From cded42ec99b1bccae276789ffc83ff6d3e615db9 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sat, 10 Nov 2018 16:36:00 -0600 Subject: [PATCH] Fix CUDA short vector codegen --- loopy/target/cuda.py | 2 +- test/test_target.py | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/loopy/target/cuda.py b/loopy/target/cuda.py index 673d3b284..d6f55091a 100644 --- a/loopy/target/cuda.py +++ b/loopy/target/cuda.py @@ -290,7 +290,7 @@ class CUDACASTBuilder(CASTBuilder): _VEC_AXES = "xyzw" def add_vector_access(self, access_expr, index): - return access_expr.a(self._VEC_AXES[index]) + return access_expr.attr(self._VEC_AXES[index]) def emit_barrier(self, synchronization_kind, mem_kind, comment): """ diff --git a/test/test_target.py b/test/test_target.py index 75b3c05ae..bcf85a340 100644 --- a/test/test_target.py +++ b/test/test_target.py @@ -358,6 +358,23 @@ def test_ispc_streaming_stores(): lp.generate_code_v2(knl).all_code() +def test_cuda_short_vector(): + knl = lp.make_kernel( + "{ [i]: 0<=i 1: exec(sys.argv[1]) -- GitLab