Skip to content

[Build] [CANN] Failed to build CANN provider with training and Python bindings #20697

Open
@shakhat

Description

Describe the issue

The build fails when the library is built with CANN provider, training and Python bindings.

Urgency

No response

Target platform

aarch64+npu

Build script

./build.sh --parallel 40 --use_cann --enable_training --enable_pybind --build_wheel

Error / output

In file included from /home/ilya/work/onnxruntime/orttraining/orttraining/core/framework/torch/torch_proxy.h:10,                                                                     
                 from /home/ilya/work/onnxruntime/orttraining/orttraining/training_ops/cpu/torch/torch_custom_function_kernel_base.h:16,                                             
                 from /home/ilya/work/onnxruntime/onnxruntime/core/providers/shared_library/provider_bridge_provider.cc:57:                                                          
/home/ilya/work/onnxruntime/orttraining/orttraining/core/framework/torch/python_common.h:16:10: fatal error: Python.h: No such file or directory
   16 | #include <Python.h>
      |          ^~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/onnxruntime_providers_cann.dir/build.make:426: CMakeFiles/onnxruntime_providers_cann.dir/home/ilya/work/onnxruntime/onnxruntime/core/providers/shared_library/provider_bridge_provider.cc.o] Error 1

Visual Studio Version

No response

GCC / Compiler Version

No response

Metadata

Assignees

No one assigned

    Labels

    buildbuild issues; typically submitted using templateep:CANNissues related to CANN EOstaleissues that have not been addressed in a while; categorized by a bot

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions