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

Fix compiler error with MSVC 17 and CUDA 10.2 #2240

Merged
merged 1 commit into from
Jun 8, 2020

Conversation

SimeonEhrig
Copy link
Contributor

Fixes the compiler error described in this issue: #2180

@atilag
Copy link

atilag commented Jun 3, 2020

I can confirm that solved the problem (we were facing the same exact issue).
Would love to see this merged :)

Copy link
Collaborator

@rwgk rwgk left a 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).

@wjakob
Copy link
Member

wjakob commented Jun 4, 2020

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).

@SimeonEhrig
Copy link
Contributor Author

I added the comment.

Side comment: compiling pybind11 code with nvcc sounds really scary (even if it's just for the "host" part).

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.

Copy link
Collaborator

@rwgk rwgk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Collaborator

@ax3l ax3l left a 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.

@wjakob
Copy link
Member

wjakob commented Jun 8, 2020

Thanks!

@wjakob wjakob merged commit c776e9e into pybind:master Jun 8, 2020
@SimeonEhrig
Copy link
Contributor Author

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 for reporting the bug.

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

Successfully merging this pull request may close these issues.

5 participants