Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Apple silicon GPU(mps) support to ray #38464

Open
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

NripeshN
Copy link

@NripeshN NripeshN commented Aug 15, 2023

Why are these changes needed?

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

@NripeshN
Copy link
Author

hi @krfricke, created a new PR because I messed up my old one.

@stale
Copy link

stale bot commented Sep 17, 2023

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

  • If you'd like to keep this open, just leave any comment, and the stale label will be removed.

@stale stale bot added the stale The issue is stale. It will be closed within 7 days unless there are further conversation label Sep 17, 2023
@NripeshN
Copy link
Author

hi @krfricke, please review this PR

@stale stale bot removed the stale The issue is stale. It will be closed within 7 days unless there are further conversation label Sep 29, 2023
@jjyao
Copy link
Collaborator

jjyao commented Oct 24, 2023

Hi @NripeshN,

Thanks for the contribution. As the first step, we need to support Apple silicon GPU in Ray core. Could you follow #38553 as an example to update the PR? Thanks!

@jjyao jjyao self-assigned this Oct 24, 2023
NripeshN and others added 2 commits October 25, 2023 00:40
Signed-off-by: Nripesh Niketan <86844847+NripeshN@users.noreply.github.com>
Copy link
Collaborator

@jjyao jjyao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you rebase with master

python/ray/air/_internal/torch_utils.py Outdated Show resolved Hide resolved

@staticmethod
def get_current_node_num_accelerators() -> int:
return 1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the currently node doesn't have apple accelerators, we shouldn't return 1.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey,
quick question. All Apple silicon laptops have mps accelerator support.
So shouldn't it always be 1?

NripeshN and others added 2 commits October 26, 2023 06:41
Signed-off-by: Nripesh Niketan <86844847+NripeshN@users.noreply.github.com>
@NripeshN NripeshN requested a review from jjyao October 27, 2023 21:59
Signed-off-by: Nripesh Niketan <86844847+NripeshN@users.noreply.github.com>
@anyscalesam
Copy link
Collaborator

@jjyao this feels like a good thing to push through to enable better support for local dev/test on apple silicon. reminder to take a look. im adding this to core-sprint so we don't forget.

@anyscalesam anyscalesam added triage Needs triage (eg: priority, bug/not-bug, and owning component) core Issues that should be addressed in Ray Core stale The issue is stale. It will be closed within 7 days unless there are further conversation labels May 15, 2024
@anyscalesam anyscalesam removed the request for review from jjyao May 23, 2024 22:12
@stale stale bot removed the stale The issue is stale. It will be closed within 7 days unless there are further conversation label May 23, 2024
@anyscalesam anyscalesam assigned anyscalesam and unassigned jjyao May 28, 2024
@anyscalesam anyscalesam added P2 Important issue, but not time-critical and removed triage Needs triage (eg: priority, bug/not-bug, and owning component) labels May 28, 2024
@anyscalesam
Copy link
Collaborator

We really need Apple consult to help push this PR through as we're not familiar with MPS and other Apple Silicon GPU specific APIs.

@anyscalesam anyscalesam added the @external-author-action-required Alternate tag for PRs where the author doesn't have labeling permission. label Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Issues that should be addressed in Ray Core @external-author-action-required Alternate tag for PRs where the author doesn't have labeling permission. P2 Important issue, but not time-critical
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants