summaryrefslogtreecommitdiffstats
path: root/Tests/CudaOnly
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'test-cuda-bin2c-null' into release-3.31Brad King2024-10-191-1/+1
|\ | | | | | | | | | | | | 0c1d290090 Tests: Ensure CUDA bin2c output is null terminated Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9917
| * Tests: Ensure CUDA bin2c output is null terminatedRobert Maynard2024-10-181-1/+1
| | | | | | | | | | | | | | | | 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.
* | Merge topic 'test-cuda-simplify-kernels' into release-3.31Brad King2024-10-181-7/+0
|\ \ | |/ | | | | | | | | | | ee9e2216ec Tests: Simplify CUDA kernels avoid crash with nvidia driver 550 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9913
| * Tests: Simplify CUDA kernels avoid crash with nvidia driver 550Robert Maynard2024-10-181-7/+0
| | | | | | | | | | Avoid having two identical kernels in PTX. We don't need a second kernel anyway.
* | Merge topic 'test-cuda-optixir-includes'Brad King2024-10-081-0/+1
|\ \ | | | | | | | | | | | | | | | | | | c75e873564 CUDA: OptiXIR test includes all required headers Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9884
| * | CUDA: OptiXIR test includes all required headersRobert Maynard2024-10-071-0/+1
| | |
* | | Tests: Update cmake_minimum_required versions to 3.10Brad King2024-10-031-1/+1
|/ /
* | Tests: Honor CUDAFLAGS in all CUDA testsBrad King2024-09-251-6/+2
| |
* | Add support for unity builds with CUDA sourcesRobert Maynard2024-08-025-0/+40
|/ | | | Fixes #22750
* CUDA/Clang: Add support for MSVC ABI on Windows using GNU-like frontendBrad King2024-01-221-1/+3
| | | | Fixes: #20776
* Tests: Do not expect nvToolsExt in CUDA 12 toolkitBrad King2024-01-181-1/+5
|
* Tests: Fix CudaOnly.Toolkit coverage of npp libsBrad King2024-01-181-1/+1
|
* Tests: Remove unused dllexport markup from CudaOnly.DeviceLTOBrad King2024-01-182-14/+2
| | | | The test does not use shared libraries.
* Tests: Remove unused iostream from CUDA sourcesBrad King2024-01-1810-26/+0
|
* Tests: Fix condition adding nvcc-only flags in CudaOnly.SeparateCompilationBrad King2024-01-181-1/+1
|
* Merge topic 'FindCUDAToolkit-cupti'Brad King2023-12-152-1/+20
|\ | | | | | | | | | | | | | | 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
| * Tests: Verify CUDA::cupti existence on a subset of machinesRobert Maynard2023-12-142-1/+20
| | | | | | | | When we know that the cupti library exists explicitly request the CUDA Toolkit test to verify the existence
* | CUDA: Support CMAKE_TRY_COMPILE_TARGET_TYPE of STATIC_LIBRARYRobert Maynard2023-11-073-0/+12
|/
* FindCUDAToolkit: Search all of `nvcc` implicit includes and library dirsRobert Maynard2023-09-271-1/+15
| | | | | | | | 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
* CUDA: Device linking now uses TARGET_OBJECTS contentRobert Maynard2023-09-255-0/+71
| | | | | | 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.
* VS: Avoid unnecessary CUDA device linking for OBJECT librariesRobert Maynard2023-09-112-0/+2
| | | | | | | 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.
* CUDA/NVIDIA: fix LTO with explicit architecturesRafael Stahl2023-05-311-2/+9
|
* CUDA: Cuda* tests add rpath entry only for need cuda lib directoryRobert Maynard2023-05-223-3/+6
| | | | | | 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.
* Tests: Restore CudaOnly.RuntimeControls cudart verification on WindowsBrad King2023-03-271-1/+1
| | | | | | 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.
* Tests: Teach CudaOnly.CUBIN to tolerate toolkit not supporting native archBrad King2023-03-162-1/+13
| | | | | | | 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.
* Tests: Add missing exit code to CudaOnly.{CUBIN,Fatbin}Brad King2023-03-162-0/+4
|
* CUDA: Add support for CUBIN, FATBIN, and OPTIXIR compilationRobert Maynard2023-03-1310-0/+268
|
* CUDA: device linking obeys CMAKE_CUDA_VISIBILITY_PRESET settingRobert Maynard2023-01-166-13/+32
| | | | Fixes #24272
* FindCUDAToolkit: Support the new `nvJitLink` library in CUDA 12Robert Maynard2022-12-121-0/+4
|
* FindCUDAToolkit: Ensure that paths provided have no symlinksRobert Maynard2022-11-301-0/+6
| | | | Fixes: #24188
* Merge topic 'ci-nvhpc'Brad King2022-11-291-4/+5
|\ | | | | | | | | | | | | | | 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
| * Tests: Clarify CudaOnly.SeparateCompilationPTX outputBrad King2022-11-231-4/+5
| |
* | Tests: Don't presume that Linux CUDA Toolkits provide static libsRobert Maynard2022-11-2310-34/+105
|/
* FindCUDAToolkit: Restore usage from multiple directoriesRobert Maynard2022-11-024-0/+33
| | | | Fixes #24119
* CUDA: Revert "Always mark cuda toolkit as system include"Robert Maynard2022-10-174-20/+2
| | | | | | | | We need to revert this change as it can disable error messages when compiling invalid CUDA code. This reverts commit ea659b155d (CUDA: Always mark cuda toolkit as system include, 2022-06-27, v3.25.0-rc1~269^2).
* CUDA: Always mark cuda toolkit as system includeRobert Maynard2022-08-184-2/+20
| | | | Fixes: #23731
* CUDA: Add Device LTO support for nvccRobert Maynard2022-07-226-11/+138
| | | | Fixes #22200
* CUDA: native/all/all-major generates minimal set of ptx codeRobert Maynard2022-05-031-0/+1
| | | | Fixes #23459
* Merge topic 'ninja_compile_database_understand_new_cuda_lang_variables'Brad King2022-03-311-0/+2
|\ | | | | | | | | | | | | | | f7c6b9833c CUDA: Ninja generator generates valid compile database Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7129
| * CUDA: Ninja generator generates valid compile databaseRobert Maynard2022-03-301-0/+2
| | | | | | | | | | | | | | The ninja generator has been updated to poperly write the compile database when the CUDA language has been enabled. Fixes #23368
* | CUDA: Add support for CUDA_ARCHITECTURES=nativeBrad King2022-03-101-1/+12
| | | | | | | | | | | | | | | | | | | | | | 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
* | Tests: Rename CudaOnly.{All => ArchSpecial}Brad King2022-03-103-4/+4
|/ | | | | | | | | The purpose of the test is to cover special values of `CMAKE_CUDA_ARCHITECTURES`. Prepare to add more than just `all` and `all-major`. While at it, fix the `project()` name in the test to match what we pass to `ctest` with `--build-project`.
* Tests: Fix CudaOnly.SeparateCompilationPTX test project nameBrad King2022-02-161-1/+1
| | | | | | | | | | | | Fix the test added by commit 61b9764b03 (CUDA: Allow both CUDA_SEPARABLE_COMPILATION and CUDA_PTX_COMPILATION, 2021-09-17, v3.23.0-rc1~516^2) to have a `project()` name matching what is passed to CTest's `--build-project` option. Otherwise, on VS builds, MSBuild warns: MSBUILD : error MSB1009: Project file does not exist. Other CUDA tests use a matching project name already.
* CUDA: Generic all and all-major supportRaul Tambre2022-02-011-34/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 14d8a276 (CUDA: Support nvcc 11.5 new -arch=all|all-major flags, 2021-08-17) added all and all-major options to CUDA_ARCHITECTURES. These are fairly generic and likely to see real-world use by distributors. Thus it's desirable to support these also for Clang and older NVCC versions. The supported architectures are dependent on the toolkit version. We determine the toolkit version prior to compiler detection. For NVCC we get the version from the vendor identification output, but for Clang we need to invoke NVCC separately. The architecture information is mostly based on the Wikipedia list with the earliest supported version being CUDA 7.0. This could be documented and expanded in the future to allow projects to query CUDA toolkit version and architecture information. For Clang we additionally constrain based on its support. Additionally the architecture mismatch detection logic is fixed, improved and updated for generic support: * Commit 01428c55 (CUDA: Fail fast if CMAKE_CUDA_ARCHITECTURES doesn't work during detection, 2020-08-29) enabled CMAKE_CUDA_COMPILER_ID_REQUIRE_SUCCESS if CMAKE_CUDA_ARCHITECTURES is specified. This results in CMakeDetermineCompilerID.cmake printing the compiler error and our code for presenting the mismatch in a user-friendly way being useless. The custom logic seems preferable so go back to not enabling it. * Commit 14d8a276 (CUDA: Support nvcc 11.5 new -arch=all|all-major flags, 2021-08-17) tried to support CMP0054 but forgot to add x to the interpolated result. Thus the conditions would always evaluate to false. This is fixed as a byproduct of removing NVIDIA specific checks, improving the error message and replacing architectures_mode with a simpler architectures_explicit. Visual Studio support omits testing the flags during detection due to complexities in determining the toolkit version when using it. A long-term proper implementation would be #23161. Implements #22860.
* CUDA: Visual Studio Generator propagates definitions for PTX filesunknown2021-12-143-0/+8
| | | | | | | | From CUDA 9.0 to CUDA 11.4 the CUDA Visual Studio integration defines omitted user defines from PTX generation. With CUDA 11.5 this has been resolved, so we backport the fix to allow for consistent behavior when using CMake
* CUDA: Support nvcc 11.5 new -arch=all|all-major flagsRobert Maynard2021-11-013-0/+49
|
* CUDA: Allow both CUDA_SEPARABLE_COMPILATION and CUDA_PTX_COMPILATIONRobert Maynard2021-10-206-1/+97
| | | | | | The target properties `CUDA_SEPARABLE_COMPILATION` and `CUDA_PTX_COMPILATION` now aren't mutually exclusive and can now be used together on the same target.
* CUDA/Clang: Fix separable compilation in non-root directories with Makefilesroot2021-07-294-21/+22
| | | | | | | | Seems the relative paths were wrong basically all around such that only compiling files in the top-level directory would work. I've modified CudaOnly.SeparateCompilation to cover this. Fixes #22482.
* FindCUDAToolkit: Robust version checks when CUDA lang is not enabledRobert Maynard2021-02-094-0/+39
| | | | | | Previously if you set `CMAKE_CUDA_COMPILER` but hadn't enabled the CUDA language, FindCUDAToolkit would not correctly compute the version information.
* CUDA: Fix tests with CUDAARCHS setRaul Tambre2020-11-302-1/+6
| | | | | | | With CUDAARCHS there's the possibility of tests being run with multiple architectures or having CMAKE_CUDA_ARCHITECTURES set with NVCC despite CMP0104 being OLD. Fix a few tests to work properly in such cases.