How to use GPU on Mac M1/2 Install xcode tools xcode-select --install Install llvm brew install llvm libomp Install torch 2.1.2 pip install torch==2.1.2