summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-11-23 12:50:33 (GMT)
committerBrad King <brad.king@kitware.com>2022-11-23 12:52:19 (GMT)
commit9474d0238690ee032037e13f4317f8366f69538a (patch)
treebe2d0ddf55d1a3b095b95a097499f4ca38f857d4 /Tests
parent9b9a42166803e864a8b08c22cadfe8db447acb40 (diff)
downloadCMake-9474d0238690ee032037e13f4317f8366f69538a.zip
CMake-9474d0238690ee032037e13f4317f8366f69538a.tar.gz
CMake-9474d0238690ee032037e13f4317f8366f69538a.tar.bz2
Tests: Clarify CudaOnly.SeparateCompilationPTX output
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CudaOnly/SeparateCompilationPTX/main.cu9
1 files changed, 5 insertions, 4 deletions
diff --git a/Tests/CudaOnly/SeparateCompilationPTX/main.cu b/Tests/CudaOnly/SeparateCompilationPTX/main.cu
index 164cde5..f94beff 100644
--- a/Tests/CudaOnly/SeparateCompilationPTX/main.cu
+++ b/Tests/CudaOnly/SeparateCompilationPTX/main.cu
@@ -21,10 +21,11 @@ int main()
cuCtxCreate(&context, 0, device);
CUmodule module;
- cuModuleLoadData(&module, kernels);
- if (module == nullptr) {
- std::cerr << "Failed to load the embedded ptx" << std::endl;
+ CUresult result = cuModuleLoadData(&module, kernels);
+ std::cout << "module pointer: " << module << '\n';
+ if (result != CUDA_SUCCESS || module == nullptr) {
+ std::cerr << "Failed to load the embedded ptx with error: "
+ << static_cast<unsigned int>(result) << '\n';
return 1;
}
- std::cout << module << std::endl;
}