YXY-0922 opened a new pull request, #17161:
URL: https://github.com/apache/tvm/pull/17161
### Bug Fix
In the `TileWithTensorIntrin` function, when the `allow_padding` parameter
is enabled, the original implementation inlines all consumer blocks. This
behavior can lead to incorrect inlining of output blocks, causing issues with
block shapes and dependencies. To ensure correct inlining operations, only
non-output consumer blocks should be inlined.
### Changes Made
- **Added Non-Output Block Check:** Before inlining consumer blocks, added a
check to ensure only non-output blocks are inlined.
- Used the `tir::IsOutputBlock` function to determine if a block is an
output block.
- Applied `sch->ComputeInline` only if the block is not an output block.
### Specific Code Changes
1. Modified the consumer inlining logic in the `TileWithTensorIntrin`
function:
```cpp
for (const auto& consumer : consumers) {
auto sref = sch->GetSRef(consumer);
if (!tir::IsOutputBlock(sch->state(), sref,
tir::GetScopeRoot(sch->state(), sref, true)))
sch->ComputeInline(consumer);
}
### Impact
These changes ensure that when padding is enabled, only non-output blocks
will be inlined, maintaining correct block shapes and dependencies. This fixes
the issue in previous versions where output blocks might be incorrectly inlined.
Please review these changes and provide feedback for further improvements.
Thank you for your time and assistance!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]