diff options
author | Brad King <brad.king@kitware.com> | 2018-08-24 17:25:51 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-08-24 17:35:01 (GMT) |
commit | 36f49faa3cdd18bac40c97f301a8d677dba8efa1 (patch) | |
tree | 1bee0cab3cdd5c8742f1edc6bb7d4a9b20819b6e /Tests/CudaOnly | |
parent | 7b148e7a3037a7a7d852244e391a7350d8e75d64 (diff) | |
parent | 122c79748c30fb80d911591472cba8d6efdb75ae (diff) | |
download | CMake-36f49faa3cdd18bac40c97f301a8d677dba8efa1.zip CMake-36f49faa3cdd18bac40c97f301a8d677dba8efa1.tar.gz CMake-36f49faa3cdd18bac40c97f301a8d677dba8efa1.tar.bz2 |
Merge topic 'cuda-no-cublas_device'
122c79748c CUDA: Avoid using deprecated cublas_device to identify device lib dirs
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2296
Diffstat (limited to 'Tests/CudaOnly')
-rw-r--r-- | Tests/CudaOnly/LinkSystemDeviceLibraries/main.cu | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Tests/CudaOnly/LinkSystemDeviceLibraries/main.cu b/Tests/CudaOnly/LinkSystemDeviceLibraries/main.cu index 7eecec1..2c7c388 100644 --- a/Tests/CudaOnly/LinkSystemDeviceLibraries/main.cu +++ b/Tests/CudaOnly/LinkSystemDeviceLibraries/main.cu @@ -3,6 +3,9 @@ #include <cuda_runtime.h> #include <iostream> +// this test only makes sense for versions of CUDA that ships +// static libraries that have separable compilation device symbols +#if __CUDACC_VER_MAJOR__ <= 9 __global__ void deviceCublasSgemm(int n, float alpha, float beta, const float* d_A, const float* d_B, float* d_C) @@ -22,6 +25,7 @@ __global__ void deviceCublasSgemm(int n, float alpha, float beta, cublasDestroy(cnpHandle); } +#endif int choose_cuda_device() { @@ -63,6 +67,7 @@ int main(int argc, char** argv) return 0; } +#if __CUDACC_VER_MAJOR__ <= 9 // initial values that will make sure that the cublasSgemm won't actually // do any work int n = 0; @@ -72,6 +77,7 @@ int main(int argc, char** argv) float* d_B = nullptr; float* d_C = nullptr; deviceCublasSgemm<<<1, 1>>>(n, alpha, beta, d_A, d_B, d_C); +#endif return 0; } |