summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Tests/CudaOnly/GPUDebugFlag/main.cu5
1 files changed, 5 insertions, 0 deletions
diff --git a/Tests/CudaOnly/GPUDebugFlag/main.cu b/Tests/CudaOnly/GPUDebugFlag/main.cu
index 8b97a3f..1f3fc12 100644
--- a/Tests/CudaOnly/GPUDebugFlag/main.cu
+++ b/Tests/CudaOnly/GPUDebugFlag/main.cu
@@ -49,6 +49,11 @@ int main(int argc, char** argv)
{
bool* has_debug;
cudaError_t err = cudaMallocManaged(&has_debug, sizeof(bool));
+ if (err != cudaSuccess) {
+ std::cerr << "cudaMallocManaged failed:\n"
+ << " " << cudaGetErrorString(err) << std::endl;
+ return 1;
+ }
debug_kernel<<<1, 1>>>(has_debug);
err = cudaDeviceSynchronize();