Fix buffer stride runtime mismatch#2950
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2950 +/- ##
===========================================
- Coverage 83.47% 59.16% -24.32%
===========================================
Files 249 195 -54
Lines 52276 33783 -18493
Branches 4503 3945 -558
===========================================
- Hits 43638 19988 -23650
- Misses 7880 12842 +4962
- Partials 758 953 +195
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
53763c1 to
adaaa94
Compare
adaaa94 to
e561c21
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.