Documentation ¶
Index ¶
- Variables
- type LayoutProto
- func (*LayoutProto) Descriptor() ([]byte, []int)deprecated
- func (x *LayoutProto) GetMeshConfig() *MeshProto
- func (x *LayoutProto) GetShardingSpecs() []*ShardingSpec
- func (x *LayoutProto) GetType() LayoutProto_LayoutType
- func (*LayoutProto) ProtoMessage()
- func (x *LayoutProto) ProtoReflect() protoreflect.Message
- func (x *LayoutProto) Reset()
- func (x *LayoutProto) String() string
- type LayoutProto_LayoutType
- func (LayoutProto_LayoutType) Descriptor() protoreflect.EnumDescriptor
- func (x LayoutProto_LayoutType) Enum() *LayoutProto_LayoutType
- func (LayoutProto_LayoutType) EnumDescriptor() ([]byte, []int)deprecated
- func (x LayoutProto_LayoutType) Number() protoreflect.EnumNumber
- func (x LayoutProto_LayoutType) String() string
- func (LayoutProto_LayoutType) Type() protoreflect.EnumType
- type MeshDimensionProto
- func (*MeshDimensionProto) Descriptor() ([]byte, []int)deprecated
- func (x *MeshDimensionProto) GetName() string
- func (x *MeshDimensionProto) GetSize() int64
- func (*MeshDimensionProto) ProtoMessage()
- func (x *MeshDimensionProto) ProtoReflect() protoreflect.Message
- func (x *MeshDimensionProto) Reset()
- func (x *MeshDimensionProto) String() string
- type MeshProto
- func (*MeshProto) Descriptor() ([]byte, []int)deprecated
- func (x *MeshProto) GetGlobalDeviceIds() []int64
- func (x *MeshProto) GetGlobalDevices() []string
- func (x *MeshProto) GetLocalDeviceIds() []int64
- func (x *MeshProto) GetLocalDevices() []string
- func (x *MeshProto) GetMeshDimensions() []*MeshDimensionProto
- func (x *MeshProto) GetName() string
- func (x *MeshProto) GetSingleDevice() string
- func (x *MeshProto) GetUseXlaSpmd() bool
- func (*MeshProto) ProtoMessage()
- func (x *MeshProto) ProtoReflect() protoreflect.Message
- func (x *MeshProto) Reset()
- func (x *MeshProto) String() string
- type ShardingSpec
Constants ¶
This section is empty.
Variables ¶
View Source
var ( LayoutProto_LayoutType_name = map[int32]string{ 0: "UNKNOWN", 1: "STATIC", 2: "PARTED", 3: "SINGLE_DEVICE", } LayoutProto_LayoutType_value = map[string]int32{ "UNKNOWN": 0, "STATIC": 1, "PARTED": 2, "SINGLE_DEVICE": 3, } )
Enum value maps for LayoutProto_LayoutType.
View Source
var File_tensorflow_dtensor_proto_layout_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type LayoutProto ¶
type LayoutProto struct { ShardingSpecs []*ShardingSpec `protobuf:"bytes,1,rep,name=sharding_specs,json=shardingSpecs,proto3" json:"sharding_specs,omitempty"` MeshConfig *MeshProto `protobuf:"bytes,2,opt,name=mesh_config,json=meshConfig,proto3" json:"mesh_config,omitempty"` Type LayoutProto_LayoutType `protobuf:"varint,3,opt,name=type,proto3,enum=tensorflow.dtensor.LayoutProto_LayoutType" json:"type,omitempty"` // contains filtered or unexported fields }
Proto representation of a Layout.
func (*LayoutProto) Descriptor
deprecated
func (*LayoutProto) Descriptor() ([]byte, []int)
Deprecated: Use LayoutProto.ProtoReflect.Descriptor instead.
func (*LayoutProto) GetMeshConfig ¶
func (x *LayoutProto) GetMeshConfig() *MeshProto
func (*LayoutProto) GetShardingSpecs ¶
func (x *LayoutProto) GetShardingSpecs() []*ShardingSpec
func (*LayoutProto) GetType ¶ added in v2.14.0
func (x *LayoutProto) GetType() LayoutProto_LayoutType
func (*LayoutProto) ProtoMessage ¶
func (*LayoutProto) ProtoMessage()
func (*LayoutProto) ProtoReflect ¶
func (x *LayoutProto) ProtoReflect() protoreflect.Message
func (*LayoutProto) Reset ¶
func (x *LayoutProto) Reset()
func (*LayoutProto) String ¶
func (x *LayoutProto) String() string
type LayoutProto_LayoutType ¶ added in v2.14.0
type LayoutProto_LayoutType int32
const ( LayoutProto_UNKNOWN LayoutProto_LayoutType = 0 LayoutProto_STATIC LayoutProto_LayoutType = 1 // A tiled layout for static and evenly shaped local shards. LayoutProto_PARTED LayoutProto_LayoutType = 2 // A parted layout contains axes that are treated as LayoutProto_SINGLE_DEVICE LayoutProto_LayoutType = 3 // A single device layout that represents DTensor on a )
func (LayoutProto_LayoutType) Descriptor ¶ added in v2.14.0
func (LayoutProto_LayoutType) Descriptor() protoreflect.EnumDescriptor
func (LayoutProto_LayoutType) Enum ¶ added in v2.14.0
func (x LayoutProto_LayoutType) Enum() *LayoutProto_LayoutType
func (LayoutProto_LayoutType) EnumDescriptor
deprecated
added in
v2.14.0
func (LayoutProto_LayoutType) EnumDescriptor() ([]byte, []int)
Deprecated: Use LayoutProto_LayoutType.Descriptor instead.
func (LayoutProto_LayoutType) Number ¶ added in v2.14.0
func (x LayoutProto_LayoutType) Number() protoreflect.EnumNumber
func (LayoutProto_LayoutType) String ¶ added in v2.14.0
func (x LayoutProto_LayoutType) String() string
func (LayoutProto_LayoutType) Type ¶ added in v2.14.0
func (LayoutProto_LayoutType) Type() protoreflect.EnumType
type MeshDimensionProto ¶
type MeshDimensionProto struct { // Name of mesh dimension, required to create Mesh. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Length of mesh dimension. Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` // contains filtered or unexported fields }
func (*MeshDimensionProto) Descriptor
deprecated
func (*MeshDimensionProto) Descriptor() ([]byte, []int)
Deprecated: Use MeshDimensionProto.ProtoReflect.Descriptor instead.
func (*MeshDimensionProto) GetName ¶
func (x *MeshDimensionProto) GetName() string
func (*MeshDimensionProto) GetSize ¶
func (x *MeshDimensionProto) GetSize() int64
func (*MeshDimensionProto) ProtoMessage ¶
func (*MeshDimensionProto) ProtoMessage()
func (*MeshDimensionProto) ProtoReflect ¶
func (x *MeshDimensionProto) ProtoReflect() protoreflect.Message
func (*MeshDimensionProto) Reset ¶
func (x *MeshDimensionProto) Reset()
func (*MeshDimensionProto) String ¶
func (x *MeshDimensionProto) String() string
type MeshProto ¶
type MeshProto struct { MeshDimensions []*MeshDimensionProto `protobuf:"bytes,1,rep,name=mesh_dimensions,json=meshDimensions,proto3" json:"mesh_dimensions,omitempty"` // A list of global devices ids. GlobalDeviceIds []int64 `protobuf:"varint,2,rep,packed,name=global_device_ids,json=globalDeviceIds,proto3" json:"global_device_ids,omitempty"` // Devices ids handled by the local process. LocalDeviceIds []int64 `protobuf:"varint,4,rep,packed,name=local_device_ids,json=localDeviceIds,proto3" json:"local_device_ids,omitempty"` // Devices handled by the local process. LocalDevices []string `protobuf:"bytes,5,rep,name=local_devices,json=localDevices,proto3" json:"local_devices,omitempty"` // Global device names (Optional). Set when multiple device meshes are in use. GlobalDevices []string `protobuf:"bytes,6,rep,name=global_devices,json=globalDevices,proto3" json:"global_devices,omitempty"` // Required name which uniquely identifies this mesh in a program. Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // If true, ops on this mesh will use XLA SPMD. UseXlaSpmd bool `protobuf:"varint,7,opt,name=use_xla_spmd,json=useXlaSpmd,proto3" json:"use_xla_spmd,omitempty"` // The device string when the mesh is a single device mesh. If it is not // empty, then global_device_ids, local_device_ids, local_device and global // devices are all empty. SingleDevice string `protobuf:"bytes,8,opt,name=single_device,json=singleDevice,proto3" json:"single_device,omitempty"` // contains filtered or unexported fields }
Proto representation of a Mesh. TODO(allenl): Add a unique mesh ID so we have an efficient way to identify meshes in mappings.
func (*MeshProto) Descriptor
deprecated
func (*MeshProto) GetGlobalDeviceIds ¶
func (*MeshProto) GetGlobalDevices ¶
func (*MeshProto) GetLocalDeviceIds ¶
func (*MeshProto) GetLocalDevices ¶
func (*MeshProto) GetMeshDimensions ¶
func (x *MeshProto) GetMeshDimensions() []*MeshDimensionProto
func (*MeshProto) GetSingleDevice ¶ added in v2.13.0
func (*MeshProto) GetUseXlaSpmd ¶ added in v2.12.0
func (*MeshProto) ProtoMessage ¶
func (*MeshProto) ProtoMessage()
func (*MeshProto) ProtoReflect ¶
func (x *MeshProto) ProtoReflect() protoreflect.Message
type ShardingSpec ¶
type ShardingSpec struct { // If set, the mesh dimension this tensor dimension is sharded over. ShardingSpec string `protobuf:"bytes,2,opt,name=sharding_spec,json=shardingSpec,proto3" json:"sharding_spec,omitempty"` // contains filtered or unexported fields }
Defines a sharding spec over a tensor. A sharding spec can either be a mesh dimension of the associated mesh or the special values scalar, or not_sharded.
func (*ShardingSpec) Descriptor
deprecated
func (*ShardingSpec) Descriptor() ([]byte, []int)
Deprecated: Use ShardingSpec.ProtoReflect.Descriptor instead.
func (*ShardingSpec) GetShardingSpec ¶
func (x *ShardingSpec) GetShardingSpec() string
func (*ShardingSpec) ProtoMessage ¶
func (*ShardingSpec) ProtoMessage()
func (*ShardingSpec) ProtoReflect ¶
func (x *ShardingSpec) ProtoReflect() protoreflect.Message
func (*ShardingSpec) Reset ¶
func (x *ShardingSpec) Reset()
func (*ShardingSpec) String ¶
func (x *ShardingSpec) String() string
Click to show internal directories.
Click to hide internal directories.