Skip to content

Add MPS (Apple Silicon) device support#7

Draft
aki916 wants to merge 2 commits intoFujitsuResearch:mainfrom
aki916:fix/mps-device-support
Draft

Add MPS (Apple Silicon) device support#7
aki916 wants to merge 2 commits intoFujitsuResearch:mainfrom
aki916:fix/mps-device-support

Conversation

@aki916
Copy link
Copy Markdown

@aki916 aki916 commented Apr 5, 2026

Summary

  • Add a device utility module ( onecomp/utils/device.py ) that auto-detects the best available device (CUDA > MPS > CPU) and provides a cross-platform empty_cache() helper.
  • Replace all hardcoded torch.cuda.empty_cache() calls with the device-agnostic empty_cache() .
  • Add safe wrappers for Cholesky operations (cholesky, cholesky_inverse, cholesky_solve) that fall back to CPU on MPS, since MPS does not support these ops.
  • Change the default device parameter from cuda:0 to auto-detection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant