"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
"""

import builtins
import collections.abc
import typing

import google.protobuf.descriptor
import google.protobuf.internal.containers
import google.protobuf.message

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

@typing.final
class InterconnectLink(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    DEVICE_ID_FIELD_NUMBER: builtins.int
    TYPE_FIELD_NUMBER: builtins.int
    STRENGTH_FIELD_NUMBER: builtins.int
    device_id: builtins.int
    type: builtins.str
    strength: builtins.int
    def __init__(
        self, *, device_id: builtins.int | None = ..., type: builtins.str | None = ..., strength: builtins.int | None = ...
    ) -> None: ...
    def ClearField(
        self, field_name: typing.Literal["device_id", b"device_id", "strength", b"strength", "type", b"type"]
    ) -> None: ...

global___InterconnectLink = InterconnectLink

@typing.final
class LocalLinks(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    LINK_FIELD_NUMBER: builtins.int
    @property
    def link(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___InterconnectLink]: ...
    def __init__(self, *, link: collections.abc.Iterable[global___InterconnectLink] | None = ...) -> None: ...
    def ClearField(self, field_name: typing.Literal["link", b"link"]) -> None: ...

global___LocalLinks = LocalLinks

@typing.final
class DeviceLocality(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    BUS_ID_FIELD_NUMBER: builtins.int
    NUMA_NODE_FIELD_NUMBER: builtins.int
    LINKS_FIELD_NUMBER: builtins.int
    bus_id: builtins.int
    """Optional bus locality of device.  Default value of 0 means
    no specific locality.  Specific localities are indexed from 1.
    """
    numa_node: builtins.int
    """Optional NUMA locality of device."""
    @property
    def links(self) -> global___LocalLinks:
        """Optional local interconnect links to other devices."""

    def __init__(
        self, *, bus_id: builtins.int | None = ..., numa_node: builtins.int | None = ..., links: global___LocalLinks | None = ...
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["links", b"links"]) -> builtins.bool: ...
    def ClearField(
        self, field_name: typing.Literal["bus_id", b"bus_id", "links", b"links", "numa_node", b"numa_node"]
    ) -> None: ...

global___DeviceLocality = DeviceLocality

@typing.final
class DeviceAttributes(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    NAME_FIELD_NUMBER: builtins.int
    DEVICE_TYPE_FIELD_NUMBER: builtins.int
    MEMORY_LIMIT_FIELD_NUMBER: builtins.int
    LOCALITY_FIELD_NUMBER: builtins.int
    INCARNATION_FIELD_NUMBER: builtins.int
    PHYSICAL_DEVICE_DESC_FIELD_NUMBER: builtins.int
    XLA_GLOBAL_ID_FIELD_NUMBER: builtins.int
    name: builtins.str
    """Fully specified name of the device within a cluster."""
    device_type: builtins.str
    """String representation of device_type."""
    memory_limit: builtins.int
    """Memory capacity of device in bytes."""
    incarnation: builtins.int
    """A device is assigned a global unique number each time it is
    initialized. "incarnation" should never be 0.
    """
    physical_device_desc: builtins.str
    """String representation of the physical device that this device maps to."""
    xla_global_id: builtins.int
    """A physical device ID for use in XLA DeviceAssignments, unique across
    clients in a multi-client setup. Set to -1 if unavailable, non-negative
    otherwise.
    """
    @property
    def locality(self) -> global___DeviceLocality:
        """Platform-specific data about device that may be useful
        for supporting efficient data transfers.
        """

    def __init__(
        self,
        *,
        name: builtins.str | None = ...,
        device_type: builtins.str | None = ...,
        memory_limit: builtins.int | None = ...,
        locality: global___DeviceLocality | None = ...,
        incarnation: builtins.int | None = ...,
        physical_device_desc: builtins.str | None = ...,
        xla_global_id: builtins.int | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["locality", b"locality"]) -> builtins.bool: ...
    def ClearField(
        self,
        field_name: typing.Literal[
            "device_type",
            b"device_type",
            "incarnation",
            b"incarnation",
            "locality",
            b"locality",
            "memory_limit",
            b"memory_limit",
            "name",
            b"name",
            "physical_device_desc",
            b"physical_device_desc",
            "xla_global_id",
            b"xla_global_id",
        ],
    ) -> None: ...

global___DeviceAttributes = DeviceAttributes
