Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(eks): update nodegroup gpu check #31445

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
6 changes: 6 additions & 0 deletions packages/aws-cdk-lib/aws-ec2/lib/instance-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,11 @@ export enum InstanceClass {
*/
G6 = 'g6',

/**
* Graphics-optimized instances powered by AMD EPYC processors and NVIDIA L40S Tensor Core GPUs, 6th generation
*/
G6E = 'g6e',

/**
* Parallel-processing optimized instances, 2nd generation
*/
Expand Down Expand Up @@ -1589,6 +1594,7 @@ export class InstanceType {
[InstanceClass.GRAPHICS5_GRAVITON2]: 'g5g',
[InstanceClass.G5G]: 'g5g',
[InstanceClass.GRAPHICS6]: 'g6',
[InstanceClass.G6E]: 'g6e',
[InstanceClass.G6]: 'g6',
[InstanceClass.PARALLEL2]: 'p2',
[InstanceClass.P2]: 'p2',
Expand Down
4 changes: 2 additions & 2 deletions packages/aws-cdk-lib/aws-eks/lib/managed-nodegroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -605,8 +605,8 @@ const gpuAmiTypes: NodegroupAmiType[] = [
function isGpuInstanceType(instanceType: InstanceType): boolean {
//compare instanceType to known GPU InstanceTypes
const knownGpuInstanceTypes = [InstanceClass.P2, InstanceClass.P3, InstanceClass.P3DN, InstanceClass.P4DE, InstanceClass.P4D,
InstanceClass.G3S, InstanceClass.G3, InstanceClass.G4DN, InstanceClass.G4AD, InstanceClass.G5, InstanceClass.G5G,
InstanceClass.INF1, InstanceClass.INF2];
InstanceClass.G3S, InstanceClass.G3, InstanceClass.G4DN, InstanceClass.G4AD, InstanceClass.G5, InstanceClass.G5G, InstanceClass.G6,
InstanceClass.G6E, InstanceClass.INF1, InstanceClass.INF2];
return knownGpuInstanceTypes.some((c) => instanceType.sameInstanceClassAs(InstanceType.of(c, InstanceSize.LARGE)));
}

Expand Down