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

support config gpu memory factor #28

Merged
merged 1 commit into from
Oct 17, 2022

Conversation

peiniliu
Copy link
Contributor

As described in #19 and #22, the device plugin needs to support config GPU memory factor to control the number of virtual devices that Listandwatched by kubelet. By default, we support each memory block as 1MB, this PR support config this factor, so that users can specify their own GPU memory granularity.

Tested Results:

2022/08/15 08:57:18 Loading configuration.
2022/08/15 08:57:18
Running with config:
{
"version": "v1beta1",
"flags": {
"GPUStrategy": "share",
"GPUMemoryFactor": 10
}
}

ENV of pod1.yml
NVIDIA_VISIBLE_DEVICES=0
NVIDIA_DRIVER_CAPABILITIES=compute,utility
VOLCANO_GPU_MEMORY_TOTAL=15109
VOLCANO_GPU_ALLOCATED=10240

Signed-off-by: peiniliu [email protected]

| `--config-file` | `$CONFIG_FILE` | `""` |

when starting volcano-device-plugin.yml, users can specify these parameters by adding args to the container 'volcano-device-plugin'.
For example:
- args: ["--gpu-strategy=number"] will let device plugin using the gpu-number strategy
- args: ["--gpu-strategy=share","--gpu-memory-factor=10"] will let device plugin using the gpu-share strategy, and memory factor is 10MB
Copy link
Contributor

Choose a reason for hiding this comment

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

Are there some limit about the parameter gpu-memory-factor? For example, could it be a decimal?

Copy link
Member

Choose a reason for hiding this comment

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

This is not recommended generally, the most common setting is 1MiB / 1 GiB

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, so I mean it should be highlight.

Copy link
Member

@shinytang6 shinytang6 left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link
Member

@william-wang william-wang left a comment

Choose a reason for hiding this comment

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

/lgtm

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.

4 participants