Add additional check for optional tables during init by nrspruit · Pull Request #407 · oneapi-src/level-zero
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request modifies the driver initialization logic to properly handle optional DDI (Device Driver Interface) tables. The change allows optional tables to fail gracefully without stopping the initialization process, while still failing fast on required table errors. This is achieved by ignoring return values from optional table loading functions and resetting the result to SUCCESS, ensuring the initialization continues to load remaining tables.
Key Changes:
- Modified initialization functions across multiple loader files to treat optional DDI tables differently from required ones
- Updated the template file to generate code that handles optional tables conditionally based on namespace
- Version bumped from 1.26.2 to 1.26.3
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| source/loader/zet_ldrddi.cpp | Added documentation and modified init function to ignore failures from optional DDI tables (Exp variants) |
| source/loader/zes_ldrddi.cpp | Added documentation and modified init function to ignore failures from optional DDI tables, removed error handling for specific optional tables |
| source/loader/zer_ldrddi.cpp | Added comprehensive documentation for the init function behavior |
| source/loader/ze_ldrddi.cpp | Added documentation and modified init function to ignore failures from optional DDI tables (Exp and RTAS variants) |
| scripts/templates/ldrddi.cpp.mako | Updated template to conditionally generate error handling based on whether table is optional |
| PRODUCT_GUID.txt | Updated version from 1.26.2 to 1.26.3 and refreshed GUID |
| CMakeLists.txt | Updated project version from 1.26.2 to 1.26.3 |
| CHANGELOG.md | Added v1.26.3 entry documenting the fix for optional DDI table handling |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.