pub struct ShardingSpecProto {
pub tensor_name: String,
pub device: Vec<i64>,
pub index_to_device_group_map: Vec<IntIntListEntryProto>,
pub sharded_dim: Vec<ShardedDimProto>,
}Expand description
ShardingSpecProto: This describes the sharding spec for a specific input or output tensor of a node.
Fields§
§tensor_name: StringThis field MUST be present for this version of the IR.
Identifies the input or output of the node that is being sharded.
Required to match a name specified in the node’s input or output list of ValueInfoProtos.
It is called logical tensor in subsequent descriptions.
device: Vec<i64>The following is the list of devices across which the logical tensor is sharded or replicated.
index_to_device_group_map: Vec<IntIntListEntryProto>Each element v in above field devices may represent either a device or a set of devices (when we want the same shard/tensor to be replicated across a subset of devices), as indicated by the following optional map. If the map contains an entry for v, then v represents a device group, and the map indicates the set of devices in that group.
sharded_dim: Vec<ShardedDimProto>The following is the sharded-shape of the tensor, consisting of the sharding-spec for each axis of the tensor.
Trait Implementations§
Source§impl Clone for ShardingSpecProto
impl Clone for ShardingSpecProto
Source§fn clone(&self) -> ShardingSpecProto
fn clone(&self) -> ShardingSpecProto
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ShardingSpecProto
impl Debug for ShardingSpecProto
Source§impl Default for ShardingSpecProto
impl Default for ShardingSpecProto
Source§fn default() -> ShardingSpecProto
fn default() -> ShardingSpecProto
Source§impl Message for ShardingSpecProto
impl Message for ShardingSpecProto
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for ShardingSpecProto
impl PartialEq for ShardingSpecProto
Source§fn eq(&self, other: &ShardingSpecProto) -> bool
fn eq(&self, other: &ShardingSpecProto) -> bool
self and other values to be equal, and is used by ==.