Skip to content

Commit

Permalink
Only set the hip context if it is valid.
Browse files Browse the repository at this point in the history
  • Loading branch information
AWoloszyn committed Nov 13, 2024
1 parent f563521 commit a48e08f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions runtime/src/iree/hal/drivers/hip/context_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

static inline iree_status_t iree_hal_hip_set_context(
const iree_hal_hip_dynamic_symbols_t* syms, hipCtx_t hip_context) {
if (!hip_context) {
return iree_ok_status();
}
IREE_TRACE({
hipCtx_t current_context = NULL;
IREE_HIP_RETURN_IF_ERROR(syms, hipCtxGetCurrent(&current_context),
Expand Down

0 comments on commit a48e08f

Please sign in to comment.