Repository navigation
feat(plugin): add a compute sharing mode without HSA_CU_MASK - #265
Merged
Merged
Conversation
-compute_sharing (chart dp.computeSharing) lets every container on a GPU run on all of its CUs. Allocate sets no HSA_CU_MASK, reserves no CUs and writes no hami.io/amd-cu-allocated annotation. Memory limits, LD_AUDIT, dmem and the device visibility variables are unchanged. Signed-off-by: mesutoezdil <mesudozdil@gmail.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: moezdil The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
/kind feature
What this PR does / why we need it:
Adds the "AMD: support compute Sharing mode (not setting CU_MASK)" item from the HAMi v2.12 roadmap (Project-HAMi/HAMi#3442).
-compute_sharing(chartdp.computeSharing, default off) makesAllocateskip the CU slice: noHSA_CU_MASK, no reserved CUs, nohami.io/amd-cu-allocatedannotation, and no CU rebuild from the node's pods. Every container on a GPU runs on all of its CUs and the hardware schedules their work.HIP_DEVICE_MEMORY_LIMIT_<i>,LD_AUDIT, dmem,ROCR_VISIBLE_DEVICESandHIP_VISIBLE_DEVICESare unchanged.The mode is per node, read at plugin start. Mixing masked and unmasked pods on one GPU would let the unmasked ones run on a masked pod's CUs, so the docs say to drain the node before switching. The HAMi scheduler still counts
amd.com/gpucores, so in this mode it limits how many pods share a card, not what each gets.Which issue(s) this PR fixes:
Part of Project-HAMi/HAMi#3442
Special notes for your reviewer:
Tested on an RX 9070 XT (gfx1201, 64 CUs), RKE2 with HAMi 2.11.0. Two pods with
amd.com/gpucores: 50,amd.com/gpumem: 4096ran an FP32 FMA HIP kernel:HSA_CU_MASK0:0-31,0:32-63-compute_sharing=trueHIP_DEVICE_MEMORY_LIMIT_0andLD_AUDITwere set in both modes. A thirdgpucores: 50pod stayed Pending withCardInsufficientCore.TestAllocateComputeSharingcovers a core slice, a memory-only slice and a whole GPU while another pod holds every CU. With the option forced off, all three cases fail.go vet ./...andgo test -race ./...pass in the CI builder image;helm lintand both template renders pass.Does this PR introduce a user-facing change?:
Yes, the new
-compute_sharingflag and thedp.computeSharingchart value, off by default.AI Disclosure:
Written with AI assistance and reviewed and tested by the author.