Skip to content

[SYCL] Enable UR validation layer on SYCL RT e2e precommit jobs #18651

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: sycl
Choose a base branch
from

Conversation

martygrant
Copy link
Contributor

@martygrant martygrant commented May 23, 2025

We would like to enable the validation layer in UR for the precommit e2e testing jobs. This layer is disabled currently to bypass the overhead of extra checks, but the same checks have propagated through to the UR adapters where they are not required. If the checks are removed from the adapters then some e2e tests will fail as some incorrect usage is not being caught by the validation layer.

Docs on UR layers: https://oneapi-src.github.io/unified-runtime/core/INTRO.html#layers

Closes #18257

@martygrant martygrant requested a review from a team as a code owner May 23, 2025 14:20
@martygrant martygrant changed the title Enable UR validation layer on SYCL RT e2e precommit jobs [SYCL] Enable UR validation layer on SYCL RT e2e precommit jobs May 23, 2025
Copy link
Contributor

@sarnex sarnex left a comment

Choose a reason for hiding this comment

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

Is this expected to have a performance impact on test runtime? If so do we have an idea of how much? Thx

@martygrant
Copy link
Contributor Author

@sarnex I've done some investigation to see if there's any impact with enabling the validation layer:

This is running sycl branch in a release build from commit d63672bc9b0f09d231be9d0ac81d04a884a380cd. I ran the e2e tests against CUDA, OpenCL and L0 5 times with the following options and took an average for each:

  • without validation enabled
  • with full validation (UR_ENABLE_LAYERS=UR_LAYER_FULL_VALIDATION)
  • with only parameter validation (UR_ENABLE_LAYERS=UR_LAYER_PARAMETER_VALIDATION)

My system information:

$ ./bin/urinfo
[cuda:gpu][cuda:0] NVIDIA CUDA BACKEND, NVIDIA GeForce GT 1030 6.1 [CUDA 12.8]
[level_zero:gpu][level_zero:0] Intel(R) oneAPI Unified Runtime over Level-Zero, Intel(R) UHD Graphics 770 12.2.0 [1.6.33276.160000]
[opencl:cpu][opencl:0] Intel(R) OpenCL, 12th Gen Intel(R) Core(TM) i9-12900K OpenCL 3.0 (Build 0) [2025.19.4.0.18_160000.xmain-hotfix]

Here are the results:

Adapter No validation Full validation Parameter validation
CUDA 422.496s 573.556s (+151.06s) 653.842s (+231.346s)
OpenCL 453.478s 598.116s (+144.638s) 692.728s (+139.25s)
L0 777.47s 906.892s (+129.422s) 1031.642 (+254.172)

I didn't expect parameter validation to increase the run time longer than full validation, not sure what's going on there. Regardless, I think this shows with either of the validation layers options enabled, we only add a few minutes to the run time which I feel isn't a particularly large impact and would be worth while help developers potentially catch more issues earlier.

@aelovikov-intel
Copy link
Contributor

I vaguely recall that we had some validation enabled at some point (when UR was in different repo) and I disabled it because it was only catching issues in the UR itself and not in SYCL RT (and even those were issues with imprecise spec/validation layer itself).

This isn't a request for anything, just a bit of history (if I remember it correctly at all). Feel free to ignore.

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.

[UR][CI] Add new job to build UR with validation layer enabled
3 participants