Skip to content

Commit fb0d903

Browse files
committed
compiler: Add INBOUND_IF_RELAXED property
1 parent 2b98129 commit fb0d903

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

devito/ir/support/properties.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,13 @@ def __init__(self, name, val=None):
8585
is used for iteration spaces that are larger than the data space.
8686
"""
8787

88+
INBOUND_IF_RELAXED = Property('inbound-if-relaxed')
89+
"""
90+
Similar to INBOUND, but devised for IncrDimensions whose iteration space is
91+
_not_ larger than the data space and, as such, still require full lowering
92+
(see the `relax_incr_dimensions` pass for more info).
93+
"""
94+
8895
PREFETCHABLE = Property('prefetchable')
8996
"""
9097
A Dimension along which prefetching is feasible and beneficial.
@@ -295,6 +302,9 @@ def block(self, dims, kind='default'):
295302
def inbound(self, dims):
296303
return self.add(dims, INBOUND)
297304

305+
def inbound_if_relaxed(self, dims):
306+
return self.add(dims, INBOUND_IF_RELAXED)
307+
298308
def init_core_shm(self, dims):
299309
properties = self.add(dims, INIT_CORE_SHM)
300310
properties = properties.drop(properties={INIT_HALO_LEFT_SHM,
@@ -327,7 +337,8 @@ def is_affine(self, dims):
327337
return any(AFFINE in self.get(d, ()) for d in as_tuple(dims))
328338

329339
def is_inbound(self, dims):
330-
return any(INBOUND in self.get(d, ()) for d in as_tuple(dims))
340+
return any({INBOUND, INBOUND_IF_RELAXED}.intersection(self.get(d, set()))
341+
for d in as_tuple(dims))
331342

332343
def is_sequential(self, dims):
333344
return any(SEQUENTIAL in self.get(d, ()) for d in as_tuple(dims))

0 commit comments

Comments
 (0)