-
Notifications
You must be signed in to change notification settings - Fork 100
Resource isolation design #60
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: limengxuan <[email protected]>
|
@davidLif @omer-dayan could you help me review that~ |
|
Thank you for proposing this feature for KAI Scheduler and for your patience while we reviewed your suggestion. Based on the PR details, I understand the key components of the proposed solution to be:
The technical aspects seem clear to me. However, I do have a couple of questions:
|
Thanks for your reviewing, i'll try my best to answer
|
|
hello @archlitchi , I am looking for the gpu memory hard isolution way, I think this way is working for us. So what we need to change is update the kai-scheduler mutating webhook? And maybe the pod annotation design, current the annotation is pod scope not container scope. |
yes, we need to inject environment variable into each container using shared-gpu according to pod annotations, in kai-scheduler mutating webhook |
Great to hear! On our side, it's crucial that the integration remains open, as we believe our users will greatly benefit from the flexibility to onboard additional frameworks at this level in the future. With that in mind, we're happy to align on the API, specifically the environment variable name and value format. I propose using I suggest that the DaemonSet and the mutating webhook configuration be part of a separate, optional deployment. This allows users to opt-in by deploying it within their clusters. Once deployed, they’ll benefit from KAI Scheduler capabilities and memory isolation provided by Hami Core. I believe the Hami Core project is the right place to host the corresponding YAML files or deployment instructions. Within your development repository it will remain up to date and properly maintained in the future. Here’s an outline of how I envision the process:
|
|
@romanbaron I agree to deploy hami-core and mutating webhook separately so as not to interfere with kai-scheulder's code. Will you provide mutating webhook? |
|
Thanks, @romanbaron, @wy0824 that's a nice approach, I'll set the TODO-list here according to the update, please help me review, i'll start working on it once review is passed.
|
|
What decisions are made in the scheduler that effect the setting of this |
Yes, the value of 'GPU_MEMORY_LIMIT' is not effected by schedule decisions, that's why we can directly patch the environment variable in pod mutator |
We support two types of GPU Sharing requests:
|
I can take the KAI Scheduler part, I can add a document that describes the architecture around GPU_MEMORY_LIMIT env var that covers both types of GPU sharing requests. And then I can also implement it in KAI Scheduler. Will you cover the part of If we agree, this PR is probably no longer needed then. |
of course, i can manage the 'KAI-resource-isolator'. |
|
@romanbaron will kai scheduler support gpu core sharing, there is CUDA_DEVICE_SM_LIMIT in hami-core |
Maybe at some point, but it is not on our 2025 roadmap. |
Thank you for the contribution and for suggesting the addition! At this time, in order to remain neutral with regard to third-party integrations, we're not adding references to specific integrations in our documentation. On the topic of staying connected, we currently don't have a dedicated Slack channel, but we are working on creating one. We will keep you updated once it is set! |
ok, no problem, i'm working on KAI-resource-isolator now, in the meantime, i'll leave this PR open for sync and discussion. |
|
Is there any reason nvidia MPS is not considered for resource isolation? |
Our goal is to remain agnostic to all tools and solutions (including resource isolation solutions), letting users choose whatever fits the best to their needs. That being said, MPS is compatible with the KAI scheduler as long as a couple of MPS related conditions are met on your setup:
With these in place, KAI will be able to schedule MPS workloads without issues. If you run into any unexpected behavior, please feel free to open an issue - we are more than happy to investigate and help out! |
|
Is there any updates for this feature timeline? (hardware -level isolation) |
Same question. Is this still in the plans? |

Currently, KAI-scheduler does not enforce resource-isolation when using gpu-sharing feature, related issues: issue#49, issue#45. This document introduces an approach to implement that.
It is merely a design document for now, but we plan to implement that if pass the evaluation.