Repository navigation
Mention device-node permissions when no oneAPI device is found - #765
Open
ShauryaAttreya37 wants to merge 2 commits into
Open
ShauryaAttreya37 wants to merge 2 commits into
ShauryaAttreya37 wants to merge 2 commits into
Conversation
When the user cannot open the Intel GPU's render node, the driver finds no device and zeInit fails with RESULT_ERROR_UNINITIALIZED, which oneAPI.jl handled silently. Look for Intel render nodes under /dev/dri (vendor 0x8086 in sysfs) and, if none can be opened for reading and writing, warn with how to join the owning group. Machines without an Intel GPU stay quiet. The hint is also added to the other initialization failures. Closes JuliaGPU#168.
Only append the hint when there is one, so messages no longer end in a dangling ". "; skip probing the device nodes when quiet; and suggest joining the group that actually owns the render node (falling back to render/video when it can't be determined or is root).
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #765 +/- ##
==========================================
- Coverage 86.94% 86.71% -0.24%
==========================================
Files 55 55
Lines 5195 5163 -32
==========================================
- Hits 4517 4477 -40
- Misses 678 686 +8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Closes #168.
As discussed in #168, a common reason oneAPI.jl is not functional on a machine with a supported Intel GPU is that the user cannot open the GPU's device node in
/dev/dri(not in therender/videogroup). The driver then finds no device,zeInitfails withRESULT_ERROR_UNINITIALIZED, andinitializereturns without saying anything, so there is no clue to the cause.Change
oneL0.device_access_hint()looks for Intel render nodes (/dev/dri/renderD*whose/sys/class/drm/<node>/device/vendoris0x8086). If there are some and none can be opened for reading and writing (access(2)withR_OK|W_OK), it returns a sentence naming the nodes and how to fix it:Otherwise it returns
nothing. That includes machines without an Intel GPU and non-Linux systems, so theRESULT_ERROR_UNINITIALIZEDcase stays silent there as before. The hint is also appended to the "Failed to initialize oneAPI" error and the "no drivers found" message.quiet = truestill suppresses everything.Testing
New
device access hinttestset intest/level-zero.jl, using a fakedri/sysfstree: an accessible Intel node (no hint), an inaccessible one (hint naming the node; skipped as root), an inaccessible node of another vendor (no hint), no nodes, and missing folders.I ran that testset against this branch's
oneL0.jldefinitions on Julia 1.13.1 (Linux): 5/5 pass. On this machine, which has an Intel GPU with an accessiblerenderD128,device_access_hint()returnsnothing. I did not run the full GPU suite locally, and the warning path insideinitializeitself is only exercised whenzeInitfails, which I could not trigger without changing the real device permissions.This change was written with AI assistance and reviewed before submitting.