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

chore(ec2): dl2q instance type, IntanceType fixes #29481

Merged
merged 5 commits into from
Mar 15, 2024
Merged
Changes from 1 commit
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
48 changes: 36 additions & 12 deletions packages/aws-cdk-lib/aws-ec2/lib/instance-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,11 @@ export enum InstanceClass {
*/
MEMORY5_AMD_NVME_DRIVE = 'memory5-amd-nvme-drive',

/**
* Memory optimized instances based on AMD EPYC with local NVME drive, 5th generation
*/
R5AD = 'r5ad',

/**
* High memory instances (3TB) based on Intel Xeon Platinum 8176M (Skylake) processors, 1st generation
*/
Expand Down Expand Up @@ -283,11 +288,6 @@ export enum InstanceClass {
*/
U_24TB1 = 'u-24tb1',

/**
* Memory optimized instances based on AMD EPYC with local NVME drive, 5th generation
*/
R5AD = 'r5ad',

/**
* Memory optimized instances that are also EBS-optimized, 5th generation
*/
Expand Down Expand Up @@ -611,20 +611,30 @@ export enum InstanceClass {
*/
STORAGE_COMPUTE_1 = 'storage-compute-1',

/**
* Storage/compute balanced instances, 1st generation
*/
H1 = 'h1',

/**
* High performance computing powered by AWS Trainium
*/
TRN1 = 'trn1',
TRAINING_ACCELERATOR1 = 'training-accelerator1',
Comment on lines 620 to +622
Copy link
Contributor

Choose a reason for hiding this comment

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

Where are these descriptions pulled from? Some of them seem mismatched after the changes, or were they incorrect before?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Neither trn1 nor trn1n had a symbolic "alias" given to them when they were added, unlike every other instance class. I added one, didn't get it from anywhere really, looked up the AWS docs and tried to match the other's.


/**
* High performance computing powered by AWS Trainium
*/
TRN1N = 'trn1n',
TRN1 = 'trn1',

/**
* Storage/compute balanced instances, 1st generation
* Network-optimized high performance computing powered by AWS Trainium
*/
H1 = 'h1',
TRAINING_ACCELERATOR1_ENHANCED_NETWORK = 'training-accelerator1-enhanced-network',

/**
* Network-optimized high performance computing powered by AWS Trainium
*/
TRN1N = 'trn1n',
Comment on lines +635 to +637
Copy link
Contributor

Choose a reason for hiding this comment

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

Description for this has changed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, the trn1n description didn't have the network optimization discriminator, both trn1* had the same description:

/**
* High performance computing powered by AWS Trainium
*/
TRN1 = 'trn1',
/**
* High performance computing powered by AWS Trainium
*/
TRN1N = 'trn1n',

Copy link
Contributor

@paulhcsun paulhcsun Mar 14, 2024

Choose a reason for hiding this comment

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

Gotcha, thanks for clarifying. Waiting for one other PR to merge in and will approve this after that.


/**
* I/O-optimized instances, 3rd generation
Expand Down Expand Up @@ -742,7 +752,7 @@ export enum InstanceClass {
MEMORY_INTENSIVE_1_EXTENDED = 'memory-intensive-1-extended',

/**
* Memory-intensive instances, 1st generation
* Memory-intensive instances, extended, 1st generation
*/
X1E = 'x1e',

Expand Down Expand Up @@ -881,7 +891,7 @@ export enum InstanceClass {
P2 = 'p2',

/**
* Parallel-processing optimized instances, 3nd generation
* Parallel-processing optimized instances, 3rd generation
*/
PARALLEL3 = 'parallel3',

Expand All @@ -891,7 +901,7 @@ export enum InstanceClass {
P3 = 'p3',

/**
* Parallel-processing optimized instances with local NVME drive for high performance computing, 3nd generation
* Parallel-processing optimized instances with local NVME drive for high performance computing, 3rd generation
*/
PARALLEL3_NVME_DRIVE_HIGH_PERFORMANCE = 'parallel3-nvme-drive-high-performance',

Expand Down Expand Up @@ -1199,6 +1209,16 @@ export enum InstanceClass {
* Deep learning instances powered by Gaudi accelerators from Habana Labs (an Intel company), 1st generation
*/
DL1 = 'dl1',

/**
* Deep learning instances powered by Qualcomm AI 100 Standard accelerators, 2nd generation
*/
DEEP_LEARNING2_QUALCOMM = 'deep-learning2-qualcomm',

/**
* Deep learning instances powered by Qualcomm AI 100 Standard accelerators, 2nd generation
*/
DL2Q = 'dl2q',
}

/**
Expand Down Expand Up @@ -1490,7 +1510,9 @@ export class InstanceType {
[InstanceClass.D3]: 'd3',
[InstanceClass.STORAGE3_ENHANCED_NETWORK]: 'd3en',
[InstanceClass.D3EN]: 'd3en',
[InstanceClass.TRAINING_ACCELERATOR1]: 'trn1',
[InstanceClass.TRN1]: 'trn1',
[InstanceClass.TRAINING_ACCELERATOR1_ENHANCED_NETWORK]: 'trn1n',
[InstanceClass.TRN1N]: 'trn1n',
[InstanceClass.STORAGE_COMPUTE_1]: 'h1',
[InstanceClass.H1]: 'h1',
Expand Down Expand Up @@ -1606,6 +1628,8 @@ export class InstanceType {
[InstanceClass.MEMORY_INTENSIVE_2_XTZ_INTEL]: 'x2iezn',
[InstanceClass.DEEP_LEARNING1]: 'dl1',
[InstanceClass.DL1]: 'dl1',
[InstanceClass.DEEP_LEARNING2_QUALCOMM]: 'dl2q',
[InstanceClass.DL2Q]: 'dl2q',
};
return new InstanceType(`${instanceClassMap[instanceClass] ?? instanceClass}.${instanceSize}`);
}
Expand Down
Loading