Repository navigation
Conversation
Signed-off-by: Edward Z. Yang <[email protected]> [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/101115
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit bf24c72: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Signed-off-by: Edward Z. Yang <ezyangmeta.com> [ghstack-poisoned]
Signed-off-by: Edward Z. Yang <ezyangmeta.com> cc soumith voznesenskym penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx desertfire [ghstack-poisoned]
Signed-off-by: Edward Z. Yang <ezyangmeta.com> cc soumith voznesenskym penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx desertfire [ghstack-poisoned]
Signed-off-by: Edward Z. Yang <ezyangmeta.com> cc soumith voznesenskym penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx desertfire [ghstack-poisoned]
Signed-off-by: Edward Z. Yang <ezyangmeta.com> cc soumith voznesenskym penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx desertfire [ghstack-poisoned]
Signed-off-by: Edward Z. Yang <ezyangmeta.com> cc soumith voznesenskym penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx desertfire [ghstack-poisoned]
Signed-off-by: Edward Z. Yang <ezyangmeta.com> cc soumith voznesenskym penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx desertfire [ghstack-poisoned]
| 'upsample_bilinear2d_backward_out_cuda', | ||
| torch.device(device).type == 'cuda') | ||
|
|
||
| @skipIfTorchInductor("aot-autograd issue") |
There was a problem hiding this comment.
All of these tests are skipped this way. What broke was requires_grad was not set correctly on some of the tensors. TBH, it is probably worth figuring out what went wrong; maybe it's "requires_grad tensors was created inside graph"
| # importlib is required because the import cannot be top level | ||
| # (cycle) and cannot be nested (TS doesn't support) | ||
| return importlib.import_module('torch._decomp.decompositions').upsample_bilinear2d_vec( | ||
| input, output_size, align_corners, scale_factors) |
There was a problem hiding this comment.
is import_lib still necessary, if you're running it from inside of a region of if not torch.jit.is_scripting?
I would have thought that torchscript would know to not try to scriptify the region in this block, but maybe that's wrong
There was a problem hiding this comment.
Yes:
File "/data/users/ezyang/d/pytorch/torch/jit/frontend.py", line 141, in <listcomp>
stmts = [build_stmt(ctx, s) for s in stmts]
File "/data/users/ezyang/d/pytorch/torch/jit/frontend.py", line 320, in __call__
return method(ctx, node)
File "/data/users/ezyang/d/pytorch/torch/jit/frontend.py", line 644, in build_If
build_stmts(ctx, stmt.body),
File "/data/users/ezyang/d/pytorch/torch/jit/frontend.py", line 141, in build_stmts
stmts = [build_stmt(ctx, s) for s in stmts]
File "/data/users/ezyang/d/pytorch/torch/jit/frontend.py", line 141, in <listcomp>
stmts = [build_stmt(ctx, s) for s in stmts]
File "/data/users/ezyang/d/pytorch/torch/jit/frontend.py", line 319, in __call__
raise UnsupportedNodeError(ctx, node)
torch.jit.frontend.UnsupportedNodeError: import statements aren't supported:
File "/data/users/ezyang/d/pytorch/torch/nn/functional.py", line 4002
# importlib is required because the import cannot be top level
# (cycle) and cannot be nested (TS doesn't support)
import torch._decomp.decompositions as decomp
~~~~~~ <--- HERE
return decomp.upsample_bilinear2d_vec(
input, output_size, align_corners, scale_factors)
----------------------------------------------------------------------
I think what is going on is that TorchScript is parsing the entire function body before eliminating is_scripting, so you can't use language features that the parser doesn't support.
|
@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 |
TorchTitan's Kimi K2.7 vision encoder resizes its learnable positional table here: https://github.com/pytorch/torchtitan/blob/85c549b9332067f7615241e73e0c4a28d44b065f/torchtitan/models/kimi_k2_7/vision_encoder.py#L90-L106 ```python grid_table = pos_embed.permute(2, 0, 1).unsqueeze(0).float() ... F.interpolate(grid_table, size=(h, w), mode=bicubic) ``` this PR make sure `--debug.deterministic` / `torch.use_deterministic_algorithms(True)` work. Fix is similar to to #101115 * direct ATen calls, TorchScript, and `antialias=True` are unchanged * deterministic decomposition is slower and can have small forward rounding differences Pull Request resolved: #193707 Approved by: https://github.com/Skylion007
…93707) TorchTitan's Kimi K2.7 vision encoder resizes its learnable positional table here: https://github.com/pytorch/torchtitan/blob/85c549b9332067f7615241e73e0c4a28d44b065f/torchtitan/models/kimi_k2_7/vision_encoder.py#L90-L106 ```python grid_table = pos_embed.permute(2, 0, 1).unsqueeze(0).float() ... F.interpolate(grid_table, size=(h, w), mode=bicubic) ``` this PR make sure `--debug.deterministic` / `torch.use_deterministic_algorithms(True)` work. Fix is similar to to pytorch#101115 * direct ATen calls, TorchScript, and `antialias=True` are unchanged * deterministic decomposition is slower and can have small forward rounding differences Pull Request resolved: pytorch#193707 Approved by: https://github.com/Skylion007
Stack from ghstack (oldest at bottom):
Signed-off-by: Edward Z. Yang [email protected]
cc @soumith @voznesenskym @penguinwu @anijain2305 @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @desertfire