ExecutableBuildOptionsProto

Struct ExecutableBuildOptionsProto 

Source
pub struct ExecutableBuildOptionsProto {
Show 19 fields pub device_ordinal: i64, pub result_layout: Option<ShapeProto>, pub comp_envs: Option<CompilationEnvironmentsProto>, pub debug_options: Option<DebugOptions>, pub num_replicas: i64, pub num_partitions: i64, pub use_spmd_partitioning: bool, pub use_auto_spmd_partitioning: bool, pub deduplicate_hlo: bool, pub device_assignment: Option<DeviceAssignmentProto>, pub alias_passthrough_params: bool, pub run_backend_only: bool, pub allow_spmd_sharding_propagation_to_parameters: Vec<bool>, pub allow_spmd_sharding_propagation_to_output: Vec<bool>, pub fdo_profile: Vec<u8>, pub device_memory_size: i64, pub auto_spmd_partitioning_mesh_shape: Vec<i64>, pub auto_spmd_partitioning_mesh_ids: Vec<i64>, pub use_shardy_partitioner: bool,
}
Expand description

A serialization of xla::ExecutableBuildOptions. Next id: 20.

Fields§

§device_ordinal: i64

If set, this is the device to build the computation for. Valid device_ordinal values are: 0 to # of devices - 1. These values are identical to the device ordinal values used by StreamExecutor. The built executable will be executable on any device equivalent to the specified device as determined by Backend::devices_equivalent(). A value of -1 indicates this option has not been set.

§result_layout: Option<ShapeProto>

If set, this specifies the layout of the result of the computation. If not set, the service will chose the layout of the result. A Shape is used to store the layout to accommodate tuple result shapes. A value of nullptr indicates the option has not been set.

§comp_envs: Option<CompilationEnvironmentsProto>

Expose access to the XLA compilation environments, which will be passed to the compilation process.

§debug_options: Option<DebugOptions>

Expose access to the XLA debug options which will be passed to the compilation process.

§num_replicas: i64

The number of replicas of this computation that are to be executed. Defaults to 1.

§num_partitions: i64

The number of partitions in this computation. Defaults to 1.

§use_spmd_partitioning: bool

Indicates whether to use SPMD (true) or MPMD (false) partitioning when num_partitions > 1 and XLA is requested to partition the input program.

§use_auto_spmd_partitioning: bool

Whether to automatically generate XLA shardings for SPMD partitioner.

§deduplicate_hlo: bool

Whether HLOs should be deduplicated.

§device_assignment: Option<DeviceAssignmentProto>

If set, this specifies a static device assignment for the computation. Otherwise, the computation will be compiled generically and can be run with any device assignment compatible with the computation’s replica and partition counts.

§alias_passthrough_params: bool

Whether input and output buffers are aliased if the associated parameter is passed-through XLA modules without being changed.

§run_backend_only: bool

By default, XLA builds an executable by invoking standard compilation, i.e. running Compiler::Compile, or both Compiler::RunHloPasses and Compiler::RunBackend. When run_backend_only is set to true, XLA builds an executable by invoking only RunBackend and skip invoking RunHloPasses, which can be used to compile post-optimizations HLO modules.

§allow_spmd_sharding_propagation_to_parameters: Vec<bool>

Allows sharding propagation to propagate to the parameters. This changes the input shape of the computation (which is undesirable), but it can be used to allow to run partial compilation to determine what would be the input sharding of a computation if XLA would be allowed to propagate the sharding which can be used by higher level framework as a way to query intermediate sharding of operations when multiple computation would be chained and merged together. This is a vector of bool, because the user can control which parameters can have the sharding substituted. If only one boolean value is passed in the vector that is interpreted as the value to be applied for every parameter.

§allow_spmd_sharding_propagation_to_output: Vec<bool>

Allows sharding propagation to propagate to the outputs. This changes the output shape of the computation (which is undesirable), but it can be used to allow to run partial compilation to determine what would be the output sharding of a computation if XLA would be allowed to propagate the sharding which can be used by higher level framework as a way to query intermediate sharding of operations when multiple computation would be chained and merged together. This is a vector of bool, because the user can control (if the output of the computation is a tuple) which elements of the tuple can have the sharding substituted and which don’t. If only one boolean value is passed in the vector that’s interpreted as the value to be applied for every single element of the output tuple. One value per element of the tuple means that each value is attached to one of the output elements.

§fdo_profile: Vec<u8>

Opaque profile data for any feedback directed optimizations.

§device_memory_size: i64§auto_spmd_partitioning_mesh_shape: Vec<i64>

Mesh shape in auto sharding options.

§auto_spmd_partitioning_mesh_ids: Vec<i64>

Mesh ids in auto sharding options.

§use_shardy_partitioner: bool

Use Shardy, a new partitioner, to replace the existing ShardingPropagation and SpmdPartitioner. See go/xla-sdy-pipeline for details.

Trait Implementations§

Source§

impl Clone for ExecutableBuildOptionsProto

Source§

fn clone(&self) -> ExecutableBuildOptionsProto

Returns a duplicate of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ExecutableBuildOptionsProto

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ExecutableBuildOptionsProto

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Message for ExecutableBuildOptionsProto

Source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
Source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
Source§

fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message to a buffer. Read more
Source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
Source§

fn encode_length_delimited( &self, buf: &mut impl BufMut, ) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
Source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
Source§

fn decode(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes an instance of the message from a buffer. Read more
Source§

fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes a length-delimited instance of the message from the buffer.
Source§

fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
Source§

fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
Source§

impl PartialEq for ExecutableBuildOptionsProto

Source§

fn eq(&self, other: &ExecutableBuildOptionsProto) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for ExecutableBuildOptionsProto

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.