Skip to content

Commit

Permalink
Merge pull request #124 from gcongiu/2023.11.17_fix-intercept-mode-bug
Browse files Browse the repository at this point in the history
Fix intercept mode bugs
gcongiu authored Nov 27, 2023
2 parents 7d9e811 + 291f513 commit e15e214
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/rocm/roc_profiler.c
Original file line number Diff line number Diff line change
@@ -1374,7 +1374,7 @@ intercept_ctx_reset(rocp_ctx_t rocp_ctx)
{
int i;

for (i = 0; i < INTERCEPT_ROCP_FEATURE_COUNT; ++i) {
for (i = 0; i < rocp_ctx->u.intercept.feature_count; ++i) {
rocp_ctx->u.intercept.counters[i] = 0;
}

@@ -1981,7 +1981,7 @@ get_context_counters(unsigned int dev_id, cb_context_node_t *n, rocp_ctx_t rocp_
break;
}
}
if (j < rocp_ctx->u.intercept.feature_count) {
if (j >= rocp_ctx->u.intercept.feature_count) {
return PAPI_ECMP;
}
rocp_ctx->u.intercept.counters[j] += n->counters[i];

0 comments on commit e15e214

Please sign in to comment.