From 32907a84db7432bafce9db3b34a1b85252512ed5 Mon Sep 17 00:00:00 2001 From: zachjweiner Date: Sun, 1 Nov 2020 15:32:55 -0600 Subject: [PATCH] add large array test --- test/test_array.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/test_array.py b/test/test_array.py index 613d2ff7..65b98038 100644 --- a/test/test_array.py +++ b/test/test_array.py @@ -205,6 +205,21 @@ def test_vector_fill(ctx_factory): a_gpu = cl_array.zeros(queue, 100, dtype=cltypes.float4) +def test_zeros_large_array(ctx_factory): + context = ctx_factory() + queue = cl.CommandQueue(context) + + if queue.device.address_bits == 64: + # this shouldn't hang/cause errors + # see https://github.com/inducer/pyopencl/issues/395 + a_gpu = cl_array.zeros(queue, (2**28 + 1,), dtype='float64') + # run a couple kernels to ensure no propagated runtime errors + a_gpu[...] = 1. + a_gpu = 2 * a_gpu - 3 + else: + pass + + def test_absrealimag(ctx_factory): context = ctx_factory() queue = cl.CommandQueue(context) -- GitLab