Commit Graph

8 Commits

Author SHA1 Message Date
Justin Chu
cb7a30f656 [BE] Enable ruff's UP rules and autoformat inductor/ (#105431)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/105431
Approved by: https://github.com/albanD
2023-07-19 13:45:00 +00:00
Edward Z. Yang
0eb59ad093 Change export tracing_mode default to symbolic (#99877)
Differential Revision: [D45231039](https://our.internmc.facebook.com/intern/diff/D45231039/)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/99877
Approved by: https://github.com/albanD, https://github.com/voznesenskym
2023-04-25 00:12:12 +00:00
PyTorch MergeBot
c83e1f517d Revert "Delete tracing_mode argument to export (#99555)"
This reverts commit e9786149ab.

Reverted https://github.com/pytorch/pytorch/pull/99555 on behalf of https://github.com/DanilBaibak due to Break internal build
2023-04-24 08:21:41 +00:00
Edward Z. Yang
e9786149ab Delete tracing_mode argument to export (#99555)
You can have any color you want, as long as it's tracing_mode="symbolic"

Signed-off-by: Edward Z. Yang <ezyang@meta.com>

Pull Request resolved: https://github.com/pytorch/pytorch/pull/99555
Approved by: https://github.com/voznesenskym
2023-04-21 16:20:51 +00:00
Liao, Xuan
16d85160d5 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
2023-03-20 07:56:18 +00:00
PyTorch MergeBot
5d33f9cddb Revert "Fix standalone compile for op with multiple outputs (#96936)"
This reverts commit 37cde56658.

Reverted https://github.com/pytorch/pytorch/pull/96936 on behalf of https://github.com/kit1980 due to Broke inductor tests on macos-12-py3-arm64 https://github.com/pytorch/pytorch/actions/runs/4458548491/jobs/7830566793
2023-03-19 20:32:13 +00:00
Liao, Xuan
37cde56658 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
2023-03-19 02:44:03 +00:00
Jason Ansel
e13b804105 Add standalone torch._inductor.compile() API (#95594)
This fixes support for inductor compiling non-dynamo generated FX graphs.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/95594
Approved by: https://github.com/bertmaher, https://github.com/desertfire
2023-02-28 20:05:03 +00:00