Skip to content

Commit 72b8a1c

Browse files
author
awstools
committed
feat(client-ec2): Add better support for fractional GPU instances in DescribeInstanceTypes API. The new fields, logicalGpuCount, gpuPartitionSize, and workload array enable better GPU resource selection and filtering for both full and fractional GPU instance types.
1 parent 202b860 commit 72b8a1c

File tree

4 files changed

+81
-2
lines changed

4 files changed

+81
-2
lines changed

clients/client-ec2/src/commands/DescribeInstanceTypesCommand.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,11 @@ export interface DescribeInstanceTypesCommandOutput extends DescribeInstanceType
174174
* // Name: "STRING_VALUE",
175175
* // Manufacturer: "STRING_VALUE",
176176
* // Count: Number("int"),
177+
* // LogicalGpuCount: Number("int"),
178+
* // GpuPartitionSize: Number("double"),
179+
* // Workloads: [ // WorkloadsList
180+
* // "STRING_VALUE",
181+
* // ],
177182
* // MemoryInfo: { // GpuDeviceMemoryInfo
178183
* // SizeInMiB: Number("int"),
179184
* // },

clients/client-ec2/src/models/models_4.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2351,6 +2351,24 @@ export interface GpuDeviceInfo {
23512351
*/
23522352
Count?: number | undefined;
23532353

2354+
/**
2355+
* <p>Total number of GPU devices of this type.</p>
2356+
* @public
2357+
*/
2358+
LogicalGpuCount?: number | undefined;
2359+
2360+
/**
2361+
* <p>The size of each GPU as a fraction of a full GPU, between 0 (excluded) and 1 (included).</p>
2362+
* @public
2363+
*/
2364+
GpuPartitionSize?: number | undefined;
2365+
2366+
/**
2367+
* <p>A list of workload types this GPU supports.</p>
2368+
* @public
2369+
*/
2370+
Workloads?: string[] | undefined;
2371+
23542372
/**
23552373
* <p>Describes the memory available to the GPU accelerator.</p>
23562374
* @public

clients/client-ec2/src/schemas/schemas_0.ts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2802,6 +2802,7 @@ const _GOI = "GroupOwnerId";
28022802
const _GPD = "GetPasswordData";
28032803
const _GPDR = "GetPasswordDataRequest";
28042804
const _GPDRe = "GetPasswordDataResult";
2805+
const _GPS = "GpuPartitionSize";
28052806
const _GRIEQ = "GetReservedInstancesExchangeQuote";
28062807
const _GRIEQR = "GetReservedInstancesExchangeQuoteRequest";
28072808
const _GRIEQRe = "GetReservedInstancesExchangeQuoteResult";
@@ -3488,6 +3489,7 @@ const _LF = "LogFormat";
34883489
const _LFA = "LambdaFunctionArn";
34893490
const _LG = "LocalGateways";
34903491
const _LGA = "LogGroupArn";
3492+
const _LGC = "LogicalGpuCount";
34913493
const _LGI = "LocalGatewayId";
34923494
const _LGIS = "LocalGatewayIdSet";
34933495
const _LGIi = "LinkedGroupId";
@@ -5921,9 +5923,11 @@ const _WBCR = "WithdrawByoipCidrRequest";
59215923
const _WBCRi = "WithdrawByoipCidrResult";
59225924
const _WC = "WithCooldown";
59235925
const _WCe = "WeightedCapacity";
5926+
const _WL = "WorkloadsList";
59245927
const _WM = "WarningMessage";
59255928
const _WU = "WakeUp";
59265929
const _We = "Weight";
5930+
const _Wo = "Workloads";
59275931
const _ZI = "ZoneId";
59285932
const _ZISL = "ZoneIdStringList";
59295933
const _ZIo = "ZoneIds";
@@ -6589,6 +6593,7 @@ const _gLN = "groupLongName";
65896593
const _gM = "groupMember";
65906594
const _gN = "groupName";
65916595
const _gOI = "groupOwnerId";
6596+
const _gPS = "gpuPartitionSize";
65926597
const _gS = "groupSet";
65936598
const _gSr = "groupSource";
65946599
const _gp = "gpus";
@@ -6896,6 +6901,7 @@ const _lF = "logFormat";
68966901
const _lFA = "lambdaFunctionArn";
68976902
const _lG = "launchGroup";
68986903
const _lGA = "logGroupArn";
6904+
const _lGC = "logicalGpuCount";
68996905
const _lGI = "localGatewayId";
69006906
const _lGIi = "linkedGroupId";
69016907
const _lGN = "logGroupName";
@@ -7959,6 +7965,7 @@ const _vpc = "vpcs";
79597965
const _w = "warning";
79607966
const _wC = "weightedCapacity";
79617967
const _wM = "warningMessage";
7968+
const _wS = "workloadSet";
79627969
const _we = "weight";
79637970
const _xN = "xmlName";
79647971
const _zI = "zoneId";
@@ -17134,11 +17141,14 @@ export var GetVpnTunnelReplacementStatusResult$: StaticStructureSchema = [3, n0,
1713417141
];
1713517142
export var GpuDeviceInfo$: StaticStructureSchema = [3, n0, _GDI,
1713617143
0,
17137-
[_N, _Man, _Cou, _MIe],
17144+
[_N, _Man, _Cou, _LGC, _GPS, _Wo, _MIe],
1713817145
[[0, { [_eQN]: `Name`
1713917146
, [_xN]: _n }], [0, { [_eQN]: `Manufacturer`
1714017147
, [_xN]: _man }], [1, { [_eQN]: `Count`
17141-
, [_xN]: _cou }], [() => GpuDeviceMemoryInfo$, { [_eQN]: `MemoryInfo`
17148+
, [_xN]: _cou }], [1, { [_eQN]: `LogicalGpuCount`
17149+
, [_xN]: _lGC }], [1, { [_eQN]: `GpuPartitionSize`
17150+
, [_xN]: _gPS }], [() => WorkloadsList, { [_eQN]: `WorkloadSet`
17151+
, [_xN]: _wS }], [() => GpuDeviceMemoryInfo$, { [_eQN]: `MemoryInfo`
1714217152
, [_xN]: _mIe }]]
1714317153
];
1714417154
export var GpuDeviceMemoryInfo$: StaticStructureSchema = [3, n0, _GDMI,
@@ -27778,6 +27788,10 @@ var VpnTunnelOptionsSpecificationsList: StaticListSchema = [1, n0, _VTOSL,
2777827788
0, [() => VpnTunnelOptionsSpecification$,
2777927789
0]
2778027790
];
27791+
var WorkloadsList: StaticListSchema = [1, n0, _WL,
27792+
0, [0,
27793+
{ [_xN]: _it }]
27794+
];
2778127795
var ZoneIdStringList: StaticListSchema = [1, n0, _ZISL,
2778227796
0, [0,
2778327797
{ [_xN]: _ZI }]

codegen/sdk-codegen/aws-models/ec2.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66629,6 +66629,30 @@
6662966629
"smithy.api#xmlName": "count"
6663066630
}
6663166631
},
66632+
"LogicalGpuCount": {
66633+
"target": "com.amazonaws.ec2#LogicalGpuCount",
66634+
"traits": {
66635+
"aws.protocols#ec2QueryName": "LogicalGpuCount",
66636+
"smithy.api#documentation": "<p>Total number of GPU devices of this type.</p>",
66637+
"smithy.api#xmlName": "logicalGpuCount"
66638+
}
66639+
},
66640+
"GpuPartitionSize": {
66641+
"target": "com.amazonaws.ec2#GpuPartitionSize",
66642+
"traits": {
66643+
"aws.protocols#ec2QueryName": "GpuPartitionSize",
66644+
"smithy.api#documentation": "<p>The size of each GPU as a fraction of a full GPU, between 0 (excluded) and 1 (included).</p>",
66645+
"smithy.api#xmlName": "gpuPartitionSize"
66646+
}
66647+
},
66648+
"Workloads": {
66649+
"target": "com.amazonaws.ec2#WorkloadsList",
66650+
"traits": {
66651+
"aws.protocols#ec2QueryName": "WorkloadSet",
66652+
"smithy.api#documentation": "<p>A list of workload types this GPU supports.</p>",
66653+
"smithy.api#xmlName": "workloadSet"
66654+
}
66655+
},
6663266656
"MemoryInfo": {
6663366657
"target": "com.amazonaws.ec2#GpuDeviceMemoryInfo",
6663466658
"traits": {
@@ -66700,6 +66724,9 @@
6670066724
"smithy.api#documentation": "<p>Describes the GPU accelerators for the instance type.</p>"
6670166725
}
6670266726
},
66727+
"com.amazonaws.ec2#GpuPartitionSize": {
66728+
"type": "double"
66729+
},
6670366730
"com.amazonaws.ec2#GroupBy": {
6670466731
"type": "enum",
6670566732
"members": {
@@ -90560,6 +90587,9 @@
9056090587
}
9056190588
}
9056290589
},
90590+
"com.amazonaws.ec2#LogicalGpuCount": {
90591+
"type": "integer"
90592+
},
9056390593
"com.amazonaws.ec2#Long": {
9056490594
"type": "long"
9056590595
},
@@ -132390,6 +132420,18 @@
132390132420
"smithy.api#output": {}
132391132421
}
132392132422
},
132423+
"com.amazonaws.ec2#Workload": {
132424+
"type": "string"
132425+
},
132426+
"com.amazonaws.ec2#WorkloadsList": {
132427+
"type": "list",
132428+
"member": {
132429+
"target": "com.amazonaws.ec2#Workload",
132430+
"traits": {
132431+
"smithy.api#xmlName": "item"
132432+
}
132433+
}
132434+
},
132393132435
"com.amazonaws.ec2#ZoneIdStringList": {
132394132436
"type": "list",
132395132437
"member": {

0 commit comments

Comments
 (0)