Skip to content

Commit

Permalink
Fix handle translation when ddi table fallback (#185)
Browse files Browse the repository at this point in the history
- When enough drivers are removed that ddi table fallback is completed,
  then intercept_enabled needs to be set to false such that handle
translation is done correctly.

Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
  • Loading branch information
nrspruit authored Aug 27, 2024
1 parent cba2c7d commit 827a709
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/lib/ze_lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ namespace ze_lib
{
result = zetDdiTableInit();
}
// If ze/zet ddi tables have been reinit and no longer use the intercept layer, then handles passed to zelLoaderTranslateHandleInternal do not require translation.
// Setting intercept_enabled==false changes the behavior of zelLoaderTranslateHandleInternal to avoid translation.
// Translation is only required if the intercept layer is enabled for the ZE handle types.
loader::context->intercept_enabled = false;
}
if (sysmanOnly || sysmanEnv) {
// reInit the ZES DDI Tables
Expand Down

0 comments on commit 827a709

Please # to comment.