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

pbrt/gpu and pbrt/wavefront compilation fails #437

Closed
akanimax opened this issue Sep 2, 2024 · 1 comment
Closed

pbrt/gpu and pbrt/wavefront compilation fails #437

akanimax opened this issue Sep 2, 2024 · 1 comment

Comments

@akanimax
Copy link

akanimax commented Sep 2, 2024

Hello!
Hope you are doing well.

I am currently trying to build pbrt-v4 with gpu support on an RTX 2070 super. My cuda is 12.6 and my Optix is 7.1 (although I have tried 7.3, 7.7 and 8.0), but my build fails with many compilation errors only in the files inside of pbrt/gpu and pbrt/wavefront.

I believe I have configured the cmake for GPU by specifying the PBRT_OPTIX7_PATH correctly, since the whole build gets triggered with the nvcc compiler instead of c++.

Here are for example some errors from the that I get:

14>C:\Users\Animesh\AppData\Local\Temp\tmpxft_00005618_00000000-7_aggregate.cudafe1.stub.c(31): error C2039: 'cuda': is not a member of '`global namespace''
14>C:\Users\Animesh\AppData\Local\Temp\tmpxft_00005618_00000000-7_aggregate.cudafe1.stub.c(31): error C2039: 'ranges': is not a member of 'std'
14>D:\work\software\Microsoft Visual Studio\VC\Tools\MSVC\14.41.34120\include\set(22): note: see declaration of 'std'
14>C:\Users\Animesh\AppData\Local\Temp\tmpxft_00005618_00000000-7_aggregate.cudafe1.stub.c(31): error C2039: '__4': is not a member of 'std'
14>D:\work\software\Microsoft Visual Studio\VC\Tools\MSVC\14.41.34120\include\set(22): note: see declaration of 'std'
14>C:\Users\Animesh\AppData\Local\Temp\tmpxft_00005618_00000000-7_aggregate.cudafe1.stub.c(31): error C2039: '__cpo': is not a member of 'std'
14>D:\work\software\Microsoft Visual Studio\VC\Tools\MSVC\14.41.34120\include\set(22): note: see declaration of 'std'
14>C:\Users\Animesh\AppData\Local\Temp\tmpxft_00005618_00000000-7_aggregate.cudafe1.stub.c(31): error C3083: 'cuda': the symbol to the left of a '::' must be a type
14>C:\Users\Animesh\AppData\Local\Temp\tmpxft_00005618_00000000-7_aggregate.cudafe1.stub.c(31): error C3083: 'ranges': the symbol to the left of a '::' must be a type
14>C:\Users\Animesh\AppData\Local\Temp\tmpxft_00005618_00000000-7_aggregate.cudafe1.stub.c(31): error C3083: '__4': the symbol to the left of a '::' must be a type
14>C:\Users\Animesh\AppData\Local\Temp\tmpxft_00005618_00000000-7_aggregate.cudafe1.stub.c(31): error C3083: '__cpo': the symbol to the left of a '::' must be a type
14>C:\Users\Animesh\AppData\Local\Temp\tmpxft_00005618_00000000-7_aggregate.cudafe1.stub.c(31): error C2440: 'type cast': cannot convert from 'overloaded-function' to 'char *'
14>C:\Users\Animesh\AppData\Local\Temp\tmpxft_00005618_00000000-7_aggregate.cudafe1.stub.c(31): note: Context does not allow for disambiguation of overloaded function
14>C:\Users\Animesh\AppData\Local\Temp\tmpxft_00005618_00000000-7_aggregate.cudafe1.stub.c(31): error C2660: '__cudaRegisterVar': function does not take 7 arguments
14>C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\include\crt/host_runtime.h(197): note: see declaration of '__cudaRegisterVar'
14>C:\Users\Animesh\AppData\Local\Temp\tmpxft_00005618_00000000-7_aggregate.cudafe1.stub.c(31): note: while trying to match the argument list '(void **, char *, const char [143], int, unsigned __int64, int, int)'
14>C:\Users\Animesh\AppData\Local\Temp\tmpxft_00005618_00000000-7_aggregate.cudafe1.stub.c(32): error C2039: 'cuda': is not a member of '`global namespace''
14>C:\Users\Animesh\AppData\Local\Temp\tmpxft_00005618_00000000-7_aggregate.cudafe1.stub.c(32): error C2039: 'ranges': is not a member of 'std'
14>D:\work\software\Microsoft Visual Studio\VC\Tools\MSVC\14.41.34120\include\set(22): note: see declaration of 'std'
14>C:\Users\Animesh\AppData\Local\Temp\tmpxft_00005618_00000000-7_aggregate.cudafe1.stub.c(32): error C2039: '__4': is not a member of 'std'
14>D:\work\software\Microsoft Visual Studio\VC\Tools\MSVC\14.41.34120\include\set(22): note: see declaration of 'std'
14>C:\Users\Animesh\AppData\Local\Temp\tmpxft_00005618_00000000-7_aggregate.cudafe1.stub.c(32): error C2039: '__cpo': is not a member of 'std'
14>D:\work\software\Microsoft Visual Studio\VC\Tools\MSVC\14.41.34120\include\set(22): note: see declaration of 'std'
14>C:\Users\Animesh\AppData\Local\Temp\tmpxft_00005618_00000000-7_aggregate.cudafe1.stub.c(32): error C3083: 'cuda': the symbol to the left of a '::' must be a type
14>C:\Users\Animesh\AppData\Local\Temp\tmpxft_00005618_00000000-7_aggregate.cudafe1.stub.c(32): error C3083: 'ranges': the symbol to the left of a '::' must be a type
14>C:\Users\Animesh\AppData\Local\Temp\tmpxft_00005618_00000000-7_aggregate.cudafe1.stub.c(32): error C3083: '__4': the symbol to the left of a '::' must be a type
14>C:\Users\Animesh\AppData\Local\Temp\tmpxft_00005618_00000000-7_aggregate.cudafe1.stub.c(32): error C3083: '__cpo': the symbol to the left of a '::' must be a type
14>C:\Users\Animesh\AppData\Local\Temp\tmpxft_00005618_00000000-7_aggregate.cudafe1.stub.c(32): error C2039: 'iter_move': is not a member of 'std'

I have tried to find a solution for this issue by surfing various other similar discussions, but couldn't find an answer for this one. My setup is so close to building this amazing project for gpu, but failing at the final build stage.

Any help would be highly appreciated.

Cheers!
@akanimax

@akanimax
Copy link
Author

akanimax commented Sep 3, 2024

I tried the solution mentioned in the #429, and it works.
The combination that currently works is ->

  1. Cuda 12.4 specifically
  2. Optix version 8.0.0 works, but anything above 7.1 should also work.
  3. Most importantly, MSVC build tool must specifically be 14.39

Feeling relieved now 😄!

@akanimax akanimax closed this as completed Sep 3, 2024
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

1 participant