Mps device, torch backend

Hi there,
I have an Apple M2 Max which has mps device, I am using torch and huggingface for finetuning a transformer.
I am facing error:

RuntimeError: MPS does not support cumsum op with int64 input

platform: macOS-13.5.2-arm64-arm-64bit
Libraries version:


I used this command and restarted still doesn’t solve the problem:

pip3 install --pre torch torchvision torchaudio --extra-index-url

Appreciate any help!


This may help

I’m running M1 and no problems but using very simple stuff (just CNNs)

I see that you are already running Ventura though. Maybe wiping all out and reinstalling works.

Thanks for the resource @Mah_Neh,
Yes, I have Ventura.

An easy trick that worked was uninstalling the torch (that I had not done previously) and reinstalling it with the following command:

pip3 install --pre torch torchvision torchaudio --extra-index-url
1 Like