Skip to content
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

'mps' NotImplementedError -FYI #70

Open
RobBW opened this issue Nov 6, 2024 · 7 comments
Open

'mps' NotImplementedError -FYI #70

RobBW opened this issue Nov 6, 2024 · 7 comments

Comments

@RobBW
Copy link

RobBW commented Nov 6, 2024

On a Mac M2 I get the error message:

NotImplementedError: Output channels > 65536 not supported at the MPS device. As a temporary fix, you can set the environment variable PYTORCH_ENABLE_MPS_FALLBACK=1 to use the CPU as a fallback for this op. WARNING: this will be slower than running natively on MPS.

According to the PyTorch site this message is incorrect; fallback also errors . See:https://github.com/pytorch/pytorch/issues/134416)
https://github.com/pytorch/pytorch/issues/129207
According to the latter they

have tracked this down to a kernel side issue in MPS which will take longer to fix (as at Nov 2024)

Looks like we can only wait and in the meantime ensure Output channels <65536

@RobBW
Copy link
Author

RobBW commented Nov 6, 2024

Have searched for ways to reduce the number of output channels but got bogged down in details of the program without understanding the big picture
Can anyone suggest a simple change that will ensure channels are <65536

@RobBW
Copy link
Author

RobBW commented Nov 15, 2024

Oops a link above should be: [https://github.com/pytorch/pytorch/issues/134416]

@RobBW
Copy link
Author

RobBW commented Nov 15, 2024

Appears to have been fixed today see: https://github.com/pytorch/pytorch/pull/140726 but I have not yet tested it in AudioSR. Need to download latest PyTorch and verify that it works in MacOS Sonoma

@hvaara
Copy link

hvaara commented Nov 15, 2024

Please feel free to @-mention me in case it's still not working and I'll take another look. Requirements are macOS 15.1 (or later), and PyTorch nightly (torch-2.6.0.dev20241115 or later).

If you're using torchaudio that can be tricky to get working with torch-2.6.0.dev20241115 right now without compiling from source. It should be easier tomorrow. The steps to compile from source is fairly straight-forward, but complicated the first time you're doing it (everything's easy when you know how), and I don't think it's documented anywhere. If you get stuck please reach out -- I'm happy to help 😃

@RobBW
Copy link
Author

RobBW commented Nov 16, 2024

Thanks. Before I upgrade to 15.1. Is there a known reason that it will not work with the last MacOS Sonoma 14.7.1? Or hasn’t it been tested with it?

@hvaara
Copy link

hvaara commented Nov 16, 2024

The fixes in MPS rolls out with the OS as opposed to stand-alone. To get the fixes in MPS you need to update macOS to a version after which they where introduced -- macOS 15.1 in this case.

@hvaara
Copy link

hvaara commented Dec 11, 2024

Heads up: pytorch/pytorch#140726 introduced a regression affecting at least the Conv2d op. I'm currently investigating the scope of the impact and potential mitigations. As of now, it appears that Conv1d is unaffected, and its fix will be included in PyTorch v2.6.0. For updates, please follow pytorch/pytorch#142836.

@RobBW Do you know if the model is using Conv1d or Conv2d?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants