Skip to content

Windows 2019 vcc build #920

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

Closed
spyroot opened this issue Nov 7, 2021 · 4 comments
Closed

Windows 2019 vcc build #920

spyroot opened this issue Nov 7, 2021 · 4 comments

Comments

@spyroot
Copy link

spyroot commented Nov 7, 2021

Hi Folks,

I manage to narrow down most of the issues with VC. ( note I keep testing CUDA 11.3 / 11.4 Torch 1.9/1.10)
but it same issue.

I added /wd4624 torch extension so it won't go crazy with false positives.
so it invoked with /wd4267

Tested both with and without 14/17 ( default one wrong it not valid vc args.

    extra_compile_args = {"cxx": ["/std:c++17"]}

also, this kEpsilon is defined in different places. So it is not clear it float or double
In util geometric it just cost auto

in another spot, it is defined below. So it truncates type or can't do type deduction in templates.

I refactored a bit header file in ball etc and used the same epsilon definition,
it looks like fixed all truncation errors.

C:\Users\neros.conda\envs\tf-gpu\lib\site-packages\torch\include\pybind11\cast.h(1429): error: too few arguments for template template parameter "Tuple"
detected during instantiation of class "pybind11::detail::tuple_caster<Tuple, Ts...> [with Tuple=std::pair, Ts=<T1, T2>]"
(1507): here

#ifdef _MSC_VER
#define kEpsilon 1e-8f
#else
const auto kEpsilon = 1e-8;
#endif

But I can't narrow down errors related to templates.

FAILED: C:/dev/pytorch3d/build/temp.win-amd64-3.9/Release/dev/pytorch3d/pytorch3d/csrc/ball_query/ball_query.obj
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4\bin\nvcc --generate-dependencies-with-compile --dependency-output C:\dev\pytorch3d\build\temp.win-amd64-3.9\Release\dev\pytorch3d\pytorch3d\csrc\ball_query\ball_query.obj.d --use-local-env -Xcompiler /MD -Xcompiler /wd4819 -Xcompiler /wd4251 -Xcompiler /wd4244 -Xcompiler /wd4267 -Xcompiler /wd4275 -Xcompiler /wd4018 -Xcompiler /wd4190 -Xcompiler /EHsc -Xcompiler /wd4624 -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -DWITH_CUDA -DTHRUST_IGNORE_CUB_VERSION_CHECK -IC:\dev\pytorch3d\pytorch3d\csrc -IC:\dev\cub -IC:\Users\neros\.conda\envs\tf-gpu\lib\site-packages\torch\include -IC:\Users\neros\.conda\envs\tf-gpu\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\neros\.conda\envs\tf-gpu\lib\site-packages\torch\include\TH -IC:\Users\neros\.conda\envs\tf-gpu\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4\include" -IC:\Users\neros\.conda\envs\tf-gpu\include -IC:\Users\neros\.conda\envs\tf-gpu\include -ID:\dev\VC\Tools\MSVC\14.29.30133\ATLMFC\include -ID:\dev\VC\Tools\MSVC\14.29.30133\include "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" -c C:\dev\pytorch3d\pytorch3d\csrc\ball_query\ball_query.cu -o C:\dev\pytorch3d\build\temp.win-amd64-3.9\Release\dev\pytorch3d\pytorch3d\csrc\ball_query\ball_query.obj -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86
C:\Users\neros\.conda\envs\tf-gpu\lib\site-packages\torch\include\pybind11\cast.h(1429): error: too few arguments for template template parameter "Tuple"
          detected during instantiation of class "pybind11::detail::tuple_caster<Tuple, Ts...> [with Tuple=std::pair, Ts=<T1, T2>]"
(1507): here

C:\Users\neros\.conda\envs\tf-gpu\lib\site-packages\torch\include\pybind11\cast.h(1503): error: too few arguments for template template parameter "Tuple"
          detected during instantiation of class "pybind11::detail::tuple_caster<Tuple, Ts...> [with Tuple=std::pair, Ts=<T1, T2>]"
(1507): here

2 errors detected in the compilation of "c:/dev/pytorch3d/pytorch3d/csrc/ball_query/ball_query.cu".
ball_query.cu

I'm not even sure how I can dump errors because it is not clear what error actually even is.

@bottler
Copy link
Contributor

bottler commented Nov 7, 2021

If you are using the latest main, there is no problem with the code. Multiple people have it working. Don't try to fix the compiler errors by changing the code. Are you using visual studio 16.9.6?

@spyroot
Copy link
Author

spyroot commented Nov 7, 2021

Thank you for your feedback !, No it is Version 16.11.5 Torch 1.10 / 1.19 Cuda 11.3 / 11.4. it strange really I re-create 20 times different conda env.

@bottler
Copy link
Contributor

bottler commented Nov 7, 2021

I think you may need to downgrade the compiler. See #876 (comment) and the links from there. I think it's a known problem with the very latest compiler.

@spyroot
Copy link
Author

spyroot commented Nov 8, 2021

So it took some effort it looks like the issue somewhere in Torch 1.19/1.10 and CUDA 11.4. I manage to compile and testing now.

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

2 participants