From 9edea6af6f67e80d110ec6e064856752c4f4dad7 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Tue, 29 Aug 2017 17:42:59 -0500 Subject: [PATCH] Remove approximation of lower bounds for hw loops --- loopy/codegen/loop.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/loopy/codegen/loop.py b/loopy/codegen/loop.py index 0110a0609..450c43786 100644 --- a/loopy/codegen/loop.py +++ b/loopy/codegen/loop.py @@ -286,11 +286,10 @@ def set_up_hw_parallel_loops(codegen_state, schedule_index, next_func, bounds = kernel.get_iname_bounds(iname) domain = kernel.get_inames_domain(iname) - # It's ok to find a bound that's too "loose". The conditional - # generators will mop up after us. - from loopy.isl_helpers import static_min_of_pw_aff - lower_bound = static_min_of_pw_aff(bounds.lower_bound_pw_aff, - constants_only=False) + # Approximating this is not OK, since the loop may wind up + # starting too low--and with a fixed length, it'll iterate + # over the wrong domain. + lower_bound = bounds.lower_bound_pw_aff # These bounds are 'implemented' by the hardware. Make sure # that the downstream conditional generators realize that. -- GitLab