tqchen commented on PR #77:
URL: https://github.com/apache/tvm-rfcs/pull/77#issuecomment-1156407362

   Adding some additional discussion with @csullivan .
   
   We agree that:
   - There are different ways to encode layout and padding decisions:
       - E0: BufferConstraint(as element in the IR)
       - E1: Composing a stage that transforms the layout(a loop that 
represents the mapping)
   - Non-local rewrites are needed to be able to propagate the layout and 
padding decision through out the entire model through constraint solving. 
   
   Right now we have some healthy discussions about ways to encode layout and 
padding decisions. 
   
   Some of my thoughts:
   
   Introducing changes to TIR would needs some additional thoughts that 
deserves some extra consideration. Due to the N*M complexity (where N is the 
TIR possibilities and M is the number of primitives to be supported).
   
   Right now it is possible to do non-local constraint rewriting flowings as 
part of the graph pass. Note that while E1 is indeed less "compact" on one 
hand, we can use it to reconstruct THE compact data structure(that represents 
the layout decision) that we can use to flow the decisions across the graph 
node.  E1 also enables some additional capabilities (e.g.) expressing future 
memory remappings that do not necessarily fit into padding/packing.
   
   Starting from the graph level allows us to capture learnings, then use some 
e2e goals to make an informed decision on TIR level change later if needed.
   
   
   
   
   
   
   
   
   


-- 
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-unsubscr...@tvm.apache.org

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

Reply via email to