Skip to content

Added symbolic shape testing for AOTAutograd#85789

Closed
Chillee wants to merge 6 commits intogh/chillee/134/basefrom
gh/chillee/134/head
Closed

Added symbolic shape testing for AOTAutograd#85789
Chillee wants to merge 6 commits intogh/chillee/134/basefrom
gh/chillee/134/head

Conversation

[ghstack-poisoned]
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Sep 28, 2022

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/85789

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

❌ 1 Failures

As of commit 88f0062:

The following jobs have failed:

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

@pytorch-bot pytorch-bot bot added the topic: not user facing topic category label Sep 28, 2022
@Chillee Chillee changed the title Added symbolic shape testing Added symbolic shape testing for AOTAutograd Sep 28, 2022
@Chillee Chillee mentioned this pull request Sep 28, 2022
Copy link
Copy Markdown
Contributor

@ezyang ezyang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The use of backward() for the testing is weird but I guess it doesn't matter

@skipIfNoSympy
@patch("functorch.compile.config.use_dynamic_shapes", True)
@patch("functorch.compile.config.use_fake_tensor", True)
@patch("functorch.compile.config.use_functionalize", False)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should beef up functionalization testing too eventually

t_args = [sample_input.input] + list(sample_input.args)
t_kwargs = sample_input.kwargs
flat_args, args_spec = pytree.tree_flatten((t_args, t_kwargs))
sentinel_val = -42
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A brief explainer on this would help!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the sentinel does not have to be an int, allocating a fresh object and testing object identity on it is better as it is guaranteed not to collide

if isinstance(out, tuple):
sm = 0
for i in out:
sm += i.sum()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will inplace right? Well I guess we support differentiating it so it's fine?

@huydhn
Copy link
Copy Markdown
Contributor

huydhn commented Sep 28, 2022

@pytorchbot revert -m "Sorry, reverting as this breaks an aot_autograd mac test on functorch. #85794 was reverted before but it was at the top of the stack so the revert still fail https://hud.pytorch.org/pytorch/pytorch/commit/823dc33b00b811c28a3924a6f0a31ba6afee7272" -c nosignal

@huydhn huydhn reopened this Sep 28, 2022
@huydhn huydhn added the ciflow/trunk Trigger trunk jobs on your pull request label Sep 28, 2022
@github-actions github-actions bot requested a review from ezyang September 28, 2022 17:14
@pytorchmergebot
Copy link
Copy Markdown
Collaborator

@pytorchbot successfully started a revert job. Check the current status here.
Please reach out to the PyTorch DevX Team with feedback or questions!

@pytorchmergebot
Copy link
Copy Markdown
Collaborator

Reverting PR 85789 failed

Reason: Command git -C /home/runner/work/pytorch/pytorch revert --no-edit 35fe4abdc74d88c0d4768f3cd7aedcfd2e817a3d returned non-zero exit code 1

Auto-merging functorch/test/test_aotdispatch.py
CONFLICT (content): Merge conflict in functorch/test/test_aotdispatch.py
error: could not revert 35fe4abdc7... Added symbolic shape testing for AOTAutograd (#85789)
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git revert --continue".
hint: You can instead skip this commit with "git revert --skip".
hint: To abort and get back to the state before "git revert",
hint: run "git revert --abort".
Details for Dev Infra team Raised by workflow job

@huydhn huydhn removed the ciflow/trunk Trigger trunk jobs on your pull request label Sep 28, 2022
@huydhn huydhn closed this Sep 28, 2022
drisspg pushed a commit to drisspg/pytorch that referenced this pull request Sep 29, 2022
@facebook-github-bot facebook-github-bot deleted the gh/chillee/134/head branch October 2, 2022 14:19
mehtanirav pushed a commit that referenced this pull request Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants