-
Notifications
You must be signed in to change notification settings - Fork 750
Support PyTorch 2.8 #2630
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
base: main
Are you sure you want to change the base?
Support PyTorch 2.8 #2630
Conversation
|
Thanks for the Pull Request @M-Quadra! It would be great to support a newer version of PyTorch. The code changes look good to me. I've kicked off a CI run: |
|
PyTorch on the x86_64 platform is older and behaves differently; I'll mark the test with |
|
That's a whole lot of tests to xfail. I think you should look into why they're failing. X86_64 machines are running a different version of PyTorch: Line 3 in 0434e85
That's likely the cause. |
|
Failing test: The SolutionUse |
Adapt torch 2.8, torchao 0.12.0, executorch 0.7.0.
Environment
Features and Bug Fixes
Fix test_batchnorm_dynamic_stress
Fix test_batchnorm_dynamic_stress
For
torch.nn.functional.batch_norm:Adapt ones_like dtype
Adapt ones_like dtype for torch 2.8.0
In torch 2.8.0, the dtype of
ones_likemay be moved to_assert_tensor_metadata.Fix test_unfold
Fix test_unfold
To fix the unit test, replace the following code:
with:
Adapt torch.nn.SELU for executorch 0.7.0
Adapt torch.nn.SELU for executorch 0.7.0
In executorch 0.7.0,
torch.nn.SELUis decomposed toaten.elu. But theeluoperator implementation is missingscalesupport.Fix source code assert
Fix source code assert
Adapt torchao 0.12.0
Adapt torchao 0.12.0
In torchao 0.12.0,
torchao_quant.quantize_affineno longer accepts thezero_point_domainargument.torchao.quantization.pt2eexpectsnode.meta["source_fn_stack"]; ensurenode.metaexists by adding a dummy placeholder when missing.Add dead node elimination
Add dead node elimination
Some nodes in the FX graph are not used, but the graph validation does not ignore dead nodes and thus fails.
Related Issue
Closes #2610.