diff --git a/loopy/target/cuda.py b/loopy/target/cuda.py index 673d3b284c79c99e88f2dc08ba1b6de41d2ee9a4..d6f55091a3ba994781e87f180faa49629a049772 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 75b3c05aeeb0fd1b9cfb5b0c10ad25976ea2464c..bcf85a340a29afc8772686d23c5fe3e8a03ccffd 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])