Skip to content

getting error during "python3 setup.py build_ext --inplace" #3

@pawan-tripathi8878

Description

@pawan-tripathi8878

(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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions