diff --git a/pkg/providers/instancetype/types.go b/pkg/providers/instancetype/types.go index d46f357ee468..497dda87b4db 100644 --- a/pkg/providers/instancetype/types.go +++ b/pkg/providers/instancetype/types.go @@ -141,6 +141,14 @@ func computeRequirements(info *ec2.InstanceTypeInfo, offerings cloudprovider.Off requirements.Get(v1.LabelInstanceGPUCount).Insert(fmt.Sprint(aws.Int64Value(gpu.Count))) requirements.Get(v1.LabelInstanceGPUMemory).Insert(fmt.Sprint(aws.Int64Value(gpu.MemoryInfo.SizeInMiB))) } + // Accelerators - excluding Neuron + if info.InferenceAcceleratorInfo != nil && len(info.InferenceAcceleratorInfo.Accelerators) == 1 && info.NeuronInfo == nil { + accelerator := info.InferenceAcceleratorInfo.Accelerators[0] + requirements.Get(v1.LabelInstanceAcceleratorName).Insert(lowerKabobCase(aws.StringValue(accelerator.Name))) + requirements.Get(v1.LabelInstanceAcceleratorManufacturer).Insert(lowerKabobCase(aws.StringValue(accelerator.Manufacturer))) + requirements.Get(v1.LabelInstanceAcceleratorCount).Insert(fmt.Sprint(aws.Int64Value(accelerator.Count))) + requirements.Get(v1.LabelInstanceAcceleratorMemory).Insert(fmt.Sprint(aws.Int64Value(info.InferenceAcceleratorInfo.TotalInferenceMemoryInMiB))) + } // Neuron if info.NeuronInfo != nil && len(info.NeuronInfo.NeuronDevices) == 1 { device := info.NeuronInfo.NeuronDevices[0] @@ -297,7 +305,6 @@ func awsNeuronCores(info *ec2.InstanceTypeInfo) *resource.Quantity { if info.NeuronInfo != nil { neuronDevice := info.NeuronInfo.NeuronDevices[0] neuronCorePerDevice := neuronDevice.CoreInfo.Count - count = *neuronDevice.Count * *neuronCorePerDevice } return resources.Quantity(fmt.Sprint(count)) diff --git a/website/content/en/preview/reference/instance-types.md b/website/content/en/preview/reference/instance-types.md index 0333349bed9a..887eb087f74f 100644 --- a/website/content/en/preview/reference/instance-types.md +++ b/website/content/en/preview/reference/instance-types.md @@ -5186,6 +5186,9 @@ below are the resources available with some assumptions and after the instance o #### Labels | Label | Value | |--|--| + |karpenter.k8s.aws/instance-accelerator-count|8| + |karpenter.k8s.aws/instance-accelerator-manufacturer|qualcomm| + |karpenter.k8s.aws/instance-accelerator-name|qualcomm-ai100| |karpenter.k8s.aws/instance-category|dl| |karpenter.k8s.aws/instance-cpu|96| |karpenter.k8s.aws/instance-cpu-manufacturer|intel|