Lunderberg commented on a change in pull request #9727:
URL: https://github.com/apache/tvm/pull/9727#discussion_r818759960



##########
File path: src/tir/ir/expr.cc
##########
@@ -1056,12 +1058,28 @@ TVM_STATIC_IR_FUNCTOR(ReprPrinter, vtable)
     .set_dispatch<AnyNode>([](const ObjectRef& node, ReprPrinter* p) { 
p->stream << "?"; });
 
 // BufferLoad
+void BufferLoadNode::LegalizeDtype() {
+  int index_lanes = 1;

Review comment:
       Definitely agreed that this is an overgeneralization, and should be 
restricted further.  One concern with restricting it that much is that it might 
not handle the case a vector index in an earlier index, which is then moved to 
the last index by a subsequent layout transformation.
   
   What if we restrict it to have at most one vector index, but allow that 
index to occur in any location?  That would avoid questions on how multiple 
vector indices should be flattened (e.g. I could see 
`[ramp(i,1,4),ramp(j,1,4)]` on a `[4,4]` buffer being reasonable flattened to 
`[ramp(4*i + j, 1, 4)]` or to `[ramp(ramp(j,1,4), 1,4)]`, or to `[ramp(i, 1, 
16)]`, depending on how the two indices interact), but would still allow for 
the transformed-to-last-index case.




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