diff --git a/lib/level-zero/oneL0.jl b/lib/level-zero/oneL0.jl index c5a694d9..e3fa7ad8 100644 --- a/lib/level-zero/oneL0.jl +++ b/lib/level-zero/oneL0.jl @@ -221,6 +221,15 @@ function initialize(; quiet::Bool=false) functional[] = false return end + # The driver could not open the GPU's render node: point at the usual fix rather + # than printing a backtrace. + if err isa ZeError && err.code == RESULT_ERROR_INSUFFICIENT_PERMISSIONS + quiet || @error """Failed to initialize oneAPI: no permission to access the GPU. + Make sure your user can read and write the GPU's render node in /dev/dri, + usually by joining the group that owns it (`render` on most systems).""" + functional[] = false + return + end # For other errors, still report them as errors quiet || @error "Failed to initialize oneAPI" exception=(err,catch_backtrace()) functional[] = false