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

Proposal of dynamic GPU slice plugin #3820

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sailorvii
Copy link

NVIDIA official GPU sharing includes time-slice, MPS and MIG. Currently the MPS and MIG dynamic is not supported, we want to add this into volcano scheduler plugin

@volcano-sh-bot
Copy link
Contributor

Welcome @sailorvii!

It looks like this is your first PR to volcano-sh/volcano.

Thank you, and welcome to Volcano. 😃

@volcano-sh-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign lowang-bh
You can assign the PR to them by writing /assign @lowang-bh in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@volcano-sh-bot volcano-sh-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 14, 2024
@Monokaix
Copy link
Member

Hi, please squash to one commit and sign off.

Signed-off-by: sailorvii <[email protected]>
Signed-off-by: chenw66 <[email protected]>
Copy link
Member

@JesseStutler JesseStutler left a comment

Choose a reason for hiding this comment

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

I have reviewd it, please take a look~

- plugins:
- name: cugpushare
arguments:
cugpushare.schedulePolicy: spread
Copy link
Member

Choose a reason for hiding this comment

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

What does cu mean in cugpushare?

Copy link
Member

Choose a reason for hiding this comment

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

Maybe we can rename the plugin? There is already a plugin called deviceshare, we need to highlight that the plugin is used to dynamically split the gpu.

Copy link
Author

Choose a reason for hiding this comment

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

Sure, let's rename it.

Copy link
Member

Choose a reason for hiding this comment

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

Where is the logic of this AddPod, in the mig-agent of nos? I'm wondering whether our dynamic GPU slice plugin is strongly dependent on the nos project. You can see that the annotation has the watermark of nos, and nos project is not updated frequently.

Copy link
Author

Choose a reason for hiding this comment

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

  1. AddPod is in volcano/pkg/scheduler/api/node_info.go addResource.
  2. 3 functions can be reused from nos project: mig agent, mps agent and mps device plugin. They are not the most important part. If needed, we could rewrite them.

Copy link
Member

Choose a reason for hiding this comment

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

And I feel that the design of nos is strange. All the MIG profiles whether they are free or used are annotated as annotation entries of the node. And the MIG profiles requested by Pod are also annotated as annotation entries. That's not how annotation is meant to be used this way. Can we define a CRD to manage these specs and status, and node can refer to this CRD? Or we can aggregate these specs and status into one JSON struct and annotated as only one annotation entry.

Copy link
Author

Choose a reason for hiding this comment

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

Sure, it's good to bind those annotations.

Copy link
Member

Choose a reason for hiding this comment

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

How is the capacity in binpack or spread calculated here? Because we are dynamically dividing the GPU as MIG profiles, we don't know how many MIG profiles the GPU can be divided into.

Copy link
Author

Choose a reason for hiding this comment

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

Oh, here we only use the memory as the resource capacity calculation. Each profile has a dedicated memory size.

cugpushare.weight.cpu: 1
cugpushare.weight.memory: 2
cugpushare.weight.gpu: 5
cugpushare.DevicePluginCMName: mps-configmap
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need to specify the name and ns of the configmap here, isn't this fixed?

Copy link
Author

Choose a reason for hiding this comment

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

This is a shared config between the planner and the device plugin. The name could be configured. The planner(in the scheduler) and device plugin should define the same name configmap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
retest-not-required-docs-only size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants