tqchen commented on a change in pull request #9727:
URL: https://github.com/apache/tvm/pull/9727#discussion_r818739034
##########
File path: include/tvm/tir/expr.h
##########
@@ -610,6 +610,14 @@ class BufferLoadNode : public PrimExprNode {
/*! \brief The indices location to be loaded. */
Array<PrimExpr> indices;
+ /*! \brief Set the dtype based on the buffer/indices
+ *
+ * Usually, this will be the same dtype as the buffer. This may
+ * have a different number of lanes than the buffer's dtype if index
+ * values have more than 1 lane.
+ */
+ void LegalizeDtype();
Review comment:
Reading again, I now think that LegalizeDtype should be a private
function called by CTOR. COW was a convenient way to construct a new field, but
this comes with the price of leaking this behavior to the outside. Consider add
a function WithIndices(Bufferload, indices) that calls into this legalization
function. Can be done as a followup
--
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]