pytorch icon indicating copy to clipboard operation
pytorch copied to clipboard

Fix standalone compile for op with multiple outputs

Open Valentine233 opened this issue 3 years ago • 1 comments

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.

cc @soumith @voznesenskym @penguinwu @anijain2305 @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @peterbell10 @desertfire

Valentine233 avatar Mar 16 '23 06:03 Valentine233

:link: Helpful Links

:test_tube: See artifacts and rendered test results at hud.pytorch.org/pr/96936

Note: Links to docs will display an error until the docs builds have been completed.

:white_check_mark: No Failures

As of commit 26ef7296a7ac86659b32ffc975aa96f727a75009: :green_heart: Looks good so far! There are no failures yet. :green_heart:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

pytorch-bot[bot] avatar Mar 16 '23 06:03 pytorch-bot[bot]

@pytorchbot merge

Valentine233 avatar Mar 19 '23 02:03 Valentine233

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging Check the merge workflow status here

pytorchmergebot avatar Mar 19 '23 02:03 pytorchmergebot

@pytorchbot revert -m "Broke inductor tests on macos-12-py3-arm64 https://github.com/pytorch/pytorch/actions/runs/4458548491/jobs/7830566793" -c nosignal

kit1980 avatar Mar 19 '23 20:03 kit1980

@Valentine233 sorry I have to revert this. Please fix for macos-12-py3-arm64 and re-land.

kit1980 avatar Mar 19 '23 20:03 kit1980

@pytorchbot successfully started a revert job. Check the current status here. Questions? Feedback? Please reach out to the PyTorch DevX Team

pytorchmergebot avatar Mar 19 '23 20:03 pytorchmergebot

@Valentine233 your PR has been successfully reverted.

pytorchmergebot avatar Mar 19 '23 20:03 pytorchmergebot

Looks like this PR was not the reason for the test failure, it was a mistake to revert it. I'll reland it soon.

kit1980 avatar Mar 19 '23 21:03 kit1980

@pytorchbot rebase

kit1980 avatar Mar 20 '23 01:03 kit1980

@pytorchbot successfully started a rebase job. Check the current status here

pytorchmergebot avatar Mar 20 '23 01:03 pytorchmergebot

Rebase failed due to

Aborting rebase because rebasing the branch resulted in the same sha as the target branch.
This usually happens because the PR has already been merged.  Please rebase locally and push.

Raised by https://github.com/pytorch/pytorch/actions/runs/4463722719

pytorchmergebot avatar Mar 20 '23 01:03 pytorchmergebot

@pytorchbot merge

kit1980 avatar Mar 20 '23 01:03 kit1980

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging Check the merge workflow status here

pytorchmergebot avatar Mar 20 '23 02:03 pytorchmergebot

Merge failed

Reason: 1 jobs have failed, first few of them are: periodic / linux-focal-rocm5.4.2-py3.8 / test (distributed, 1, 2, linux.rocm.gpu)

Details for Dev Infra team Raised by workflow job

pytorchmergebot avatar Mar 20 '23 03:03 pytorchmergebot

@pytorchbot merge

kit1980 avatar Mar 20 '23 06:03 kit1980

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging Check the merge workflow status here

pytorchmergebot avatar Mar 20 '23 06:03 pytorchmergebot