Skip to content

Commit

Permalink
Temp to check for issue
Browse files Browse the repository at this point in the history
  • Loading branch information
AWoloszyn committed Nov 12, 2024
1 parent b47bf2f commit 141d31a
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions runtime/src/iree/hal/drivers/hip/context_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,20 @@

static inline iree_status_t iree_hal_hip_set_context(
const iree_hal_hip_dynamic_symbols_t* syms, hipCtx_t hip_context) {
IREE_TRACE({
hipCtx_t current_context = NULL;
IREE_HIP_RETURN_IF_ERROR(syms, hipCtxGetCurrent(&current_context),
"hipCtxGetCurrent");
if (current_context != hip_context) {
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));
return iree_ok_status();
// IREE_TRACE({
// hipCtx_t current_context = NULL;
// IREE_HIP_RETURN_IF_ERROR(syms, hipCtxGetCurrent(&current_context),
// "hipCtxGetCurrent");
// if (current_context != hip_context) {
// 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));
}

#endif // IREE_HAL_DRIVERS_HIP_CONTEXT_UTIL_H_

0 comments on commit 141d31a

Please sign in to comment.