From 04e7eaccf5039db5369ccf87957873989f59f01f Mon Sep 17 00:00:00 2001 From: Peter Caday Date: Fri, 25 Oct 2024 12:09:13 -0700 Subject: [PATCH] xe: ocl: workaround for older Xe2 Windows drivers --- src/gpu/intel/ocl/ocl_utils.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gpu/intel/ocl/ocl_utils.cpp b/src/gpu/intel/ocl/ocl_utils.cpp index c5cca23b8d9..1d7cc09e36e 100644 --- a/src/gpu/intel/ocl/ocl_utils.cpp +++ b/src/gpu/intel/ocl/ocl_utils.cpp @@ -366,6 +366,11 @@ status_t get_ocl_device_eu_count(cl_device_id device, // for certain buggy drivers. bool ok = true; +#ifdef _WIN32 + // But don't try this on Windows Xe2 to avoid undercounting EUs. + ok &= (arch != gpu::intel::compute::gpu_arch_t::xe2); +#endif + auto do_query = [&](cl_uint query) -> cl_uint { cl_uint val = 0; ok = ok