DB
DB copied to clipboard
ImportError: cannot import name 'deform_conv_cuda'
在编译完之后,运行代码的时候,报下面这个错误:
Traceback (most recent call last):
File "train.py", line 71, in
Hi @Tian14267 I faced with the same issue. You need to "build deformable convolution opertor" as mentioned in the README
build deformable convolution opertor make sure your cuda path of $CUDA_HOME is the same version as your cuda in PyTorch make sure GCC >= 4.9 you need to delete the build directory before you re-build it.
echo` $CUDA_HOME cd assets/ops/dcn/ python setup.py build_ext --inplace
@viethungtsdv Can you please guide me on how to build this?
I tried this
python setup.py build_ext --inplace
but I am getting error
It will be great if you can send me steps to build it from scratch?
@Tian14267 @MhLiao
@viethungtsdv Can you please guide me on how to build this? I tried this
python setup.py build_ext --inplace
but I am getting error It will be great if you can send me steps to build it from scratch? @Tian14267 @MhLiao
@Akshay-Ijantkar Did you resolve this? Actually I'm facing this problem. could you tell me what to do from scratch? It created a build folder but I get this at the end so I'm not sure whether everything was implemented perfectly
C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA\v10.1\bin\nvcc -c src/deform_conv_cuda_kernel.cu -o build\temp.win-amd64-3.8\Release\src/deform_conv_cuda_kernel.obj -IC:\Users\HP\anaconda3\envs\DBresearch\lib\site-packages\torch\include -IC:\Users\HP\anaconda3\envs\DBresearch\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\HP\anaconda3\envs\DBresearch\lib\site-packages\torch\include\TH -IC:\Users\HP\anaconda3\envs\DBresearch\lib\site-packages\torch\include\THC "-IC:/Program Files/NVIDIA GPU Computing Toolkit/CUDA\v10.1\include" -IC:\Users\HP\anaconda3\envs\DBresearch\include -IC:\Users\HP\anaconda3\envs\DBresearch\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" -Xcompiler /EHsc -Xcompiler /wd4819 -Xcompiler /MD -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=deform_conv_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_50,code=sm_50 error: command 'C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA\v10.1\bin\nvcc' failed: No such file or directory
Hi @Tian14267 I faced with the same issue. You need to "build deformable convolution opertor" as mentioned in the README
build deformable convolution opertor make sure your cuda path of $CUDA_HOME is the same version as your cuda in PyTorch make sure GCC >= 4.9 you need to delete the build directory before you re-build it.
echo` $CUDA_HOME cd assets/ops/dcn/ python setup.py build_ext --inplace q请问eindows下可以吗
@viethungtsdv Can you please guide me on how to build this? I tried this
python setup.py build_ext --inplace
but I am getting error It will be great if you can send me steps to build it from scratch? @Tian14267 @MhLiao
i got error too, how did you soulve it?
I resolved this problem by replacing AT_CHECK calls by TORCH_CHECK call at both deform_conv_cuda.cpp and deform_pool_cuda.cpp referenced from here https://discuss.pytorch.org/t/my-pytorch-model-stop-logging-without-error/77686/7