New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dynamo.optimizations.training.aot_autograd does not functionalize #90759
Labels
high priority
module: aotdispatch
umbrella label for AOTAutograd issues
module: pt2-dispatcher
PT2 dispatcher-related issues (e.g., aotdispatch, functionalization, faketensor, custom-op,
oncall: pt2
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Comments
Known problem, if no inputs require grad it goes a different path that doesn't functionalize. Need to fix this |
silvasean
added a commit
to silvasean/torch-mlir
that referenced
this issue
Dec 13, 2022
As [@ezyang suggested](pytorch/pytorch#90276 (comment)), use `torch._dynamo.optimizations.training.aot_autograd` instead of raw `make_fx`. This is more future proof and gives us the backward pass and functionalization. We don't currently get functionalization because of pytorch/pytorch#90759 This also incidentally fixes the source location handling, which makes `lockstep_basic.py` give an accurate source location!
silvasean
added a commit
to llvm/torch-mlir
that referenced
this issue
Dec 15, 2022
As [@ezyang suggested](pytorch/pytorch#90276 (comment)), use `torch._dynamo.optimizations.training.aot_autograd` instead of raw `make_fx`. This is more future proof and gives us the backward pass and functionalization. We don't currently get functionalization because of pytorch/pytorch#90759 This also incidentally fixes the source location handling, which makes `lockstep_basic.py` give an accurate source location!
vivekkhandelwal1
pushed a commit
to vivekkhandelwal1/torch-mlir
that referenced
this issue
Dec 15, 2022
As [@ezyang suggested](pytorch/pytorch#90276 (comment)), use `torch._dynamo.optimizations.training.aot_autograd` instead of raw `make_fx`. This is more future proof and gives us the backward pass and functionalization. We don't currently get functionalization because of pytorch/pytorch#90759 This also incidentally fixes the source location handling, which makes `lockstep_basic.py` give an accurate source location!
albanD
added
oncall: pt2
module: aotdispatch
umbrella label for AOTAutograd issues
and removed
triage review
labels
Dec 19, 2022
desertfire
added
the
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
label
Dec 19, 2022
bdhirsh
added a commit
that referenced
this issue
Jan 26, 2023
…inference" still waiting for CI fallout fixes #90759 [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Jan 26, 2023
still waiting for CI fallout fixes #90759 [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 2, 2023
…inference" still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 2, 2023
still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 2, 2023
…inference" still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 2, 2023
still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 3, 2023
…inference" still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 3, 2023
still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 3, 2023
…inference" still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 3, 2023
still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 4, 2023
…inference" still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 4, 2023
still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 6, 2023
…inference" still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 7, 2023
still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 7, 2023
…inference" still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 7, 2023
still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 7, 2023
…inference" still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 7, 2023
still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 7, 2023
…inference" still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 7, 2023
still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 7, 2023
…inference" still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 7, 2023
still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 9, 2023
…inference" still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 9, 2023
still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 9, 2023
…inference" still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 9, 2023
still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 9, 2023
…inference" still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 9, 2023
still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 9, 2023
…inference" still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 9, 2023
still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 10, 2023
…inference" still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 10, 2023
still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 11, 2023
…inference" still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 11, 2023
still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 12, 2023
…inference" still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 12, 2023
still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 12, 2023
…inference" still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 12, 2023
still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 12, 2023
…inference" still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
bdhirsh
added a commit
that referenced
this issue
Feb 12, 2023
still waiting for CI fallout fixes #90759 cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
zou3519
added
the
module: pt2-dispatcher
PT2 dispatcher-related issues (e.g., aotdispatch, functionalization, faketensor, custom-op,
label
Mar 18, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
high priority
module: aotdispatch
umbrella label for AOTAutograd issues
module: pt2-dispatcher
PT2 dispatcher-related issues (e.g., aotdispatch, functionalization, faketensor, custom-op,
oncall: pt2
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
🐛 Describe the bug
I tried adjusting my code from using raw make_fx to aot_autograd as suggested by @ezyang in this comment. It seems to be working well for converting the graph to dispatcher ops, and gives us the backward graph too as Ed said. However, Ed mentioned that it would also give us functionalization, but I don't see that happening. I tried poking around inside aot_autograd to force it down the
normalize_ir
code path and didn't get the functionalized graph either.See repro script and output:
Output:
Compare this to the result with raw use of make_fx/functionalize:
This functionalized output is what I want (except that
m1 is result
is false, so there is a soundness issue :/ ).Versions
PyTorch version: 2.0.0.dev20221211+cpu
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A
OS: Debian GNU/Linux rodete (x86_64)
GCC version: (Debian 12.2.0-3) 12.2.0
Clang version: 14.0.6-2
CMake version: version 3.25.0
Libc version: glibc-2.35
Python version: 3.10.8 (main, Nov 3 2022, 15:17:13) [GCC 12.2.0] (64-bit runtime)
Python platform: Linux-5.19.11-1rodete1-amd64-x86_64-with-glibc2.35
Is CUDA available: False
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
Versions of relevant libraries:
[pip3] numpy==1.24.0rc2
[pip3] torch==2.0.0.dev20221211+cpu
[pip3] torchvision==0.15.0.dev20221211+cpu
cc @ezyang @gchanan @zou3519 @kadeng @msaroufim @bdhirsh @anijain2305 @chauhang @soumith @wconstab @ngimel
The text was updated successfully, but these errors were encountered: