Fix buffer stride runtime mismatch#2950
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2950 +/- ##
==========================================
+ Coverage 83.47% 83.49% +0.01%
==========================================
Files 249 249
Lines 52276 52302 +26
Branches 4503 4504 +1
==========================================
+ Hits 43638 43667 +29
+ Misses 7880 7878 -2
+ Partials 758 757 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
dd74d3c to
87857e3
Compare
| pad_key = f.__padding_dtype__ | ||
| else: | ||
| pad_key = None | ||
| pad_key = f.__padding_dtype__ if d is f.dimensions[-1] else None |
There was a problem hiding this comment.
random thought: do we need a dimensions_padded property rather than just [-1]? thinking about what we recently doing in PRO with all those "special" Arrays.
There was a problem hiding this comment.
At some point yes would be good to have
| padding = kwargs.get('padding') | ||
| if padding is None: | ||
| padding = ((0, 0),)*self.ndim | ||
| if self.is_autopaddable: |
There was a problem hiding this comment.
with this fix, can we also drop this:
https://github.com/devitocodes/devito/blob/main/devito/types/misc.py#L270-L274
?
FabioLuporini
left a comment
There was a problem hiding this comment.
some questions, but it's a great catch, and a great cleanup too
EdCaunt
left a comment
There was a problem hiding this comment.
Approved pending Fabio's comments
4503028 to
0520dc7
Compare
0520dc7 to
53763c1
Compare
Make sure mapped array use symbolic padding so that it always matches the runtime mapped function and can safely reuse the Function's strydes.