diff --git a/loopy/kernel/tools.py b/loopy/kernel/tools.py index df0f3c931b46c32d0091a452855c27642a7bd269..8bdc72d54a91c6e8b4f9ec0ca3053831627d3eae 100644 --- a/loopy/kernel/tools.py +++ b/loopy/kernel/tools.py @@ -318,10 +318,16 @@ class SetOperationCacheManager: return result def dim_min(self, set, *args): + if set.plain_is_empty(): + raise LoopyError("domain '%s' is empty" % set) + from loopy.isl_helpers import dim_min_with_elimination return self.op(set, "dim_min", dim_min_with_elimination, args) def dim_max(self, set, *args): + if set.plain_is_empty(): + raise LoopyError("domain '%s' is empty" % set) + from loopy.isl_helpers import dim_max_with_elimination return self.op(set, "dim_max", dim_max_with_elimination, args)