feat: new mutex GPU scheduling policy#2011
Conversation
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mesutoezdil The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
be8e91c to
e67ea6f
Compare
NUMA was the primary key in Less(), breaking binpack and spread intent when devices are on different NUMA nodes. Score is now primary, NUMA is tiebreaker when scores are equal. Fixes Project-HAMi#1806 Closes Project-HAMi#2010 Part of Project-HAMi#1889 Signed-off-by: mesutoezdil <mesudozdil@gmail.com>
Add GPUSchedulerPolicyMutex = "mutex" constant. When a pod sets hami.io/gpu-scheduler-policy: mutex, the scheduler allocates only GPUs with no existing users (Used == 0). - Less(): mutex case sorts idle GPUs to tail for Fit() to pick first - Fit(): isMutex filter rejects devices with Used > 0 - Applied to all 13 device backends Closes Project-HAMi#2009 Part of Project-HAMi#1889 Signed-off-by: mesutoezdil <mesudozdil@gmail.com>
e67ea6f to
d11fc02
Compare
Add
GPUSchedulerPolicyMutex = "mutex"constant. When a pod setshami.io/gpu-scheduler-policy: mutex, the scheduler allocates only GPUs with no existing users.Changes
pkg/util/types.goGPUSchedulerPolicyMutexconstantpkg/scheduler/policy/gpu_policy.goLess(): mutex case sorts idle GPUs to tail soFit()picks them firstpkg/device/*/device.go(13 backends)Fit(): skip devices withUsed > 0when policy is mutexpkg/scheduler/policy/gpu_policy_test.goUsage
Pod is only scheduled to a GPU with no existing users.
Closes #2009
Part of #1889
Test plan
go test ./pkg/scheduler/policy/... --race -count=1go test ./pkg/device/... --race -count=1