diff --git a/packages/google-cloud-tpu/google/cloud/tpu_v2alpha1/__init__.py b/packages/google-cloud-tpu/google/cloud/tpu_v2alpha1/__init__.py index e791b2892a17..09b9383f2f8f 100644 --- a/packages/google-cloud-tpu/google/cloud/tpu_v2alpha1/__init__.py +++ b/packages/google-cloud-tpu/google/cloud/tpu_v2alpha1/__init__.py @@ -20,6 +20,7 @@ from .services.tpu import TpuAsyncClient, TpuClient from .types.cloud_tpu import ( + AcceleratorConfig, AcceleratorType, AccessConfig, AttachedDisk, @@ -66,6 +67,7 @@ __all__ = ( "TpuAsyncClient", + "AcceleratorConfig", "AcceleratorType", "AccessConfig", "AttachedDisk", diff --git a/packages/google-cloud-tpu/google/cloud/tpu_v2alpha1/types/__init__.py b/packages/google-cloud-tpu/google/cloud/tpu_v2alpha1/types/__init__.py index 0298ce4d4e18..4788987e986c 100644 --- a/packages/google-cloud-tpu/google/cloud/tpu_v2alpha1/types/__init__.py +++ b/packages/google-cloud-tpu/google/cloud/tpu_v2alpha1/types/__init__.py @@ -14,6 +14,7 @@ # limitations under the License. # from .cloud_tpu import ( + AcceleratorConfig, AcceleratorType, AccessConfig, AttachedDisk, @@ -59,6 +60,7 @@ ) __all__ = ( + "AcceleratorConfig", "AcceleratorType", "AccessConfig", "AttachedDisk", diff --git a/packages/google-cloud-tpu/google/cloud/tpu_v2alpha1/types/cloud_tpu.py b/packages/google-cloud-tpu/google/cloud/tpu_v2alpha1/types/cloud_tpu.py index f896586acfc9..737af8eef426 100644 --- a/packages/google-cloud-tpu/google/cloud/tpu_v2alpha1/types/cloud_tpu.py +++ b/packages/google-cloud-tpu/google/cloud/tpu_v2alpha1/types/cloud_tpu.py @@ -66,6 +66,7 @@ "GetGuestAttributesRequest", "GetGuestAttributesResponse", "SimulateMaintenanceEventRequest", + "AcceleratorConfig", "ShieldedInstanceConfig", }, ) @@ -389,6 +390,8 @@ class Node(proto.Message): queued_resource (str): Output only. The qualified name of the QueuedResource that requested this Node. + accelerator_config (google.cloud.tpu_v2alpha1.types.AcceleratorConfig): + The AccleratorConfig for the TPU Node. shielded_instance_config (google.cloud.tpu_v2alpha1.types.ShieldedInstanceConfig): Shielded Instance options. """ @@ -588,6 +591,11 @@ class ApiVersion(proto.Enum): proto.STRING, number=43, ) + accelerator_config: "AcceleratorConfig" = proto.Field( + proto.MESSAGE, + number=44, + message="AcceleratorConfig", + ) shielded_instance_config: "ShieldedInstanceConfig" = proto.Field( proto.MESSAGE, number=45, @@ -1366,6 +1374,8 @@ class AcceleratorType(proto.Message): The resource name. type_ (str): The accelerator type. + accelerator_configs (MutableSequence[google.cloud.tpu_v2alpha1.types.AcceleratorConfig]): + The accelerator config. """ name: str = proto.Field( @@ -1376,6 +1386,11 @@ class AcceleratorType(proto.Message): proto.STRING, number=2, ) + accelerator_configs: MutableSequence["AcceleratorConfig"] = proto.RepeatedField( + proto.MESSAGE, + number=3, + message="AcceleratorConfig", + ) class GetAcceleratorTypeRequest(proto.Message): @@ -1762,6 +1777,45 @@ class SimulateMaintenanceEventRequest(proto.Message): ) +class AcceleratorConfig(proto.Message): + r"""A TPU accelerator configuration. + + Attributes: + type_ (google.cloud.tpu_v2alpha1.types.AcceleratorConfig.Type): + Required. Type of TPU. + topology (str): + Required. Topology of TPU in chips. + """ + + class Type(proto.Enum): + r"""TPU type. + + Values: + TYPE_UNSPECIFIED (0): + Unspecified version. + V2 (2): + TPU v2. + V3 (4): + TPU v3. + V4 (7): + TPU v4. + """ + TYPE_UNSPECIFIED = 0 + V2 = 2 + V3 = 4 + V4 = 7 + + type_: Type = proto.Field( + proto.ENUM, + number=1, + enum=Type, + ) + topology: str = proto.Field( + proto.STRING, + number=2, + ) + + class ShieldedInstanceConfig(proto.Message): r"""A set of Shielded Instance options.