From c2f2c29cffe333b1d20a5e367e19de2e3f3fe140 Mon Sep 17 00:00:00 2001 From: Kaushik Kulkarni Date: Fri, 13 Aug 2021 17:40:50 -0500 Subject: [PATCH] assert that shape expressions cannot depend on any results --- pytato/target/loopy/codegen.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pytato/target/loopy/codegen.py b/pytato/target/loopy/codegen.py index 0ffb017..dc463de 100644 --- a/pytato/target/loopy/codegen.py +++ b/pytato/target/loopy/codegen.py @@ -643,6 +643,8 @@ def shape_to_scalar_expression(shape: ShapeType, result.append( cgen_mapper(component, state).to_loopy_expression((), shape_context)) + assert not shape_context.depends_on + return tuple(result) -- GitLab