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 2021/04/26 23:46:00 UTC

[GitHub] [tvm] comaniac commented on a change in pull request #7923: [TensorIR][PASS][M1c] CompactBufferAllocation

comaniac commented on a change in pull request #7923:
URL: https://github.com/apache/tvm/pull/7923#discussion_r620643414



##########
File path: include/tvm/tir/transform.h
##########
@@ -360,6 +360,52 @@ TVM_DLL Pass LowerInitBlock();
  */
 TVM_DLL Pass PlanAndUpdateBufferAllocationLocation();
 
+/*!
+ * \brief Substitute all the block vars with the PrimExprs they are bound to, indicated by the
+ *        corresponding iter_values in BlockRealize, and then convert the blocks into opaque
+ *        ones by removing all the iter_values in BlockRealize and iter_vars in Block.

Review comment:
       Substitute ... for, or Convert ... to.
   ```suggestion
    * \brief Substitute all the block vars with the PrimExprs they are bound to, indicated by the
    *        corresponding iter_values in BlockRealize, for opaque blocks by removing all
    *.        the iter_values in BlockRealize and iter_vars in Block.
   ```

##########
File path: include/tvm/tir/stmt.h
##########
@@ -991,13 +992,22 @@ class BufferRegion : public ObjectRef {
   TVM_DLL explicit BufferRegion(Buffer buffer, Array<Range> region);
 
   /*!
-   * \brief Create a BufferRegion which is full region of the given buffer..
+   * \brief Create a BufferRegion which is full region of the given buffer.
    * \param buffer The buffer to generate full BufferRegion.
    * \return The BufferRegion which covers all region of the given buffer
    */
   TVM_DLL static BufferRegion FullRegion(Buffer buffer);
 
+  /*!
+   * \brief Create a BufferRegion which is a single point of the given buffer.
+   * \param buffer The buffer to generate single point BufferRegion.
+   * \param indices The access point indices of the buffer
+   * \return The BufferRegion which is the single point of the given buffer.
+   */
+  TVM_DLL static BufferRegion FromPoint(Buffer buffer, Array<PrimExpr> indices);

Review comment:
       Given this naming convension, should `FullRegion` be renamed to `FromRegion`?




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org