Skip to content

Commit

Permalink
[TIR][Schedule] TileWithTensorIntrin skip incorrect ComputeInline for…
Browse files Browse the repository at this point in the history
… input-padding (#16239)

[TIR][Schedule] TileWithTensorInstrin Skip some ComputeInline for some producer if not padded
  • Loading branch information
XFPlus authored Dec 19, 2023
1 parent 3df798d commit 943861c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/tir/schedule/transform.cc
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,12 @@ Optional<LoopRV> TileWithTensorIntrin(const tir::Schedule& sch, const tir::Block
auto producers = sch->GetProducers(block_rv);
for (const auto& producer : producers) {
auto original_producers = sch->GetProducers(producer);
ICHECK_EQ(original_producers.size(), 1u);
// NOTICE: there may not all producers padded.
// Inline the original producer into the padding block. This ensures that the new producer
// has the padded shape.
sch->ComputeInline(original_producers[0]);
if (original_producers.size() == 1u) {
sch->ComputeInline(original_producers[0]);
}
}
auto consumers = sch->GetConsumers(block_rv);
for (const auto& consumer : consumers) {
Expand Down

0 comments on commit 943861c

Please sign in to comment.