zhiics commented on issue #4570: [relay] Relay annotation and partitioning for 
external compilers
URL: https://github.com/apache/incubator-tvm/pull/4570#issuecomment-568921493
 
 
   @masahi 
   
   > Obviously operator fusion should be disabled for the subgraph that would 
be sent to external tools, but for other nodes that run on CPU I want operator 
fusion to work as usual. Is that possible?
   
   Yes, this is possible. I just added a unit test for this. Please check it 
out.
   
   > I want subgraphs I get from this pass to be already quantized, so the 
quantization pass should happen before this pass. Are quantization and this 
pass going to work without any issues?
   
   Yes, you should be able customize your opt pass pipeline. For example:
   ```python
   # Given a relay module, mod
   with relay.quantize.qconfig(...):
       q_mod = relay.quantize.quantize(mod, params)
   
   seq1 = [relay.transform.xx, relay.transform.yy]
   with relay.build_config(...)
       mod = seq1(q_mod)
   
   mod = relay.build_extern_compiler(mod, "ccompiler")
   
   relaly.build_config(...):
       graph, lib, params = relay.build(mod, "llvm")
   ```

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