Skip to content

Commit

Permalink
Fix nvtx call when stopping and restarting timers
Browse files Browse the repository at this point in the history
  • Loading branch information
maddyscientist committed Jan 9, 2024
1 parent 732d095 commit 01f84f6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/timer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,13 @@ namespace quda {
qudaDeviceSynchronize();
profile[i].stop(file, func, line);
if (use_global) StopGlobal(func, file, line, static_cast<QudaProfileType>(i));
POP_RANGE;
pt_stack.push(static_cast<QudaProfileType>(i));
}
}

profile[idx].start(func, file, line);
PUSH_RANGE(fname.c_str(), idx)
PUSH_RANGE(fname.c_str(), idx);
if (use_global) StartGlobal(func, file, line, idx);
}

Expand All @@ -188,7 +189,7 @@ namespace quda {
errorQuda("Failed to stop timer idx = %d", idx);
}
if (use_global) StopGlobal(func, file, line, idx);
POP_RANGE
POP_RANGE;

if (pt_stack.empty()) {
StopTotal(func, file, line, idx);
Expand All @@ -197,6 +198,7 @@ namespace quda {
auto i = pt_stack.top();
pt_stack.pop();
profile[i].start(func, file, line);
PUSH_RANGE(fname.c_str(), i);
if (use_global) StartGlobal(func, file, line, i);
}
}
Expand Down

0 comments on commit 01f84f6

Please sign in to comment.