Unverified Commit 98173c60 authored by Evan Pretti's avatar Evan Pretti Committed by GitHub
Browse files

Workaround for Intel CPU OpenCL 2025.3 (#5137)

parent 2fbed592
...@@ -59,6 +59,8 @@ OpenCLFFT3D::OpenCLFFT3D(OpenCLContext& context, int xsize, int ysize, int zsize ...@@ -59,6 +59,8 @@ OpenCLFFT3D::OpenCLFFT3D(OpenCLContext& context, int xsize, int ysize, int zsize
if (platformVendor.size() >= 5 && platformVendor.substr(0, 5) == "Intel") { if (platformVendor.size() >= 5 && platformVendor.substr(0, 5) == "Intel") {
// Intel's OpenCL uses low accuracy trig functions, so tell VkFFT to use lookup tables instead. // Intel's OpenCL uses low accuracy trig functions, so tell VkFFT to use lookup tables instead.
config.useLUT = 1; config.useLUT = 1;
// Version 2025.3 of Intel's OpenCL generates incorrect results when Y and Z sizes are 33 or 39; this is a workaround.
config.fixMinRaderPrimeMult = 11;
} }
VkFFTResult result = initializeVkFFT(&app, config); VkFFTResult result = initializeVkFFT(&app, config);
if (result != VKFFT_SUCCESS) if (result != VKFFT_SUCCESS)
......
...@@ -122,6 +122,9 @@ int main(int argc, char* argv[]) { ...@@ -122,6 +122,9 @@ int main(int argc, char* argv[]) {
testTransform<mm_double2>(true, 25, 28, 25); testTransform<mm_double2>(true, 25, 28, 25);
testTransform<mm_double2>(true, 25, 25, 28); testTransform<mm_double2>(true, 25, 25, 28);
testTransform<mm_double2>(true, 21, 25, 27); testTransform<mm_double2>(true, 21, 25, 27);
testTransform<mm_double2>(true, 32, 33, 33);
testTransform<mm_double2>(true, 32, 33, 39);
testTransform<mm_double2>(true, 32, 39, 39);
} }
else { else {
testTransform<mm_float2>(false, 28, 25, 30); testTransform<mm_float2>(false, 28, 25, 30);
...@@ -129,6 +132,9 @@ int main(int argc, char* argv[]) { ...@@ -129,6 +132,9 @@ int main(int argc, char* argv[]) {
testTransform<mm_float2>(true, 25, 28, 25); testTransform<mm_float2>(true, 25, 28, 25);
testTransform<mm_float2>(true, 25, 25, 28); testTransform<mm_float2>(true, 25, 25, 28);
testTransform<mm_float2>(true, 21, 25, 27); testTransform<mm_float2>(true, 21, 25, 27);
testTransform<mm_float2>(true, 32, 33, 33);
testTransform<mm_float2>(true, 32, 33, 39);
testTransform<mm_float2>(true, 32, 39, 39);
} }
} }
catch(const exception& e) { catch(const exception& e) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment