Open jiabao-wang opened 1 week ago
Could NOT find Torch_npu (missing: TORCH_NPU_INCLUDE_DIRS)
please check torch_npu in your env. for more information, please ref https://lmdeploy.readthedocs.io/en/latest/get_started/ascend/get_started.html and the dockerfile in lmdeploy repo(https://github.com/InternLM/lmdeploy/blob/main/docker/Dockerfile_aarch64_ascend)
we've tested our project on 800T with kunpeng cpu. if you have 800I or intel cpu, you may need to modify some path in the dockerfile.
when i run : DEVICE=ascend python3 setup.py develop
output: CMake Error at /home/wjb/miniconda3/envs/test/lib/python3.8/site-packages/cmake/data/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:233 (message): Could NOT find Torch_npu (missing: TORCH_NPU_INCLUDE_DIRS) Call Stack (most recent call first): /home/wjb/miniconda3/envs/test/lib/python3.8/site-packages/cmake/data/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:603 (_FPHSA_FAILURE_MESSAGE) cmake/FindTorch_npu.cmake:20 (find_package_handle_standard_args) dlinfer/vendor/ascend/CMakeLists.txt:23 (find_package)
How can i do to fix it?
===================================================================================================== detail output: DEVICE=ascend python3 setup.py develop /home/wjb/miniconda3/envs/test/lib/python3.8/site-packages/setuptools/command/develop.py:40: EasyInstallDeprecationWarning: easy_install command is deprecated. !!
!! easy_install.initialize_options(self) /home/wjb/miniconda3/envs/test/lib/python3.8/site-packages/skbuild/setuptools_wrap.py:611: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated. !!
!! dist.fetch_build_eggs(setup_requires)
-- Trying 'Ninja' generator
-- Not searching for unused variables given on the command line. CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.10 will be removed from a future version of CMake.
Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.
-- The C compiler identification is GNU 9.4.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- The CXX compiler identification is GNU 9.4.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done (0.5s) -- Generating done (0.0s) -- Build files have been written to: /home/wjb/code/dlinfer/_cmake_test_compile/build
-- Trying 'Ninja' generator - success
Configuring Project Working directory: /home/wjb/code/dlinfer/_skbuild/linux-x86_64-3.8/cmake-build Command: /home/wjb/miniconda3/envs/test/lib/python3.8/site-packages/cmake/data/bin/cmake /home/wjb/code/dlinfer -G Ninja -DCMAKE_MAKE_PROGRAM:FILEPATH=/home/wjb/miniconda3/envs/test/lib/python3.8/site-packages/ninja/data/bin/ninja --no-warn-unused-cli -DCMAKE_INSTALL_PREFIX:PATH=/home/wjb/code/dlinfer/_skbuild/linux-x86_64-3.8/cmake-install -DPYTHON_VERSION_STRING:STRING=3.8.20 -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/home/wjb/miniconda3/envs/test/lib/python3.8/site-packages/skbuild/resources/cmake -DPYTHON_EXECUTABLE:PATH=/home/wjb/miniconda3/envs/test/bin/python3 -DPYTHON_INCLUDE_DIR:PATH=/home/wjb/miniconda3/envs/test/include/python3.8 -DPYTHON_LIBRARY:PATH=/home/wjb/miniconda3/envs/test/lib/libpython3.8.so -DPython_EXECUTABLE:PATH=/home/wjb/miniconda3/envs/test/bin/python3 -DPython_ROOT_DIR:PATH=/home/wjb/miniconda3/envs/test -DPython_FIND_REGISTRY:STRING=NEVER -DPython_INCLUDE_DIR:PATH=/home/wjb/miniconda3/envs/test/include/python3.8 -DPython_NumPy_INCLUDE_DIRS:PATH=/home/wjb/miniconda3/envs/test/lib/python3.8/site-packages/numpy/core/include -DPython3_EXECUTABLE:PATH=/home/wjb/miniconda3/envs/test/bin/python3 -DPython3_ROOT_DIR:PATH=/home/wjb/miniconda3/envs/test -DPython3_FIND_REGISTRY:STRING=NEVER -DPython3_INCLUDE_DIR:PATH=/home/wjb/miniconda3/envs/test/include/python3.8 -DPython3_NumPy_INCLUDE_DIRS:PATH=/home/wjb/miniconda3/envs/test/lib/python3.8/site-packages/numpy/core/include -DCMAKE_MAKE_PROGRAM:FILEPATH=/home/wjb/miniconda3/envs/test/lib/python3.8/site-packages/ninja/data/bin/ninja -DCMAKE_BUILD_TYPE=Release -DDEVICE=ascend
Not searching for unused variables given on the command line. CMake Warning at /home/wjb/miniconda3/envs/test/lib/python3.8/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:22 (message): static library kineto_LIBRARY-NOTFOUND not found. Call Stack (most recent call first): /home/wjb/miniconda3/envs/test/lib/python3.8/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:127 (append_torchlib_if_found) dlinfer/vendor/ascend/CMakeLists.txt:22 (find_package)
-- Found Torch_npu: TORCH_NPU_LIBRARY: /home/wjb/miniconda3/envs/test/lib/python3.8/site-packages/torch_npu/lib/libtorch_npu.so, TORCH_NPU_INCLUDE_DIRS: TORCH_NPU_INCLUDE_DIRS-NOTFOUND CMake Error at /home/wjb/miniconda3/envs/test/lib/python3.8/site-packages/cmake/data/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:233 (message): Could NOT find Torch_npu (missing: TORCH_NPU_INCLUDE_DIRS) Call Stack (most recent call first): /home/wjb/miniconda3/envs/test/lib/python3.8/site-packages/cmake/data/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:603 (_FPHSA_FAILURE_MESSAGE) cmake/FindTorch_npu.cmake:20 (find_package_handle_standard_args) dlinfer/vendor/ascend/CMakeLists.txt:23 (find_package)
-- Configuring incomplete, errors occurred! Traceback (most recent call last): File "/home/wjb/miniconda3/envs/test/lib/python3.8/site-packages/skbuild/setuptools_wrap.py", line 660, in setup env = cmkr.configure( File "/home/wjb/miniconda3/envs/test/lib/python3.8/site-packages/skbuild/cmaker.py", line 354, in configure raise SKBuildError(msg)
An error occurred while configuring with CMake. Command: /home/wjb/miniconda3/envs/test/lib/python3.8/site-packages/cmake/data/bin/cmake /home/wjb/code/dlinfer -G Ninja -DCMAKE_MAKE_PROGRAM:FILEPATH=/home/wjb/miniconda3/envs/test/lib/python3.8/site-packages/ninja/data/bin/ninja --no-warn-unused-cli -DCMAKE_INSTALL_PREFIX:PATH=/home/wjb/code/dlinfer/_skbuild/linux-x86_64-3.8/cmake-install -DPYTHON_VERSION_STRING:STRING=3.8.20 -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/home/wjb/miniconda3/envs/test/lib/python3.8/site-packages/skbuild/resources/cmake -DPYTHON_EXECUTABLE:PATH=/home/wjb/miniconda3/envs/test/bin/python3 -DPYTHON_INCLUDE_DIR:PATH=/home/wjb/miniconda3/envs/test/include/python3.8 -DPYTHON_LIBRARY:PATH=/home/wjb/miniconda3/envs/test/lib/libpython3.8.so -DPython_EXECUTABLE:PATH=/home/wjb/miniconda3/envs/test/bin/python3 -DPython_ROOT_DIR:PATH=/home/wjb/miniconda3/envs/test -DPython_FIND_REGISTRY:STRING=NEVER -DPython_INCLUDE_DIR:PATH=/home/wjb/miniconda3/envs/test/include/python3.8 -DPython_NumPy_INCLUDE_DIRS:PATH=/home/wjb/miniconda3/envs/test/lib/python3.8/site-packages/numpy/core/include -DPython3_EXECUTABLE:PATH=/home/wjb/miniconda3/envs/test/bin/python3 -DPython3_ROOT_DIR:PATH=/home/wjb/miniconda3/envs/test -DPython3_FIND_REGISTRY:STRING=NEVER -DPython3_INCLUDE_DIR:PATH=/home/wjb/miniconda3/envs/test/include/python3.8 -DPython3_NumPy_INCLUDE_DIRS:PATH=/home/wjb/miniconda3/envs/test/lib/python3.8/site-packages/numpy/core/include -DCMAKE_MAKE_PROGRAM:FILEPATH=/home/wjb/miniconda3/envs/test/lib/python3.8/site-packages/ninja/data/bin/ninja -DCMAKE_BUILD_TYPE=Release -DDEVICE=ascend Source directory: /home/wjb/code/dlinfer Working directory: /home/wjb/code/dlinfer/_skbuild/linux-x86_64-3.8/cmake-build Please see CMake's output for more information.