-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Output size of the matrix multiplication is larger than currently supported by the MPS backend: 72250,72250, needs to be less than 2**32 elements #141909
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
Comments
ComfyUI Error ReportError Details
Stack Trace
System Information
Devices
Logs
Attached WorkflowPlease make sure that workflow does not contain any sensitive information such as API keys or passwords.
Additional Context(Please add any additional context or steps to reproduce the error here) |
Just curious: did it work in 2.4? |
Unrelated, but a very funny (and unhelpful) error:
Fixed in #141927 |
I don't know. I started using ComfyUI very recently. |
Minimal reproimport torch
x1 = torch.randn(1, 72250, 1, device="mps")
x2 = torch.randn(1, 1, 72250, device="mps")
res = torch.bmm(x1, x2) Reproed bad on v2.4.1, where PyTorch crashed with
|
Commenting out pytorch/aten/src/ATen/native/mps/operations/LinearAlgebra.mm Lines 572 to 579 in 2d9b081
at main reproduces the error from v2.4.1. |
From triage discussion: we've determined it's high pri to use fallback or to use tiling in the large matrix case. |
…ion (old: 2^32 total elem). Addresses #141909
…ytorch#143095) The previous tiling implementation worked for up to 2^32 total elements per single batch entry. This extends the functionality to support the dimensions encountered in ComfyUI (output shape: 1,72250,72250). Fixes pytorch#141909 Pull Request resolved: pytorch#143095 Approved by: https://github.com/kulinseth
…143095) The previous tiling implementation worked for up to 2^32 total elements per single batch entry. This extends the functionality to support the dimensions encountered in ComfyUI (output shape: 1,72250,72250). Fixes #141909 Pull Request resolved: #143095 Approved by: https://github.com/kulinseth (cherry picked from commit afa313e)
…144558) Extend bmm tiling to work up to 2^32 elem in any single output dim (#143095) The previous tiling implementation worked for up to 2^32 total elements per single batch entry. This extends the functionality to support the dimensions encountered in ComfyUI (output shape: 1,72250,72250). Fixes #141909 Pull Request resolved: #143095 Approved by: https://github.com/kulinseth (cherry picked from commit afa313e) Co-authored-by: Joona Havukainen <jhavukainen@apple.com>
Observing
Output RC 2.6:
Output Nightly:
|
@atalman what machine you run this one on?
|
Uh oh!
There was an error while loading. Please reload this page.
🚀 The feature, motivation and pitch
Output size of the matrix multiplication is larger than currently supported by the MPS backend: 72250,72250, needs to be less than 2**32 elements
Alternatives
No response
Additional context
Reported as suggested by the error message.
I'm on a Apple M2 Max MacBook Pro with 96GB Ram.
cc @ezyang @gchanan @zou3519 @kadeng @msaroufim @kulinseth @albanD @malfet @DenisVieriu97 @jhavukainen
The text was updated successfully, but these errors were encountered: