Problem
The predictor topology reads comp.Resources but does not provide any GPU (NVIDIA GPU / TPU / AWS Inferentia / Trainium) resource helpers, and does not auto-inject or validate GPU-specific requirements. KServe users frequently need:
- GPU resource requests: Explicitly requesting
nvidia.com/gpu: "1" or amd.com/gpu in the container resources.
- Auto-GPU detection: Based on model format or selected ServingRuntime, optionally suggest/add GPU resources automatically.
- TPU support (Google): Selector for
cloud.google.com/gke-accelerator and toleration for cloud.google.com/gke-tpu.
- AWS Inferentia / Trainium: Resources like
aws.amazon.com/neuron and node selectors for Neuron nodes.
- GPU-specific environment variables: Auto-inject
CUDA_VISIBLE_DEVICES, NVIDIA_VISIBLE_DEVICES, or runtime-specific vars when GPU is requested.
Currently, users must manually set comp.Resources with the exact GPU resource name and quantity, which is Kubernetes-specific and error-prone.
Suggested approach
Add a gpu or accelerator block to ModelServerCustomSpec (and LLM parameters):
type — "nvidia", "tpu", "inferentia", "trainium", "amd", etc.
count — number of accelerators.
autoInjectEnv — boolean, defaults to true. When enabled, inject common env vars for the selected accelerator type.
Alternatively, keep it simpler: add nvidiaGPU, tpu, neuron as optional typed fields with count + autoEnv.
Acceptance criteria
Problem
The predictor topology reads
comp.Resourcesbut does not provide any GPU (NVIDIA GPU / TPU / AWS Inferentia / Trainium) resource helpers, and does not auto-inject or validate GPU-specific requirements. KServe users frequently need:nvidia.com/gpu: "1"oramd.com/gpuin the container resources.cloud.google.com/gke-acceleratorand toleration forcloud.google.com/gke-tpu.aws.amazon.com/neuronand node selectors for Neuron nodes.CUDA_VISIBLE_DEVICES,NVIDIA_VISIBLE_DEVICES, or runtime-specific vars when GPU is requested.Currently, users must manually set
comp.Resourceswith the exact GPU resource name and quantity, which is Kubernetes-specific and error-prone.Suggested approach
Add a
gpuoracceleratorblock toModelServerCustomSpec(and LLM parameters):type—"nvidia","tpu","inferentia","trainium","amd", etc.count— number of accelerators.autoInjectEnv— boolean, defaults to true. When enabled, inject common env vars for the selected accelerator type.Alternatively, keep it simpler: add
nvidiaGPU,tpu,neuronas optional typed fields with count + autoEnv.Acceptance criteria