diff options
Diffstat (limited to 'Tests/Cuda/StubRPATH/main.cxx')
-rw-r--r-- | Tests/Cuda/StubRPATH/main.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Tests/Cuda/StubRPATH/main.cxx b/Tests/Cuda/StubRPATH/main.cxx new file mode 100644 index 0000000..877856e --- /dev/null +++ b/Tests/Cuda/StubRPATH/main.cxx @@ -0,0 +1,17 @@ + +#include <iostream> + +#include <cuda.h> + +int main(int argc, char** argv) +{ + int nDevices = 0; + cuInit(0); + auto err = cuDeviceGetCount(&nDevices); + if (err != CUDA_SUCCESS) { + std::cerr << "Failed to retrieve the number of CUDA enabled devices " + << err << std::endl; + return 1; + } + return 0; +} |