Skip to content

Commit

Permalink
Use a zone instead of an message so that we can count in the trace.
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Woloszyn <[email protected]>
  • Loading branch information
AWoloszyn committed Nov 12, 2024
1 parent cc33ba7 commit 50276f7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion runtime/src/iree/hal/drivers/hip/context_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ static inline iree_status_t iree_hal_hip_set_context(
IREE_HIP_RETURN_IF_ERROR(syms, hipCtxGetCurrent(&current_context),
"hipCtxGetCurrent");
if (current_context != hip_context) {
IREE_TRACE_MESSAGE(INFO, "Hip Context Switch");
IREE_TRACE_ZONE_BEGIN_NAMED(z0, "iree_hal_hip_set_context_switch");
iree_status_t status =
IREE_HIP_RESULT_TO_STATUS(syms, hipCtxSetCurrent(hip_context));
IREE_TRACE_ZONE_END(z0);
return status;
}
});
return IREE_HIP_RESULT_TO_STATUS(syms, hipCtxSetCurrent(hip_context));
Expand Down

0 comments on commit 50276f7

Please sign in to comment.