Skip to content

feat: set GPU extended_resources for Ray head and worker groups#1126

Open
pingsutw wants to merge 3 commits into
mainfrom
ray-extended-resources-gpu
Open

feat: set GPU extended_resources for Ray head and worker groups#1126
pingsutw wants to merge 3 commits into
mainfrom
ray-extended-resources-gpu

Conversation

@pingsutw
Copy link
Copy Markdown
Member

Summary

  • Populate extended_resources on the Ray HeadGroupSpec and each WorkerGroupSpec from their requests, so GPU accelerator (device/partition/device-class) and shared-memory configuration is propagated to KubeRay.
  • Export get_proto_extended_resources from flyte.extend so the Ray plugin (and other plugins) can build the proto ExtendedResources.
  • Add unit tests for the Ray plugin (new plugins/ray/tests/) covering accelerator propagation.

Test plan

  • uv run --project plugins/ray pytest plugins/ray/tests/test_task.py -v
  • Tests verify:
    • Head node with Resources(gpu="T4:1")head_group_spec.extended_resources.gpu_accelerator.device == "nvidia-tesla-t4".
    • Worker group with Resources(gpu="A100:2")worker_group_spec[0].extended_resources.gpu_accelerator.device == "nvidia-tesla-a100".
    • CPU/memory-only requests leave extended_resources unset on both head and worker specs.

pingsutw added 2 commits May 28, 2026 15:05
Populate extended_resources on Ray HeadGroupSpec and WorkerGroupSpec from
their requests so GPU accelerator (and shared memory) configuration is
propagated to KubeRay. Export get_proto_extended_resources from flyte.extend
and add unit tests covering head/worker accelerator propagation.

Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org>
dansola
dansola previously approved these changes May 30, 2026
Signed-off-by: Daniel Sola <daniel@union.ai>
Signed-off-by: Daniel Sola <daniel.sola@union.ai>
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.

2 participants