Skip to content

Commit

Permalink
Continue if CUPTI is not initialized, closes #2
Browse files Browse the repository at this point in the history
  • Loading branch information
richardmembarth committed Feb 22, 2024
1 parent aeccf5d commit 3aaed55
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/benchmark/instrumentation/cuda/instrumentation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ Instrumentation::Instrumentation(int device)
return;
}

if (err == CUPTI_ERROR_NOT_INITIALIZED)
{
std::cerr << "WARNING: CUDA driver version is not compatible with the CUPTI version, CUPTI not initialized\n";
return;
}

const char *err_str;
cuptiGetResultString(err, &err_str);
std::cerr << "CUPTI ERROR code " << err << ": " << err_str << std::endl;

throw std::runtime_error("cuptiProfilerInitialize() failed");
}
}

0 comments on commit 3aaed55

Please sign in to comment.