Skip to content

Commit

Permalink
No auto injection of toleration for explicitly requested unpartitione…
Browse files Browse the repository at this point in the history
…d GPUs

Signed-off-by: Jeev B <[email protected]>
  • Loading branch information
jeevb committed Oct 12, 2023
1 parent 6526390 commit 69cbd9c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
9 changes: 0 additions & 9 deletions flyteplugins/go/tasks/pluginmachinery/flytek8s/pod_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ const defaultContainerTemplateName = "default"
const primaryContainerTemplateName = "primary"
const PrimaryContainerKey = "primary_container_name"

const GpuPartitionSizeNotSet = "NotSet"

// AddRequiredNodeSelectorRequirements adds the provided v1.NodeSelectorRequirement
// objects to an existing v1.Affinity object. If there are no existing required
// node selectors, the new v1.NodeSelectorRequirement will be added as-is.
Expand Down Expand Up @@ -195,13 +193,6 @@ func ApplyGPUNodeSelectors(podSpec *v1.PodSpec, gpuAccelerator *core.GPUAccelera
}
if config.GetK8sPluginConfig().GpuUnpartitionedToleration != nil {
partitionSizeTol = config.GetK8sPluginConfig().GpuUnpartitionedToleration
} else {
partitionSizeTol = &v1.Toleration{
Key: config.GetK8sPluginConfig().GpuPartitionSizeNodeLabel,
Value: GpuPartitionSizeNotSet,
Operator: v1.TolerationOpEqual,
Effect: v1.TaintEffectNoSchedule,
}
}
case *core.GPUAccelerator_PartitionSize:
partitionSizeNsr = &v1.NodeSelectorRequirement{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -626,12 +626,6 @@ func TestApplyGPUNodeSelectors(t *testing.T) {
Operator: v1.TolerationOpEqual,
Effect: v1.TaintEffectNoSchedule,
},
{
Key: "gpu-partition-size",
Value: GpuPartitionSizeNotSet,
Operator: v1.TolerationOpEqual,
Effect: v1.TaintEffectNoSchedule,
},
},
podSpec.Tolerations,
)
Expand Down

0 comments on commit 69cbd9c

Please sign in to comment.