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

NotImplementedError: The operator 'aten::isin.Tensor_Tensor_out' #219

Open
cyrilzakka opened this issue May 6, 2024 · 3 comments
Open

Comments

@cyrilzakka
Copy link

cyrilzakka commented May 6, 2024

Trying to run this on the CLI on macOS:

insanely-fast-whisper --device mps  --batch-size 2 --file-name chunk0.mp3
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 https://github.com/pytorch/pytorch/issues/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.

Any advice?

For non-CLI, I now just run the following:

import os
os.environ['PYTORCH_ENABLE_MPS_FALLBACK'] = '1'
import torch
from transformers import pipeline
from transformers.utils import is_flash_attn_2_available
@cyrilzakka
Copy link
Author

After updating to torch (nightly) everything seems to be working fine:

pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu

@pmane
Copy link

pmane commented May 11, 2024

Did you manage to use GPU without os.environ['PYTORCH_ENABLE_MPS_FALLBACK'] = '1' ?
I was able to use this few months back on GPU, now looks like it is broken.

Can you give me your requirements .txt if you are able to work with GPU ? I am getting same error and not able to resolve

@mertbozkir
Copy link

After updating to torch (nightly) everything seems to be working fine:

pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu

Unfortunately, doesn't solve my problem:

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 https://github.com/pytorch/pytorch/issues/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.

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

3 participants