Skip to content

Commit

Permalink
Only allow ddi table reinit given Program Instrumentation is disabled
Browse files Browse the repository at this point in the history
Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
  • Loading branch information
nrspruit committed Aug 21, 2024
1 parent 9af67d5 commit b53f564
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/lib/ze_lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ namespace ze_lib
bool requireDdiReinit = false;
result = zelLoaderDriverCheck(flags, &ze_lib::context->initialzeDdiTable.Global, &requireDdiReinit);
// If a driver was removed from the driver list, then the ddi tables need to be reinit to allow for passthru directly to the driver.
if (requireDdiReinit) {
// If ZET_ENABLE_PROGRAM_INSTRUMENTATION is enabled, then reInit is not possible due to the functions being intercepted with the previous ddi tables.
auto programInstrumentationEnabled = getenv_tobool( "ZET_ENABLE_PROGRAM_INSTRUMENTATION" );
if (requireDdiReinit && !programInstrumentationEnabled) {
// reInit the ZE DDI Tables
if( ZE_RESULT_SUCCESS == result )
{
Expand Down

0 comments on commit b53f564

Please sign in to comment.