From 78cc289a79bab5da1c7ea77d3db1a12a31aa67a1 Mon Sep 17 00:00:00 2001 From: Jerome Kieffer Date: Wed, 6 Nov 2024 18:03:57 +0100 Subject: [PATCH] Fix grid size for Blelloch test --- src/pyFAI/opencl/test/test_collective.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pyFAI/opencl/test/test_collective.py b/src/pyFAI/opencl/test/test_collective.py index 688f48d7e..a305b5e03 100644 --- a/src/pyFAI/opencl/test/test_collective.py +++ b/src/pyFAI/opencl/test/test_collective.py @@ -178,11 +178,11 @@ def test_Blelloch(self): """ data_d = pyopencl.array.to_device(self.queue, self.data.astype("float32")) scan_d = pyopencl.array.empty_like(data_d) - maxi = int(round(numpy.log2(min(self.shape, self.max_valid_wg))))+1 + maxi = int(round(numpy.log2(min(self.shape/2, self.max_valid_wg))))+1 for i in range(maxi): wg = 1 << i try: - evt = self.program.test_blelloch_scan(self.queue, (self.shape,), (wg,), + evt = self.program.test_blelloch_scan(self.queue, (self.shape//2,), (wg,), data_d.data, scan_d.data, pyopencl.LocalMemory(2*4*wg))