I'm using docker image pulled from ascendhub:pytorch-modelzoo:23.0.RC2-1.8.1, the environment information is:
python3.7.5, arm64,CANN: 6.3.RC2,torch: 1.8.1
compilation terminated.
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "/usr/local/python3.7.5/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1673, in _run_ninja_build
env=env)
File "/usr/local/python3.7.5/lib/python3.7/subprocess.py", line 512, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ninja', '-v', '-j', '8']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "setup.py", line 479, in
zip_safe=False)
File "/usr/local/python3.7.5/lib/python3.7/site-packages/setuptools/init.py", line 155, in setup
return distutils.core.setup(**attrs)
File "/usr/local/python3.7.5/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 148, in setup
return run_commands(dist)
File "/usr/local/python3.7.5/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
dist.run_commands()
File "/usr/local/python3.7.5/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
self.run_command(cmd)
File "/usr/local/python3.7.5/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/usr/local/python3.7.5/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 79, in run
_build_ext.run(self)
File "/usr/local/python3.7.5/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/usr/local/python3.7.5/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 708, in build_extensions
build_ext.build_extensions(self)
File "/usr/local/python3.7.5/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "/usr/local/python3.7.5/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "/usr/local/python3.7.5/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 202, in build_extension
_build_ext.build_extension(self, ext)
File "/usr/local/python3.7.5/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 534, in build_extension
depends=ext.depends)
File "/usr/local/python3.7.5/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 538, in unix_wrap_ninja_compile
with_cuda=with_cuda)
File "/usr/local/python3.7.5/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1359, in _write_ninja_file_and_compile_objects
error_prefix='Error compiling objects for extension')
File "/usr/local/python3.7.5/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1683, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension
Prerequisite
Environment
I'm using docker image pulled from ascendhub:pytorch-modelzoo:23.0.RC2-1.8.1, the environment information is: python3.7.5, arm64,CANN: 6.3.RC2,torch: 1.8.1
Reproduces the problem - code sample
The code in
envnpu.sh
is:!/bin/bash
CANN_INSTALL_PATH_CONF='/etc/Ascend/ascend_cann_install.info'
if [ -f $CANN_INSTALL_PATH_CONF ]; then CANN_INSTALL_PATH=$(cat $CANN_INSTALL_PATH_CONF | grep Install_Path | cut -d "=" -f 2) else CANN_INSTALL_PATH="/usr/local/Ascend" fi
if [ -d ${CANN_INSTALL_PATH}/ascend-toolkit/latest ]; then source ${CANN_INSTALL_PATH}/ascend-toolkit/set_env.sh echo ${CANN_INSTALL_PATH} else source ${CANN_INSTALL_PATH}/nnae/set_env.sh fi msnpureport -g error -d 0 msnpureport -g error -d 1 msnpureport -g error -d 2 msnpureport -g error -d 3 msnpureport -g error -d 4 msnpureport -g error -d 5 msnpureport -g error -d 6 msnpureport -g error -d 7
export ASCEND_SLOG_PRINT_TO_STDOUT=0 export ASCEND_GLOBAL_LOG_LEVEL=3 export ASCEND_GLOBAL_EVENT_ENABLE=0 export TASK_QUEUE_ENABLE=1 export PTCOPY_ENABLE=1 export COMBINED_ENABLE=1 export DYNAMIC_OP='ADD#MUL' export HCCL_WHITELIST_DISABLE=1 export BMMV2_ENABLE=1 export TRI_COMBINED_ENABLE=1
export PYTHONPATH=${CANN_INSTALL_PATH}/ascend-toolkit/latest/tools/ms_fmk_transplt/torch_npu_bridge:$PYTHONPATH
Reproduces the problem - command or script
Step1:
source env_npu.sh
Step2:
MMCV_WITH_OPS=1 MAX_JOBS=8 FORCE_NPU=1 python setup.py build_ext
Reproduces the problem - error message
HwHiAiUser@5fed7283bf50:~/mmcv$ MMCV_WITH_OPS=1 MAX_JOBS=8 FORCE_NPU=1 python setup.py build_ext Compiling mmcv._ext only with CPU and NPU running build_ext Emitting ninja build file /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/build.ninja... Compiling objects... Using envvar MAX_JOBS (8) as the number of workers... [1/37] c++ -MMD -MF /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/fused_bias_leakyrelu_npu.o.d -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DMMCV_WITH_NPU -DMMCV_WITH_XLA -I/home/HwHiAiUser/mmcv/mmcv/ops/csrc/common -I/home/HwHiAiUser/mmcv/mmcv/ops/csrc/common/npu -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch_npu/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/TH -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/THC -I/usr/local/python3.7.5/include/python3.7m -c -c /home/HwHiAiUser/mmcv/mmcv/ops/csrc/pytorch/npu/fused_bias_leakyrelu_npu.cpp -o /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/fused_bias_leakyrelu_npu.o -std=c++14 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=1 FAILED: /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/fused_bias_leakyrelu_npu.o c++ -MMD -MF /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/fused_bias_leakyrelu_npu.o.d -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DMMCV_WITH_NPU -DMMCV_WITH_XLA -I/home/HwHiAiUser/mmcv/mmcv/ops/csrc/common -I/home/HwHiAiUser/mmcv/mmcv/ops/csrc/common/npu -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch_npu/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/TH -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/THC -I/usr/local/python3.7.5/include/python3.7m -c -c /home/HwHiAiUser/mmcv/mmcv/ops/csrc/pytorch/npu/fused_bias_leakyrelu_npu.cpp -o /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/fused_bias_leakyrelu_npu.o -std=c++14 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=1 In file included from /home/HwHiAiUser/mmcv/mmcv/ops/csrc/pytorch/npu/fused_bias_leakyrelu_npu.cpp:1:0: /home/HwHiAiUser/mmcv/mmcv/ops/csrc/common/pytorch_npu_helper.hpp:21:10: fatal error: torch_npu/csrc/aten/CustomFunctions.h: No such file or directory
include <torch_npu/csrc/aten/CustomFunctions.h>
compilation terminated. [2/37] c++ -MMD -MF /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/gather_points_npu.o.d -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DMMCV_WITH_NPU -DMMCV_WITH_XLA -I/home/HwHiAiUser/mmcv/mmcv/ops/csrc/common -I/home/HwHiAiUser/mmcv/mmcv/ops/csrc/common/npu -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch_npu/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/TH -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/THC -I/usr/local/python3.7.5/include/python3.7m -c -c /home/HwHiAiUser/mmcv/mmcv/ops/csrc/pytorch/npu/gather_points_npu.cpp -o /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/gather_points_npu.o -std=c++14 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=1 FAILED: /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/gather_points_npu.o c++ -MMD -MF /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/gather_points_npu.o.d -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DMMCV_WITH_NPU -DMMCV_WITH_XLA -I/home/HwHiAiUser/mmcv/mmcv/ops/csrc/common -I/home/HwHiAiUser/mmcv/mmcv/ops/csrc/common/npu -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch_npu/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/TH -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/THC -I/usr/local/python3.7.5/include/python3.7m -c -c /home/HwHiAiUser/mmcv/mmcv/ops/csrc/pytorch/npu/gather_points_npu.cpp -o /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/gather_points_npu.o -std=c++14 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=1 In file included from /home/HwHiAiUser/mmcv/mmcv/ops/csrc/pytorch/npu/gather_points_npu.cpp:1:0: /home/HwHiAiUser/mmcv/mmcv/ops/csrc/common/pytorch_npu_helper.hpp:21:10: fatal error: torch_npu/csrc/aten/CustomFunctions.h: No such file or directory
include <torch_npu/csrc/aten/CustomFunctions.h>
compilation terminated. [3/37] c++ -MMD -MF /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/bbox_overlaps_npu.o.d -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DMMCV_WITH_NPU -DMMCV_WITH_XLA -I/home/HwHiAiUser/mmcv/mmcv/ops/csrc/common -I/home/HwHiAiUser/mmcv/mmcv/ops/csrc/common/npu -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch_npu/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/TH -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/THC -I/usr/local/python3.7.5/include/python3.7m -c -c /home/HwHiAiUser/mmcv/mmcv/ops/csrc/pytorch/npu/bbox_overlaps_npu.cpp -o /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/bbox_overlaps_npu.o -std=c++14 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=1 FAILED: /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/bbox_overlaps_npu.o c++ -MMD -MF /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/bbox_overlaps_npu.o.d -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DMMCV_WITH_NPU -DMMCV_WITH_XLA -I/home/HwHiAiUser/mmcv/mmcv/ops/csrc/common -I/home/HwHiAiUser/mmcv/mmcv/ops/csrc/common/npu -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch_npu/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/TH -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/THC -I/usr/local/python3.7.5/include/python3.7m -c -c /home/HwHiAiUser/mmcv/mmcv/ops/csrc/pytorch/npu/bbox_overlaps_npu.cpp -o /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/bbox_overlaps_npu.o -std=c++14 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=1 In file included from /home/HwHiAiUser/mmcv/mmcv/ops/csrc/pytorch/npu/bbox_overlaps_npu.cpp:1:0: /home/HwHiAiUser/mmcv/mmcv/ops/csrc/common/pytorch_npu_helper.hpp:21:10: fatal error: torch_npu/csrc/aten/CustomFunctions.h: No such file or directory
include <torch_npu/csrc/aten/CustomFunctions.h>
compilation terminated. [4/37] c++ -MMD -MF /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/focal_loss_npu.o.d -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DMMCV_WITH_NPU -DMMCV_WITH_XLA -I/home/HwHiAiUser/mmcv/mmcv/ops/csrc/common -I/home/HwHiAiUser/mmcv/mmcv/ops/csrc/common/npu -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch_npu/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/TH -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/THC -I/usr/local/python3.7.5/include/python3.7m -c -c /home/HwHiAiUser/mmcv/mmcv/ops/csrc/pytorch/npu/focal_loss_npu.cpp -o /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/focal_loss_npu.o -std=c++14 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=1 FAILED: /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/focal_loss_npu.o c++ -MMD -MF /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/focal_loss_npu.o.d -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DMMCV_WITH_NPU -DMMCV_WITH_XLA -I/home/HwHiAiUser/mmcv/mmcv/ops/csrc/common -I/home/HwHiAiUser/mmcv/mmcv/ops/csrc/common/npu -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch_npu/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/TH -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/THC -I/usr/local/python3.7.5/include/python3.7m -c -c /home/HwHiAiUser/mmcv/mmcv/ops/csrc/pytorch/npu/focal_loss_npu.cpp -o /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/focal_loss_npu.o -std=c++14 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=1 In file included from /home/HwHiAiUser/mmcv/mmcv/ops/csrc/pytorch/npu/focal_loss_npu.cpp:1:0: /home/HwHiAiUser/mmcv/mmcv/ops/csrc/common/pytorch_npu_helper.hpp:21:10: fatal error: torch_npu/csrc/aten/CustomFunctions.h: No such file or directory
include <torch_npu/csrc/aten/CustomFunctions.h>
compilation terminated. [5/37] c++ -MMD -MF /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/active_rotated_filter_npu.o.d -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DMMCV_WITH_NPU -DMMCV_WITH_XLA -I/home/HwHiAiUser/mmcv/mmcv/ops/csrc/common -I/home/HwHiAiUser/mmcv/mmcv/ops/csrc/common/npu -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch_npu/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/TH -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/THC -I/usr/local/python3.7.5/include/python3.7m -c -c /home/HwHiAiUser/mmcv/mmcv/ops/csrc/pytorch/npu/active_rotated_filter_npu.cpp -o /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/active_rotated_filter_npu.o -std=c++14 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=1 FAILED: /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/active_rotated_filter_npu.o c++ -MMD -MF /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/active_rotated_filter_npu.o.d -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DMMCV_WITH_NPU -DMMCV_WITH_XLA -I/home/HwHiAiUser/mmcv/mmcv/ops/csrc/common -I/home/HwHiAiUser/mmcv/mmcv/ops/csrc/common/npu -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch_npu/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/TH -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/THC -I/usr/local/python3.7.5/include/python3.7m -c -c /home/HwHiAiUser/mmcv/mmcv/ops/csrc/pytorch/npu/active_rotated_filter_npu.cpp -o /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/active_rotated_filter_npu.o -std=c++14 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=1 In file included from /home/HwHiAiUser/mmcv/mmcv/ops/csrc/pytorch/npu/active_rotated_filter_npu.cpp:1:0: /home/HwHiAiUser/mmcv/mmcv/ops/csrc/common/pytorch_npu_helper.hpp:21:10: fatal error: torch_npu/csrc/aten/CustomFunctions.h: No such file or directory
include <torch_npu/csrc/aten/CustomFunctions.h>
compilation terminated. [6/37] c++ -MMD -MF /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/deform_roi_pool.o.d -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DMMCV_WITH_NPU -DMMCV_WITH_XLA -I/home/HwHiAiUser/mmcv/mmcv/ops/csrc/common -I/home/HwHiAiUser/mmcv/mmcv/ops/csrc/common/npu -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch_npu/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/TH -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/THC -I/usr/local/python3.7.5/include/python3.7m -c -c /home/HwHiAiUser/mmcv/mmcv/ops/csrc/pytorch/npu/deform_roi_pool.cpp -o /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/deform_roi_pool.o -std=c++14 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=1 FAILED: /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/deform_roi_pool.o c++ -MMD -MF /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/deform_roi_pool.o.d -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DMMCV_WITH_NPU -DMMCV_WITH_XLA -I/home/HwHiAiUser/mmcv/mmcv/ops/csrc/common -I/home/HwHiAiUser/mmcv/mmcv/ops/csrc/common/npu -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch_npu/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/TH -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/THC -I/usr/local/python3.7.5/include/python3.7m -c -c /home/HwHiAiUser/mmcv/mmcv/ops/csrc/pytorch/npu/deform_roi_pool.cpp -o /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/deform_roi_pool.o -std=c++14 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=1 In file included from /home/HwHiAiUser/mmcv/mmcv/ops/csrc/pytorch/npu/deform_roi_pool.cpp:1:0: /home/HwHiAiUser/mmcv/mmcv/ops/csrc/common/pytorch_npu_helper.hpp:21:10: fatal error: torch_npu/csrc/aten/CustomFunctions.h: No such file or directory
include <torch_npu/csrc/aten/CustomFunctions.h>
compilation terminated. [7/37] c++ -MMD -MF /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/box_iou_rotated_npu.o.d -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DMMCV_WITH_NPU -DMMCV_WITH_XLA -I/home/HwHiAiUser/mmcv/mmcv/ops/csrc/common -I/home/HwHiAiUser/mmcv/mmcv/ops/csrc/common/npu -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch_npu/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/TH -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/THC -I/usr/local/python3.7.5/include/python3.7m -c -c /home/HwHiAiUser/mmcv/mmcv/ops/csrc/pytorch/npu/box_iou_rotated_npu.cpp -o /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/box_iou_rotated_npu.o -std=c++14 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=1 FAILED: /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/box_iou_rotated_npu.o c++ -MMD -MF /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/box_iou_rotated_npu.o.d -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DMMCV_WITH_NPU -DMMCV_WITH_XLA -I/home/HwHiAiUser/mmcv/mmcv/ops/csrc/common -I/home/HwHiAiUser/mmcv/mmcv/ops/csrc/common/npu -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch_npu/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/TH -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/THC -I/usr/local/python3.7.5/include/python3.7m -c -c /home/HwHiAiUser/mmcv/mmcv/ops/csrc/pytorch/npu/box_iou_rotated_npu.cpp -o /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/box_iou_rotated_npu.o -std=c++14 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=1 In file included from /home/HwHiAiUser/mmcv/mmcv/ops/csrc/pytorch/npu/box_iou_rotated_npu.cpp:1:0: /home/HwHiAiUser/mmcv/mmcv/ops/csrc/common/pytorch_npu_helper.hpp:21:10: fatal error: torch_npu/csrc/aten/CustomFunctions.h: No such file or directory
include <torch_npu/csrc/aten/CustomFunctions.h>
compilation terminated. [8/37] c++ -MMD -MF /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/group_points_npu.o.d -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DMMCV_WITH_NPU -DMMCV_WITH_XLA -I/home/HwHiAiUser/mmcv/mmcv/ops/csrc/common -I/home/HwHiAiUser/mmcv/mmcv/ops/csrc/common/npu -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch_npu/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/TH -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/THC -I/usr/local/python3.7.5/include/python3.7m -c -c /home/HwHiAiUser/mmcv/mmcv/ops/csrc/pytorch/npu/group_points_npu.cpp -o /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/group_points_npu.o -std=c++14 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=1 FAILED: /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/group_points_npu.o c++ -MMD -MF /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/group_points_npu.o.d -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DMMCV_WITH_NPU -DMMCV_WITH_XLA -I/home/HwHiAiUser/mmcv/mmcv/ops/csrc/common -I/home/HwHiAiUser/mmcv/mmcv/ops/csrc/common/npu -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch_npu/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/TH -I/usr/local/python3.7.5/lib/python3.7/site-packages/torch/include/THC -I/usr/local/python3.7.5/include/python3.7m -c -c /home/HwHiAiUser/mmcv/mmcv/ops/csrc/pytorch/npu/group_points_npu.cpp -o /home/HwHiAiUser/mmcv/build/temp.linux-aarch64-3.7/mmcv/ops/csrc/pytorch/npu/group_points_npu.o -std=c++14 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=1 In file included from /home/HwHiAiUser/mmcv/mmcv/ops/csrc/pytorch/npu/group_points_npu.cpp:1:0: /home/HwHiAiUser/mmcv/mmcv/ops/csrc/common/pytorch_npu_helper.hpp:21:10: fatal error: torch_npu/csrc/aten/CustomFunctions.h: No such file or directory
include <torch_npu/csrc/aten/CustomFunctions.h>
compilation terminated. ninja: build stopped: subcommand failed. Traceback (most recent call last): File "/usr/local/python3.7.5/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1673, in _run_ninja_build env=env) File "/usr/local/python3.7.5/lib/python3.7/subprocess.py", line 512, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['ninja', '-v', '-j', '8']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "setup.py", line 479, in
zip_safe=False)
File "/usr/local/python3.7.5/lib/python3.7/site-packages/setuptools/init.py", line 155, in setup
return distutils.core.setup(**attrs)
File "/usr/local/python3.7.5/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 148, in setup
return run_commands(dist)
File "/usr/local/python3.7.5/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
dist.run_commands()
File "/usr/local/python3.7.5/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
self.run_command(cmd)
File "/usr/local/python3.7.5/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/usr/local/python3.7.5/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 79, in run
_build_ext.run(self)
File "/usr/local/python3.7.5/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/usr/local/python3.7.5/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 708, in build_extensions
build_ext.build_extensions(self)
File "/usr/local/python3.7.5/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "/usr/local/python3.7.5/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "/usr/local/python3.7.5/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 202, in build_extension
_build_ext.build_extension(self, ext)
File "/usr/local/python3.7.5/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 534, in build_extension
depends=ext.depends)
File "/usr/local/python3.7.5/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 538, in unix_wrap_ninja_compile
with_cuda=with_cuda)
File "/usr/local/python3.7.5/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1359, in _write_ninja_file_and_compile_objects
error_prefix='Error compiling objects for extension')
File "/usr/local/python3.7.5/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1683, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension
Additional information
No response