Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MPS] Skip virtualized devices (pytorch#111576)
Skip devices that does not support `MTLGPUFamilyMac2`, for example something called "Apple Paravirtual device", which started to appear in GitHub CI, from https://github.com/malfet/deleteme/actions/runs/6577012044/job/17867739464#step:3:18 ``` Found device Apple Paravirtual device isLowPower false supports Metal false ``` As first attempt to allocate memory on such device will fail with: ``` RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 1.70 GB). Tried to allocate 0 bytes on private pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure). ``` Fixes pytorch#111449 Pull Request resolved: pytorch#111576 Approved by: https://github.com/atalman, https://github.com/clee2000, https://github.com/huydhn
- Loading branch information