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

[BUG] NotImplementedError: The operator 'aten::isin.Tensor_Tensor_out' is not currently implemented for the MPS device. #141

Closed
Nucleon729 opened this issue Jun 28, 2024 · 4 comments
Labels
bug Something isn't working dependency Concerns issues with a dependency mps Concerns running code on the MPS torch backend

Comments

@Nucleon729
Copy link

Nucleon729 commented Jun 28, 2024

Hi,

when trying to run the example script on macOS on a macM1 Max, using mps, I get this error:

NotImplementedError: The operator 'aten::isin.Tensor_Tensor_out' is not currently implemented for the MPS device. If you want this op to be added in priority during the prototype phase of this feature, please comment on pytorch/pytorch#77764. 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.

does it means I can't run chronos natively on MPS?

Kind regards,

@Nucleon729 Nucleon729 added the bug Something isn't working label Jun 28, 2024
@lostella
Copy link
Contributor

@Nucleon729 as suggested by the error message, setting PYTORCH_ENABLE_MPS_FALLBACK=1 will make it work. Just run

export PYTORCH_ENABLE_MPS_FALLBACK=1

in your terminal before executing the example snippet.

@abdulfatir
Copy link
Contributor

@Nucleon729 Some changes in transformers broke MPS support. Please install the following version:

pip install transformers~=4.39.0

Also note that bfloat16 may not be supported on MPS, so you should change the torch_dtype to torch.float32.

@abdulfatir
Copy link
Contributor

Opened an issue in transformers: huggingface/transformers#31737

@lostella lostella added dependency Concerns issues with a dependency mps Concerns running code on the MPS torch backend labels Jul 17, 2024
@abdulfatir
Copy link
Contributor

Fix for the above issue was merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependency Concerns issues with a dependency mps Concerns running code on the MPS torch backend
Projects
None yet
Development

No branches or pull requests

3 participants