Commit Graph

135 Commits

Author SHA1 Message Date
Eduard Voronkin
4135175337 FASTBuild: support CUDA language
Fixes: #27318
2025-10-25 08:58:38 -04:00
Robert Maynard
72b8814f85 CUDA: Properly construct CUcontext in tests 2025-09-24 08:28:54 -04:00
Robert Maynard
f25982c422 CUDA: Update all tests to support NPPIF CUDA 13 deprecations 2025-09-24 08:28:33 -04:00
Brad King
72ee13035d Merge topic 'cuda_13_support'
3ff777de12 CUDA: Update CUDA tests to handle CUDA 13 deprecations
bbf732525a CUDA: Add CUDA 13.0 support to 'all' and 'all-major' architecture tables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11015
2025-08-05 09:58:01 -04:00
Robert Maynard
3ff777de12 CUDA: Update CUDA tests to handle CUDA 13 deprecations 2025-08-04 11:22:13 -04:00
Brad King
b01c1df41b Merge topic 'cuda-nvcc-system-includes'
d2be863b5e CUDA: Add include paths from nvcc SYSTEM_INCLUDES entry

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10857
2025-06-06 08:12:49 -04:00
Robert Maynard
d2be863b5e CUDA: Add include paths from nvcc SYSTEM_INCLUDES entry
Upcoming versions of nvcc are adding support for `SYSTEM_INCLUDES`
which contain includes that are implicitly used with `-isystem`
instead of `-I`.

Support of this is needed in CMake as some CUDA Toolkit releases will
start to have a different include directory layout and using only the
output from `INCLUDES` will be insufficient to find all headers.
2025-06-05 10:53:12 -04:00
Brad King
07df1a2a64 Merge topic 'cuda-12.9' into release-3.31
a1b4c30f24 CUDA: Add CUDA 12.9 new architectures and family syntax
b2251e0deb CUDA/Clang: Update architectures supported by CUDA 12.8

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10738
2025-05-03 09:58:35 -04:00
Brad King
031593de25 Merge branch 'backport-cuda-12.9' into cuda-12.9 2025-05-02 16:16:06 -04:00
Robert Maynard
a1b4c30f24 CUDA: Add CUDA 12.9 new architectures and family syntax 2025-05-02 15:46:49 -04:00
Brad King
1e6356e67f Merge topic 'cuda_tests_no_hardcoded_sm_values' into release-4.0
83a0c72a2d ci: Tell CudaOnly.CompileFlags test what specific architecture to use

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10701
2025-04-24 07:43:46 -04:00
Robert Maynard
83a0c72a2d ci: Tell CudaOnly.CompileFlags test what specific architecture to use
CUDA 12.8 deprecates architectures below 75.  Presumably a future
version will remove it.  Prepare infrastructure to avoid relying on
hard-coded arch 50 in this test.

This extends commit 63a5460faf (ci: Tell CudaOnly.Architecture test what
specific architecture to use, 2025-04-21).
2025-04-23 09:28:13 -04:00
Brad King
1395c1e19a ci: Tell CudaOnly.Architecture test what specific architecture to use
CUDA 12.8 deprecates architectures below 75.  Presumably a future
version will remove it.  Prepare infrastructure to avoid relying on
hard-coded arch 52 in this test.
2025-04-21 18:24:41 -04:00
Brad King
63a5460faf ci: Tell CudaOnly.Architecture test what specific architecture to use
CUDA 12.8 deprecates architectures below 75.  Presumably a future
version will remove it.  Prepare infrastructure to avoid relying on
hard-coded arch 52 in this test.
2025-04-21 18:07:15 -04:00
Kitware Robot
0b96ae1f6a Revise C++ coding style using clang-format with "east const"
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`, now with "east const" enforcement.
Use `clang-format` version 18.

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

Issue: #26123
2025-01-23 13:09:50 -05:00
Alex Turbov
bc8621d999 Fix: A lot of typos in code found by typos
Yet another great code spellchecker: https://github.com/crate-ci/typos/

(Will be added later as a `pre-commit` hook)
2025-01-12 18:49:34 +04:00
Brad King
7d41427968 Merge topic 'test-cuda-bin2c-null'
0c1d290090 Tests: Ensure CUDA bin2c output is null terminated

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9917
2024-10-19 14:49:48 -04:00
Brad King
ceda8bece9 Merge topic 'test-cuda-bin2c-null' into release-3.31
0c1d290090 Tests: Ensure CUDA bin2c output is null terminated

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9917
2024-10-19 14:49:47 -04:00
Robert Maynard
0c1d290090 Tests: Ensure CUDA bin2c output is null terminated
The default behavior of bin2c is to create binary arrays that have no
null termination.  So to use it as a C array we need to explicitly tell
it to create valid null terminated strings.

This will safely allow us to run PTX tests across all CUDA drivers.
2024-10-18 11:05:10 -04:00
Brad King
eb00926123 Merge topic 'test-cuda-simplify-kernels'
ee9e2216ec Tests: Simplify CUDA kernels avoid crash with nvidia driver 550

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9913
2024-10-18 07:35:59 -04:00
Brad King
e45dc7b827 Merge topic 'test-cuda-simplify-kernels' into release-3.31
ee9e2216ec Tests: Simplify CUDA kernels avoid crash with nvidia driver 550

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9913
2024-10-18 07:35:57 -04:00
Robert Maynard
ee9e2216ec Tests: Simplify CUDA kernels avoid crash with nvidia driver 550
Avoid having two identical kernels in PTX.  We don't need a second
kernel anyway.
2024-10-17 20:18:24 -04:00
Brad King
f93640b4c0 Merge topic 'test-cuda-optixir-includes'
c75e873564 CUDA: OptiXIR test includes all required headers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9884
2024-10-08 08:47:02 -04:00
Robert Maynard
c75e873564 CUDA: OptiXIR test includes all required headers 2024-10-07 10:23:42 -04:00
Brad King
9e3b559b6a Tests: Update cmake_minimum_required versions to 3.10 2024-10-03 14:18:16 -04:00
Brad King
33406182a5 Tests: Honor CUDAFLAGS in all CUDA tests 2024-09-25 16:30:02 -04:00
Robert Maynard
b90ae10dda Add support for unity builds with CUDA sources
Fixes #22750
2024-08-02 13:35:53 -04:00
Brad King
88c740462c CUDA/Clang: Add support for MSVC ABI on Windows using GNU-like frontend
Fixes: #20776
2024-01-22 09:33:54 -05:00
Brad King
607d271b1f Tests: Do not expect nvToolsExt in CUDA 12 toolkit 2024-01-18 14:27:29 -05:00
Brad King
5eb26fb943 Tests: Fix CudaOnly.Toolkit coverage of npp libs 2024-01-18 14:27:29 -05:00
Brad King
af85fa7ac1 Tests: Remove unused dllexport markup from CudaOnly.DeviceLTO
The test does not use shared libraries.
2024-01-18 14:27:29 -05:00
Brad King
d40bca5a8c Tests: Remove unused iostream from CUDA sources 2024-01-18 14:27:29 -05:00
Brad King
a9bb2606c1 Tests: Fix condition adding nvcc-only flags in CudaOnly.SeparateCompilation 2024-01-18 14:27:29 -05:00
Brad King
d901c4aa95 Merge topic 'FindCUDAToolkit-cupti'
04959e0285 Tests: Verify CUDA::cupti existence on a subset of machines
09a3c8b46b CUDAToolkit: Correctly search all include paths from compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9072
2023-12-15 09:32:00 -05:00
Robert Maynard
04959e0285 Tests: Verify CUDA::cupti existence on a subset of machines
When we know that the cupti library exists explicitly request the CUDA Toolkit test to verify the existence
2023-12-14 14:05:28 -05:00
Robert Maynard
d7642a7d42 CUDA: Support CMAKE_TRY_COMPILE_TARGET_TYPE of STATIC_LIBRARY 2023-11-07 10:48:32 -05:00
Robert Maynard
4316d4dcfd FindCUDAToolkit: Search all of nvcc implicit includes and library dirs
Improves the handling of CUDA layouts where we have multiple include
and library directories listed in the output of `nvcc -v`. This
updates both when the CUDA language is enabled or not.

Fixes: #24915
2023-09-27 13:28:52 -04:00
Robert Maynard
cd984261e1 CUDA: Device linking now uses TARGET_OBJECTS content
Due to an oversight in cmLinkLineDeviceComputer object
files did not get propagate to the device linking phase
when given via the `$<TARGET_OBJECTS>` generator expression.
2023-09-25 08:50:38 -04:00
Robert Maynard
6ebff6ebf8 VS: Avoid unnecessary CUDA device linking for OBJECT libraries
Without `CudaLink` fields, MSBuild tries to perform a device link step
for object libraries with CUDA_SEPARABLE_COMPILATION on them even when
not needed.  This commonly was encountered when generating PTX or
OPTIX-IR output.
2023-09-11 16:49:35 -04:00
Rafael Stahl
45584508fa CUDA/NVIDIA: fix LTO with explicit architectures 2023-05-31 11:44:10 -04:00
Robert Maynard
4f10111e95 CUDA: Cuda* tests add rpath entry only for need cuda lib directory
Found when developing https://github.com/conda-forge/cuda-nvcc-feedstock/pull/13/
We previously added RPATH entries for all implicit directories and therefore
started to load the incorrect pthread library.
2023-05-22 15:37:35 -04:00
Brad King
7dffe99ad8 Tests: Restore CudaOnly.RuntimeControls cudart verification on Windows
Since commit fa45594407 (file(GET_RUNTIME_DEPENDENCIES): Preserve casing
for Windows PE binaries, 2023-03-06) we may find the cudart runtime
library with its on-disk casing instead of always lower-case.
2023-03-27 09:27:53 -04:00
Brad King
81237523b7 Tests: Teach CudaOnly.CUBIN to tolerate toolkit not supporting native arch
Since commit 2def6a874b (CUDA: Add support for CUBIN, FATBIN, and
OPTIXIR compilation, 2023-01-27) added this test, it has failed when
executed with a CUDA toolkit that does not support the true native
architecture of the GPU.  Detect this case and skip the test.
2023-03-16 10:55:36 -04:00
Brad King
35a3de7ab0 Tests: Add missing exit code to CudaOnly.{CUBIN,Fatbin} 2023-03-16 10:51:56 -04:00
Robert Maynard
2def6a874b CUDA: Add support for CUBIN, FATBIN, and OPTIXIR compilation 2023-03-13 09:54:00 -04:00
Robert Maynard
0c56bdf91e CUDA: device linking obeys CMAKE_CUDA_VISIBILITY_PRESET setting
Fixes #24272
2023-01-16 11:27:13 -05:00
Robert Maynard
d37d9c098c FindCUDAToolkit: Support the new nvJitLink library in CUDA 12 2022-12-12 13:28:50 -05:00
Robert Maynard
9d012b1f69 FindCUDAToolkit: Ensure that paths provided have no symlinks
Fixes: #24188
2022-11-30 16:39:00 -05:00
Brad King
f72c405d4e Merge topic 'ci-nvhpc'
16a5c36795 gitlab-ci: add nightly job testing NVHPC with Ninja on Linux
9474d02386 Tests: Clarify CudaOnly.SeparateCompilationPTX output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7946
2022-11-29 10:39:40 -05:00
Robert Maynard
54d8044084 Tests: Don't presume that Linux CUDA Toolkits provide static libs 2022-11-23 09:27:42 -05:00