Skip to content

Expose functional IR to capture_pre_autograd#115210

Closed
tugsbayasgalan wants to merge 20 commits intogh/tugsbayasgalan/176/basefrom
gh/tugsbayasgalan/176/head
Closed

Expose functional IR to capture_pre_autograd#115210
tugsbayasgalan wants to merge 20 commits intogh/tugsbayasgalan/176/basefrom
gh/tugsbayasgalan/176/head

Conversation

@tugsbayasgalan
Copy link
Copy Markdown
Contributor

@tugsbayasgalan tugsbayasgalan commented Dec 5, 2023

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Dec 5, 2023

🔗 Helpful Links

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

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

✅ No Failures

As of commit e744558 with merge base 36dccc2 (image):
💚 Looks good so far! There are no failures yet. 💚

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

tugsbayasgalan added a commit that referenced this pull request Dec 5, 2023
ghstack-source-id: 955013b
Pull Request resolved: #115210
args: Tuple[Any],
kwargs: Optional[Dict[str, Any]] = None,
constraints: Optional[List[Constraint]] = None,
functional: bool = False,
Copy link
Copy Markdown
Contributor Author

@tugsbayasgalan tugsbayasgalan Dec 6, 2023

Choose a reason for hiding this comment

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

Make it _produce_functional_experimental_IR?

def _train(self, mode: bool = True):
raise NotImplementedError("Calling train() is not supported yet.")

<<<<<<< HEAD
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🤔


if kwargs is None:
kwargs = {}
if not _functional_pre_dispatch_IR:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: I would probably invert the condition (to limit unnecessary indents)

m = CondBranchClassMethod()
m.eval()
gm = capture_pre_autograd_graph(m, example_inputs)
# TODO (tmanlaibaatar) It doesn't work on aot_export yet
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

what doesn't work?

cc avikchaudhuri gmagogsfm zhxchen17 angelayi suo ydwu4

[ghstack-poisoned]
cc avikchaudhuri gmagogsfm zhxchen17 angelayi suo ydwu4

[ghstack-poisoned]
cc avikchaudhuri gmagogsfm zhxchen17 angelayi suo ydwu4

[ghstack-poisoned]
@tugsbayasgalan
Copy link
Copy Markdown
Contributor Author

@pytorchbot merge -f "Unrelated failure"

@pytorchmergebot
Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

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

@malfet
Copy link
Copy Markdown
Contributor

malfet commented Dec 21, 2023

@pytorchbot revert -m "This should fix test_export_constraints_error_non_strict failures, see #116273" -c weird

@pytorchmergebot
Copy link
Copy Markdown
Collaborator

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

@pytorchmergebot
Copy link
Copy Markdown
Collaborator

@tugsbayasgalan your PR has been successfully reverted.

pytorchmergebot added a commit that referenced this pull request Dec 21, 2023
This reverts commit 4b59b4d.

Reverted #115210 on behalf of https://github.com/malfet due to This should fix test_export_constraints_error_non_strict failures, see #116273 ([comment](#115210 (comment)))
cc avikchaudhuri gmagogsfm zhxchen17 angelayi suo ydwu4

[ghstack-poisoned]
tugsbayasgalan added a commit that referenced this pull request Dec 22, 2023
ghstack-source-id: dff3c10
Pull Request resolved: #115210
cc avikchaudhuri gmagogsfm zhxchen17 angelayi suo ydwu4

[ghstack-poisoned]
tugsbayasgalan added a commit that referenced this pull request Dec 25, 2023
ghstack-source-id: be67d00
Pull Request resolved: #115210
@tugsbayasgalan
Copy link
Copy Markdown
Contributor Author

@pytorchbot merge

@pytorchmergebot
Copy link
Copy Markdown
Collaborator

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 pushed a commit that referenced this pull request Dec 28, 2023
@facebook-github-bot facebook-github-bot deleted the gh/tugsbayasgalan/176/head branch December 28, 2023 15:22
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.

8 participants