From 3e498a83d364d70af68faeb106422d17976a2fe7 Mon Sep 17 00:00:00 2001 From: Simeon David Schaub Date: Tue, 14 Jul 2026 17:04:48 +0200 Subject: [PATCH] handle missing vendor info in OpenCL version string gracefully On my laptop, XRT advertises the NPU via OpenCL, but the version returned by the query is just `"OpenCL 1.0"` without any vendor info. Handle that case gracefully so at least `OpenCL.versioninfo()` doesn't error --- lib/cl/device.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cl/device.jl b/lib/cl/device.jl index 64bb1f9c..c7d9b5f1 100644 --- a/lib/cl/device.jl +++ b/lib/cl/device.jl @@ -17,7 +17,7 @@ end @inline function Base.getproperty(d::Device, s::Symbol) # simple string properties - version_re = r"OpenCL (?\d+)\.(?\d+)(?.+)" + version_re = r"OpenCL (?\d+)\.(?\d+)(?.*)" @inline function get_string(prop) sz = Ref{Csize_t}() clGetDeviceInfo(d, prop, 0, C_NULL, sz)