Skip to content

[SYCL][Unit] Mock UR_DEVICE_INFO_PLATFORM in UrMock#22685

Merged
againull merged 1 commit into
intel:syclfrom
wenju-he:fix-sycl-unit-SYCL_UR_TRACE
Jul 21, 2026
Merged

[SYCL][Unit] Mock UR_DEVICE_INFO_PLATFORM in UrMock#22685
againull merged 1 commit into
intel:syclfrom
wenju-he:fix-sycl-unit-SYCL_UR_TRACE

Conversation

@wenju-he

Copy link
Copy Markdown
Contributor

Fixes SYCL_UR_TRACE=1 ninja check-sycl-unittests crash in #22683.

mock_urDeviceGetInfo() fell through to the default zero-fill case for UR_DEVICE_INFO_PLATFORM, so device::get_infoinfo::device::platform() returned a platform wrapping a null UR handle. This is latent unless something queries that platform afterwards, which
detail::traceDeviceSelection() does whenever SYCL_UR_TRACE is enabled, causing urPlatformGetInfo to fail with UR_RESULT_ERROR_INVALID_NULL_HANDLE and the process to abort on the uncaught exception.

Fixes `SYCL_UR_TRACE=1 ninja check-sycl-unittests` crash in intel#22683.

mock_urDeviceGetInfo() fell through to the default zero-fill case for
UR_DEVICE_INFO_PLATFORM, so device::get_info<info::device::platform>()
returned a platform wrapping a null UR handle. This is latent unless
something queries that platform afterwards, which
detail::traceDeviceSelection() does whenever SYCL_UR_TRACE is enabled,
causing urPlatformGetInfo to fail with UR_RESULT_ERROR_INVALID_NULL_HANDLE
and the process to abort on the uncaught exception.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
@wenju-he
wenju-he requested a review from a team as a code owner July 20, 2026 06:02
@wenju-he
wenju-he requested a review from cperkinsintel July 20, 2026 06:02
@wenju-he

Copy link
Copy Markdown
Contributor Author

@intel/llvm-gatekeepers please merge, thanks. This PR fixes local check-sycl-unittests. e2e fails on Arc and BMG are unrelated.

@againull
againull merged commit 6060cc8 into intel:sycl Jul 21, 2026
29 of 31 checks passed
@wenju-he
wenju-he deleted the fix-sycl-unit-SYCL_UR_TRACE branch July 21, 2026 04:48
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