ashutosh-arm commented on PR #13212:
URL: https://github.com/apache/tvm/pull/13212#issuecomment-1310068371

   
   > 
   > Hi @ashutosh-arm sorry for my late reply. As I see it, the main purpose of 
the new option is to show the correspondence between the operators from the 
original graph and the final operations offloading on the target. This is 
displayed as a sequential printout of the source relay's operations, with the 
composites from which they are derived and the target to which they are 
unloaded.
   > 
   > Another point worth highlighting is the partitioned Relay, which is an 
output of --dump-code="relay", have relay operation's numbers ( %...) different 
from those in the initial Relay. Therefore, the new knob, which keeps the 
initial Relay's numbers, can be handy
   > 
   > Here is an example output with the new option:
   > 
   > ```
   > 'ethos-u    <- ethos-u.qnn_conv2d'
   
   I see your point. Here are some points to consider:
   
   1. `print_operators_offloading` would print the mapping of MicroNPU 
operators to the original Relay operators. Each target that uses partitioning 
has its own ways of defining these mappings. Some of them make use of 
`MergeCompilerRegions` that clubs multiple operators into a single partitioned 
function. Would it be possible to support additional targets given the knob 
name implies generic support in TVM?
   2. Another thing in pipe for better debug from frontends down to TIR is 
Compiler Explorer: https://github.com/apache/tvm/issues/13116. At some point in 
future, this should provide more transparency to the operator mappings.
   3. In the mean time, with a little education to the end user of MicroNPU, 
learning to interpret partitioned functions could be made easy. Just a 
suggestion, this knowledge could be shared via [TVM 
docs](https://tvm.apache.org/docs/how_to/work_with_microtvm/micro_ethosu.html?highlight=ethosu)
  and/or [MicroNPU 
demo](https://github.com/apache/tvm/blob/main/apps/microtvm/ethosu/README.md.).
   4. Another reason for thinking twice is that this knob changes the output 
from TVM. We should seek more opinions from community maybe?


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

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to