Skip to content

Conversation

nrspruit
Copy link
Contributor

@nrspruit nrspruit commented Oct 20, 2025

  • Fix the zer Global Init to be treated like an experimental init that
    cannot affect the ability to use a driver.
  • Zero initialize the zer DDI tables to avoid uninitialized memory reads
    when a driver does not implement all DDI functions.

@vishnu-khanth
Copy link
Contributor

vishnu-khanth commented Oct 20, 2025

we may also have to uncomment the test GivenLevelZeroLoaderPresentWithLoaderInterceptEnabledAndRuntimeApiUnsupportedWhenCallingRuntimeApisAfterZeInitThenExpectErrorUnsupportedFeature

and add it to CMakeList

@nrspruit
Copy link
Contributor Author

we may also have to uncomment the test GivenLevelZeroLoaderPresentWithLoaderInterceptEnabledAndRuntimeApiUnsupportedWhenCallingRuntimeApisAfterZeInitThenExpectErrorUnsupportedFeature

and add it to CMakeList

Great, let me do that in this review to see if there are additional issues.

@nrspruit nrspruit changed the title Fix zer Global table init to be optional Fix zer Global table init to be optional and zero init DDI tables Oct 20, 2025
@nrspruit nrspruit force-pushed the fix_zer_initcheck branch 3 times, most recently from aae21a3 to 5606512 Compare October 20, 2025 17:54
- Fix the zer Global Init to be treated like an experimental init that
  cannot affect the ability to use a driver.
- Zero initialize the zer DDI tables to avoid uninitialized memory reads
  when a driver does not implement all DDI functions.

Signed-off-by: Neil R. Spruit <[email protected]>
# Add runtime_api_unsupported tests for single driver
if(init_method STREQUAL "ZeInitDrivers")
if(init_method STREQUAL "ZeInitDrivers" OR init_method STREQUAL "ZeInit")
add_runtime_api_test("runtime_api_unsupported" ${init_method} "single_driver")
Copy link
Contributor

@vishnu-khanth vishnu-khanth Oct 21, 2025

Choose a reason for hiding this comment

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

minor:
The test name seems to have typo with runtime_api duplicated (tests_single_driver_runtime_api_runtime_api_unsupported_ZeInitDrivers)

Hence we could rename runtime_api_unsupported -> unsupported
Similarly at 623 aswell

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!

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