From fe14096e66842183d9e2b28505501adefcd983d0 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 6 Jun 2016 12:38:13 -0500 Subject: [PATCH] test_global_parallel_reduction_simpler: enable (now-fixed) auto_test --- test/test_reduction.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/test/test_reduction.py b/test/test_reduction.py index 67eeae8ed..05a3367fe 100644 --- a/test/test_reduction.py +++ b/test/test_reduction.py @@ -243,7 +243,6 @@ def no_test_global_parallel_reduction(ctx_factory, size): @pytest.mark.parametrize("size", [10000]) def test_global_parallel_reduction_simpler(ctx_factory, size): ctx = ctx_factory() - queue = cl.CommandQueue(ctx) knl = lp.make_kernel( "{[l,g,j]: 0 <= l < nl and 0 <= g,j < ng}", @@ -268,15 +267,7 @@ def test_global_parallel_reduction_simpler(ctx_factory, size): knl = lp.split_reduction_outward(knl, "l_inner") knl = lp.tag_inames(knl, "g:g.0,j:l.0") - evt, (result,) = knl(queue, nl=size) - evt, (result_ref,) = ref_knl(queue, nl=size) - - nsamples = size * 2 * ng - print(result.get()/nsamples, result_ref.get()/nsamples) - assert abs(result.get() - result_ref.get()) / abs(result_ref.get()) < 1e-5 - - # FIXME: auto_test breaks - #lp.auto_test_vs_ref(ref_knl, ctx, knl, parameters={"nl": size}) + lp.auto_test_vs_ref(ref_knl, ctx, knl, parameters={"nl": size}) def test_argmax(ctx_factory): -- GitLab