Expand description
Helpers that generated code calls (not meant to be used directly).
Structs§
- Conv
Dims - The dimension numbers of a convolution, as JAX’s
ConvDimensionNumbers: each spec lists dimensions of an operand or of the result. - Conv
Window - The window of a convolution: one entry per spatial dimension.
- Function
- A function of the IR (a closed jaxpr).
- Heap
- An array of
Nelements on the heap whose buffer goes back to a pool of the thread when dropped, for the next array of the same layout: the large arrays of a step are allocated again at every step, and fresh allocations of that size are mapped pages that fault and are zeroed by the system at every first touch. - Host
Array - An array in host memory: a typed buffer and a shape.
- bf16
- A 16-bit floating point type implementing the
bfloat16format. - f16
- A 16-bit floating point type implementing the IEEE 754-2008 standard
binary16a.k.a “half” format.
Enums§
- Binary
Op - An elementwise operation with two operands of the same type and a result of that type.
- Compare
Op - A comparison.
- Cumulative
Op - The operation of a cumulative reduction (
cumsumand the like). - UnaryOp
- An elementwise operation with one operand and a result of the same type.
Traits§
- Element
- A Rust type that is an element type of ruxla. It is implemented for
bool, the integer types,f16,bf16,f32,f64,c64, andc128. - Ops
- Elementwise operations on one element type. Calling an operation that
the type does not support (see
UnaryOp::supports) panics; callers check the types first.
Functions§
- boxed_
copy - A copy of
xon the heap. - build
[f(0), f(1), ..., f(N - 1)].- build_
boxed buildon the heap.- cast
- Converts between element types with the semantics of XLA’s
converton CPU: - cholesky
- The Cholesky factors (lower) of
batchmatricesn x n(ruxla_kernels::linalg::cholesky: NaN where a matrix is not positive definite). - compare
- Compares two values (floats follow IEEE 754: comparisons with NaN are
false, except
Ne). - conv
conv_general_dilatedof operands of the result’s type (ruxla_kernels::window::conv_general_dilated).- cumulative
- A cumulative reduction of
x(of shapeshape) alongaxis, in the order XLA combines the elements on CPU (ruxla_kernels::array::cumulative). - eval
- Evaluates a serialized function (deserialized once into
cell) with the interpreter: the equations that generated code does not specialize. - filled
- An array of
Ncopies ofxon the heap (without a copy on the stack). - from_
host - The elements of a host array of
Nelements of typeT. - from_
host_ scalar - The element of a host array of one element of type
T. - host
- A host array of
datawith shapedims. - integer_
pow x^yfor an integer exponent, by repeated squaring in the same order as JAX’s lowering ofinteger_pow(which fixes the rounding of floats). Negative exponents take the reciprocal at the end.- overwritten
- An array (on the stack) that the caller overwrites before reading; the
generated code writes it so for
reusedon the heap. - reused
- An array of
Nelements on the heap that the caller overwrites before reading (Heap::reused). - sort_
order - The order of
lax.sortkeys: integers and booleans in their natural order, and floats in the total order-inf < ... < 0 < ... < inf < NaNin which-0.0equals0.0and all NaNs are equal, as JAX’s comparator makes it by canonicalizing zeros and NaNs before a total-order comparison. - threefry2x32
- The threefry2x32 hash (20 rounds) of the counters
(x1, x2)with the key(k1, k2), as injax.random. - top_k
top_kalongaxis(ruxla_kernels::array::top_k): the values and their indices.- triangular_
solve triangular_solveofbatchsystems with right-hand sidesm x n(ruxla_kernels::linalg::triangular_solve; the flags as its options: left side, lower, transpose, conjugate, unit diagonal).