Expand description
The interface for batching primitives (vmap).
vmap turns a function of single examples into a function of batches by
applying each primitive’s batching rule (Primitive::batch). A rule
receives its operands with their batch dimensions (Batched) and emits
batched operations through BatchCx. The driver, which walks the
equations of a function, lives in ruxla-transforms.
Structs§
- Batched
- A value of the batched function and the position of its batch dimension,
or
Noneif it is the same for every example of the batch.
Traits§
- BatchCx
- A context that emits the operations of a batched function.
Functions§
- inline
- Emits the equations of
fapplied toargsintocx, and returns the outputs.
Type Aliases§
- Build
Body - The body given to
BatchCx::build_function: emits operations through the context it receives, from the inputs of the new function, and returns its outputs.