serve
serve copied to clipboard
Fix CI and Regression workflows for MAC Arm64
Description
The Mac CI and regression failures are being caused by the following reasons:
- The
macos-lastest
github runner tag now points toarm64
based Mac. - PyTorch 2.3 has dropped support for
x86
Mac. - The M1 mac github runners do not expose the GPU(MPS hardware) https://github.com/actions/runner-images/issues/7085 https://github.com/actions/runner-images/issues/9254#issuecomment-1968570672
This PR fixes the above issues by:
- Fixing the GPU detection logic when running on M1 Mac to fall back to CPU. Note that the Mac CI and Regression only runs on CPU, when running on the github runner. To run on MPS, a self hosted runner will need to be created.
- Update CI and regression tests to run on both CPU only and MPS on M1 Mac
Type of change
- [x] Bug fix (non-breaking change which fixes an issue)
Feature/Issue validation/testing
- [ ] Mac
arm64
CI: https://github.com/pytorch/serve/actions/runs/8976048758/job/24652034356?pr=3128 - [ ] Mac
arm64
Regression: https://github.com/pytorch/serve/actions/runs/8976048741/job/24652042161?pr=3128