mbarrett97 commented on issue #4771: [Relay] Added Merge Composite pass
URL: https://github.com/apache/incubator-tvm/pull/4771#issuecomment-579448339
 
 
   It's important to emphasise the difference between partitioned subgraphs 
(which correspond to 'External' functions), and the merged patterns here (which 
correspond to 'Composite' functions).
   
   Composite functions are a way to group together relay patterns which 
correspond to a particular external codegen function (eg. qnn_conv2d + bias_add 
+ requantize maps to a single convolution function in Arm Compute Library). 
External functions are a way to represent a subgraph that should not go via TVM 
codegen but should instead go through an external compiler (eg. DNNL).
   
   For libraries like ACL or DNNL, it happens to be the case that you can just 
put every supported operator/composite function in it's own external function 
(partitioned subgraph) and because the library calls are standalone that works 
well enough.
   
   A more complex external compiler though may want to do some advanced fusion 
or manipulation which means it needs to see the full supported subgraph, not 
just a single operator/composite function at a time. It will produce some 
binary artifact that computes the entire subgraph rather than a particular 
operator within it. All that complexity should be handled by the external 
compiler's codegen pass, the responsibility of the partitioner is to ensure 
that pass receives a valid subgraph that is as large as possible while still 
being fully supported and introducing no dataflow problems.
   
   In summary, I don't think this pass replaces partitioning which is essential 
for the 'complex compiler' case, but I think it may replace the annotation pass.

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


With regards,
Apache Git Services

Reply via email to