Expose functional IR to capture_pre_autograd#115210
Expose functional IR to capture_pre_autograd#115210tugsbayasgalan wants to merge 20 commits intogh/tugsbayasgalan/176/basefrom
Conversation
[ghstack-poisoned]
🔗 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 FailuresAs of commit e744558 with merge base 36dccc2 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
[ghstack-poisoned]
torch/_export/__init__.py
Outdated
| args: Tuple[Any], | ||
| kwargs: Optional[Dict[str, Any]] = None, | ||
| constraints: Optional[List[Constraint]] = None, | ||
| functional: bool = False, |
There was a problem hiding this comment.
Make it _produce_functional_experimental_IR?
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
torch/_export/__init__.py
Outdated
| def _train(self, mode: bool = True): | ||
| raise NotImplementedError("Calling train() is not supported yet.") | ||
|
|
||
| <<<<<<< HEAD |
torch/_export/__init__.py
Outdated
|
|
||
| if kwargs is None: | ||
| kwargs = {} | ||
| if not _functional_pre_dispatch_IR: |
There was a problem hiding this comment.
nit: I would probably invert the condition (to limit unnecessary indents)
test/export/test_export.py
Outdated
| m = CondBranchClassMethod() | ||
| m.eval() | ||
| gm = capture_pre_autograd_graph(m, example_inputs) | ||
| # TODO (tmanlaibaatar) It doesn't work on aot_export yet |
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]
|
@pytorchbot merge -f "Unrelated failure" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
|
@pytorchbot revert -m "This should fix test_export_constraints_error_non_strict failures, see #116273" -c weird |
|
@pytorchbot successfully started a revert job. Check the current status here. |
|
@tugsbayasgalan your PR has been successfully reverted. |
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]
cc avikchaudhuri gmagogsfm zhxchen17 angelayi suo ydwu4 [ghstack-poisoned]
|
@pytorchbot merge |
Merge startedYour 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 |
) Pull Request resolved: #116383 Approved by: https://github.com/bdhirsh ghstack dependencies: #115188, #115210
Stack from ghstack (oldest at bottom):
cc @avikchaudhuri @gmagogsfm @zhxchen17 @angelayi @suo @ydwu4