From a1f748a8586c97cf6c29a274374426cd30c7ef0e Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Wed, 1 Jan 2014 20:04:08 +0100 Subject: [PATCH] Improve error message about non-constant temp shape --- loopy/check.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/loopy/check.py b/loopy/check.py index 7b3e522a3..6435c7a3f 100644 --- a/loopy/check.py +++ b/loopy/check.py @@ -38,7 +38,10 @@ def check_temp_variable_shapes_are_constant(kernel): for tv in kernel.temporary_variables.itervalues(): if any(not isinstance(s_i, int) for s_i in tv.shape): raise LoopyError("shape of temporary variable '%s' is not " - "constant" % tv.name) + "constant (but has to be since the size of " + "the temporary needs to be known at build time). " + "Use loopy.fix_parameters to set variables to " + "constant values." % tv.name) def check_insn_attributes(kernel): -- GitLab