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(ec2): support for g6 and gr6 instance types in aws-ec2 #29735

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 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 @@ -880,6 +880,26 @@ export enum InstanceClass {
*/
G5G = 'g5g',

/**
* Graphics-optimized instances powered by NVIDIA L4 Tensor Core GPUs, 6th generation
*/
GRAPHICS6 = 'graphics6',

/**
* Graphics-optimized instances powered by NVIDIA L4 Tensor Core GPUs, 6th generation
*/
G6 = 'g6',

/**
* Graphics-optimized instances powered by NVIDIA L4 Tensor Core GPUs with higher memory ratio, 6th generation
*/
GRAPHICS6_MEMORY = 'graphics6-memory',

/**
* Graphics-optimized instances powered by NVIDIA L4 Tensor Core GPUs with higher memory ratio, 6th generation
*/
GR6 = 'gr6',

/**
* Parallel-processing optimized instances, 2nd generation
*/
Expand Down Expand Up @@ -1556,6 +1576,10 @@ export class InstanceType {
[InstanceClass.G5]: 'g5',
[InstanceClass.GRAPHICS5_GRAVITON2]: 'g5g',
[InstanceClass.G5G]: 'g5g',
[InstanceClass.GRAPHICS6]: 'g6',
[InstanceClass.G6]: 'g6',
[InstanceClass.GRAPHICS6_MEMORY]: 'gr6',
[InstanceClass.GR6]: 'gr6',
[InstanceClass.PARALLEL2]: 'p2',
[InstanceClass.P2]: 'p2',
[InstanceClass.PARALLEL3]: 'p3',
Expand Down
1 change: 1 addition & 0 deletions packages/aws-cdk-lib/aws-eks/lib/managed-nodegroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,7 @@ 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.G6, InstanceClass.GR6,
InstanceClass.INF1, InstanceClass.INF2];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
InstanceClass.G6, InstanceClass.GR6,
InstanceClass.INF1, InstanceClass.INF2];
InstanceClass.G6, InstanceClass.GR6, InstanceClass.INF1, InstanceClass.INF2];

It should fit in one line.

return knownGpuInstanceTypes.some((c) => instanceType.sameInstanceClassAs(InstanceType.of(c, InstanceSize.LARGE)));
}
Expand Down
Loading