Repository navigation
Avoid warnings from Unified Runtime Level Zero adapter - #2306
Open
ndgrigorian wants to merge 2 commits into
Open
ndgrigorian wants to merge 2 commits into
ndgrigorian wants to merge 2 commits into
Conversation
ndgrigorian
requested review from
antonwolfy and
vlad-perevezentsev
as code owners
April 29, 2026 22:27
ndgrigorian
force-pushed
the
work-around-custom-devices-level-zero
branch
from
April 29, 2026 22:42
3892501 to
8954fa2
Compare
|
View rendered docs @ https://intelpython.github.io/dpctl/pulls/2306/index.html |
Collaborator
antonwolfy
reviewed
May 5, 2026
| BTy == DPCTLSyclBackendType::DPCTL_LEVEL_ZERO) | ||
| { | ||
| // avoid ugly warnings from unified runtime | ||
| return wrap<vecTy>(DevicesVectorPtr); |
Collaborator
There was a problem hiding this comment.
Any way to cover that in the test?
Collaborator
Author
There was a problem hiding this comment.
it isn't obvious how to capture the UR warnings. It might be possible by some gymnastics capturing all stdout, but, then it only applies for Level Zero. I can test a few things first though
vlad-perevezentsev
previously approved these changes
Jun 2, 2026
vlad-perevezentsev
left a comment
Collaborator
There was a problem hiding this comment.
LGTM
Thank you @ndgrigorian
only opencl supports custom devices; other backends may warn when asked for them. add a test that no output is printed, and document the behavior
ndgrigorian
force-pushed
the
work-around-custom-devices-level-zero
branch
from
November 3, 2026 21:32
8954fa2 to
96208a6
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR makes
SyclPlatform.get_devices(DPCTLPlatform_GetDevices) return no devices fordevice_type="custom"on non-OpenCL platforms, without querying the SYCL runtime.Only OpenCL supports custom devices. Other backends may warn when asked for them: the Unified Runtime Level Zero adapter has no case for
UR_DEVICE_TYPE_CUSTOM, so each call prints<UR_LOG_CALLBACK>[WARNING]: Unknown device typetwice to stderr while returning no devices. The warning comes from libsycl's logger callback, so it cannot be silenced withUR_LOG_LEVEL_ZERO. OpenCL platforms still forward the request to the runtime.A test checks that
get_devices(device_type="custom")on non-OpenCL platforms returns no devices and prints nothing to stdout or stderr; it fails without this change. Theget_devicesdocstring and the C-API header now note that only OpenCL supports custom devices, and the docstring lists the"automatic"and"custom"values.🤖 Generated with Claude Code