From 1a69f60eb43086df3b288cda4fcfd2e8048bef21 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sun, 2 Sep 2012 15:48:58 -0400 Subject: [PATCH] Add stridey test (and test for domain dep). --- MEMO | 13 +++++----- test/test_loopy.py | 64 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 6 deletions(-) diff --git a/MEMO b/MEMO index ac53d89d9..504788e49 100644 --- a/MEMO +++ b/MEMO @@ -45,12 +45,8 @@ To-do - Kernel splitting (via what variables get computed in a kernel) -- Make xfail test for strided access. - - Test join_inames -- *_dimension -> *_iname - - Debug axpy nondet fail - Make tests run on GPUs @@ -103,16 +99,21 @@ Future ideas - DMA engine threads? -- Divisibility, modulo, strides? - - Try, fix indirect addressing - Nested slab decomposition (in conjunction with conditional hoisting) could generate nested conditional code. +- Better code for strides. + Dealt with ^^^^^^^^^^ +- Divisibility, modulo, strides? + -> Tested, gives correct (but suboptimal) code. + +- *_dimension -> *_iname + - Use gists (why do disjoint sets arise?) - Automatically verify that all array access is within bounds. diff --git a/test/test_loopy.py b/test/test_loopy.py index 0203bb1d8..c30290915 100644 --- a/test/test_loopy.py +++ b/test/test_loopy.py @@ -558,6 +558,70 @@ def test_equality_constraints(ctx_factory): +def test_stride(ctx_factory): + dtype = np.float32 + ctx = ctx_factory() + + order = "C" + + n = 10 + + knl = lp.make_kernel(ctx.devices[0], [ + "{[i]: 0<=i