import pyopencl as cl from pyopencl import array from pyopencl import clrandom import numpy as np from time import sleep ctx = cl.create_some_context() queue = cl.CommandQueue(ctx) for i in range(9999): s = clrandom.rand(queue, (40, 50,), np.int32, luxury=None, a=0, b=9) if i%99==0: sleep(0.5)