api/config/v1: keep user-specified rename/devices for shared resources - #1825
api/config/v1: keep user-specified rename/devices for shared resources#1825jonyhy96 wants to merge 2 commits into
Conversation
|
@jonyhy96 Can you provide a corresponding unit test case here? Possibly one that shows how two resource names are used within a node. |
b5d1686 to
85954f6
Compare
|
@rajatchopra Thanks for the review! I've pushed a unit test TestDisableResoureRenamingKeepsUserSpec in api/config/v1/replicas_test.go (commit 85954f6) covering four cases:
All four sub-tests pass locally (go test ./api/config/v1/... is green). PTAL. |
|
Looking at the #490 that introduced the IIUC MPS requires all GPUs on a node to share the same replica count. This is enforced by |
For the time-slicing sharing path, preserve user-specified rename and devices fields in ReplicatedResources so that per-UUID time-slicing (where a subset of GPUs on a node is exposed under a renamed shared resource, e.g. nvidia.com/gpu.shared, while the remaining devices stay on nvidia.com/gpu) can be expressed in the config. The MPS control daemon can only apply a single active_thread_percentage per node, so per-GPU device selection and multiple rename targets remain structurally unsupportable on the MPS path. The MPS branch therefore retains the historical behavior: user-specified rename and devices fields are reset and the original warnings are emitted. Signed-off-by: haoyun <haoyun.96@bytedance.com>
…d MPS reset TestDisableResoureRenamingKeepsUserSpec covers the time-slicing path: per-UUID rename and devices fields are preserved (including the case where a single node exposes both nvidia.com/gpu full cards and nvidia.com/gpu.shared per-UUID slices). TestDisableResoureRenamingMPSStillResets guards the MPS invariant: because the MPS control daemon can only apply a single active_thread_percentage per node, disableResoureRenaming(mps) must keep clearing user-specified rename and forcing Devices.All=true. Signed-off-by: haoyun <haoyun.96@bytedance.com>
3a7279a to
f30be88
Compare
|
@henry118 Good catch — thanks for flagging the MPS constraint. You're right that MPS and time-slicing share this helper but have very different invariants: the MPS control daemon can only apply one active_thread_percentage per node, so per-GPU device selection and multiple rename targets aren't representable on the MPS path, whereas time-slicing has no equivalent per-node limit. I've narrowed the change so it only affects the time-slicing branch:
Force-pushed as f30be88. PTAL. |
disableResoureRenamingcurrently resets theRenameandDevicesfields of every entry undersharing.timeSlicing.resources(andsharing.mps.resources) to their defaults. That makes it impossible to:nvidia.com/gpufor full cards andnvidia.com/gpu.sharedfor the time-sliced subset.Preserve both fields and emit a warning instead, so that user intent is honored. Downstream resource-manager code already supports per-UUID device lists and custom rename targets, so no additional plumbing is required.