pytorch
16d85160 - Fix standalone compile for op with multiple outputs (#96936)

Commit
1 year ago
Fix standalone compile for op with multiple outputs (#96936) Op-benchmark directly uses fx.Graph to create nodes without dynamo and then compiles the graph with inductor. Currently, operators with multiple outputs, e.g. native_layer_norm, would fail to run caused by standalone torch._inductor.compile() API #95594. Actually, the graph's result is a node with several outputs instead of a tuple with several nodes. However, the standalone API forces a non-tuple result be a tuple, i.e., a tuple with one node-type element with several outputs. This PR considers a return node with several outputs as a tuple to avoid errors. Pull Request resolved: https://github.com/pytorch/pytorch/pull/96936 Approved by: https://github.com/jgong5, https://github.com/jansel
Author
Committer
Parents
Loading