tvm icon indicating copy to clipboard operation
tvm copied to clipboard

[torch_tvm] Support Lowering to TVM even if node cannot be fused

Open serhaty opened this issue 6 years ago • 2 comments

We take PT JIT IR graph and fuse those nodes of the graph that can be lowered to Relay graph in TVM. However the current fusion logic does not create a subgraph out of a single node. You need at least two nodes that can be lowered and only then it will fuse them and create a subgraph.

In this PR, we want to enable subgraph creation for single nodes that cannot be fused with any other node. We achieve this by checking for the case where consumer can be lowered but producer cannot be.

serhaty avatar Sep 23 '19 23:09 serhaty

Also maybe we can add an flag to enable this feature or not? Or maybe just check if it affects performance?

kimishpatel avatar Sep 24 '19 22:09 kimishpatel

Can you try the flow on the quantized model to see how many subgraph we could get now?

lly-zero-one avatar Oct 01 '19 22:10 lly-zero-one