From 44dd57d1c44b16a5d60878b6702dc0a13f5362a1 Mon Sep 17 00:00:00 2001 From: Matthias Diener Date: Thu, 22 Sep 2022 13:27:29 -0500 Subject: [PATCH] skip SVM tests when no SVM support --- test/test_pytato_arraycontext.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/test_pytato_arraycontext.py b/test/test_pytato_arraycontext.py index 1494454..2c73945 100644 --- a/test/test_pytato_arraycontext.py +++ b/test/test_pytato_arraycontext.py @@ -139,12 +139,18 @@ def test_pytato_actx_allocator(actx_factory, pass_allocator): from pyopencl.tools import ImmediateAllocator alloc = ImmediateAllocator(base_actx.queue) elif pass_allocator == "pass_svm": + from pyopencl.characterize import has_coarse_grain_buffer_svm + if not has_coarse_grain_buffer_svm(base_actx.queue.device): + pytest.skip("need SVM support for this test") from pyopencl.tools import SVMAllocator alloc = SVMAllocator(base_actx.queue.context, queue=base_actx.queue) elif pass_allocator == "pass_buffer_pool": from pyopencl.tools import ImmediateAllocator, MemoryPool alloc = MemoryPool(ImmediateAllocator(base_actx.queue)) elif pass_allocator == "pass_svm_pool": + from pyopencl.characterize import has_coarse_grain_buffer_svm + if not has_coarse_grain_buffer_svm(base_actx.queue.device): + pytest.skip("need SVM support for this test") from pyopencl.tools import SVMAllocator, SVMPool alloc = SVMPool(SVMAllocator(base_actx.queue.context, queue=base_actx.queue)) else: -- GitLab