Struct pjrt_sys::protos::xla::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: i64If 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: i64The number of replicas of this computation that are to be executed. Defaults to 1.
num_partitions: i64The number of partitions in this computation. Defaults to 1.
use_spmd_partitioning: boolIndicates 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: boolWhether to automatically generate XLA shardings for SPMD partitioner.
deduplicate_hlo: boolWhether 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: boolWhether input and output buffers are aliased if the associated parameter is passed-through XLA modules without being changed.
run_backend_only: boolBy 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: boolUse 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
impl Clone for ExecutableBuildOptionsProto
source§fn clone(&self) -> ExecutableBuildOptionsProto
fn clone(&self) -> ExecutableBuildOptionsProto
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ExecutableBuildOptionsProto
impl Debug for ExecutableBuildOptionsProto
source§impl Message for ExecutableBuildOptionsProto
impl Message for ExecutableBuildOptionsProto
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.impl StructuralPartialEq for ExecutableBuildOptionsProto
Auto Trait Implementations§
impl Freeze for ExecutableBuildOptionsProto
impl RefUnwindSafe for ExecutableBuildOptionsProto
impl Send for ExecutableBuildOptionsProto
impl Sync for ExecutableBuildOptionsProto
impl Unpin for ExecutableBuildOptionsProto
impl UnwindSafe for ExecutableBuildOptionsProto
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)