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

compilation error #237

Closed
davidqing2000 opened this issue Nov 5, 2019 · 10 comments
Closed

compilation error #237

davidqing2000 opened this issue Nov 5, 2019 · 10 comments
Labels
duplicate This issue or pull request already exists

Comments

@davidqing2000
Copy link

davidqing2000 commented Nov 5, 2019

When I tried to compile packages in windows server 2012, I always got below errors with Anconda(python 3.6).

1 error detected in the compilation of "C:/Users/ADMINI~1/AppData/Local/Temp/2/t
mpxft_00001ac8_00000000-10_deform_conv_cuda.cpp1.ii".
error: command 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\bin
\nvcc.exe' failed with exit status 1

Below is the information of CUDA version for your reference.

nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Tue_Jun_12_23:08:12_Central_Daylight_Time_2018
Cuda compilation tools, release 9.2, V9.2.148

@ppwwyyxx
Copy link
Contributor

ppwwyyxx commented Nov 5, 2019

Please include details about the problem following the issue template. Your issue seems like a duplicate of #232 from the partial information you provided.

@ppwwyyxx ppwwyyxx closed this as completed Nov 5, 2019
@ppwwyyxx ppwwyyxx added the duplicate This issue or pull request already exists label Nov 5, 2019
@davidqing2000
Copy link
Author

davidqing2000 commented Nov 5, 2019

I have looked the issue-'pytorch/extension-cpp#37', it seems it's different error message.

here is my one.

C:/ProgramData/Anaconda3/lib/site-packages/torch/include/torch/csrc/api/include
torch/optim/adam.h(45): warning: field of class type without a DLL interface use
d in a class with a DLL interface

C:/ProgramData/Anaconda3/lib/site-packages/torch/include/torch/csrc/api/include
torch/optim/adam.h(46): warning: field of class type without a DLL interface use
d in a class with a DLL interface

C:/ProgramData/Anaconda3/lib/site-packages/torch/include/torch/csrc/api/include
torch/optim/adam.h(47): warning: field of class type without a DLL interface use
d in a class with a DLL interface

C:/ProgramData/Anaconda3/lib/site-packages/torch/include/torch/csrc/api/include
torch/optim/adam.h(48): warning: field of class type without a DLL interface use
d in a class with a DLL interface

C:/ProgramData/Anaconda3/lib/site-packages/torch/include/torch/csrc/api/include
torch/optim/lbfgs.h(27): warning: base class dllexport/dllimport specification d
iffers from that of the derived class

C:/ProgramData/Anaconda3/lib/site-packages/torch/include/torch/csrc/api/include
torch/optim/lbfgs.h(48): warning: field of class type without a DLL interface us
ed in a class with a DLL interface

C:/ProgramData/Anaconda3/lib/site-packages/torch/include/torch/csrc/api/include
torch/optim/lbfgs.h(49): warning: field of class type without a DLL interface us
ed in a class with a DLL interface

C:/ProgramData/Anaconda3/lib/site-packages/torch/include/torch/csrc/api/include
torch/optim/lbfgs.h(50): warning: field of class type without a DLL interface us
ed in a class with a DLL interface

C:/ProgramData/Anaconda3/lib/site-packages/torch/include/torch/csrc/api/include
torch/optim/lbfgs.h(51): warning: field of class type without a DLL interface us
ed in a class with a DLL interface

C:/ProgramData/Anaconda3/lib/site-packages/torch/include/torch/csrc/api/include
torch/optim/rmsprop.h(34): warning: base class dllexport/dllimport specification
differs from that of the derived class

C:/ProgramData/Anaconda3/lib/site-packages/torch/include/torch/csrc/api/include
torch/optim/rmsprop.h(50): warning: field of class type without a DLL interface
used in a class with a DLL interface

C:/ProgramData/Anaconda3/lib/site-packages/torch/include/torch/csrc/api/include
torch/optim/rmsprop.h(51): warning: field of class type without a DLL interface
used in a class with a DLL interface

C:/ProgramData/Anaconda3/lib/site-packages/torch/include/torch/csrc/api/include
torch/optim/rmsprop.h(52): warning: field of class type without a DLL interface
used in a class with a DLL interface

C:/ProgramData/Anaconda3/lib/site-packages/torch/include/torch/csrc/api/include
torch/optim/sgd.h(31): warning: base class dllexport/dllimport specification dif
fers from that of the derived class

C:/ProgramData/Anaconda3/lib/site-packages/torch/include/torch/csrc/api/include
torch/optim/sgd.h(46): warning: field of class type without a DLL interface used
in a class with a DLL interface

C:/ProgramData/Anaconda3/lib/site-packages/torch/include\torch/csrc/autograd/rec
ord_function.h(25): warning: field of class type without a DLL interface used in
a class with a DLL interface

C:/ProgramData/Anaconda3/lib/site-packages/torch/include\torch/csrc/autograd/rec
ord_function.h(90): warning: field of class type without a DLL interface used in
a class with a DLL interface

C:/ProgramData/Anaconda3/lib/site-packages/torch/include\torch/csrc/autograd/pro
filer.h(97): warning: modifier is ignored on an enum specifier

C:/ProgramData/Anaconda3/lib/site-packages/torch/include\torch/csrc/autograd/pro
filer.h(112): warning: modifier is ignored on an enum specifier

C:/ProgramData/Anaconda3/lib/site-packages/torch/include\torch/csrc/autograd/pro
filer.h(169): warning: field of class type without a DLL interface used in a cla
ss with a DLL interface

C:/ProgramData/Anaconda3/lib/site-packages/torch/include\torch/csrc/autograd/pro
filer.h(245): warning: field of class type without a DLL interface used in a cla
ss with a DLL interface

C:/ProgramData/Anaconda3/lib/site-packages/torch/include\torch/csrc/autograd/sav
ed_variable.h(46): warning: field of class type without a DLL interface used in
a class with a DLL interface

C:/ProgramData/Anaconda3/lib/site-packages/torch/include\torch/csrc/autograd/sav
ed_variable.h(49): warning: field of class type without a DLL interface used in
a class with a DLL interface

C:/ProgramData/Anaconda3/lib/site-packages/torch/include\torch/csrc/autograd/sav
ed_variable.h(50): warning: field of class type without a DLL interface used in
a class with a DLL interface

C:/ProgramData/Anaconda3/lib/site-packages/torch/include\torch/csrc/autograd/fun
ction.h(353): warning: field of class type without a DLL interface used in a cla
ss with a DLL interface

C:/ProgramData/Anaconda3/lib/site-packages/torch/include\torch/csrc/autograd/fun
ction.h(355): warning: field of class type without a DLL interface used in a cla
ss with a DLL interface

C:/ProgramData/Anaconda3/lib/site-packages/torch/include\torch/csrc/autograd/fun
ction.h(356): warning: field of class type without a DLL interface used in a cla
ss with a DLL interface

C:/ProgramData/Anaconda3/lib/site-packages/torch/include\torch/csrc/autograd/fun
ction.h(357): warning: field of class type without a DLL interface used in a cla
ss with a DLL interface

C:/ProgramData/Anaconda3/lib/site-packages/torch/include\torch/csrc/autograd/fun
ction.h(358): warning: field of class type without a DLL interface used in a cla
ss with a DLL interface

C:/ProgramData/Anaconda3/lib/site-packages/torch/include\torch/csrc/autograd/cus
tom_function.h(84): warning: field of class type without a DLL interface used in
a class with a DLL interface

C:/ProgramData/Anaconda3/lib/site-packages/torch/include\torch/csrc/autograd/cus
tom_function.h(105): warning: field of class type without a DLL interface used i
n a class with a DLL interface

C:/ProgramData/Anaconda3/lib/site-packages/torch/include\torch/csrc/autograd/cus
tom_function.h(106): warning: field of class type without a DLL interface used i
n a class with a DLL interface

C:/ProgramData/Anaconda3/lib/site-packages/torch/include\torch/csrc/autograd/cus
tom_function.h(107): warning: field of class type without a DLL interface used i
n a class with a DLL interface

C:/ProgramData/Anaconda3/lib/site-packages/torch/include\torch/csrc/autograd/cus
tom_function.h(108): warning: field of class type without a DLL interface used i
n a class with a DLL interface

C:/ProgramData/Anaconda3/lib/site-packages/torch/include\torch/csrc/autograd/cus
tom_function.h(113): warning: field of class type without a DLL interface used i
n a class with a DLL interface

C:/ProgramData/Anaconda3/lib/site-packages/torch/include\torch/csrc/autograd/cus
tom_function.h(129): warning: field of class type without a DLL interface used i
n a class with a DLL interface

1 error detected in the compilation of "C:/Users/ADMINI~1/AppData/Local/Temp/2/t
mpxft_00000ab4_00000000-10_deform_conv_cuda.cpp1.ii".
error: command 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bi
n\nvcc.exe' failed with exit status 1

@ppwwyyxx
Copy link
Contributor

ppwwyyxx commented Nov 5, 2019

It seems all you pasted are warnings, not errors. So it's unclear to me what your error actually was.

@davidqing2000
Copy link
Author

Does it help to identify the error?

1 error detected in the compilation of "C:/Users/ADMINI~1/AppData/Local/Temp/2/t
mpxft_00000ab4_00000000-10_deform_conv_cuda.cpp1.ii".
error: command 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bi
n\nvcc.exe' failed with exit status 1

@ppwwyyxx
Copy link
Contributor

ppwwyyxx commented Nov 5, 2019

It does not. If you looked at the long logs in #232 , there are some actual errors, in addition to the error of "nvcc failed".

@davidqing2000
Copy link
Author

I attached the error log for you.

err.txt

I'm not sure where I can get the detail error log, above I export the log of compliation. if you need any extra comments, pls let me know, thanks.

@ppwwyyxx
Copy link
Contributor

ppwwyyxx commented Nov 5, 2019

If you searched for "error" in your log file, it is the same as #232 and pytorch/extension-cpp#37.

C:/ProgramData/Anaconda3/lib/site-packages/torch/include\torch/csrc/jit/argument_spec.h(190): error: member "torch::jit::ArgumentSpecCreator::DEPTH_LIMIT" may not be initialized

@davidqing2000
Copy link
Author

I have refered to #37 and try to modify below codes, then I get some new error:

D:/development/detectron2/detectron2/layers/csrc/ROIAlign/ROIAlign_cuda.cu(337): error: no instance of function template "at::cuda::ATenCeilDiv" matches the argument list
argument types are: (long long, long)

D:/development/detectron2/detectron2/layers/csrc/ROIAlign/ROIAlign_cuda.cu(337): error: no instance of overloaded function "std::min" matches the argument list
argument types are: (, long)

D:/development/detectron2/detectron2/layers/csrc/ROIAlign/ROIAlign_cuda.cu(393): error: no instance of function template "at::cuda::ATenCeilDiv" matches the argument list
argument types are: (int64_t, long)

D:/development/detectron2/detectron2/layers/csrc/ROIAlign/ROIAlign_cuda.cu(393): error: no instance of overloaded function "std::min" matches the argument list
argument types are: (, long)

4 errors detected in the compilation of "C:/Users/ADMINI~1/AppData/Local/Temp/2/tmpxft_00001934_00000000-10_ROIAlign_cuda.cpp1.ii".
ROIAlign_cuda.cu


several files must be changed by manually.
file1:
{your evn path}\Lib\site-packages\torch\include\torch\csrc\jit\argument_spec.h
example:
{C:\Miniconda3\envs\py36}\Lib\site-packages\torch\include\torch\csrc\jit\argument_spec.h(190)
static constexpr size_t DEPTH_LIMIT = 128;
change to -->
static const size_t DEPTH_LIMIT = 128;
file2:
{your evn path}\Lib\site-packages\torch\include\pybind11\cast.h
example:
{C:\Miniconda3\envs\py36}\Lib\site-packages\torch\include\pybind11\cast.h(1449)
explicit operator type&() { return *(this->value); }
change to -->
explicit operator type&() { return ((type)this->value); }

@elnazsn1988
Copy link

@davidqing2000 I have your exact same issue, have you been able to get it up and running?

@elnazsn1988
Copy link

@davidqing2000 try the solution mentioned here: #9 is a decetron2 replica with adjusted variables for windows and vc 2019 - does not work for me but maybe works for you?

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants