tqchen commented on a change in pull request #8585:
URL: https://github.com/apache/tvm/pull/8585#discussion_r679212377



##########
File path: include/tvm/tir/stmt.h
##########
@@ -1059,6 +1059,20 @@ class MatchBufferRegion : public ObjectRef {
  public:
   TVM_DLL explicit MatchBufferRegion(Buffer buffer, BufferRegion source);
 
+  /*!
+   * \brief Convert target buffer access indices to original one.
+   * \param indices The indices of the target buffer
+   * \return The indices of source buffer.
+   */
+  TVM_DLL Array<PrimExpr> ConvertIndices(const Array<PrimExpr>& indices) const;

Review comment:
       ARCH: Given this is more like a utility to lower the IRNode, it does not 
bear any semantics meaning here. It would be better to separate that from the 
IR node to keep it minimum. Instead, include these utilities in buffer lowering 
pass(lower match buffer)

##########
File path: include/tvm/tir/stmt.h
##########
@@ -1059,6 +1059,20 @@ class MatchBufferRegion : public ObjectRef {
  public:
   TVM_DLL explicit MatchBufferRegion(Buffer buffer, BufferRegion source);
 
+  /*!
+   * \brief Convert target buffer access indices to original one.
+   * \param indices The indices of the target buffer
+   * \return The indices of source buffer.
+   */
+  TVM_DLL Array<PrimExpr> ConvertIndices(const Array<PrimExpr>& indices) const;
+
+  /*!
+   * \brief Convert target buffer region to original one.
+   * \param region The sub-region of the target buffer
+   * \return The region of source buffer.
+   */
+  TVM_DLL Region ConvertRegion(const Region& region) const;

Review comment:
       ARCH: Given this is more like a utility to lower the IRNode, it does not 
bear any semantics meaning here. It would be better to separate that from the 
IR node to keep it minimum. Instead, include these utilities in buffer lowering 
pass(lower match buffer)




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