#[non_exhaustive]pub enum Params {
Show 47 variants
None,
Convert {
new_dtype: DType,
},
Round {
method: RoundingMethod,
},
IntegerPow {
y: i32,
},
BroadcastInDim {
shape: Shape,
broadcast_dimensions: Vec<usize>,
},
Reshape {
new_sizes: Shape,
},
Transpose {
permutation: Vec<usize>,
},
Reduce {
axes: Vec<usize>,
},
ArgMinMax {
axis: usize,
index_dtype: DType,
},
DotGeneral {
dimension_numbers: DotDims,
precision: Precision,
preferred_element_type: Option<DType>,
},
ConvGeneralDilated {
window_strides: Vec<usize>,
padding: Vec<(i64, i64)>,
lhs_dilation: Vec<usize>,
rhs_dilation: Vec<usize>,
dimension_numbers: ConvDims,
feature_group_count: usize,
batch_group_count: usize,
precision: Precision,
preferred_element_type: Option<DType>,
},
ReduceWindow {
window_dimensions: Vec<usize>,
window_strides: Vec<usize>,
padding: Vec<(i64, i64)>,
base_dilation: Vec<usize>,
window_dilation: Vec<usize>,
},
SelectAndScatterAdd {
select_prim: SelectPrim,
window_dimensions: Vec<usize>,
window_strides: Vec<usize>,
padding: Vec<(i64, i64)>,
},
SelectAndGatherAdd {
select_prim: SelectPrim,
window_dimensions: Vec<usize>,
window_strides: Vec<usize>,
padding: Vec<(i64, i64)>,
base_dilation: Vec<usize>,
window_dilation: Vec<usize>,
},
Iota {
dtype: DType,
shape: Shape,
dimension: usize,
},
Slice {
start_indices: Vec<usize>,
limit_indices: Vec<usize>,
strides: Vec<usize>,
},
DynamicSlice {
slice_sizes: Vec<usize>,
},
Concatenate {
dimension: usize,
},
Pad {
padding_config: Vec<(i64, i64, usize)>,
},
Rev {
dimensions: Vec<usize>,
},
Sort {
dimension: usize,
is_stable: bool,
num_keys: usize,
},
Cumulative {
axis: usize,
reverse: bool,
},
Fft {
fft_type: FftType,
fft_lengths: Vec<usize>,
},
TopK {
k: usize,
axis: usize,
is_stable: bool,
},
TriangularSolve {
left_side: bool,
lower: bool,
transpose_a: bool,
conjugate_a: bool,
unit_diagonal: bool,
},
LuPivotsToPermutation {
permutation_size: usize,
},
Qr {
full_matrices: bool,
pivoting: bool,
},
Eigh {
lower: bool,
sort_eigenvalues: bool,
subset_by_index: Option<(usize, usize)>,
algorithm: Option<EighImplementation>,
},
Schur {
compute_schur_vectors: bool,
},
Ormqr {
left: bool,
transpose: bool,
},
SymmetricProduct {
alpha: f64,
beta: f64,
},
Tridiagonal {
lower: bool,
},
HostCallback {
callback: HostCallback,
outputs: Vec<AVal>,
},
TridiagonalSolve {
perturb_singular: bool,
},
Eig {
compute_left_eigenvectors: bool,
compute_right_eigenvectors: bool,
enable_eigvec_derivs: bool,
},
Svd {
full_matrices: bool,
compute_uv: bool,
subset_by_index: Option<(usize, usize)>,
algorithm: Option<SvdAlgorithm>,
},
Gather {
dimension_numbers: GatherDims,
slice_sizes: Vec<usize>,
mode: GatherScatterMode,
indices_are_sorted: bool,
unique_indices: bool,
},
Scatter {
dimension_numbers: ScatterDims,
mode: GatherScatterMode,
indices_are_sorted: bool,
unique_indices: bool,
},
Cond {
branches: Vec<Arc<Function>>,
},
While {
cond: Arc<Function>,
body: Arc<Function>,
cond_nconsts: usize,
body_nconsts: usize,
},
Scan {
body: Arc<Function>,
length: usize,
reverse: bool,
num_consts: usize,
num_carry: usize,
},
Jit {
name: String,
body: Arc<Function>,
},
CustomJvp {
call: Arc<Function>,
jvp: Arc<Function>,
num_consts: usize,
},
CustomVjp {
call: Arc<Function>,
fwd: Arc<Function>,
bwd: Arc<Function>,
num_consts: usize,
},
CustomLin {
bwd: Arc<Function>,
num_res: usize,
},
Checkpoint {
body: Arc<Function>,
},
Extern {
name: String,
module: Arc<str>,
inputs: Vec<AVal>,
outputs: Vec<AVal>,
},
}Expand description
The parameters of an equation, one variant per family of primitives.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
None
No parameters.
Convert
convert_element_type and bitcast_convert_type.
Round
round.
Fields
method: RoundingMethodHow halfway cases are rounded.
IntegerPow
integer_pow.
BroadcastInDim
broadcast_in_dim.
Fields
Reshape
reshape.
Transpose
transpose.
Reduce
reduce_sum, reduce_max, reduce_min.
ArgMinMax
argmax, argmin.
DotGeneral
dot_general.
Fields
ConvGeneralDilated
conv_general_dilated.
Fields
ReduceWindow
reduce_window_sum, reduce_window_max, reduce_window_min.
Fields
SelectAndScatterAdd
select_and_scatter_add.
Fields
select_prim: SelectPrimHow elements are selected in each window.
SelectAndGatherAdd
select_and_gather_add.
Fields
select_prim: SelectPrimHow elements are selected in each window.
Iota
iota.
Fields
Slice
slice.
Fields
DynamicSlice
dynamic_slice.
Concatenate
concatenate.
Pad
pad.
Rev
rev.
Sort
sort.
Fields
Cumulative
cumsum, cumprod, cummax, cummin, and cumlogsumexp.
Fields
Fft
fft.
Fields
TopK
top_k.
Fields
TriangularSolve
triangular_solve.
Fields
LuPivotsToPermutation
lu_pivots_to_permutation.
Qr
qr.
Fields
Eigh
eigh.
Fields
subset_by_index: Option<(usize, usize)>The range [start, end) of the (ascending) eigenvalues and
their eigenvectors that are returned (all if None).
algorithm: Option<EighImplementation>The algorithm (the platform’s default if None).
Schur
schur: the Schur decomposition.
Ormqr
ormqr: the product with Q of Householder reflectors.
SymmetricProduct
symmetric_product: alpha a a^T + beta c.
Tridiagonal
tridiagonal: the reduction of Hermitian matrices to tridiagonal
form.
HostCallback
host_callback: a Rust function on host arrays.
TridiagonalSolve
tridiagonal_solve: the solution of tridiagonal systems.
Fields
Eig
eig: the eigendecomposition of general matrices.
Fields
Svd
svd.
Fields
subset_by_index: Option<(usize, usize)>The range [start, end) of the (descending) singular values and
their vectors that are returned (all if None).
algorithm: Option<SvdAlgorithm>The algorithm (the platform’s default if None).
Gather
gather.
Fields
dimension_numbers: GatherDimsHow indices and slices map to the result.
mode: GatherScatterModeHow out-of-bounds indices are treated.
Scatter
The scatter family.
Fields
dimension_numbers: ScatterDimsHow indices and updates map to the operand.
mode: GatherScatterModeHow out-of-bounds indices are treated.
Cond
cond: calls the branch chosen by an index.
While
while: repeats the body while the predicate holds.
Fields
Scan
scan: a loop over the leading dimension of some inputs.
Fields
Jit
jit: a call to a function compiled as a unit.
CustomJvp
custom_jvp_call: a function with a JVP rule written by the user
(jax.custom_jvp).
Fields
CustomVjp
custom_vjp_call: a function with a VJP rule written by the user
(jax.custom_vjp).
Fields
CustomLin
custom_lin: the linear part of a custom_vjp_call in forward mode,
which only reverse mode can use (it is transposed into bwd).
Fields
Checkpoint
checkpoint: a function whose intermediate values are recomputed in
reverse mode instead of stored (jax.checkpoint).
Extern
extern_call: a call to the public main of a StableHLO module
written by another program (such as jax.export), which XLA links
with the caller.