You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/03/10 16:44:42 UTC
[GitHub] [tvm] Lunderberg commented on a change in pull request #10513: [TIR] Restrict Buffer indices, only last index can be multi-lane
Lunderberg commented on a change in pull request #10513:
URL: https://github.com/apache/tvm/pull/10513#discussion_r823931080
##########
File path: src/tir/ir/expr.cc
##########
@@ -1059,11 +1059,13 @@ TVM_STATIC_IR_FUNCTOR(ReprPrinter, vtable)
// BufferLoad
void BufferLoadNode::LegalizeDType() {
- int index_lanes = 1;
- for (const auto& index : indices) {
- index_lanes *= index.dtype().lanes();
+ for (size_t i = 0; i < indices.size(); i++) {
Review comment:
I like these, and it is definitely cleaner with the `is_scalar()` helper. Changes made as suggested.
--
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: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org