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

[RFE] Change num_gpus to a dict to support arbitrary accelerators #467

Closed
Xaenalt opened this issue Feb 22, 2024 · 3 comments
Closed

[RFE] Change num_gpus to a dict to support arbitrary accelerators #467

Xaenalt opened this issue Feb 22, 2024 · 3 comments

Comments

@Xaenalt
Copy link

Xaenalt commented Feb 22, 2024

Name of Feature or Improvement

I'd like to change from a hardcoding of nvidia.com/gpu to instead having a dict or something of resources. There are other accelerators and it'd be nice to specify them with an arbitrary key/value rather than hardcoding nvidia.com/gpu

Description of Problem the Feature Should Solve

Currently hardcoding nvidia.com/gpu is suboptimal since there are other accelerators, habana.ai/gaudi to name one, but there are other potential resources and accelerators, some possibly even not public. It would be a benefit to usability to specify these additional resources without editing the template.

Describe the Solution You Would Like to See

I'd like to see a constructor something like:

cluster = Cluster(ClusterConfiguration(
    name='raytest',
    namespace='ray-demo',
    num_workers=2,
    min_cpus=8,
    max_cpus=8,
    min_memory=12,
    max_memory=12,
    resources={"habana.ai/gaudi": 1},
    image="quay.io/spryor/ray:synapseai-1.13-torch",
    instascale=False
))

Which would just add the keys/values from the resources variable into the resources requests/limits section. Perhaps an option to set requests/limits separately something like for splitting, but first pass it's totally fine if it's just requests == limits since for hardware devices it's required they be equal

Describe Alternatives You Have Considered

Some alternative format ideas are maybe something like min_resources and max_resources, or a string format like "someresource": "1/2" for request 1 limit 2, etc.

Additional Context

In this case, the request is around Habana Gaudi devices, but the scope exists beyond that

@anishasthana
Copy link
Member

cc @Bobbins228

@Bobbins228
Copy link
Contributor

This sounds like a useful change 👍

@KPostOffice
Copy link
Collaborator

Solved with #531

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

No branches or pull requests

4 participants