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 2022/07/11 21:35:40 UTC

[GitHub] [tvm-rfcs] areusch commented on a diff in pull request #81: [USMP] Update RFC with constants pools

areusch commented on code in PR #81:
URL: https://github.com/apache/tvm-rfcs/pull/81#discussion_r918368975


##########
rfcs/0009_Unified_Static_Memory_Planning.md:
##########
@@ -461,19 +461,43 @@ Inputs :
 * IRModule containing 
     * AoT TIR PrimFunc (the control function describing the call graph to operators)
     * All Operator Functions
-    * Each tir.allocate in the IRModule annotated with candidate pools ([Using the annotation field of tir.allocate](https://github.com/apache/tvm-rfcs/blob/c447cbfbd5abceaa7623a0f90cc492784e6f0c0b/rfcs/0023-adding-annotation-field-to-tir.allocate.md))
+    * Each tir.allocate in the IRModule annotated with candidate workspace pools ([Using the annotation field of tir.allocate](https://github.com/apache/tvm-rfcs/blob/c447cbfbd5abceaa7623a0f90cc492784e6f0c0b/rfcs/0023-adding-annotation-field-to-tir.allocate.md))
 
 
         ```
+        /*!
+         * \brief base class pool of memory accessible by one or more targets.
+         * This is extended to represent workspace pools and constant pools.
+         * (See below)
+         */
         struct PoolInfoNode : public Object {
-        String  pool_name;
-        Integer size_bytes;
-        Integer alignment;
-        Integer pool_offset;
-        Map<Target,String> target_access; // 'rw' or 'ro'
+            /*! \brief The name of the memory pool */
+            String pool_name;
+            /*! \brief The expected size hint to be used by the allocator.
+            * The size_hint_bytes is set to kUnrestrictedPoolSizeHint
+            * to indicate the pool is not size restricted.
+            */
+            Integer size_hint_bytes;
+            /*! \brief The clock frequency of the memory in Hz */
+            Integer clock_frequency_hz;
+            /*! \brief The read bandwidth in bytes/cycle */
+            Integer read_bandwidth_bytes_per_cycle;
+            /*! \brief The write bandwidth in bytes/cycle */
+            Integer write_bandwidth_bytes_per_cycle;
+            /*! \brief The read latency in cycles */
+            Integer read_latency_cycles;
+            /*! \brief The write latency in cycles */
+            Integer write_latency_cycles;
+            /*! \brief The burst length in bytes for each Target */
+            Map<Target, Integer> target_burst_bytes;
+            /*! \brief The targets linked to the pool */
+            Array<Target> targets;
         }
+
+        struct WorkspacePoolInfoNode : public PoolInfoNode {
+        };
         ```
-        The input IRModule is expected to have "candidate_memory_pools" annotation populated with a orderered list of PoolInfo objects. The ordering will indicate to the planner the order of preference each allocate will be pinned to each Pool. The core compiler will run a pass to assign each tir.allocate with candidate_memory_pools based on the target each PrimFunc is executed, prior to invoking the USMP.
+        The input IRModule is expected to have "candidate_memory_pools" annotation populated with a orderered list of WorkspacePoolInfo objects. The ordering will indicate to the planner the order of preference each allocate will be pinned to each Pool. The core compiler will run a pass to assign each tir.allocate with candidate_memory_pools based on the target each PrimFunc is executed, prior to invoking the USMP.

Review Comment:
   ok, that makes sense to me



-- 
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: commits-unsubscribe@tvm.apache.org

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