fixing wrong stride retrieved from fusion#4028
Conversation
|
!test |
Description
Changes walkthrough 📝
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
| if (alias_info.type != AllocationType::New) { | ||
| // For reuse buffer alias, we need to get the aliased_io's size/stride | ||
| if (alias_info.type == AllocationType::ReuseBuffer) { | ||
| tv = alias_info.aliased_io->as<TensorView>(); |
There was a problem hiding this comment.
Without this patch, we'll ended up with passing the wrong kernel arguments when we have inplace updates on inputs with a non-trivial allocation domain.
The earlier refactor PR broke this test:
Fuser/tests/python/test_python_frontend.py
Lines 4949 to 4950 in 5111d3b
Unfortunately the two PRs ( the refactor #3952 and the test #3970 ) were merged in parallel and never combined in the CI.
csarofeen
left a comment
There was a problem hiding this comment.
Approving, but we should understand this only works if we guarantee that input and outputs are exactly the same. i.e. they have exact matching of logical domains where every ID is exact matched in the same order and no other extraneous IDs (at least those that are not reduction). Even a broadcast would invalidate this approach. J, please follow up with a PR to make sure this is the case.
We forgot to consider output with aliases when constructing kernel arguments.
This ended up giving us wrong arguments passed for kernel, producing wrong results.