-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fix compiler error with MSVC 17 and CUDA 10.2 #2240
Conversation
I can confirm that solved the problem (we were facing the same exact issue). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Could you please add a one-line comment to explain why the static_cast was inserted?
Maybe:
// static_cast works around compiler error with MSVC 17 and CUDA 10.2 (PR #2240).
I'll merge this once you've had a chance to add an extra comment. (As we do in a few other places). Side comment: compiling pybind11 code with nvcc sounds really scary (even if it's just for the "host" part). |
4386f0d
to
6196fdf
Compare
I added the comment.
In our case, pybind11 is not the scary part to compile ;-) We use a highly templated C++ library which also supports gcc, clang and icc as host compiler for nvcc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for digging into this and finding a work-around, Simeon!
I co-reported your reproducer as Nvidia Bug 3013788 so they have a chance to get their splitter/frontend into order for upcoming CUDA releases.
Thanks! |
Thanks for reporting the bug. |
Fixes the compiler error described in this issue: #2180