comaniac edited a comment on issue #5409:
URL: https://github.com/apache/incubator-tvm/pull/5409#issuecomment-618537434


   Ah I see your point. I missed considering that `ConstantNode` is also a 
"node" instead of a "var". I agree with you that constant nodes should follow 
the target of the consuming node and the output you illustrated makes sense to 
me.
   
   On the other hand, it'd be better to maintain the statement of "annotating 
every node" of `AnnotateTarget` pass in my opinion. A similar case is 
`TupleNode`. We determine the target of tuple nodes by looking at its 
arguments, and still annotate it whatever it should be at the TVM or other 
targets. In summary, I'd prefer the following annotation generated by 
`AnnotateTarget`:
   
   ```
   input
     |
   begin
     |
    op -- begin -- end -- const -- begin
     |
    end
   ```
   
   Although just like you pointed out that constant node is not in dataflow 
path, I still prefer to simplify the process in a pass. This can not only 
naturally guarantee that this change will not affect the rest BYOC flow, but 
also make the future maintenance easier.
   


----------------------------------------------------------------
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:
[email protected]


Reply via email to