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

./src/ransac_voting.cpp:7:81: error: ‘AT_ASSERTM’ was not declared in this scope #12

Closed
sjtuytc opened this issue Apr 13, 2019 · 10 comments

Comments

@sjtuytc
Copy link

sjtuytc commented Apr 13, 2019

Hi, when I build ransac voting layer it happened this error. My gcc version is 5.4.0.
python setup.py build_ext --inplace
running build_ext
building 'ransac_voting' extension
gcc -pthread -B /media/data_1/home/zelin/anaconda3/envs/pvnet_new/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/media/data_1/home/zelin/anaconda3/envs/pvnet_new/lib/python3.6/site-packages/torch/lib/include -I/media/data_1/home/zelin/anaconda3/envs/pvnet_new/lib/python3.6/site-packages/torch/lib/include/TH -I/media/data_1/home/zelin/anaconda3/envs/pvnet_new/lib/python3.6/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/media/data_1/home/zelin/anaconda3/envs/pvnet_new/include/python3.6m -c ./src/ransac_voting.cpp -o build/temp.linux-x86_64-3.6/./src/ransac_voting.o -DTORCH_EXTENSION_NAME=ransac_voting -std=c++11
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
./src/ransac_voting.cpp: In function ‘at::Tensor generate_hypothesis(at::Tensor, at::Tensor, at::Tensor)’:
./src/ransac_voting.cpp:7:81: error: ‘AT_ASSERTM’ was not declared in this scope
#define CHECK_CUDA(x) AT_ASSERTM(x.type().is_cuda(), #x " must be a CUDA tensor")
^
./src/ransac_voting.cpp:9:24: note: in expansion of macro ‘CHECK_CUDA’
#define CHECK_INPUT(x) CHECK_CUDA(x); CHECK_CONTIGUOUS(x)
^
./src/ransac_voting.cpp:26:5: note: in expansion of macro ‘CHECK_INPUT’
CHECK_INPUT(direct);
^
./src/ransac_voting.cpp: In function ‘void voting_for_hypothesis(at::Tensor, at::Tensor, at::Tensor, at::Tensor, float)’:
./src/ransac_voting.cpp:7:81: error: ‘AT_ASSERTM’ was not declared in this scope
#define CHECK_CUDA(x) AT_ASSERTM(x.type().is_cuda(), #x " must be a CUDA tensor")
^
./src/ransac_voting.cpp:9:24: note: in expansion of macro ‘CHECK_CUDA’
#define CHECK_INPUT(x) CHECK_CUDA(x); CHECK_CONTIGUOUS(x)
^
./src/ransac_voting.cpp:49:5: note: in expansion of macro ‘CHECK_INPUT’
CHECK_INPUT(direct);
^
./src/ransac_voting.cpp: In function ‘at::Tensor generate_hypothesis_vanishing_point(at::Tensor, at::Tensor, at::Tensor)’:
./src/ransac_voting.cpp:7:81: error: ‘AT_ASSERTM’ was not declared in this scope
#define CHECK_CUDA(x) AT_ASSERTM(x.type().is_cuda(), #x " must be a CUDA tensor")
^
./src/ransac_voting.cpp:9:24: note: in expansion of macro ‘CHECK_CUDA’
#define CHECK_INPUT(x) CHECK_CUDA(x); CHECK_CONTIGUOUS(x)
^
./src/ransac_voting.cpp:70:5: note: in expansion of macro ‘CHECK_INPUT’
CHECK_INPUT(direct);
^
./src/ransac_voting.cpp: In function ‘void voting_for_hypothesis_vanishing_point(at::Tensor, at::Tensor, at::Tensor, at::Tensor, float)’:
./src/ransac_voting.cpp:7:81: error: ‘AT_ASSERTM’ was not declared in this scope
#define CHECK_CUDA(x) AT_ASSERTM(x.type().is_cuda(), #x " must be a CUDA tensor")
^
./src/ransac_voting.cpp:9:24: note: in expansion of macro ‘CHECK_CUDA’
#define CHECK_INPUT(x) CHECK_CUDA(x); CHECK_CONTIGUOUS(x)
^
./src/ransac_voting.cpp:93:5: note: in expansion of macro ‘CHECK_INPUT’
CHECK_INPUT(direct);
^
error: command 'gcc' failed with exit status 1

@sjtuytc
Copy link
Author

sjtuytc commented Apr 13, 2019

I tried to modify AT_ASSERTM to AT_ASSERT. But then it reports the following errors:
running build_ext
building 'ransac_voting' extension
gcc -pthread -B /media/data_1/home/zelin/anaconda3/envs/pvnet_new/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/media/data_1/home/zelin/anaconda3/envs/pvnet_new/lib/python3.6/site-packages/torch/lib/include -I/media/data_1/home/zelin/anaconda3/envs/pvnet_new/lib/python3.6/site-packages/torch/lib/include/TH -I/media/data_1/home/zelin/anaconda3/envs/pvnet_new/lib/python3.6/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/media/data_1/home/zelin/anaconda3/envs/pvnet_new/include/python3.6m -c ./src/ransac_voting.cpp -o build/temp.linux-x86_64-3.6/./src/ransac_voting.o -DTORCH_EXTENSION_NAME=ransac_voting -std=c++11
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
/usr/local/cuda/bin/nvcc -I/media/data_1/home/zelin/anaconda3/envs/pvnet_new/lib/python3.6/site-packages/torch/lib/include -I/media/data_1/home/zelin/anaconda3/envs/pvnet_new/lib/python3.6/site-packages/torch/lib/include/TH -I/media/data_1/home/zelin/anaconda3/envs/pvnet_new/lib/python3.6/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/media/data_1/home/zelin/anaconda3/envs/pvnet_new/include/python3.6m -c ./src/ransac_voting_kernel.cu -o build/temp.linux-x86_64-3.6/./src/ransac_voting_kernel.o -DTORCH_EXTENSION_NAME=ransac_voting --compiler-options '-fPIC' -std=c++11
./src/ransac_voting_kernel.cu(75): error: no instance of constructor "at::Type::Type" matches the argument list
argument types are: (int, int, int)

./src/ransac_voting_kernel.cu(75): error: no suitable user-defined conversion from "at::Type" to "at::IntList" exists

./src/ransac_voting_kernel.cu(255): error: no instance of constructor "at::Type::Type" matches the argument list
argument types are: (int, int, int)

./src/ransac_voting_kernel.cu(255): error: no suitable user-defined conversion from "at::Type" to "at::IntList" exists

4 errors detected in the compilation of "/tmp/tmpxft_0000b460_00000000-6_ransac_voting_kernel.cpp1.ii".
error: command '/usr/local/cuda/bin/nvcc' failed with exit status 1

@pengsida
Copy link
Member

what is your pytorch version

@sjtuytc
Copy link
Author

sjtuytc commented Apr 14, 2019

Thanks, I modified my pytorch version and solved this problem

@sjtuytc sjtuytc closed this as completed Apr 14, 2019
@571502680
Copy link

When I use pytorch-0.4.0 to build ransac voting layer it happened the same error. My gcc version is 5.4.0.

@pengsida
Copy link
Member

Please follow README.md.

@571502680
Copy link

Please follow README.md.

So?it doesn't work

@pengsida
Copy link
Member

  1. setup python environment
    image
  2. In requirements, we install pytorch-0.4.1 in https://github.com/zju3dv/pvnet/blob/master/requirements.txt#L7

@571502680
Copy link

setup python environment

In requirements, we install pytorch-0.4.1 in https://github.com/zju3dv/pvnet/blob/master/requirements.txt#L7
why does it have different versions?https://github.com/jkznst/pvnet/blob/master/README.md

@pengsida
Copy link
Member

I updated README.md after #10
Sorry for the inconvenience.

@571502680
Copy link

I updated README.md after #10
Sorry for the inconvenience.

Thanks for your reply!

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

3 participants