【Command ‘[‘ninja‘, ‘-v‘]‘ returned non-zero exit status 1.CUDA11编译Precise ROI pooling出错】

Pytracking编译Precise ROI pooling出错 CUDA11.1 RTX3090,pytorch1.7.1,ubuntu20.04


直接摆方法,在终端中输入

export CUDA_HOME="/usr/local/cuda-11.1"

后运行run_training.py
换了pytorch,换了cuda也没解决,后面在别人的博客的评论看到是因为环境变量的问题,实测有用[Object Tracking][环境配置流程][Ubuntu16.04]ATOM【CVPR2019】pytracking
[Object Tracking][环境配置流程][Ubuntu16.04]ATOM【CVPR2019】pytracking
编译报错如下

// An highlighted block
[1/3] :/usr/local/cuda-11.1:/usr/local/cuda-11.1:/usr/local/cuda-11.1/bin/nvcc  -DTORCH_EXTENSION_NAME=_prroi_pooling -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /home/wuyuanlong/下载/Enter/envs/pytracking/lib/python3.7/site-packages/torch/include -isystem /home/wuyuanlong/下载/Enter/envs/pytracking/lib/python3.7/site-packages/torch/include/h/csrc/api/include -isystem /home/wuyuanlong/下载/Enter/envs/pytracking/lib/python3.7/site-packages/torch/include/TH -isystem /home/wuyuanlong/下载/Enter/envs/pytracking/lib/python3.7/site-packages/torch/include/THC -isyst/usr/local/cuda-11.1:/usr/local/cuda-11.1:/usr/local/cuda-11.1/include -isystem /home/wuyuanlong/下载/Enter/envs/pytracking/include/python3.7m -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 --compiler-options '-fPIC' -std=c++14 -c '/home/wuyuanlong/下载/recurrent/pytracking-master/ltr/external/PreciseRoIPooling/pytorch/prroi_pool/src/prroi_pooling_gpu_impl.cu' -o prroi_pooling_gpu_impl.cuda.o 
FAILED: prroi_pooling_gpu_impl.cuda.o 
:/usr/local/cuda-11.1:/usr/local/cuda-11.1:/usr/local/cuda-11.1/bin/nvcc  -DTORCH_EXTENSION_NAME=_prroi_pooling -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /home/wuyuanlong/下载/Enter/envs/pytracking/lib/python3.7/site-packages/torch/include -isystem /home/wuyuanlong/下载/Enter/envs/pytracking/lib/python3.7/site-packages/torch/include/torch//api/include -isystem /home/wuyuanlong/下载/Enter/envs/pytracking/lib/python3.7/site-packages/torch/include/TH -isystem /home/wuyuanlong/下载/Enter/envs/pytracking/lib/python3.7/site-packages/torch/include/THC -isystem :/uocal/cuda-11.1:/usr/local/cuda-11.1:/usr/local/cuda-11.1/include -isystem /home/wuyuanlong/下载/Enter/envs/pytracking/include/python3.7m -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS_-D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 --compiler-options '-fPIC' -std=c++14 -c '/home/wuyuanlong/下载/recurrent/pytracking-master/ltr/external/PreciseRoIPooling/pytorch/prroi_pool/src/prroi_pooling_gpu_impl.cu' -o prroi_pooling_gpu_impl.cuda.o 
/bin/sh: 1: :/usr/local/cuda-11.1:/usr/local/cuda-11.1:/usr/local/cuda-11.1/bin/nvcc: not found
[2/3] c++ -MMD -MF prroi_pooling_gpu.o.d -DTORCH_EXTENSION_NAME=_prroi_pooling -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /home/wuyuanlong/下载/Enter/envs/pytracking/lib/python3.7/site-packages/torch/include -isystem /home/wuyuanlong/下载/Enter/envs/pytracking/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -isystem /home/wnlong/下载/Enter/envs/pytracking/lib/python3.7/site-packages/torch/include/TH -isystem /home/wuyuanlong/下载/Enter/envs/pytracking/lib/python3.7/site-packages/torch/include/THC -isystem :/usr/local/cuda-11.1:/usr/local/cud.1:/usr/local/cuda-11.1/include -isystem /home/wuyuanlong/下载/Enter/envs/pytracking/include/python3.7m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -c '/home/wuyuanlong/下载/recurrent/pytracking-master/ltr/external/Preciseooling/pytorch/prroi_pool/src/prroi_pooling_gpu.c' -o prroi_pooling_gpu.o 
FAILED: prroi_pooling_gpu.o 
c++ -MMD -MF prroi_pooling_gpu.o.d -DTORCH_EXTENSION_NAME=_prroi_pooling -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /home/wuyuanlong/下载/Enter/envs/pytracking/lib/python3.7/site-packages/torch/include -isystem /home/wuyuanlong/下载/Enter/envs/pytracking/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -isystem /home/wuyuanl下载/Enter/envs/pytracking/lib/python3.7/site-packages/torch/include/TH -isystem /home/wuyuanlong/下载/Enter/envs/pytracking/lib/python3.7/site-packages/torch/include/THC -isystem :/usr/local/cuda-11.1:/usr/local/cuda-11.1r/local/cuda-11.1/include -isystem /home/wuyuanlong/下载/Enter/envs/pytracking/include/python3.7m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -c '/home/wuyuanlong/下载/recurrent/pytracking-master/ltr/external/PreciseRoIPoo/pytorch/prroi_pool/src/prroi_pooling_gpu.c' -o prroi_pooling_gpu.o 
In file included from /home/wuyuanlong/下载/recurrent/pytracking-master/ltr/external/PreciseRoIPooling/pytorch/prroi_pool/src/prroi_pooling_gpu.c:15:0:
/home/wuyuanlong/下载/Enter/envs/pytracking/lib/python3.7/site-packages/torch/include/ATen/cuda/CUDAContext.h:5:10: fatal error: cuda_runtime_api.h: 没有那个文件或目录
 #include <cuda_runtime_api.h>
          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.
Training crashed at epoch 1
Traceback for the error!
Traceback (most recent call last):
  File "/home/wuyuanlong/下载/Enter/envs/pytracking/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1723, in _run_ninja_build
    env=env)
  File "/home/wuyuanlong/下载/Enter/envs/pytracking/lib/python3.7/subprocess.py", line 512, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

总结:超长报错要仔细查看每一个报错细节,找到真正的问题
其他参考过的文章:
3090(30系显卡)编译prpooling出错的解决办法
trdimp代码配置(pytracking,ubuntu18.04 + cuda11.3)
pytracking系列跟踪算法的配置(LWL, KYS, PrDiMP, DiMP and ATOM Trackers)(Ubuntu版本)

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值