From cf884971f57ca2f7cc2a39a8ecc6cb3062cd8d32 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Thu, 11 Jul 2013 18:46:42 -0400 Subject: [PATCH] Add convolution mockup from Rob Fergus --- test/test_loopy.py | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/test/test_loopy.py b/test/test_loopy.py index 455917481..446de00db 100644 --- a/test/test_loopy.py +++ b/test/test_loopy.py @@ -1141,17 +1141,21 @@ def test_vector_ilp_with_prefetch(ctx_factory): assert len(list(re.finditer("barrier", code))) == 1 -def test_convolution_like(ctx_factory): +def test_convolution(ctx_factory): ctx = ctx_factory() dtype = np.float64 knl = lp.make_kernel(ctx.devices[0], - "{ [im_x, im_y, f_x, f_y]: -f_w <= f_x,f_y <= f_w \ - and f_w <= im_x < im_w-f_w and f_w <= im_y < im_h-f_w }", + "{ [iimg, ifeat, icolor, im_x, im_y, f_x, f_y]: \ + -f_w <= f_x,f_y <= f_w \ + and f_w <= im_x < im_w-f_w and f_w <= im_y < im_h-f_w \ + and 0<=iimg<=nimgs and 0<=ifeat