acoustic-carpenter-78188
03/18/2026, 6:03 PMGpuResourceName from the K8s plugin config instead of hardcoding "nvidia.com/gpu" in convertTaskResourcesToRequirements()
Problem
convertTaskResourcesToRequirements() in taskexec_context.go uses the hardcoded constant utils.ResourceNvidiaGPU ("nvidia.com/gpu") for GPU resource requests and limits. The K8s plugin config already provides a configurable GpuResourceName field (via gpu-resource-name in the config), but this function ignores it.
This means operators using alternative GPU resource types (e.g. "amd.com/gpu", "nvidia.com/gpu.shared", "habana.ai/gaudi") cannot use the existing configuration to change the GPU resource name — it's always hardcoded to nvidia.com/gpu.
The config field is already used correctly in flyteplugins/go/tasks/pluginmachinery/flytek8s/ (e.g. container_helper.go), but flytepropeller bypasses it.
Fix
Replace utils.ResourceNvidiaGPU with k8sConfig.GetK8sPluginConfig().GpuResourceName in convertTaskResourcesToRequirements(). This reads the configured GPU resource name at runtime, defaulting to "nvidia.com/gpu" when not explicitly set.
Testing
• Default behavior unchanged: GpuResourceName defaults to "nvidia.com/gpu"
• Custom GPU resource names (e.g. "amd.com/gpu") are now respected in task resource requirements
Closes #6746
flyteorg/flyte