Skip to content

Commit 5dc569c

Browse files
authored
Merge pull request #2855 from devitocodes/pad-safe
compiler: prevent padding non inner-most dim
2 parents c581d00 + 15c889f commit 5dc569c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

devito/types/basic.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -916,6 +916,10 @@ def __padding_setup_smart__(self, **kwargs):
916916
return nopadding
917917
d = self.space_dimensions[-1]
918918

919+
# Last space Dimension is not the most inner Dimension
920+
if d != self.dimensions[-1]:
921+
return nopadding
922+
919923
mmts = configuration['platform'].max_mem_trans_size(self.__padding_dtype__)
920924
remainder = self._size_nopad[d] % mmts
921925
if remainder == 0:

0 commit comments

Comments
 (0)