From e09373fc5fe676802ec8269edd732d6c66a65c18 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Wed, 17 Mar 2021 13:31:11 -0500 Subject: [PATCH 1/3] test_fuzz_expression_code_gen: keep context alive for the benefit of Intel CL --- loopy/target/c/compyte | 2 +- test/test_expression.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/loopy/target/c/compyte b/loopy/target/c/compyte index 276478e5b..d1f993dae 160000 --- a/loopy/target/c/compyte +++ b/loopy/target/c/compyte @@ -1 +1 @@ -Subproject commit 276478e5b357618a4464817f2263c0d41515d425 +Subproject commit d1f993daecc03947d9e6e3e60d2a5145ecbf3786 diff --git a/test/test_expression.py b/test/test_expression.py index dd8c74105..8753949fd 100644 --- a/test/test_expression.py +++ b/test/test_expression.py @@ -344,8 +344,9 @@ def test_fuzz_expression_code_gen(ctx_factory, expr_type, random_seed, target): print(knl) if target == lp.PyOpenCLTarget: + cl_ctx = ctx_factory() knl = lp.set_options(knl, "write_cl") - evt, lp_values = knl(cl.CommandQueue(ctx_factory()), out_host=True) + evt, lp_values = knl(cl.CommandQueue(cl_ctx), out_host=True) elif target == lp.ExecutableCTarget: evt, lp_values = knl() else: -- GitLab From 9a678660dc9ba55e9c43e999a39fe469a063d83c Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Wed, 17 Mar 2021 13:52:11 -0500 Subject: [PATCH 2/3] test_complex_support: keep context alive for the benefit of Intel CL --- test/test_expression.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test_expression.py b/test/test_expression.py index 8753949fd..03ac0d787 100644 --- a/test/test_expression.py +++ b/test/test_expression.py @@ -518,7 +518,8 @@ def test_complex_support(ctx_factory, target): if target == lp.PyOpenCLTarget: knl = lp.set_options(knl, "write_cl") - evt, out = knl(cl.CommandQueue(ctx_factory()), **kwargs) + cl_ctx = ctx_factory() + evt, out = knl(cl.CommandQueue(cl_ctx), **kwargs) elif target == lp.ExecutableCTarget: evt, out = knl(**kwargs) else: -- GitLab From fa482f1de0d3d7467c00dadacda48a78f7fe3089 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Wed, 17 Mar 2021 14:12:45 -0500 Subject: [PATCH 3/3] test_opencl_support_for_bool: keep context alive for the benefit of Intel CL --- test/test_target.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test_target.py b/test/test_target.py index 7f691b3e4..bda6b78ea 100644 --- a/test/test_target.py +++ b/test/test_target.py @@ -416,7 +416,8 @@ def test_opencl_support_for_bool(ctx_factory): """, [lp.GlobalArg("y", dtype=np.bool8, shape=lp.auto)]) - evt, (out, ) = knl(cl.CommandQueue(ctx_factory())) + cl_ctx = ctx_factory() + evt, (out, ) = knl(cl.CommandQueue(cl_ctx)) out = out.get() np.testing.assert_equal(out, np.tile(np.array([0, 1], dtype=np.bool8), 5)) -- GitLab