Closed kdgutier closed 1 year ago
It is important to notice that the numerical stability of MPS operators is not guaranteed. And some normal operations can fail to converge.
It is recommended to use a GPU on a Linux machine and debug on the Macbook M2 machine.
The new Macbooks have Metal Performance Shaders (MPS) backend for GPU training acceleration. PyTorch is yet to use fully the capabilities of the hardware, and some functionalities are not available. A solution is to set the
PYTORCH_ENABLE_MPS_FALLBACK=1
environment variable to execute the code on the CPU if Mac GPU's code is not available.The following line in the terminal with the respective
neuralforecast
environment activated solves the issue.In a jupyter notebook the same effect is achieved with the following line: