Skip to content

[UR][L0v2] Introduce urGraphGetIdExp to provide unique graph identifiers#22418

Open
mmichel11 wants to merge 3 commits into
intel:syclfrom
adamfidel:matt/ur_graph_id
Open

[UR][L0v2] Introduce urGraphGetIdExp to provide unique graph identifiers#22418
mmichel11 wants to merge 3 commits into
intel:syclfrom
adamfidel:matt/ur_graph_id

Conversation

@mmichel11

Copy link
Copy Markdown
Contributor
  • Implements urGraphGetIdExp which internally invokes zeGraphGetIdExt to align SYCL native graph IDs with L0
  • The identifier is process-unique and persists beyond graph destruction

@mmichel11 mmichel11 force-pushed the matt/ur_graph_id branch 3 times, most recently from fff8797 to 8036347 Compare June 24, 2026 22:53
// that predate its support leads to memory corruption errors in
// sycl/test-e2e/Adapters/level_zero/ tests, so manually check the driver
// version until the issue is resolved.
if (this->isDriverVersionNewerOrSimilar(1, 15, 38921)) {

@mmichel11 mmichel11 Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I first observed these non-graph test failures in: https://github.com/intel/llvm/actions/runs/28179054588 where the driver does not yet support zeGraphGetIdExp. I reproduced this issue locally and confirmed the affected tests pass once I use a driver that supports zeGraphGetIdExt and skip the zeDriverGetExtensionFunctionAddress call for older drivers.

There's an issue to be filed to L0 which seems to be the source of this memory corruption, but this check provides us a workaround for now.

@mmichel11

Copy link
Copy Markdown
Contributor Author

The added UR test is skipped in CI as the driver does not yet contain the new L0 graph function. Here are the results from a local BMG run with a new driver build:

urGraphGetIdExp L0v2 BMG
$ ./test/conformance/exp_graph/exp_graph-test --gtest_filter="*urGraphGetIdExp*Level_Zero_V2*"
Note: Google Test filter = *urGraphGetIdExp*Level_Zero_V2*
[==========] Running 8 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 8 tests from urGraphGetIdExpTest
[ RUN      ] urGraphGetIdExpTest.SuccessMonotonicallyIncreasing/UR_BACKEND_LEVEL_ZERO__Intel_R__oneAPI_Unified_Runtime_over_Level_Zero_V2__Intel_R__Arc_TM__B580_Graphics_ID0ID______________________default_queue_submission_mode
[       OK ] urGraphGetIdExpTest.SuccessMonotonicallyIncreasing/UR_BACKEND_LEVEL_ZERO__Intel_R__oneAPI_Unified_Runtime_over_Level_Zero_V2__Intel_R__Arc_TM__B580_Graphics_ID0ID______________________default_queue_submission_mode (6 ms)
[ RUN      ] urGraphGetIdExpTest.SuccessMonotonicallyIncreasing/UR_BACKEND_LEVEL_ZERO__Intel_R__oneAPI_Unified_Runtime_over_Level_Zero_V2__Intel_R__Arc_TM__B580_Graphics_ID0ID______________________UR_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE
[       OK ] urGraphGetIdExpTest.SuccessMonotonicallyIncreasing/UR_BACKEND_LEVEL_ZERO__Intel_R__oneAPI_Unified_Runtime_over_Level_Zero_V2__Intel_R__Arc_TM__B580_Graphics_ID0ID______________________UR_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE (3 ms)
[ RUN      ] urGraphGetIdExpTest.SuccessUniqueAcrossContexts/UR_BACKEND_LEVEL_ZERO__Intel_R__oneAPI_Unified_Runtime_over_Level_Zero_V2__Intel_R__Arc_TM__B580_Graphics_ID0ID______________________default_queue_submission_mode
[       OK ] urGraphGetIdExpTest.SuccessUniqueAcrossContexts/UR_BACKEND_LEVEL_ZERO__Intel_R__oneAPI_Unified_Runtime_over_Level_Zero_V2__Intel_R__Arc_TM__B580_Graphics_ID0ID______________________default_queue_submission_mode (2 ms)
[ RUN      ] urGraphGetIdExpTest.SuccessUniqueAcrossContexts/UR_BACKEND_LEVEL_ZERO__Intel_R__oneAPI_Unified_Runtime_over_Level_Zero_V2__Intel_R__Arc_TM__B580_Graphics_ID0ID______________________UR_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE
[       OK ] urGraphGetIdExpTest.SuccessUniqueAcrossContexts/UR_BACKEND_LEVEL_ZERO__Intel_R__oneAPI_Unified_Runtime_over_Level_Zero_V2__Intel_R__Arc_TM__B580_Graphics_ID0ID______________________UR_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE (2 ms)
[ RUN      ] urGraphGetIdExpTest.InvalidNullHandleGraph/UR_BACKEND_LEVEL_ZERO__Intel_R__oneAPI_Unified_Runtime_over_Level_Zero_V2__Intel_R__Arc_TM__B580_Graphics_ID0ID______________________default_queue_submission_mode
[       OK ] urGraphGetIdExpTest.InvalidNullHandleGraph/UR_BACKEND_LEVEL_ZERO__Intel_R__oneAPI_Unified_Runtime_over_Level_Zero_V2__Intel_R__Arc_TM__B580_Graphics_ID0ID______________________default_queue_submission_mode (1 ms)
[ RUN      ] urGraphGetIdExpTest.InvalidNullHandleGraph/UR_BACKEND_LEVEL_ZERO__Intel_R__oneAPI_Unified_Runtime_over_Level_Zero_V2__Intel_R__Arc_TM__B580_Graphics_ID0ID______________________UR_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE
[       OK ] urGraphGetIdExpTest.InvalidNullHandleGraph/UR_BACKEND_LEVEL_ZERO__Intel_R__oneAPI_Unified_Runtime_over_Level_Zero_V2__Intel_R__Arc_TM__B580_Graphics_ID0ID______________________UR_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE (1 ms)
[ RUN      ] urGraphGetIdExpTest.InvalidNullPtrGraphId/UR_BACKEND_LEVEL_ZERO__Intel_R__oneAPI_Unified_Runtime_over_Level_Zero_V2__Intel_R__Arc_TM__B580_Graphics_ID0ID______________________default_queue_submission_mode
[       OK ] urGraphGetIdExpTest.InvalidNullPtrGraphId/UR_BACKEND_LEVEL_ZERO__Intel_R__oneAPI_Unified_Runtime_over_Level_Zero_V2__Intel_R__Arc_TM__B580_Graphics_ID0ID______________________default_queue_submission_mode (1 ms)
[ RUN      ] urGraphGetIdExpTest.InvalidNullPtrGraphId/UR_BACKEND_LEVEL_ZERO__Intel_R__oneAPI_Unified_Runtime_over_Level_Zero_V2__Intel_R__Arc_TM__B580_Graphics_ID0ID______________________UR_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE
[       OK ] urGraphGetIdExpTest.InvalidNullPtrGraphId/UR_BACKEND_LEVEL_ZERO__Intel_R__oneAPI_Unified_Runtime_over_Level_Zero_V2__Intel_R__Arc_TM__B580_Graphics_ID0ID______________________UR_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE (1 ms)
[----------] 8 tests from urGraphGetIdExpTest (20 ms total)

[----------] Global test environment tear-down
[==========] 8 tests from 1 test suite ran. (20 ms total)
[  PASSED  ] 8 tests.

The MacOS build and Adapters/level_zero/batch_event_status.cpp failure appear unrelated and are showing up in other PR jobs.

@mmichel11 mmichel11 marked this pull request as ready for review June 26, 2026 02:10
@mmichel11 mmichel11 requested review from a team as code owners June 26, 2026 02:10
@mmichel11 mmichel11 requested a review from kekaczma June 26, 2026 02:10

@bratpiorka bratpiorka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

CUDA/HIP/OpenCL/native cpu LGTM

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.

3 participants