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/03/30 20:34:40 UTC

[GitHub] [tvm] comaniac commented on pull request #7765: [M1b] Scaffolding ScheduleState data structure

comaniac commented on pull request #7765:
URL: https://github.com/apache/tvm/pull/7765#issuecomment-810559637


   > Thanks @junrushao1994 @comaniac These are great points, although i think they are somewhat parallel to the data structure itself and have things to do with primitive implementations.
   
   Make sense. I'm fine with a follow-up PR to implement the result of this discussion.
   
   > 
   > So we could try to make discussions in parallel with respect to this PR.
   > 
   > In terms of the "root" name, given that we are uniquely identifying function already via the global names, an easy way is to just use function name in the module to obtain the root, which removes on concept here.
   
   This is also a good point. IMHO, as long as the interface makes sense to schedule primitive developers, it should be fine.
   
   > 
   > The main Q for the block name uniqueness is about how to enforce them. For manual operations they certainly makes sense. For general automated transformations it might create an extra burden to introduce name tables or allocation mechanism. Since automated transformations rules works on a sub-region and may not be aware of the names from other parts. Due to that reason, allowing pointer uniqueness might still be a better approach. This also aligns with our existing approach to handle loop vars, which saves a lot of trouble during automatic transformations.
   > 
   
   It makes sense to use unique pointers in the automation framework. One thing I would like to highlight is that even we leverage unique pointer to access blocks and don't have to worry about their names during optimization, it might still be worthwhile to maintain block name uniqueness. The reason is, IIUC, we will have a mechanism to print out the schedule in Python format for debugging and investigation. In the printed schedule, block name will be the only referenced.
   
   > This being said, we should be able to introduce canonicalization pass to uniquely rename block names. We can also add a flag in the Schedule to enforce such uniqueness if it is turned on
   
   Exactly. Calling a canonicalization pass before printing out the schedule could also solve the issue I mentioned above.


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