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

Smarter handling of CUDA unsupported compilers / always using allow-unsupported-compiler #3150

Closed
prckent opened this issue May 3, 2021 · 2 comments

Comments

@prckent
Copy link
Contributor

prckent commented May 3, 2021

Is your feature request related to a problem? Please describe.

For anyone doing development, it is more than annoying to have to add -allow-unsupported-compiler to handle recent GCC or LLVM or to test with old CUDA versions. As far as I know, we have never hit an incompatibility for our flavors of CUDA usage, and this has only cost us our time. This may also be required to use OpenMP target offload in production since it needs recent compilers to have any chance of sufficient performance and/or correctness.

SET(CUDA_NVCC_FLAGS "-allow-unsupported-compiler;${CUDA_NVCC_FLAGS}")

Describe the solution you'd like

Either:

  1. Do a test compile with nvcc, and if the unsupported warning is hit, print a "Make sure you know what you are doing" warning and add the allow-unsupported-compiler flag.
  2. (Quick route) Permanently add the allow-unsupported-compiler flag.

Describe alternatives you've considered

Keep editing CMakeLists.txt or modifying build scripts.

@ye-luo
Copy link
Contributor

ye-luo commented May 3, 2021

It needs to be an option not on by default. nvcc checks host compiler for good reason. Host compiler may not have compatible header files. More likely in C++. I have been bitten by this in the past. I always use GCC as host compiler for nvcc, so this flag is not must.

@ye-luo
Copy link
Contributor

ye-luo commented Apr 20, 2022

changed my view and implemented in #3957

@ye-luo ye-luo closed this as completed Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants