kparzysz-quic commented on a change in pull request #10513:
URL: https://github.com/apache/tvm/pull/10513#discussion_r823857293



##########
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:
       You can just ignore the last index (i.e. `i < indices.size()-1`), then 
you don't need the `i + 1 == end` check.  Also, you can use 
`indices[i].dtype.is_scalar()` instead of checking lanes directly.




-- 
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]


Reply via email to