diff --git a/test/test_array.py b/test/test_array.py index 613d2ff72cf06b17e33b6a2b15faf72bc711c3df..65b98038db2b09ac8cac865e9fb03d275b164d96 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)