summaryrefslogtreecommitdiff
path: root/Tests/Cuda
Commit message (Collapse)AuthorAgeFilesLines
* FindCUDAToolkit: Support CUDA version extraction from version.jsonRobert Maynard2023-05-041-0/+14
| | | | Fixes: #24858
* Revise C++ coding style using clang-format-15Kitware Robot2023-01-181-1/+1
| | | | | | | | | | | | | | 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 15. * 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. Fixes: #24315
* FindCUDAToolkit: Support the new `nvJitLink` library in CUDA 12Robert Maynard2022-12-121-0/+3
|
* FindCUDAToolkit: Ensure that paths provided have no symlinksRobert Maynard2022-11-301-0/+5
| | | | Fixes: #24188
* Tests: Don't presume that Linux CUDA Toolkits provide static libsRobert Maynard2022-11-2310-35/+107
|
* CMakeParseImplicitLinkInfo: Better detection of msvcRobert Maynard2022-09-021-1/+4
| | | | Use the compiler id information in addition to checking for `cl.exe`.
* CUDAToolkit: Add include paths for CUDA::cuptiPeter Bell2022-04-262-0/+13
| | | | | | | | CUDA's cupti library has its headers in a seperate directory on a standard CUDA install, but `CUDA::cupti` only adds the default cuda include directory. Issue: #22761
* compile_features: Ignore features that map to languages that aren't enabledRobert Maynard2021-06-255-56/+0
| | | | | Remove the Cuda/ConsumeCompileFeatures test as it only existed to validate that using `cxx_std_XY` would cause the paired language (CUDA) to also build in mode XY.
* FindCUDAToolkit: Robust version checks when CUDA lang is not enabledRobert Maynard2021-02-091-0/+4
| | | | | | Previously if you set `CMAKE_CUDA_COMPILER` but hadn't enabled the CUDA language, FindCUDAToolkit would not correctly compute the version information.
* CUDA: Clang separable compilationRaul Tambre2020-09-241-4/+3
| | | | | | | | | | | | For NVCC the compiler takes care of device linking when passed the "-dlink" flag. Clang doesn't support such magic and requires the buildsystem to do the work that NVCC does behind the scenes. The implementation is based on Bazel's device linking documentation: https://github.com/tensorflow/tensorflow/blob/7cabcdf073abad8c46e9dda62bb8fa4682d2061e/third_party/nccl/build_defs.bzl.tpl#L259 Closes: #20726
* Tests: Use sm_35 in Cuda.ProperDeviceLibraries for CUDA <10.0Raul Tambre2020-09-231-0/+5
| | | | | | Using the cublas device libraries seems to require at least sm_35. Set the architecture explicitly to sm_35 for old CUDA versions, which still have the cublas device library.
* Tests: Don't unnecessarily set CUDA_ARCHITECTURESRaul Tambre2020-09-2114-33/+16
| | | | | | | | | | | | | | Architecture 30 was removed with CUDA 11, so most of the CUDA tests fail with it. Remove setting the architecture and bump the minimum version to 3.18, so CMP0104 takes effect and we can rely on the default architecture, which is guaranteed to be compilable. Use of __ldg() in ProperLinkFlags was removed as it only affects performance and is available only on sm_35 and above. Testing the functionality of CUDA_ARCHITECTURES is already covered by CudaOnly.Architecture and CudaOnly.CompileFlags.
* Fix typos identified using codespellJean-Christophe Fillion-Robin2020-07-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See https://github.com/codespell-project/codespell#readme The following command was used: ``` codespell -q6 --skip="\ .git,\ *.json,\ ./Copyright.txt,\ ./Help/command/foreach.rst,\ ./Help/prop_test/REQUIRED_FILES.rst,\ ./Help/variable/CTEST_COVERAGE_COMMAND.rst,\ ./Modules/CMakeCheckCompilerFlagCommonPatterns.cmake,\ ./Modules/CMakeRCInformation.cmake,\ ./Modules/Internal/CPack/NSIS.template.in,\ ./Modules/FindMatlab.cmake,\ ./Modules/MatlabTestsRedirect.cmake,\ ./Modules/Platform/Windows-Clang.cmake,\ ./Modules/Platform/Windows-Intel-Fortran.cmake,\ ./Modules/Platform/Windows-MSVC.cmake,\ ./Source/CMakeVersion.cmake,\ ./Source/cmConvertMSBuildXMLToJSON.py,\ ./Source/cmCreateTestSourceList.cxx,\ ./Source/cmGlobalVisualStudio10Generator.cxx,\ ./Source/cmExportBuildFileGenerator.cxx,\ ./Source/cmExportInstallAndroidMKGenerator.cxx,\ ./Source/cmExportInstallFileGenerator.cxx,\ ./Source/cmExportSet.cxx,\ ./Source/cmExportTryCompileFileGenerator.cxx,\ ./Source/cmFindPackageCommand.cxx,\ ./Source/cmInstallCommand.cxx,\ ./Source/cmGeneratorExpressionLexer.cxx,\ ./Source/cmLocalVisualStudio7Generator.cxx,\ ./Source/cmOrderDirectories.cxx,\ ./Source/cmTarget.cxx,\ ./Source/kwsys/*,\ ./Source/QtDialog/CMakeSetupDialog.ui,\ ./Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx,\ ./Source/CTest/cmParseCoberturaCoverage.h,\ ./Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in,\ ./Tests/RunCMake/CPack/tests/DMG_SLA/English.license.rtf,\ ./Tests/RunCMake/CPack/tests/DMG_SLA/German.license.txt,\ ./Tests/RunCMake/CPack/tests/DMG_SLA/German.menu.txt,\ ./Tests/RunCMake/GoogleTest/xml_output.cpp,\ ./Tests/RunCMake/Make/TargetMessages*,\ ./Utilities/*,\ " \ -L "\ dependees,\ endwhile,\ fo,\ filetest,\ helpfull,\ nd,\ objext,\ stoll,\ supercedes,\ superceded,\ vas,\ varn,\ " ```
* CudaToolkit: Update for new/removed libraries in CUDA 11Robert Maynard2020-06-181-4/+18
|
* Tests: add CUDA labels to tests which are affected by CUDABen Boeckel2020-06-111-18/+23
|
* Tests: Restore NVCC-specific CUDA testsBrad King2020-05-201-1/+1
| | | | | | | | | | | | | | | | | In commit a653ca9504 (Tests: Update CUDA tests to work with Clang, 2020-03-27) some tests were conditioned using `CMAKE_CUDA_COMPILER_ID`. That is not defined when configuring CMake itself, so it accidentally turned off NVCC-specific CUDA tests altogether. Convert the conditions to check `CMake_TEST_CUDA` for `Clang` instead. That option is added explicitly to builds where we want the tests to run, so we can set it to a value indicating the CUDA compiler vendor. In commit a653ca9504 (Tests: Update CUDA tests to work with Clang, 2020-03-27) the NVCC-specific `CudaOnly.GPUDebugFlag` test was accidentally broken by removing a space when appending `-G` to the CUDA flags. This was covered by the test not running. Restore the space. Fixes: #20727
* Tests: Update CUDA tests to work with ClangRaul Tambre2020-05-152-4/+15
|
* CUDA: Convert tests to use CUDA_ARCHITECTURESRaul Tambre2020-04-159-14/+9
|
* CUDA: Add abstraction for cuda runtime selectionRobert Maynard2020-01-274-14/+33
| | | | | Fixes #17559 Replace our hard-coded default of cudart=static with a first-class abstraction to select the runtime library from an enumeration of logical names.
* Merge topic 'add_cuda_toolkit_tests'Brad King2020-01-1515-0/+480
|\ | | | | | | | | | | | | | | | | 6e474364d1 CUDAToolkit: No targets now depend on the CUDA runtime 907bb7df57 CUDAToolkit: Gracefully handle missing SDK components e500eb80cd CUDAToolkit: add_cuda_link_dependency correctly sets dependencies Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4183
| * CUDAToolkit: No targets now depend on the CUDA runtimeRobert Maynard2020-01-1415-0/+480
| | | | | | | | | | | | It is not a requirement to have shared|static consistent across your CUDA libraries (e.g curand, nppc ) and your CUDA runtime library. It is entirely allowable to use a static nppc and a shared runtime.
* | Merge branch 'backport-3.16-cuda-device-link-only-cuda'Brad King2020-01-093-0/+9
|\ \ | |/ |/|
| * Merge branch 'backport-3.15-cuda-device-link-only-cuda'Brad King2020-01-093-0/+9
| |\
| | * CUDA: Do not device link if target has no CUDA usageRobert Maynard2020-01-093-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When CUDA is enabled, and a pure non-CUDA target has CMAKE_CUDA_SEPARABLE_COMPILATION enabled, don't actually perform the device linking step, as it will fail. A target that has CMAKE_CUDA_SEPARABLE_COMPILATION enabled must also have CUDA usage (either itself, or something it links to). Fixes: #20182
* | | FindCUDAToolkit: correct searches for Toolkit componentsRobert Maynard2019-12-161-8/+1
| | |
* | | FindCUDAToolkit: Improve usage, library set, and testsRobert Maynard2019-12-165-4/+58
| | | | | | | | | | | | | | | | | | Refined the initial design of FindCUDAToolkit and improve it by adding more library support, more toolkit information and tests.
* | | CUDA: Add cuda meta-features (e.g. ``cuda_std_11``) supportRobert Maynard2019-12-1018-5/+165
|/ /
* | Revise include order using clang-format-6.0Kitware Robot2019-10-015-6/+10
|/ | | | | Run the `clang-format.bash` script to update our C and C++ code to a new include order `.clang-format`. Use `clang-format` version 6.0.
* CUDA: Do not device link if CUDA is not an enabled languageRobert Maynard2019-07-014-0/+29
| | | | | | | | | | | | | Checks added in commit 81b4d10d8f (CUDA: More exhaustive checks to determine when to do device linking, 2019-05-09, v3.15.0-rc1~82^2) assumed that CUDA properties would be set only if CUDA is enabled. We cannot do a device link step if we do not have the CUDA language enabled. This was discovered as some projects unconditionally set CUDA properties such as `CUDA_RESOLVE_DEVICE_SYMBOLS` even when the CUDA language has not been enabled. Fixes: #19432
* CUDA: Add test for device linking when host linking uses threadsRobert Maynard2018-10-245-0/+156
| | | | | | | | | Convert the `CudaOnly.LinkSystemDeviceLibraries` test to a new `Cuda.ProperDeviceLibraries` test. The former covered only the `cublas_device` library which is removed by CUDA 10. Extend the new test to also cover various cases of using threads. Issue: #18008
* Tests: Fix Cuda test project namesBrad King2018-10-105-5/+5
| | | | | Make them match what `ADD_TEST_MACRO` gives to ctest as the project name to build so that the `.sln` file will be found.
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-016-15/+15
| | | | | | | | | | | | 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.
* CUDA: Use MSVC default pattern for naming object filesRobert Maynard2018-01-306-23/+37
| | | | | The default that CUDA uses causes failures when you try to embed CUDA obj's into another target.
* Various typo fixesLuz Paz2018-01-041-1/+1
| | | | Some are user-facing. Others are source comments.
* CUDA: Fix CUDA_STANDARD selection via cxx_std_11 with CXX_STANDARDRobert Maynard2017-12-153-0/+25
| | | | | | | | | | | When C++ features require a certain C++/CUDA level, verify or update the standard level target property for each language independently. While at it, add missing rejection of invalid `CUDA_STANDARD` property values. Co-Author: Brad King <brad.king@kitware.com> Fixes: #17519
* clang-format: format all code as Cpp11Daniel Pfeifer2017-08-301-9/+0
|
* Tests: Simplify CUDA rpath on macOSBrad King2017-06-213-9/+7
| | | | | Use the `BUILD_RPATH` property and reference the CMake-computed location of the runtime libraries.
* CUDA: Visual Studio now properly delays device linkingRobert Maynard2017-04-261-1/+1
|
* CUDA: ObjectLibrary test executable now runs on OSXRobert Maynard2017-03-231-0/+5
|
* Merge topic 'cuda-msvc-flags'Brad King2017-02-163-3/+3
|\ | | | | | | | | | | 55fb46d2 CUDA: Fix default compiler flags on Windows d7c80f60 CUDA: Fix test cases to not override CUDA flags
| * CUDA: Fix test cases to not override CUDA flagsBrad King2017-02-153-3/+3
| | | | | | | | Append to `CMAKE_CUDA_FLAGS` instead of overwriting it.
* | Merge topic 'cuda-with-c'Brad King2017-02-154-0/+43
|\ \ | |/ | | | | | | | | 1c60231c CUDA: Link to standard system libraries when linking as CUDA 8d75d8dc Tests: Add case for CUDA with C but not C++
| * CUDA: Link to standard system libraries when linking as CUDABrad King2017-02-141-0/+8
| | | | | | | | | | | | | | On Windows with MSVC-like host compilers we must honor the standard libraries chosen by the `Platform/Windows-MSVC` module. Otherwise C code linked into the CUDA binary that expects to have these libraries available may not link.
| * Tests: Add case for CUDA with C but not C++Brad King2017-02-144-0/+35
| | | | | | | | An executable using CUDA and C should link as CUDA.
| * Tests: Run clang-format on CUDA codeBrad King2017-02-148-36/+26
| |
* | Tests: Run clang-format on CUDA codeBrad King2017-02-148-83/+58
| |
* | Merge branch 'backport-clang-format-cuda' into clang-format-cudaBrad King2017-02-141-0/+9
|\ \ | |/
| * clang-format.bash: Format CUDA source files tooBrad King2017-02-141-0/+9
| | | | | | | | | | | | Add `.clang-format` configuration files for Cuda test directories that use `Standard: Cpp11`. Otherwise clang-format splits the triple angle brackets used for CUDA kernels.
* | Merge topic 'cmake_provide_include_dir_for_toolkit'Brad King2017-02-143-0/+20
|\ \ | |/ | | | | | | 44f3acb2 CUDA: Detect the toolkit include directories
| * CUDA: Detect the toolkit include directoriesRobert Maynard2017-02-103-0/+20
| | | | | | | | | | The `nvcc -v` output provides what include directories need to be added to use the CUDA toolkit from other languages ( C/C++ ).