Pr/gpu soft quota#6
Open
limes22 wants to merge 6 commits into
Open
Conversation
KAI binder sets the gpu-memory annotation (MiB) on shared pods but never passes CUDA_DEVICE_MEMORY_LIMIT, which HAMi-core (libvgpu) reads to enforce the per-pod GPU memory cap. As a result libvgpu loads via ld.so.preload but enforces nothing (nvidia-smi shows full device memory) on KAI fractional-sharing pods. This makes the mutating webhook translate the gpu-memory annotation into CUDA_DEVICE_MEMORY_LIMIT=<value>m on every (init)container (skipping containers that already set it, and handling the empty-env case), so libvgpu enforces the requested cap. gpu-fraction carries no absolute memory value and is left untouched. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: limes22 <limes22@users.noreply.github.com>
Builds on the gpu-memory injection: gpu-fraction pods loaded libvgpu but received no CUDA_DEVICE_MEMORY_LIMIT, so nvidia-smi showed full device memory. Translate gpu-fraction into an absolute cap = fraction x per-GPU VRAM. Per-GPU VRAM is autodetected from the nvidia.com/gpu.memory node label (minimum across GPU nodes for heterogeneous clusters; PER_GPU_VRAM_MIB env overrides). If undetectable, gpu-fraction caps are skipped rather than guessed. gpu-memory handling is unchanged. Adds nodes read RBAC. Signed-off-by: limes22 <limes22@users.noreply.github.com>
Replace the 10-minute time.Ticker poll with a client-go SharedInformer on Nodes: recompute the gpu-fraction VRAM basis on node add/update/delete events, reading from the informer cache (lister) instead of repeated List calls. Blocks until cache sync at startup. Fraction-cap math and gpu-memory path unchanged. Signed-off-by: limes22 <limes22@users.noreply.github.com>
…AC, PER_GPU_VRAM_MIB override) Single 'helm install' works with no manual --set or separate kubectl apply. Chart 0.1.0 -> 0.2.0. Signed-off-by: limes22 <limes22@users.noreply.github.com>
…nforce) ACCEPT_NVIDIA_VISIBLE_DEVICES_ENVVAR_WHEN_UNPRIVILEGED=true (needed for KAI fractional sharing) lets any unprivileged GPU-runtime pod grab GPUs via the NVIDIA_VISIBLE_DEVICES env, bypassing allocation. The webhook now neutralizes it (=void) on pods that use a GPU runtimeClass but are not authorized (KAI share annotation, kai.scheduler/queue label, managed-by=gpu-operator, or a trusted namespace). Mode off/audit/enforce, default audit (log-only) so a wrong allowlist can't break system pods before it's observed. Signed-off-by: limes22 <limes22@users.noreply.github.com>
Revert deployment-specific defaults (personal Docker Hub image, GPU-node nodeSelector, appVersion) back to upstream values. The new feature options (perGpuVramMiB, nvidiaVisibleDevicesGuard, nodes-autodetect RBAC) remain with neutral defaults so the chart stays generic. Signed-off-by: limes22 <limes22@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: limes22 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 |
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.
A series of enhancements to ensure that libvgpu is actually enforced in KAI shared pods, including: existing gpu-memory support, VRAM capping via gpu-fraction, automatic per-GPU VRAM node label detection through an informer, and an env-bypass guard for NVIDIA_VISIBLE_DEVICES.