-
Notifications
You must be signed in to change notification settings - Fork 46
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
getting error during "python3 setup.py build_ext --inplace" #3
Comments
At this file op_pool.cpp on location models/py_utils/_cpools/src/ replace line 44,45 by replace line no 57,58 ### by auto gt_mask = at::zeros( {batch, channel, width} ,torch::CUDA(at::kByte)); If error occure then perform changes in bottom_pool.cpp,left_pool.cpp,right_pool.cpp files |
I am getting a similar error during "python setup.py build_ext --inplace" (DeepRuleVenv) ddecatur@server:/local/ddecatur/DeepRule/models/py_utils/_cpools$ python setup.py build_ext --inplace |
Please refer to this link |
To update the cpp file for the new pytorch version. |
Have the same problem. After previous fixes still don't working
https://stackoverflow.com/questions/54492378/problem-with-building-pytorch-from-source-on-linux |
(my_env) user@userM-I-85:~/Downloads/DeepRule-master/models/py_utils/_cpools$ python3 setup.py build_ext --inplace
running build_ext
building 'top_pool' extension
gcc -pthread -B /home/user/anaconda3/envs/my_env/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/user/anaconda3/envs/my_env/lib/python3.6/site-packages/torch/include -I/home/user/anaconda3/envs/my_env/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/user/anaconda3/envs/my_env/lib/python3.6/site-packages/torch/include/TH -I/home/user/anaconda3/envs/my_env/lib/python3.6/site-packages/torch/include/THC -I/home/user/anaconda3/envs/my_env/include/python3.6m -c src/top_pool.cpp -o build/temp.linux-x86_64-3.6/src/top_pool.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=top_pool -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from src/top_pool.cpp:1:0:
/home/user/anaconda3/envs/my_env/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/torch.h:7:2: warning: #warning "Including torch/torch.h for C++ extensions is deprecated. Please include torch/extension.h" [-Wcpp]
#warning
^~~~~~~
src/top_pool.cpp: In function ‘std::vectorat::Tensor top_pool_backward(at::Tensor, at::Tensor)’:
src/top_pool.cpp:44:41: error: could not convert ‘at::CUDA((c10::ScalarType)6)’ from ‘at::DeprecatedTypeProperties’ to ‘c10::IntArrayRef {aka c10::ArrayRef}’
auto max_val = at::zeros(torch::CUDA(at::kFloat), {batch, channel, width});
~~~~~~~~~~~^~~~~~~~~~~~
src/top_pool.cpp:45:41: error: could not convert ‘at::CUDA((c10::ScalarType)4)’ from ‘at::DeprecatedTypeProperties’ to ‘c10::IntArrayRef {aka c10::ArrayRef}’
auto max_ind = at::zeros(torch::CUDA(at::kLong), {batch, channel, width});
~~~~~~~~~~~^~~~~~~~~~~
src/top_pool.cpp:57:44: error: could not convert ‘at::CUDA((c10::ScalarType)0)’ from ‘at::DeprecatedTypeProperties’ to ‘c10::IntArrayRef {aka c10::ArrayRef}’
auto gt_mask = at::zeros(torch::CUDA(at::kByte), {batch, channel, width});
~~~~~~~~~~~^~~~~~~~~~~
src/top_pool.cpp:58:44: error: could not convert ‘at::CUDA((c10::ScalarType)6)’ from ‘at::DeprecatedTypeProperties’ to ‘c10::IntArrayRef {aka c10::ArrayRef}’
auto max_temp = at::zeros(torch::CUDA(at::kFloat), {batch, channel, width});
~~~~~~~~~~~^~~~~~~~~~~~
error: command 'gcc' failed with exit status 1
The text was updated successfully, but these errors were encountered: