Repository navigation
[SYCL][UR] Improve diagnostics for missing platforms in sycl-ls - #23542
inteltdelisle wants to merge 4 commits into
Conversation
When a backend's platforms or devices fail to show up in sycl-ls, users currently get little indication of where in the stack things went wrong. This change adds some logging and guidance to help narrow it down: * UR loader: log each adapter that is loaded (statically or dynamically) and the total number of adapters loaded. * UR adapters (CUDA, HIP, Level Zero, OpenCL, Native CPU, Offload): log the number of platforms each adapter initializes at INFO level. The Level Zero message is raised from DEBUG to INFO for consistency. * OpenCL adapter: log an error when clGetPlatformIDs fails or returns no platforms, and when a platform reports CL_DEVICE_NOT_FOUND. * sycl-ls --verbose: print backend-specific hints at the end of the output (clinfo, nvidia-smi, rocminfo/amd-smi, ZE_ENABLE_LOADER_DEBUG_TRACE, /dev/dri/renderD* permissions, strace), and say which UR logger messages point to a configuration problem. The new messages can be seen with UR_LOG_LOADER / UR_LOG_<ADAPTER> set to "level:info;output:stdout" (or similar). This doesn't fully resolve the issue, since sycl-ls still can't tell users *why* a backend is missing, but it should make the cause much easier to find. Refs: intel#22313 Signed-off-by: Delisle, Thierry <thierry.delisle@intel.com>
bratpiorka
left a comment
There was a problem hiding this comment.
CUDA/HIP/NativeCPU/OpenCL LGTM
ldorau
left a comment
There was a problem hiding this comment.
The description says more than the code does. It says:
- OpenCL adapter logs an error when
clGetPlatformIDsfails and forCL_DEVICE_NOT_FOUND, - sycl-ls prints a hint about permissions on
/dev/dri/renderD*, - sycl-ls explains which UR logger messages point to a configuration problem.
I cannot find any of these in the code. The OpenCL adapter adds only one INFO message ("CL No platforms found").
Please update the description (and the commit message) to match the code, or add the missing parts.
Updated the description:
|
Signed-off-by: Delisle, Thierry <thierry.delisle@intel.com>
ldorau
left a comment
There was a problem hiding this comment.
Thanks for the follow-up. One remaining issue from the earlier review: the PR description still says the OpenCL adapter logs when a platform reports CL_DEVICE_NOT_FOUND. That is not in the code. The only new OpenCL log is:
OpenCL: No platforms found (Result = {})
in the adapter constructor when clGetPlatformIDs fails or returns 0 platforms.
Please update the PR description and the first commit message to drop the CL_DEVICE_NOT_FOUND mention. After that LGTM.
When a backend's platforms or devices fail to show up in sycl-ls, users currently get little indication of where in the stack things went wrong. This change adds some logging and guidance to help narrow it down:
The new messages can be seen with UR_LOG_LOADER / UR_LOG_ set to "level:info;output:stdout" (or similar).
This doesn't fully resolve the issue, since sycl-ls still can't tell users why a backend is missing, but it should make the cause much easier to find.
Refs: #22313