diff --git a/test/test_loopy.py b/test/test_loopy.py
index 5929e7aa724b18f808260c3d594c91a5fb8e8b7e..810106aefb7088f9e0df7fcf967eabd89458f2c7 100644
--- a/test/test_loopy.py
+++ b/test/test_loopy.py
@@ -2430,6 +2430,12 @@ def test_atomic(ctx_factory, dtype):
             and "cl_khr_int64_base_atomics" not in ctx.devices[0].extensions):
         pytest.skip("64-bit atomics not supported on device")
 
+    import pyopencl.version  # noqa
+    if (
+            cl.version.VERSION < (2015, 2)
+            and dtype == np.int64):
+        pytest.skip("int64 RNG not supported in PyOpenCL < 2015.2")
+
     knl = lp.make_kernel(
             "{ [i]: 0<=i<n }",
             "out[i%20] = out[i%20] + 2*a[i] {atomic}",