Skip to content

Commit

Permalink
[TIR][Schedule] TileWithTensorInstrin Skip some ComputeInline for som…
Browse files Browse the repository at this point in the history
…e producer if not padded
  • Loading branch information
alex-wang-not-alex committed Dec 14, 2023
1 parent a59db03 commit aae820e
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 aae820e

Please sign in to comment.