Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/tir/ir/index_map.cc
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ Array<Range> IndexMapNode::MapRanges(const Array<Range>& ranges, arith::Analyzer
}
}
auto output_dtype = [&]() {
int max_bits = 0;
int max_bits = ranges.empty() ? 32 : 0;
for (const auto& range : ranges) {
max_bits = std::max(max_bits, range->extent.dtype().bits());
}
Expand Down
4 changes: 4 additions & 0 deletions src/tir/schedule/primitive/layout_transformation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1464,6 +1464,10 @@ void TransformBlockLayout(ScheduleState self, const StmtSRef& block_sref,
}

// Step 6: Do the actual replacement
if (scope_sref->StmtAs<BlockNode>()) {
ICHECK(new_loop_vars.empty()) << "Invalid block to loop replacement due to layout transform "
<< index_map;
}
self->Replace(scope_sref, body, {{block, new_block}});
}

Expand Down
Loading