From 3648d360c64e660acb6c90bedc09d310a88bf0b4 Mon Sep 17 00:00:00 2001
From: "Rebecca N. Palmer" <rebecca_palmer@zoho.com>
Date: Sun, 5 Aug 2018 22:21:20 +0100
Subject: [PATCH] Disable scan use_bank_conflict_avoidance on Intel, as it
 crashes

---
 pyopencl/scan.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/pyopencl/scan.py b/pyopencl/scan.py
index d4226cf6..c17acb2c 100644
--- a/pyopencl/scan.py
+++ b/pyopencl/scan.py
@@ -1227,8 +1227,12 @@ class GenericScanKernel(_GenericScanKernelBase):
             max_scan_wg_size = min(dev.max_work_group_size for dev in self.devices)
             wg_size_multiples = 64
 
+        # Intel beignet asserts or gives wrong results with packed structs
+        # https://bugs.freedesktop.org/show_bug.cgi?id=98717
+        # TODO: is this all Intel ICDs or only beignet?
         use_bank_conflict_avoidance = (
-                self.dtype.itemsize > 4 and self.dtype.itemsize % 8 == 0 and is_gpu)
+                self.dtype.itemsize > 4 and self.dtype.itemsize % 8 == 0
+                and is_gpu and "Intel" not in self.devices[0].platform.name)
 
         # k_group_size should be a power of two because of in-kernel
         # division by that number.
-- 
GitLab