pub struct ExecutionOptions {Show 22 fields
pub shape_with_output_layout: Option<ShapeProto>,
pub seed: u64,
pub debug_options: Option<DebugOptions>,
pub device_handles: Vec<DeviceHandle>,
pub num_replicas: i32,
pub device_assignment: Option<DeviceAssignmentProto>,
pub alias_passthrough_params: bool,
pub num_partitions: i32,
pub launch_id: i32,
pub use_spmd_partitioning: bool,
pub use_auto_spmd_partitioning: bool,
pub auto_spmd_partitioning_mesh_shape: Vec<i64>,
pub auto_spmd_partitioning_mesh_ids: Vec<i64>,
pub deduplicate_hlo: bool,
pub allow_spmd_sharding_propagation_to_parameters: Vec<bool>,
pub allow_spmd_sharding_propagation_to_output: Vec<bool>,
pub param_requires_broadcast_via_collectives: Vec<bool>,
pub allow_separate_sharding_programs: bool,
pub shardable_value_update_pairs: Vec<ShardableValueUpdatePairProto>,
pub fdo_profile: Vec<u8>,
pub device_memory_size: i64,
pub use_shardy_partitioner: bool,
}Expand description
These settings control how XLA compiles and/or runs code. Not all settings will have an effect on every platform.
When adding new fields, keep in mind that boolean fields default to false. Next id: 25.
Fields§
§shape_with_output_layout: Option<ShapeProto>This optional field’s layout is used as a hint when storing the output of this computation. Subsequent transfers of this output array to the client may be faster when using this layout.
We use a Shape here to accommodate computations that return a tuple.
seed: u64Used to seed random-number generators used in this computation. If this is 0, we generate a seed ourselves.
TODO(b/32083678): Changing the seed unnecessarily forces a recompilation.
debug_options: Option<DebugOptions>§device_handles: Vec<DeviceHandle>This optional field specifies a particular set of devices to run the computation on. The computation will be partitioned across these devices. If not provided, the default device will be chosen.
num_replicas: i32Number of replicas of the computation to run. If zero, uses the default number of replicas for the XLA service.
device_assignment: Option<DeviceAssignmentProto>This optional field specifies the device assignment if known at compile time.
alias_passthrough_params: boolAlias input and output buffers for parameters that are passed-through XLA modules without being changed.
num_partitions: i32Number of partitions of the computation to run (model parallelism). If zero, uses the default number of partitions for the XLA service.
launch_id: i32Used to identify a set of programs that should be launch together.
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.
auto_spmd_partitioning_mesh_shape: Vec<i64>Device mesh shape used to create the sharding search space when use_auto_spmd_partitioning=true.
auto_spmd_partitioning_mesh_ids: Vec<i64>Device mesh ids compatible with the above mesh_shape used when use_auto_spmd_partitioning=true.
deduplicate_hlo: boolIf set, deduplicate hlo into function calls to reduce binary size. Only works on TPU.
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.
param_requires_broadcast_via_collectives: Vec<bool>Whether to broadcast args across all replicas. One entry per arg.
allow_separate_sharding_programs: boolIf enabled, the compiler may generate sharding and unsharding programs as separate HLO modules, and modify the main program’s input and output to be sharded.
shardable_value_update_pairs: Vec<ShardableValueUpdatePairProto>The list of input/output pairs in the main program that could be sharded.
fdo_profile: Vec<u8>Profiling data for feedback directed optimizations. Note that this is not the only way to feed FDO data into the compiler and individual backends may choose to get FDO data by other means.
device_memory_size: i64Amount of device memory available for the executable to use.
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 ExecutionOptions
impl Clone for ExecutionOptions
Source§fn clone(&self) -> ExecutionOptions
fn clone(&self) -> ExecutionOptions
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExecutionOptions
impl Debug for ExecutionOptions
Source§impl Default for ExecutionOptions
impl Default for ExecutionOptions
Source§impl Message for ExecutionOptions
impl Message for ExecutionOptions
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 ExecutionOptions
impl PartialEq for ExecutionOptions
impl StructuralPartialEq for ExecutionOptions
Auto Trait Implementations§
impl Freeze for ExecutionOptions
impl RefUnwindSafe for ExecutionOptions
impl Send for ExecutionOptions
impl Sync for ExecutionOptions
impl Unpin for ExecutionOptions
impl UnwindSafe for ExecutionOptions
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)