JuliaGPU / OpenCL.jl

OpenCL Julia bindings
https://juliagpu.org/
Other
265 stars 38 forks source link

Novice view: warning about no JLLs more confusing than useful? #263

Open BioTurboNick opened 2 hours ago

BioTurboNick commented 2 hours ago

I'm testing out OpenCL on my Qualcomm Snapdragon system. I'm pretty new to GPU computing and coming into this fresh.

When I load OpenCL.jl and call OpenCL.versioninfo(), this warning displays:

┌ Warning: No OpenCL driver JLLs were detected at the time of the first call into OpenCL.jl.  
│ Only system drivers will be available.
└ @ OpenCL.cl D:\.julia\dev\OpenCL\lib\cl\api.jl:80

Immediate thought that comes to mind is that there's potentially something bad about there not being a driver JLL or using system drivers, but it's not clear what that would be. It makes me think I should look for a driver JLL for a undefined better experience, but I don't know what I should be looking for. I might reach for the pocl_jll in the README, but sounds like that's just for CPUs and if so, probably would be taking me in the wrong direction.

Should this be an information rather than a warning?

If there is a potential downside to not having a JLL, can the warning be extended to indicate in which ways? And would be nice if either the warning or the README could point out how to find appropriate JLL drivers.

maleadt commented 2 hours ago

Yeah, the warning could probably be phrased better, and/or demoted to an informational message. The reasoning was that because in Julia many packages are fully self-contained (e.g. CUDA.jl and other back-ends), users would expect OpenCL.jl to work "out of the box" as well, which isn't the case when relying on system drivers. pocl_jll is currently the only packaged driver available though, but given interest we could make a version of CUDA.jl/AMDGPU.jl/oneAPI.jl (either the packages themselves, or a similarly-named alternative) that provides a back-end for use with OpenCL.jl.