We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3fed163 commit fbddb78Copy full SHA for fbddb78
1 file changed
arraycontext/impl/pytato/__init__.py
@@ -379,8 +379,20 @@ def __init__(
379
self.using_svm = None
380
381
if allocator is None:
382
+ import pyopencl as cl
383
from pyopencl.characterize import has_coarse_grain_buffer_svm
384
has_svm = has_coarse_grain_buffer_svm(queue.device)
385
+
386
+ dev = queue.device
387
+ if (has_svm
388
+ and dev.type & cl.device_type.CPU
389
+ and "intel" in dev.platform.name.lower()):
390
+ # The Intel CPU OpenCL runtime advertises coarse-grain buffer
391
+ # SVM, but its clEnqueueSVMFree corrupts the host heap ("double
392
+ # free or corruption"), aborting the process. Fall back to
393
+ # buffer allocation there.
394
+ has_svm = False
395
396
if has_svm:
397
self.using_svm = True
398
0 commit comments