Skip to content

Commit

Permalink
Don't call cuptiFinalize for cupti versions between 18 and 21.
Browse files Browse the repository at this point in the history
  • Loading branch information
khuck committed Sep 19, 2024
1 parent a197703 commit 7a8f36b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/apex/cupti_trace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2066,7 +2066,14 @@ void apex_init_cuda_tracing() {
if (!apex::apex_options::use_cuda()) { return; }
apex_flush_cuda_tracing();
CUPTI_CALL(cuptiUnsubscribe(subscriber));
CUPTI_CALL(cuptiFinalize());
uint32_t version{0};
CUPTI_CALL(cuptiGetVersion(&version));
// cupti 12 introduced a bug that was fixed in version 12.4.
// see https://forums.developer.nvidia.com/t/cuda-profiler-tools-interface-cupti-for-cuda-toolkit-12-4-is-now-available/279799
//printf("Cupti version: %d\n", version);
if (version < 18 || version > 21) {
CUPTI_CALL(cuptiFinalize());
}
// get_range_map().clear();
//std::cout << "* * * * * * * * EXITING CUPTI SUPPORT * * * * * * * * * *" << std::endl;
allGood = false;
Expand Down

0 comments on commit 7a8f36b

Please sign in to comment.