Skip to content

Commit

Permalink
feat(tpu): update the API
Browse files Browse the repository at this point in the history
#### tpu:v2alpha1

The following keys were added:
- schemas.AcceleratorConfig.description
- schemas.AcceleratorConfig.id
- schemas.AcceleratorConfig.properties.topology.description
- schemas.AcceleratorConfig.properties.topology.type
- schemas.AcceleratorConfig.properties.type.description
- schemas.AcceleratorConfig.properties.type.enum
- schemas.AcceleratorConfig.properties.type.enumDescriptions
- schemas.AcceleratorConfig.properties.type.type
- schemas.AcceleratorConfig.type
- schemas.AcceleratorType.properties.acceleratorConfigs.description
- schemas.AcceleratorType.properties.acceleratorConfigs.items.$ref
- schemas.AcceleratorType.properties.acceleratorConfigs.type
- schemas.Node.properties.acceleratorConfig.$ref
- schemas.Node.properties.acceleratorConfig.description
  • Loading branch information
yoshi-automation authored and sofisl committed Feb 9, 2023
1 parent df55772 commit b92d702
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 1 deletion.
40 changes: 39 additions & 1 deletion discovery/tpu-v2alpha1.json
Original file line number Diff line number Diff line change
Expand Up @@ -892,13 +892,47 @@
}
}
},
"revision": "20230105",
"revision": "20230131",
"rootUrl": "https://tpu.googleapis.com/",
"schemas": {
"AcceleratorConfig": {
"description": "A TPU accelerator configuration.",
"id": "AcceleratorConfig",
"properties": {
"topology": {
"description": "Required. Topology of TPU in chips.",
"type": "string"
},
"type": {
"description": "Required. Type of TPU.",
"enum": [
"TYPE_UNSPECIFIED",
"V2",
"V3",
"V4"
],
"enumDescriptions": [
"Unspecified version.",
"TPU v2.",
"TPU v3.",
"TPU v4."
],
"type": "string"
}
},
"type": "object"
},
"AcceleratorType": {
"description": "A accelerator type that a Node can be configured with.",
"id": "AcceleratorType",
"properties": {
"acceleratorConfigs": {
"description": "The accelerator config.",
"items": {
"$ref": "AcceleratorConfig"
},
"type": "array"
},
"name": {
"description": "The resource name.",
"type": "string"
Expand Down Expand Up @@ -1341,6 +1375,10 @@
"description": "A TPU instance.",
"id": "Node",
"properties": {
"acceleratorConfig": {
"$ref": "AcceleratorConfig",
"description": "The AccleratorConfig for the TPU Node."
},
"acceleratorType": {
"description": "The type of hardware accelerators associated with this node.",
"type": "string"
Expand Down
25 changes: 25 additions & 0 deletions src/apis/tpu/v2alpha1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,27 @@ export namespace tpu_v2alpha1 {
}
}

/**
* A TPU accelerator configuration.
*/
export interface Schema$AcceleratorConfig {
/**
* Required. Topology of TPU in chips.
*/
topology?: string | null;
/**
* Required. Type of TPU.
*/
type?: string | null;
}
/**
* A accelerator type that a Node can be configured with.
*/
export interface Schema$AcceleratorType {
/**
* The accelerator config.
*/
acceleratorConfigs?: Schema$AcceleratorConfig[];
/**
* The resource name.
*/
Expand Down Expand Up @@ -453,6 +470,10 @@ export namespace tpu_v2alpha1 {
* A TPU instance.
*/
export interface Schema$Node {
/**
* The AccleratorConfig for the TPU Node.
*/
acceleratorConfig?: Schema$AcceleratorConfig;
/**
* The type of hardware accelerators associated with this node.
*/
Expand Down Expand Up @@ -1374,6 +1395,7 @@ export namespace tpu_v2alpha1 {
*
* // Example response
* // {
* // "acceleratorConfigs": [],
* // "name": "my_name",
* // "type": "my_type"
* // }
Expand Down Expand Up @@ -1691,6 +1713,7 @@ export namespace tpu_v2alpha1 {
* requestBody: {
* // request body parameters
* // {
* // "acceleratorConfig": {},
* // "acceleratorType": "my_acceleratorType",
* // "apiVersion": "my_apiVersion",
* // "cidrBlock": "my_cidrBlock",
Expand Down Expand Up @@ -1985,6 +2008,7 @@ export namespace tpu_v2alpha1 {
*
* // Example response
* // {
* // "acceleratorConfig": {},
* // "acceleratorType": "my_acceleratorType",
* // "apiVersion": "my_apiVersion",
* // "cidrBlock": "my_cidrBlock",
Expand Down Expand Up @@ -2418,6 +2442,7 @@ export namespace tpu_v2alpha1 {
* requestBody: {
* // request body parameters
* // {
* // "acceleratorConfig": {},
* // "acceleratorType": "my_acceleratorType",
* // "apiVersion": "my_apiVersion",
* // "cidrBlock": "my_cidrBlock",
Expand Down

0 comments on commit b92d702

Please sign in to comment.