jax.lib.xla_bridge.get_compile_options#
- jax.lib.xla_bridge.get_compile_options(num_replicas, num_partitions, device_assignment=None, use_spmd_partitioning=True, use_shardy_partitioner=False, use_auto_spmd_partitioning=False, auto_spmd_partitioning_mesh_shape=None, auto_spmd_partitioning_mesh_ids=None, env_options_overrides=None, fdo_profile=None, detailed_logging=True, backend=None)[source]#
Returns the compile options to use, as derived from flag values.
- Parameters:
num_replicas (int) – Number of replicas for which to compile.
num_partitions (int) – Number of partitions for which to compile.
device_assignment – Optional ndarray of jax devices indicating the assignment of logical replicas to physical devices (default inherited from xla_client.CompileOptions). Must be consistent with num_replicas and num_partitions.
use_spmd_partitioning (bool) – boolean indicating whether to enable SPMD or MPMD partitioning in XLA.
use_shardy_partitioner (bool) – boolean indicating whether to use the Shardy partitioner in XLA. Shardy is a new open sourced propagation framework for MLIR. Currently Shardy is experimental in JAX. See www.github.com/openxla/shardy.
use_auto_spmd_partitioning (bool) – boolean indicating whether to automatically generate XLA shardings for SPMD partitioner.
auto_spmd_partitioning_mesh_shape (list[int] | None | None) – device mesh shape used to create auto_spmd_partitioning search space.
auto_spmd_partitioning_mesh_ids (list[int] | None | None) – device ids used to create auto_spmd_partitioning search space.
env_options_overrides (dict[str, str] | None | None) – dict of additional options parsed by the compiler
fdo_profile (bytes | None | None) – Optional profile for feedback-directed optimization passed to XLA.
detailed_logging (bool) – Is this an “interesting” computation about which XLA would be wise to log compilation information?
backend (xc.Client | None | None) – the client, if available.
- Return type:
xc.CompileOptions