from __future__ import division import numpy as np import pyopencl as cl import loopy as lp from pyopencl.tools import pytest_generate_tests_for_pyopencl \ as pytest_generate_tests def test_tim2d(ctx_factory): dtype = np.float32 ctx = ctx_factory() order = "C" n = 8 from pymbolic import var K_sym = var("K") field_shape = (K_sym, n, n) # K - run-time symbolic knl = lp.make_kernel(ctx.devices[0], "[K] -> {[i,j,e,m,o,gi]: 0<=i,j,m,o<%d and 0<=e 1: exec(sys.argv[1]) else: from py.test.cmdline import main main([__file__])