[PATCH] D89974: [driver][CUDA] Use CMake's FindCUDA as default --cuda-path.

Raul Tambre via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 22 11:04:30 PDT 2020


tambre added a comment.

I echo @tra's concerns.
Having an option for a vendor to append/prepend a toolkit search location seems useful, but currently this seems more like a workaround for an explicit CUDA toolkit path not being passed to the testsuite.
Shortcomings in the testrunner don't seem like a reason to introduce new build-time configured default search paths into the driver.

Aside, here's an overview of CMake+CUDA:

- FindCUDA is deprecated since 3.10 and obsolete since 3.17. Replaced by native language support and FindCUDAToolkit <https://cmake.org/cmake/help/git-stage/module/FindCUDAToolkit.html>.
- CMake supports Clang as a CUDA compiler since 3.18.
- CMake supports separable compilation with Clang since 3.19.
- CMake doesn't support CUDA with Clang on Windows <https://gitlab.kitware.com/cmake/cmake/-/issues/20776>. I hope to work on it for 3.20.

Ideally LLVM would use the native CMake CUDA support and the testsuite would use the CUDA toolkit found by CMake where necessary.
Users would be able to override the selected toolkit by setting `CUDAToolkit_ROOT` when configuring Clang.
Unfortunately this would require CMake 3.18, so this'll have to wait a bit.

If there are any questions/issues on the CMake side let me know. I maintain Clang and CUDA support in CMake.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89974/new/

https://reviews.llvm.org/D89974



More information about the cfe-commits mailing list