Commit Graph

6 Commits

Author SHA1 Message Date
Brad King
8617c28221 CUDA: Factor out helper for detecting native CUDA architectures
Prepare to use it for other languages.
2023-09-21 15:34:28 -04:00
Brad King
d1b48bfabd CUDA: Add support for CUDA_ARCHITECTURES=native
CUDA 11.6 added the `nvcc -arch=native` flag to automatically compile
for the host GPUs' architectures.  Add support for specifying this
special `native` value in `CMAKE_CUDA_ARCHITECTURES` and
`CUDA_ARCHITECTURES`.  During the compiler ABI detection step,
detect the native architectures so we can pass them explicitly
when using Clang or older versions of nvcc.

Fixes: #22375
2022-03-10 09:27:29 -05:00
Brad King
f511a1c009 CMakeDetermineCompilerABI: Detect byte order as part of check
We already detect `sizeof(void*)`.  Detect the byte order as part of the
same check.

Issue: #21392
2020-11-04 10:08:13 -05:00
Kitware Robot
d7204e649e Revise C++ coding style using clang-format-6.0
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`.  Use `clang-format` version 6.0.

* If you reached this commit for a line in `git blame`, re-run the blame
  operation starting at the parent of this commit to see older history
  for the content.

* See the parent commit for instructions to rebase a change across this
  style transition commit.
2018-06-01 09:53:42 -04:00
Brad King
0b2f8ae3ba Modules: Run clang-format on CUDA code 2017-02-14 10:20:42 -05:00
Robert Maynard
4f5155f6ab CUDA: We now properly perform CUDA compiler identification. 2016-11-14 11:36:43 -05:00