Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dcn编译失败(Compile dcn dailed) #154

Closed
prz30 opened this issue Apr 24, 2020 · 4 comments
Closed

dcn编译失败(Compile dcn dailed) #154

prz30 opened this issue Apr 24, 2020 · 4 comments

Comments

@prz30
Copy link

prz30 commented Apr 24, 2020

我在编译dcn的时候遇到了错误,显示deform_conv_cuda.o编译失败,请问有人遇到相同的问题吗?
when i compile dcn, i meet a failed which tell the deform_conv_cuda.o is fail to compile
running build_ext
building 'deform_conv_cuda' extension
Emitting ninja build file /workspace/DB-master/assets/ops/dcn/build/temp.linux-x86_64-3.6/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/1] c++ -MMD -MF /workspace/DB-master/assets/ops/dcn/build/temp.linux-x86_64-3.6/src/deform_conv_cuda.o.d -pthread -B /home/work/.conda/envs/DB/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/work/.conda/envs/DB/lib/python3.6/site-packages/torch/include -I/home/work/.conda/envs/DB/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/work/.conda/envs/DB/lib/python3.6/site-packages/torch/include/TH -I/home/work/.conda/envs/DB/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/work/.conda/envs/DB/include/python3.6m -c -c /workspace/DB-master/assets/ops/dcn/src/deform_conv_cuda.cpp -o /workspace/DB-master/assets/ops/dcn/build/temp.linux-x86_64-3.6/src/deform_conv_cuda.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=deform_conv_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
FAILED: /workspace/DB-master/assets/ops/dcn/build/temp.linux-x86_64-3.6/src/deform_conv_cuda.o
/workspace/DB-master/assets/ops/dcn/src/deform_conv_cuda.cpp: In function 'int deform_conv_forward_cuda(at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, int, int, int, int, int, int, int, int, int, int, int)':
/workspace/DB-master/assets/ops/dcn/src/deform_conv_cuda.cpp:192:3: error: 'AT_CHECK' was not declared in this scope
AT_CHECK((offset.size(0) == batchSize), "invalid batch size of offset");
^~~~~~~~

@longnanxi
Copy link

你好,请问这个问题解决了吗?

@prz30
Copy link
Author

prz30 commented Apr 28, 2020 via email

@MhLiao MhLiao closed this as completed Aug 5, 2020
@allenmatt98
Copy link

Solved, this problem is because the version of C++ after pytorch1.3 has replaced AT_CHECK with TORCH_CHECK in the version of pytorch1.3 and then replaced the corresponding function in deform_conv_cuda.cpp and deform_pool_cuda.cpp.

Hey I'm facing a similar issue when I run python setup.py build_ext --inplace in dcn. Could you explain in depth how to fix this issue

@prz30
Copy link
Author

prz30 commented Nov 16, 2020

Solved, this problem is because the version of C++ after pytorch1.3 has replaced AT_CHECK with TORCH_CHECK in the version of pytorch1.3 and then replaced the corresponding function in deform_conv_cuda.cpp and deform_pool_cuda.cpp.

Hey I'm facing a similar issue when I run python setup.py build_ext --inplace in dcn. Could you explain in depth how to fix this issue

Hi, if the vesion of pytorch higher than 1.3, you need replace "AT_CHECK" with "TORCH_CHECK" in DB/assets/ops/dcn/src/deform_conv_cuda.cpp and DB/assets/ops/dcn/src/deform_pool_cuda.cpp. After that, you can successfully run “python setup.py build_ext --inplace”

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants