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

Error while compiling the code of the resampler #8

Open
Sid2697 opened this issue Aug 3, 2020 · 9 comments
Open

Error while compiling the code of the resampler #8

Sid2697 opened this issue Aug 3, 2020 · 9 comments

Comments

@Sid2697
Copy link

Sid2697 commented Aug 3, 2020

Hey! Thank you for sharing the code.
However, when I was trying to compile the code for resampler, I faced the following error. Can you please look into it? Thanks!

(ocr) siddhant.b@gnode55:~/CAR/adaptive_gridsampler$ CUDAHOSTCXX=/usr/bin/gcc-5 python3 setup.py build_ext --inplace
running build_ext
building 'adaptive_gridsampler_cuda' extension
creating build
creating build/temp.linux-x86_64-3.7
gcc -pthread -B /home/siddhant.b/miniconda3/envs/ocr/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/siddha
nt.b/miniconda3/envs/ocr/lib/python3.7/site-packages/torch/include -I/home/siddhant.b/miniconda3/envs/ocr/lib/python3.7/site-packages/torch/include/torch/csrc/api/include
 -I/home/siddhant.b/miniconda3/envs/ocr/lib/python3.7/site-packages/torch/include/TH -I/home/siddhant.b/miniconda3/envs/ocr/lib/python3.7/site-packages/torch/include/THC 
-I/usr/local/cuda-9.0/include -I/home/siddhant.b/miniconda3/envs/ocr/include/python3.7m -c adaptive_gridsampler_cuda.cpp -o build/temp.linux-x86_64-3.7/adaptive_gridsampl
er_cuda.o -std=c++11 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=adaptive_gridsampler_cuda -D_GLIBCXX_USE_CXX11_ABI=0
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
/usr/local/cuda-9.0/bin/nvcc -I/home/siddhant.b/miniconda3/envs/ocr/lib/python3.7/site-packages/torch/include -I/home/siddhant.b/miniconda3/envs/ocr/lib/python3.7/site-pa
ckages/torch/include/torch/csrc/api/include -I/home/siddhant.b/miniconda3/envs/ocr/lib/python3.7/site-packages/torch/include/TH -I/home/siddhant.b/miniconda3/envs/ocr/lib
/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-9.0/include -I/home/siddhant.b/miniconda3/envs/ocr/include/python3.7m -c adaptive_gridsampler_kernel.cu -o bu
ild/temp.linux-x86_64-3.7/adaptive_gridsampler_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr
 --compiler-options '-fPIC' -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_70,code=comp
ute_70 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=adaptive_gridsampler_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
adaptive_gridsampler_kernel.cu(10): error: explicit type is missing ("int" assumed)

adaptive_gridsampler_kernel.cu(10): error: qualified name is not allowed

adaptive_gridsampler_kernel.cu(10): error: expected a ")"

adaptive_gridsampler_kernel.cu(17): warning: parsing restarts here after previous syntax error

adaptive_gridsampler_kernel.cu(72): error: class "at::Tensor" has no member "packed_accessor32"

adaptive_gridsampler_kernel.cu(72): error: type name is not allowed

adaptive_gridsampler_kernel.cu(72): error: argument list for class template "at::RestrictPtrTraits" is missing

adaptive_gridsampler_kernel.cu(72): error: expected an expression

adaptive_gridsampler_kernel.cu(72): error: class "at::Tensor" has no member "packed_accessor32"

adaptive_gridsampler_kernel.cu(72): error: type name is not allowed

adaptive_gridsampler_kernel.cu(72): error: argument list for class template "at::RestrictPtrTraits" is missing

adaptive_gridsampler_kernel.cu(72): error: expected an expression

adaptive_gridsampler_kernel.cu(73): error: class "at::Tensor" has no member "packed_accessor32"

adaptive_gridsampler_kernel.cu(73): error: type name is not allowed

adaptive_gridsampler_kernel.cu(73): error: argument list for class template "at::RestrictPtrTraits" is missing

adaptive_gridsampler_kernel.cu(73): error: expected an expression

adaptive_gridsampler_kernel.cu(72): error: class "at::Tensor" has no member "packed_accessor32"

adaptive_gridsampler_kernel.cu(72): error: type name is not allowed

adaptive_gridsampler_kernel.cu(72): error: argument list for class template "at::RestrictPtrTraits" is missing

adaptive_gridsampler_kernel.cu(72): error: expected an expression

adaptive_gridsampler_kernel.cu(73): error: class "at::Tensor" has no member "packed_accessor32"

adaptive_gridsampler_kernel.cu(73): error: type name is not allowed

adaptive_gridsampler_kernel.cu(73): error: argument list for class template "at::RestrictPtrTraits" is missing

adaptive_gridsampler_kernel.cu(73): error: expected an expression

adaptive_gridsampler_kernel.cu(73): error: class "at::Tensor" has no member "packed_accessor32"

adaptive_gridsampler_kernel.cu(73): error: type name is not allowed

adaptive_gridsampler_kernel.cu(73): error: argument list for class template "at::RestrictPtrTraits" is missing

adaptive_gridsampler_kernel.cu(73): error: expected an expression

adaptive_gridsampler_kernel.cu(74): error: class "at::Tensor" has no member "packed_accessor32"

adaptive_gridsampler_kernel.cu(74): error: type name is not allowed

adaptive_gridsampler_kernel.cu(74): error: argument list for class template "at::RestrictPtrTraits" is missing

adaptive_gridsampler_kernel.cu(74): error: expected an expression

adaptive_gridsampler_kernel.cu(71): error: no instance of function template "kernel_adaptive_gridsampler_update_output" matches the argument list
            argument types are: (<error-type>, int, <error-type>, <error-type>, int, <error-type>, <error-type>, int, <error-type>, <error-type>, int, <error-type>, const int, const int, <error-type>, int, <error-type>, int64_t)

24 errors detected in the compilation of "/tmp/tmpxft_00004ba5_00000000-8_adaptive_gridsampler_kernel.compute_70.cpp1.ii".
error: command '/usr/local/cuda-9.0/bin/nvcc' failed with exit status 1
(ocr) siddhant.b@gnode55:~/CAR/adaptive_gridsampler$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Sep__1_21:08:03_CDT_2017
Cuda compilation tools, release 9.0, V9.0.176
(ocr) siddhant.b@gnode55:~/CAR/adaptive_gridsampler$ gcc --version
gcc (Ubuntu 5.5.0-12ubuntu1~16.04) 5.5.0 20171010
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

(ocr) siddhant.b@gnode55:~/CAR/adaptive_gridsampler$ g++ --version
g++ (Ubuntu 5.5.0-12ubuntu1~16.04) 5.5.0 20171010
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I even tried suggestions from here, but it did not help.

@DatCanCode
Copy link

Have you install pytorch version 1.3.1.
I installed pytorch 1.3.1 and It worked.

!pip install torch==1.3.1

@treammm
Copy link

treammm commented Aug 3, 2020

I used 1.3.1 but failed.... What version of cuda and cudnn are you using?

@Sid2697
Copy link
Author

Sid2697 commented Aug 4, 2020

@Datami555 I tried it again after installing pytorch 1.3.1; I got the error which is in error.txt.

@treammm
CUDA version:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Sep__1_21:08:03_CDT_2017
Cuda compilation tools, release 9.0, V9.0.176

@treammm
Copy link

treammm commented Aug 4, 2020

hmm I used CUDA 10.0 for nvcc and got different failure...

@jofuelo
Copy link

jofuelo commented Apr 4, 2021

I'm having the same issue. Could someone provide a compiled version of it?

@belisarius0
Copy link

I built adaptive gridsampler as follows.

  • torch=1.8.1
  • cuda 11.1
  • RTX3080
  • modified setup.py as follows
    • changed cxx_args from -std=c++11 to -std=c++14
    • changed nvcc_args to '-gencode', 'arch=compute_86, code=sm_86'

@dendenxu
Copy link

I built adaptive gridsampler as follows.

  • torch=1.8.1

  • cuda 11.1

  • RTX3080

  • modified setup.py as follows

    • changed cxx_args from -std=c++11 to -std=c++14
    • changed nvcc_args to '-gencode', 'arch=compute_86, code=sm_86'

👍This also worked for me on:

  • pytorch 1.11.0
  • cudatoolkit 11.3.1
  • RTX 3090

@yeruiqian
Copy link

I built adaptive gridsampler as follows.

  • torch=1.8.1

  • cuda 11.1

  • RTX3080

  • modified setup.py as follows

    • changed cxx_args from -std=c++11 to -std=c++14
    • changed nvcc_args to '-gencode', 'arch=compute_86, code=sm_86'

if works for me (3080Ti), thanks

@onions222
Copy link

I built adaptive gridsampler as follows.

  • torch=1.8.1

  • cuda 11.1

  • RTX3080

  • modified setup.py as follows

    • changed cxx_args from -std=c++11 to -std=c++14
    • changed nvcc_args to '-gencode', 'arch=compute_86, code=sm_86'

It works (P6000) Thankx!

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

8 participants