Skip to content

Conversation

@nrspruit
Copy link
Contributor

@nrspruit nrspruit commented Oct 16, 2025

  • Delay to load of the L0 Driver Libraries until the user has directly
    requested the library to be loaded thru the flags.
  • Remove the "pretest" of driver support and instead assume driver
    support based on naming and registry categorization. Speeds up loader
    init.
  • Moved init of driver libraries until zInitDrivers or zeInit
  • Added ULTs to verify the new init_driver functionality

@nrspruit nrspruit force-pushed the init_refactor branch 12 times, most recently from c8b0eb3 to 3e550da Compare October 22, 2025 20:05
@nrspruit nrspruit force-pushed the init_refactor branch 3 times, most recently from 20c2abe to f35ffc2 Compare October 28, 2025 22:15
@nrspruit
Copy link
Contributor Author

Abi issues are invalid so please ignore.

@nrspruit nrspruit marked this pull request as ready for review October 29, 2025 14:26
@nrspruit nrspruit force-pushed the init_refactor branch 4 times, most recently from 7d3c02b to e3858a5 Compare October 30, 2025 15:44
@nrspruit
Copy link
Contributor Author

Because some of the tests are changed due to the refactor, the tests that are failing in the n-1 are expected. they are the changed tests.

- Delay to load of the L0 Driver Libraries until the user has directly
  requested the library to be loaded thru the flags.
- Remove the "pretest" of driver support and instead assume driver
  support based on naming and registry categorization. Speeds up loader
  init.
- Moved init of drivers until zInitDrivers or zeInit
- Added ULTs to verify the new init_driver functionality
Signed-off-by: Neil R. Spruit <[email protected]>
Signed-off-by: Neil R. Spruit <[email protected]>
Signed-off-by: Neil R. Spruit <[email protected]>
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
-D CMAKE_BUILD_TYPE=Release \
-D BUILD_L0_LOADER_TESTS=1 \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think may not be required since BUILD_L0_LOADER_TESTS is enabled for static loader build

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because of the fake drivers I have created this indicates the creation of those libraries as part of that build option. so, even though we don't use the "tests" in the dynamic build folder, we will use the test libraries in the lib.

Copy link
Contributor

@vishnu-khanth vishnu-khanth Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. Then I guess the same thing can be added to buil-quick-static-n-1 aswell.
So that for static n-1 testing for future PR's (which will have driver init tests as part of n-1 static build), fake libs gets generated in dynamic_loader folder to use it for driver init tests

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than this, looks good to me!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in latest, thanks!

desc.pNext = nullptr;
putenv_safe( const_cast<char *>( "ZEL_TEST_MISSING_API=zeInitDrivers" ) );
EXPECT_EQ(ZE_RESULT_ERROR_UNINITIALIZED, zeInitDrivers(&pInitDriversCount, nullptr, &desc));
EXPECT_EQ(ZE_RESULT_ERROR_UNSUPPORTED_FEATURE, zeInitDrivers(&pInitDriversCount, nullptr, &desc));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: test name could also be updated

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I will update that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in latest

EXPECT_EQ(ZE_RESULT_ERROR_UNSUPPORTED_FEATURE, result);
EXPECT_EQ(0, tracingData.getZerPrologueCallCount("zerGetLastErrorDescription"));
EXPECT_EQ(0, tracingData.getZerEpilogueCallCount("zerGetLastErrorDescription"));
// ZER callbacks should still be called in the tracing layer even if the driver ends up not supporting ZER APIs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: test name can be updated here aswell

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I will rewrite the test name.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants