diff --git a/loopy/codegen/loop.py b/loopy/codegen/loop.py index cc45f95e7548945d83f38ae0e7bc9c08c5d4f013..70530d3a90cbdd5a48395034dd05000f6781b473 100644 --- a/loopy/codegen/loop.py +++ b/loopy/codegen/loop.py @@ -431,7 +431,8 @@ def generate_sequential_loop_dim_code(kernel, sched_index, codegen_state): if (static_ubound - static_lbound).plain_is_zero(): # single-trip, generate just a variable assignment, not a loop result.append(gen_code_block([ - Initializer(Const(POD(kernel.index_dtype, loop_iname)), + Initializer( + Const(POD(kernel.target, kernel.index_dtype, loop_iname)), ecm(aff_to_expr(static_lbound), PREC_NONE, "i")), Line(), inner,