Core, data, and cryptography
Core runtime, numerical operations, datasets, and cryptography.
Examples
oa
Functions
Translate a NumericMode into the equivalent env-knob state. Called once at engine init. User-set env vars always win (EnvFlag::set_if_unset checks before writing). ModeEnv vars touched Fastnone StableOA_FORCE_PRECISION=FP32, OA_DISABLE_COOPMAT=1 Deterministicabove + OA_DISABLE_PERSISTENT_LOOP=1 Port provenance: oa::applyNumericMode in oa/core/envFlag.h.
Prepend VIEWPORT_TITLE to a custom window title. Empty title → returns "OaViewport". Title already starts with "OaViewport" → returned unchanged (no double-prepend). Otherwise → "OaViewport" + title. Port provenance: oa::brandViewport in oa/core/constant.h.
Types
3 members
Keras-style hook interface for OA iterator sessions. Attach one or more callbacks to a session via its add_callback method. All hooks receive a &dyn IteratorContext so callbacks stay decoupled from the concrete session type. Mapping from C++C++Rust onBegin(Iterator&)on_begin(&mut self, ctx) onStep(Iterator&)on_step(&mut self, ctx) onEnd(Iterator&)on_end(&mut self, ctx) C++ used virtual inheritance; Rust uses dynamic dispatch through Box<dyn Callback>. The C++ move-constructor convention maps to Rust’s normal ownership — place Box<dyn Callback> values in a Vec rather than raw pointers.
Source8 members
Ordered list of Callback objects attached to a session. Callbacks fire in insertion order. This mirrors oa::Iterator::addCallback but is an explicit value rather than a virtual base member so the concrete session type can own it directly.
Source4 members
Shared checkpoint-save configuration. Used as a building block in CLI configs and passed to crate::ml::training::CbCheckpoint.
Source20 members
Command-line configuration with YAML + argv precedence. Type parameter C is any config struct that implements Default. Defaults are the base layer; a YAML file loaded via -c/--config overrides them; explicit argv flags override those. YAML support YAML loading is the caller’s responsibility. Pass a loader closure to Cli::parse_args_with_yaml to apply YAML fields before argv parsing when a -c/--config path is present.
34 members
Four-component RGBA color used by UI, plotting, overlays, and ordinary normalized render colors.
7 members
UTC human-readable date/time. For log display and file naming only — never for consensus or deterministic math.
Source6 members
Error returned by fallible OA operations. Backend and dependency errors are retained as sources without exposing their concrete types through OA’s public API.
Source22 members
Stateless host-filesystem operations. All methods are free functions on &Path. There is no instance state. Matches the surface of oa::Filesystem in C++ and its Python bindings so that cross-language code reads identically: ⓘFilesystem::create_directories(output.parent().unwrap())?; let text = Filesystem::read_text(&config_path)?;
3 members
Object-safe view of an iterator’s current state, passed to every Callback hook. The concrete iterator (e.g. TrainingLoop) implements this privately; the callback only needs the interface.
Source4 members
Shared logging configuration. Used as a building block in CLI configs and passed to crate::runtime::LogOptions or crate::LogMetrics.
Source11 members
Structured JSONL scalar-metrics sink. Thread-safe: log_scalar and flush serialize through an internal mutex. The open flag is an atomic for cheap is_open checks on the hot path.
Source8 members
Read-only whole-file mapping with RAII lifetime. Port provenance: oa::MappedFile.
Source32 members
Device-visible numeric storage with explicit shape and dtype semantics. Arithmetic operators delegate to crate::matrix and return Result<Matrix>: use let sum = (&left + &right)?;. They preserve validation, allocation, and recording failures without panicking. Multiplication is elementwise; use crate::matrix::mat_mul_nt for matrix multiplication.
45 members
24 members
Stable semantic contract for one operation before backend lowering. Generated operation registries own these descriptors. The builder-style const methods are public so generated code remains ordinary inspectable Rust rather than a private binary table.
40 members
An owned OA path value. Wraps std::path::PathBuf and adds the canonical OA named-location resolvers as associated functions. All std::fs calls and crate::Filesystem methods accept &oa::Path directly through Deref. ⓘlet wav = oa::Path::asset_rel("audio/oaNarration.wav"); let out = oa::Path::var_rel("example/audio/out.wav"); let ckpt = oa::Path::temp().join("model.oam");
14 members
Rolling-window performance statistics. No GPU dependency; pure CPU value struct.
Source0 members
Result returned by fallible OA operations.
Source2 members
RAII scoped timer. Borrows a f64 and writes elapsed seconds on drop. ⓘlet mut elapsed = 0.0_f64; { let _t = oa::ScopedTimer::new(&mut elapsed); expensive_work(); } println!("took {elapsed:.3}s");
Source10 members
Accumulating stopwatch. ⓘlet mut sw = oa::Stopwatch::new(); sw.start(); // ... work ... sw.stop(); println!("{:.3}ms", sw.elapsed_ms());
Source18 members
Nanosecond-precision monotonic timestamp. Internally stores nanoseconds elapsed since an arbitrary monotonic origin. Two Timestamp values from the same process can be subtracted; the result is meaningful as a Duration. Do not compare values across processes.
24 members
Semantic local spatial transform value. Stores translation + unit-quaternion rotation + per-axis scale + optional dimensionless row-basis shear (XY, XZ, YZ). All constructed values are finite; operations that would produce a non-finite result leave the value unchanged and return an error. Donor: oa::Transform.
10 members
Global validation controller. Port provenance: oa::Validation.
SourceEnums
Read/write access qualifier for a buffer binding. Port provenance: oa::BufferAccess in oa/core/bufferAccess.h.
Read · Write · ReadWrite
Stable category for an OA failure.
InvalidArgument · NotReady · BackendUnavailable · BackendFailure · UnsupportedBackendVersion · NoSuitableDevice · MissingCapability · ResourceExhausted · FailedPrecondition · OutOfRange · NotFound · AlreadyExists · Aborted · CallbackFailure · CheckpointCorrupt · DataLoss · Internal · Io
Process-wide numerical execution policy. Core owns the vocabulary and its environment mapping; the runtime engine consumes it through EngineConfig. ModeEffect Fastvendor math, non-deterministic reductions StableFP32 accumulators, CoopMat disabled Deterministicfixed reduction order, no race-dependent atomics Port provenance: oa::NumericMode in oa/core/envFlag.h.
Fast = 0 · Stable = 1 · Deterministic = 2
One ordered non-value input that affects operation meaning.
Boolean · SignedInteger · UnsignedInteger · Float · String · Shape · Enum
Stable type tag for a non-value operation attribute.
Boolean · SignedInteger · UnsignedInteger · Float · String · Shape · Enum
Uniform dtype relationship declared by an operation schema.
MatchInput · PromoteFloat · Explicit
Uniform shape relationship declared by an operation schema.
MatchInput · Broadcast · MatMulNt · Explicit
Semantic kind of one operation value.
Matrix · Image · Audio · VideoFrame · QuantMatrix · Texture
Severity levels for validation messages. Port provenance: oa::ValidationSeverity.
Verbose = 0 · Info = 1 · Warning = 2 · Error = 3 · Fatal = 4
Constants & Variables
pub const COMPACT_BANNER: &str = r" ╔═══════════════════════════════════════════════════════════════════════════════╗ ║ oa::Library ║ ║ The Library. Every Vendor. Vulkan Native. ║ ╚═══════════════════════════════════════════════════════════════════════════════╝ ";Source pub const REALM_BANNER: &str = r" ██████╗ ███████╗ █████╗ ██╗ ███╗ ███╗ ██╔══██╗██╔════╝██╔══██╗██║ ████╗ ████║ ██████╔╝█████╗ ███████║██║ ██╔████╔██║ ██╔══██╗██╔══╝ ██╔══██║██║ ██║╚██╔╝██║ ██║ ██║███████╗██║ ██║███████╗██║ ╚═╝ ██║ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ";Source pub const VIEWPORT_TITLE: &str = "OaViewport";Source Functions
Translate a NumericMode into the equivalent env-knob state. Called once at engine init. User-set env vars always win (EnvFlag::set_if_unset checks before writing). ModeEnv vars touched Fastnone StableOA_FORCE_PRECISION=FP32, OA_DISABLE_COOPMAT=1 Deterministicabove + OA_DISABLE_PERSISTENT_LOOP=1 Port provenance: oa::applyNumericMode in oa/core/envFlag.h.
Prepend VIEWPORT_TITLE to a custom window title. Empty title → returns "OaViewport". Title already starts with "OaViewport" → returned unchanged (no double-prepend). Otherwise → "OaViewport" + title. Port provenance: oa::brandViewport in oa/core/constant.h.
Recover a unit quaternion from a 6-component rotation representation. Donor: oa::FnTransform::quaternionFromSixD.
Pack a unit quaternion into a 6-component continuous rotation representation. The first two columns of the rotation matrix (rows in row-vector convention) are stored as [r0x, r0y, r0z, r1x, r1y, r1z]. The third column is recovered by the cross product at decode time. Donor: oa::FnTransform::quaternionToSixD.
Types
3 members
Keras-style hook interface for OA iterator sessions. Attach one or more callbacks to a session via its add_callback method. All hooks receive a &dyn IteratorContext so callbacks stay decoupled from the concrete session type. Mapping from C++C++Rust onBegin(Iterator&)on_begin(&mut self, ctx) onStep(Iterator&)on_step(&mut self, ctx) onEnd(Iterator&)on_end(&mut self, ctx) C++ used virtual inheritance; Rust uses dynamic dispatch through Box<dyn Callback>. The C++ move-constructor convention maps to Rust’s normal ownership — place Box<dyn Callback> values in a Vec rather than raw pointers.
Source8 members
Ordered list of Callback objects attached to a session. Callbacks fire in insertion order. This mirrors oa::Iterator::addCallback but is an explicit value rather than a virtual base member so the concrete session type can own it directly.
Source4 members
Shared checkpoint-save configuration. Used as a building block in CLI configs and passed to crate::ml::training::CbCheckpoint.
Source20 members
Command-line configuration with YAML + argv precedence. Type parameter C is any config struct that implements Default. Defaults are the base layer; a YAML file loaded via -c/--config overrides them; explicit argv flags override those. YAML support YAML loading is the caller’s responsibility. Pass a loader closure to Cli::parse_args_with_yaml to apply YAML fields before argv parsing when a -c/--config path is present.
34 members
Four-component RGBA color used by UI, plotting, overlays, and ordinary normalized render colors.
7 members
UTC human-readable date/time. For log display and file naming only — never for consensus or deterministic math.
Source1 members
Rust host type that has one exact admitted dense DType representation. This trait is sealed so OA can uphold the no-padding and bit-validity requirements used by checked upload and readback.
Source6 members
Error returned by fallible OA operations. Backend and dependency errors are retained as sources without exposing their concrete types through OA’s public API.
Source22 members
Stateless host-filesystem operations. All methods are free functions on &Path. There is no instance state. Matches the surface of oa::Filesystem in C++ and its Python bindings so that cross-language code reads identically: ⓘFilesystem::create_directories(output.parent().unwrap())?; let text = Filesystem::read_text(&config_path)?;
3 members
Object-safe view of an iterator’s current state, passed to every Callback hook. The concrete iterator (e.g. TrainingLoop) implements this privately; the callback only needs the interface.
Source4 members
Shared logging configuration. Used as a building block in CLI configs and passed to crate::runtime::LogOptions or crate::LogMetrics.
Source11 members
Structured JSONL scalar-metrics sink. Thread-safe: log_scalar and flush serialize through an internal mutex. The open flag is an atomic for cheap is_open checks on the hot path.
Source8 members
Read-only whole-file mapping with RAII lifetime. Port provenance: oa::MappedFile.
Source32 members
Device-visible numeric storage with explicit shape and dtype semantics. Arithmetic operators delegate to crate::matrix and return Result<Matrix>: use let sum = (&left + &right)?;. They preserve validation, allocation, and recording failures without panicking. Multiplication is elementwise; use crate::matrix::mat_mul_nt for matrix multiplication.
45 members
24 members
Stable semantic contract for one operation before backend lowering. Generated operation registries own these descriptors. The builder-style const methods are public so generated code remains ordinary inspectable Rust rather than a private binary table.
40 members
An owned OA path value. Wraps std::path::PathBuf and adds the canonical OA named-location resolvers as associated functions. All std::fs calls and crate::Filesystem methods accept &oa::Path directly through Deref. ⓘlet wav = oa::Path::asset_rel("audio/oaNarration.wav"); let out = oa::Path::var_rel("example/audio/out.wav"); let ckpt = oa::Path::temp().join("model.oam");
14 members
Rolling-window performance statistics. No GPU dependency; pure CPU value struct.
Source0 members
Result returned by fallible OA operations.
Source2 members
RAII scoped timer. Borrows a f64 and writes elapsed seconds on drop. ⓘlet mut elapsed = 0.0_f64; { let _t = oa::ScopedTimer::new(&mut elapsed); expensive_work(); } println!("took {elapsed:.3}s");
Source10 members
Accumulating stopwatch. ⓘlet mut sw = oa::Stopwatch::new(); sw.start(); // ... work ... sw.stop(); println!("{:.3}ms", sw.elapsed_ms());
Source18 members
Nanosecond-precision monotonic timestamp. Internally stores nanoseconds elapsed since an arbitrary monotonic origin. Two Timestamp values from the same process can be subtracted; the result is meaningful as a Duration. Do not compare values across processes.
24 members
Semantic local spatial transform value. Stores translation + unit-quaternion rotation + per-axis scale + optional dimensionless row-basis shear (XY, XZ, YZ). All constructed values are finite; operations that would produce a non-finite result leave the value unchanged and return an error. Donor: oa::Transform.
10 members
Global validation controller. Port provenance: oa::Validation.
SourceEnums
Read/write access qualifier for a buffer binding. Port provenance: oa::BufferAccess in oa/core/bufferAccess.h.
Read · Write · ReadWrite
Stable category for an OA failure.
InvalidArgument · NotReady · BackendUnavailable · BackendFailure · UnsupportedBackendVersion · NoSuitableDevice · MissingCapability · ResourceExhausted · FailedPrecondition · OutOfRange · NotFound · AlreadyExists · Aborted · CallbackFailure · CheckpointCorrupt · DataLoss · Internal · Io
Process-wide numerical execution policy. Core owns the vocabulary and its environment mapping; the runtime engine consumes it through EngineConfig. ModeEffect Fastvendor math, non-deterministic reductions StableFP32 accumulators, CoopMat disabled Deterministicfixed reduction order, no race-dependent atomics Port provenance: oa::NumericMode in oa/core/envFlag.h.
Fast = 0 · Stable = 1 · Deterministic = 2
One ordered non-value input that affects operation meaning.
Boolean · SignedInteger · UnsignedInteger · Float · String · Shape · Enum
Stable type tag for a non-value operation attribute.
Boolean · SignedInteger · UnsignedInteger · Float · String · Shape · Enum
Uniform dtype relationship declared by an operation schema.
MatchInput · PromoteFloat · Explicit
Uniform shape relationship declared by an operation schema.
MatchInput · Broadcast · MatMulNt · Explicit
Semantic kind of one operation value.
Matrix · Image · Audio · VideoFrame · QuantMatrix · Texture
Severity levels for validation messages. Port provenance: oa::ValidationSeverity.
Verbose = 0 · Info = 1 · Warning = 2 · Error = 3 · Fatal = 4
Constants & Variables
pub const COMPACT_BANNER: &str = r" ╔═══════════════════════════════════════════════════════════════════════════════╗ ║ oa::Library ║ ║ The Library. Every Vendor. Vulkan Native. ║ ╚═══════════════════════════════════════════════════════════════════════════════╝ ";Source pub const REALM_BANNER: &str = r" ██████╗ ███████╗ █████╗ ██╗ ███╗ ███╗ ██╔══██╗██╔════╝██╔══██╗██║ ████╗ ████║ ██████╔╝█████╗ ███████║██║ ██╔████╔██║ ██╔══██╗██╔══╝ ██╔══██║██║ ██║╚██╔╝██║ ██║ ██║███████╗██║ ██║███████╗██║ ╚═╝ ██║ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ";Source pub const VIEWPORT_TITLE: &str = "OaViewport";Source Types
3 members
Keras-style hook interface for OA iterator sessions. Attach one or more callbacks to a session via its add_callback method. All hooks receive a &dyn IteratorContext so callbacks stay decoupled from the concrete session type. Mapping from C++C++Rust onBegin(Iterator&)on_begin(&mut self, ctx) onStep(Iterator&)on_step(&mut self, ctx) onEnd(Iterator&)on_end(&mut self, ctx) C++ used virtual inheritance; Rust uses dynamic dispatch through Box<dyn Callback>. The C++ move-constructor convention maps to Rust’s normal ownership — place Box<dyn Callback> values in a Vec rather than raw pointers.
Source8 members
Ordered list of Callback objects attached to a session. Callbacks fire in insertion order. This mirrors oa::Iterator::addCallback but is an explicit value rather than a virtual base member so the concrete session type can own it directly.
Source3 members
Object-safe view of an iterator’s current state, passed to every Callback hook. The concrete iterator (e.g. TrainingLoop) implements this privately; the callback only needs the interface.
SourceTypes
20 members
Command-line configuration with YAML + argv precedence. Type parameter C is any config struct that implements Default. Defaults are the base layer; a YAML file loaded via -c/--config overrides them; explicit argv flags override those. YAML support YAML loading is the caller’s responsibility. Pass a loader closure to Cli::parse_args_with_yaml to apply YAML fields before argv parsing when a -c/--config path is present.
4 members
A named subcommand (or the implicit root command). Options registered on a Cmd are only matched when that subcommand is active. The root Cmd is always active.
Source17 members
Types
Functions
Prepend VIEWPORT_TITLE to a custom window title. Empty title → returns "OaViewport". Title already starts with "OaViewport" → returned unchanged (no double-prepend). Otherwise → "OaViewport" + title. Port provenance: oa::brandViewport in oa/core/constant.h.
Constants & Variables
pub const COMPACT_BANNER: &str = r" ╔═══════════════════════════════════════════════════════════════════════════════╗ ║ oa::Library ║ ║ The Library. Every Vendor. Vulkan Native. ║ ╚═══════════════════════════════════════════════════════════════════════════════╝ ";Source pub const REALM_BANNER: &str = r" ██████╗ ███████╗ █████╗ ██╗ ███╗ ███╗ ██╔══██╗██╔════╝██╔══██╗██║ ████╗ ████║ ██████╔╝█████╗ ███████║██║ ██╔████╔██║ ██╔══██╗██╔══╝ ██╔══██║██║ ██║╚██╔╝██║ ██║ ██║███████╗██║ ██║███████╗██║ ╚═╝ ██║ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ";Source pub const VIEWPORT_TITLE: &str = "OaViewport";Source Functions
Translate a NumericMode into the equivalent env-knob state. Called once at engine init. User-set env vars always win (EnvFlag::set_if_unset checks before writing). ModeEnv vars touched Fastnone StableOA_FORCE_PRECISION=FP32, OA_DISABLE_COOPMAT=1 Deterministicabove + OA_DISABLE_PERSISTENT_LOOP=1 Port provenance: oa::applyNumericMode in oa/core/envFlag.h.
Types
Enums
Process-wide numerical execution policy. Core owns the vocabulary and its environment mapping; the runtime engine consumes it through EngineConfig. ModeEffect Fastvendor math, non-deterministic reductions StableFP32 accumulators, CoopMat disabled Deterministicfixed reduction order, no race-dependent atomics Port provenance: oa::NumericMode in oa/core/envFlag.h.
Fast = 0 · Stable = 1 · Deterministic = 2
Types
22 members
Stateless host-filesystem operations. All methods are free functions on &Path. There is no instance state. Matches the surface of oa::Filesystem in C++ and its Python bindings so that cross-language code reads identically: ⓘFilesystem::create_directories(output.parent().unwrap())?; let text = Filesystem::read_text(&config_path)?;
Types
11 members
Structured JSONL scalar-metrics sink. Thread-safe: log_scalar and flush serialize through an internal mutex. The open flag is an atomic for cheap is_open checks on the hot path.
SourceTypes
8 members
Read-only whole-file mapping with RAII lifetime. Port provenance: oa::MappedFile.
SourceFunctions
Copy one complete byte slice into another non-overlapping slice. Small dynamic copies use fixed compiler-known blocks. Qualified medium copies use cached SIMD stores; bulk copies retain the platform implementation. Errors Returns an error when the slices have different lengths.
Copy one complete byte slice using an explicit one-way streaming policy. The destination must not be consumed by the CPU soon. On a qualified x86-64 target, medium-sized copies use non-temporal stores. Other sizes use cached stores, preferring the platform routine above the small-copy range. Errors Returns an error when the slices have different lengths.
Compare two byte slices with ordinary early-exit semantics.
Compare equal-length byte slices without content-dependent early exit. Different public lengths may return immediately. For equal lengths, every byte is visited before the result is produced. This is a bounded primitive, not a claim of system-wide constant-time behavior on every platform.
Erase every byte through observable stores. Unlike ordinary filling or zeroing, these writes are retained even when the compiler can prove the destination is not subsequently read. This does not erase copies held elsewhere or guarantee removal from caches or swap.
Constants & Variables
pub const AMPLITUDE_TO_DB: OperationContract;Source pub const BIQUAD: OperationContract;Source pub const CLIP: OperationContract;Source pub const FADE: OperationContract;Source pub const GAIN: OperationContract;Source pub const MEL_SPECTROGRAM: OperationContract;Source pub const MFCC: OperationContract;Source pub const MIX: OperationContract;Source pub const NORMALIZE: OperationContract;Source pub const PRE_EMPHASIS: OperationContract;Source pub const RESAMPLE: OperationContract;Source pub const REVERB: OperationContract;Source pub const SATURATE: OperationContract;Source pub const SOS_FILTER: OperationContract;Source pub const STFT: OperationContract;Source pub const TO_MONO: OperationContract;Source pub const WAVEFORM_ENVELOPE: OperationContract;Source Constants & Variables
Constants & Variables
pub const ML_DSA_44_VERIFY_BATCH: OperationContract;Source pub const ML_DSA_44_VERIFY_HASH_MESSAGE_BATCH: OperationContract;Source pub const ML_DSA_44_VERIFY_PREHASHED_BATCH: OperationContract;Source pub const ML_DSA_65_VERIFY_BATCH: OperationContract;Source pub const ML_DSA_65_VERIFY_HASH_MESSAGE_BATCH: OperationContract;Source pub const ML_DSA_65_VERIFY_PREHASHED_BATCH: OperationContract;Source pub const ML_DSA_87_VERIFY_BATCH: OperationContract;Source pub const ML_DSA_87_VERIFY_HASH_MESSAGE_BATCH: OperationContract;Source pub const ML_DSA_87_VERIFY_PREHASHED_BATCH: OperationContract;Source Constants & Variables
pub const ADAPTIVE_THRESHOLD_GAUSSIAN: OperationContract;Source pub const ADAPTIVE_THRESHOLD_MEAN: OperationContract;Source pub const ALPHA_BLEND: OperationContract;Source pub const AVERAGE_BLUR: OperationContract;Source pub const BILATERAL_FILTER: OperationContract;Source pub const BRIGHTNESS_CONTRAST: OperationContract;Source pub const CENTER_CROP: OperationContract;Source pub const CHANNEL_REORDER: OperationContract;Source pub const CLAMP: OperationContract;Source pub const COLOR_TWIST: OperationContract;Source pub const COMPOSITE: OperationContract;Source pub const CONVERT_COLOR: OperationContract;Source pub const CONVOLVE_2D: OperationContract;Source pub const CROP: OperationContract;Source pub const DILATE: OperationContract;Source pub const ERASE: OperationContract;Source pub const ERODE: OperationContract;Source pub const FLIP: OperationContract;Source pub const GAMMA_CONTRAST: OperationContract;Source pub const GAUSSIAN_BLUR: OperationContract;Source pub const GAUSSIAN_NOISE: OperationContract;Source pub const GRAYSCALE: OperationContract;Source pub const INVERT: OperationContract;Source pub const IN_RANGE: OperationContract;Source pub const LAPLACIAN: OperationContract;Source pub const MEDIAN_BLUR: OperationContract;Source pub const MORPHOLOGY_BLACK_HAT: OperationContract;Source pub const MORPHOLOGY_CLOSE: OperationContract;Source pub const MORPHOLOGY_GRADIENT: OperationContract;Source pub const MORPHOLOGY_OPEN: OperationContract;Source pub const MORPHOLOGY_TOP_HAT: OperationContract;Source pub const NORMALIZE: OperationContract;Source pub const PAD: OperationContract;Source pub const POSTERIZE: OperationContract;Source pub const REMAP: OperationContract;Source pub const RESIZE: OperationContract;Source pub const RESIZE_NORMALIZE: OperationContract;Source pub const ROTATE: OperationContract;Source pub const SALT_PEPPER_NOISE: OperationContract;Source pub const SCHARR: OperationContract;Source pub const SEGMENTATION_OVERLAY: OperationContract;Source pub const SEPARABLE_CONVOLVE_2D: OperationContract;Source pub const SHARPEN: OperationContract;Source pub const SOBEL: OperationContract;Source pub const SOLARIZE: OperationContract;Source pub const THRESHOLD_BINARY: OperationContract;Source pub const THRESHOLD_BINARY_INV: OperationContract;Source pub const THRESHOLD_TO_ZERO: OperationContract;Source pub const THRESHOLD_TO_ZERO_INV: OperationContract;Source pub const THRESHOLD_TRUNCATE: OperationContract;Source pub const UNSHARP_MASK: OperationContract;Source pub const WARP_AFFINE: OperationContract;Source pub const WARP_PERSPECTIVE: OperationContract;Source Constants & Variables
pub const ABS: OperationContract;Source pub const ADD: OperationContract;Source pub const ADD_SCALAR: OperationContract;Source pub const CATEGORICAL_ACCURACY_COUNT: OperationContract;Source pub const CLAMP_MAX: OperationContract;Source pub const CLAMP_MIN: OperationContract;Source pub const CONCAT: OperationContract;Source pub const COPY: OperationContract;Source pub const COS: OperationContract;Source pub const DIV: OperationContract;Source pub const DIV_SCALAR: OperationContract;Source pub const DROPOUT: OperationContract;Source pub const DROPOUT_BACKWARD: OperationContract;Source pub const EQUAL: OperationContract;Source pub const EXP: OperationContract;Source pub const GATHER: OperationContract;Source pub const GATHER_BACKWARD: OperationContract;Source pub const GATHER_LAST_DIM: OperationContract;Source pub const GATHER_LAST_DIM_BACKWARD: OperationContract;Source pub const LOG: OperationContract;Source pub const LOG_SOFTMAX: OperationContract;Source pub const LOG_SOFTMAX_BACKWARD: OperationContract;Source pub const MASKED_CATEGORICAL_ACCURACY_COUNT: OperationContract;Source pub const MAT_MUL_NT: OperationContract;Source pub const MOE_EXPERT_PLAN: OperationContract;Source pub const MOE_ROUTING_BIAS_UPDATE: OperationContract;Source pub const MUL: OperationContract;Source pub const NEG: OperationContract;Source pub const PHILOX_NORMAL: OperationContract;Source pub const PHILOX_REPLAY_ADVANCE: OperationContract;Source pub const PHILOX_UNIFORM: OperationContract;Source pub const POW: OperationContract;Source pub const RECIPROCAL: OperationContract;Source pub const REPEAT_INTERLEAVE: OperationContract;Source pub const REPEAT_INTERLEAVE_BACKWARD: OperationContract;Source pub const SAMPLE_LOGITS: OperationContract;Source pub const SCALE: OperationContract;Source pub const SIN: OperationContract;Source pub const SLICE: OperationContract;Source pub const SLICE_BACKWARD: OperationContract;Source pub const SOFTMAX: OperationContract;Source pub const SOFTMAX_BACKWARD: OperationContract;Source pub const SQRT: OperationContract;Source pub const SUB: OperationContract;Source pub const SUB_SCALAR: OperationContract;Source pub const SUM: OperationContract;Source pub const SUM_BACKWARD: OperationContract;Source pub const TOP_K: OperationContract;Source pub const TOP_K_MASK: OperationContract;Source pub const TRANSPOSE: OperationContract;Source Constants & Variables
pub const ADAM: OperationContract;Source pub const ADAMW: OperationContract;Source pub const ADAMW_GRAPH: OperationContract;Source pub const ADAMW_GRAPH_ADVANCE: OperationContract;Source pub const ADAPTIVE_AVG_POOL_2D: OperationContract;Source pub const ADAPTIVE_AVG_POOL_2D_BACKWARD: OperationContract;Source pub const APPEND: OperationContract;Source pub const APPEND_BATCH: OperationContract;Source pub const AVG_POOL_2D: OperationContract;Source pub const AVG_POOL_2D_BACKWARD: OperationContract;Source pub const BATCH_NORM_2D: OperationContract;Source pub const BATCH_NORM_2D_BACKWARD: OperationContract;Source pub const BATCH_NORM_2D_RUNNING_UPDATE: OperationContract;Source pub const BATCH_NORM_2D_WITH_STATS: OperationContract;Source pub const BCE: OperationContract;Source pub const BCE_BACKWARD: OperationContract;Source pub const BMM: OperationContract;Source pub const BMM_NT: OperationContract;Source pub const BMM_TN: OperationContract;Source pub const CART_POLE_RESET: OperationContract;Source pub const CART_POLE_STEP: OperationContract;Source pub const CHANNEL_NORM: OperationContract;Source pub const CHANNEL_NORM_BACKWARD: OperationContract;Source pub const CHANNEL_NORM_RELU: OperationContract;Source pub const CHANNEL_NORM_RELU_BACKWARD: OperationContract;Source pub const CLIP_GRAD_NORM: OperationContract;Source pub const CLIP_REWARD: OperationContract;Source pub const CONV_1D: OperationContract;Source pub const CONV_1D_BACKWARD: OperationContract;Source pub const CONV_2D: OperationContract;Source pub const CONV_2D_BACKWARD: OperationContract;Source pub const CONV_TRANSPOSE_1D: OperationContract;Source pub const CONV_TRANSPOSE_1D_BACKWARD: OperationContract;Source pub const CONV_TRANSPOSE_2D: OperationContract;Source pub const CONV_TRANSPOSE_2D_BACKWARD: OperationContract;Source pub const CROSS_ENTROPY: OperationContract;Source pub const CROSS_ENTROPY_BACKWARD: OperationContract;Source pub const DQN: OperationContract;Source pub const ELU: OperationContract;Source pub const ELU_BACKWARD: OperationContract;Source pub const EMBEDDING: OperationContract;Source pub const EMBEDDING_BACKWARD: OperationContract;Source pub const EULER_STEP: OperationContract;Source pub const EVALUATE_CATEGORICAL: OperationContract;Source pub const EVALUATE_TANH_NORMAL: OperationContract;Source pub const GAE: OperationContract;Source pub const GELU: OperationContract;Source pub const GELU_BACKWARD: OperationContract;Source pub const GROUPED_GEMM_M: OperationContract;Source pub const GROUPED_GEMM_M_BACKWARD: OperationContract;Source pub const GROUPED_LINEAR_M: OperationContract;Source pub const GROUPED_LINEAR_M_BACKWARD: OperationContract;Source pub const GRU_CELL: OperationContract;Source pub const GRU_CELL_BACKWARD: OperationContract;Source pub const GRU_SCAN: OperationContract;Source pub const GRU_SCAN_BACKWARD: OperationContract;Source pub const L1: OperationContract;Source pub const L1_BACKWARD: OperationContract;Source pub const LAYER_NORM: OperationContract;Source pub const LAYER_NORM_BACKWARD: OperationContract;Source pub const LEAKY_RELU: OperationContract;Source pub const LEAKY_RELU_BACKWARD: OperationContract;Source pub const LINEAR: OperationContract;Source pub const LINEAR_BACKWARD: OperationContract;Source pub const LINEAR_MATCH: OperationContract;Source pub const LINEAR_PARAMETER_BACKWARD: OperationContract;Source pub const LUNAR_LANDER_RESET: OperationContract;Source pub const LUNAR_LANDER_STEP: OperationContract;Source pub const MAMBA3_MIMO: OperationContract;Source pub const MAMBA3_MIMO_BACKWARD: OperationContract;Source pub const MAMBA3_MIMO_STEP: OperationContract;Source pub const MAMBA3_PREPROCESS: OperationContract;Source pub const MAMBA3_PREPROCESS_BACKWARD: OperationContract;Source pub const MAMBA3_SISO: OperationContract;Source pub const MAMBA3_SISO_BACKWARD: OperationContract;Source pub const MAMBA3_SISO_STEP: OperationContract;Source pub const MASKED_CROSS_ENTROPY: OperationContract;Source pub const MASKED_CROSS_ENTROPY_BACKWARD: OperationContract;Source pub const MASKED_MSE: OperationContract;Source pub const MASKED_MSE_BACKWARD: OperationContract;Source pub const MAX_POOL_2D: OperationContract;Source pub const MAX_POOL_2D_BACKWARD: OperationContract;Source pub const MERGE_HEADS: OperationContract;Source pub const MISH: OperationContract;Source pub const MISH_BACKWARD: OperationContract;Source pub const MOE_COMBINE: OperationContract;Source pub const MOE_COMBINE_BACKWARD: OperationContract;Source pub const MOE_GATHER: OperationContract;Source pub const MOE_GATHER_BACKWARD: OperationContract;Source pub const MOE_ROUTE_WEIGHTS: OperationContract;Source pub const MOE_ROUTE_WEIGHTS_BACKWARD: OperationContract;Source pub const MSE: OperationContract;Source pub const MSE_BACKWARD: OperationContract;Source pub const MUON: OperationContract;Source pub const NORMALIZE: OperationContract;Source pub const NORMALIZE_OBSERVATION: OperationContract;Source pub const PPO: OperationContract;Source pub const PPO_CLIPPED_POLICY: OperationContract;Source pub const PPO_CLIPPED_POLICY_BACKWARD: OperationContract;Source pub const RELU: OperationContract;Source pub const RELU_BACKWARD: OperationContract;Source pub const RESET: OperationContract;Source pub const RMS_NORM: OperationContract;Source pub const RMS_NORM_BACKWARD: OperationContract;Source pub const RMS_NORM_GATED: OperationContract;Source pub const RMS_NORM_GATED_BACKWARD: OperationContract;Source pub const RNN_CELL: OperationContract;Source pub const RNN_CELL_BACKWARD: OperationContract;Source pub const RNN_SCAN: OperationContract;Source pub const RNN_SCAN_BACKWARD: OperationContract;Source pub const ROPE: OperationContract;Source pub const ROPE_BACKWARD: OperationContract;Source pub const SAC_ACTOR: OperationContract;Source pub const SAC_CRITIC: OperationContract;Source pub const SAMPLE: OperationContract;Source pub const SAMPLE_CATEGORICAL: OperationContract;Source pub const SAMPLE_TANH_NORMAL: OperationContract;Source pub const SCALED_DOT_PRODUCT_ATTENTION: OperationContract;Source pub const SCALED_DOT_PRODUCT_ATTENTION_BACKWARD: OperationContract;Source pub const SCALE_ACTION: OperationContract;Source pub const SGD: OperationContract;Source pub const SGD_MOMENTUM: OperationContract;Source pub const SIGMOID: OperationContract;Source pub const SIGMOID_BACKWARD: OperationContract;Source pub const SILU: OperationContract;Source pub const SILU_BACKWARD: OperationContract;Source pub const SILU_MUL: OperationContract;Source pub const SILU_MUL_BACKWARD: OperationContract;Source pub const SMOOTH_L1: OperationContract;Source pub const SMOOTH_L1_BACKWARD: OperationContract;Source pub const SOFTMAX_SCALED_MASKED: OperationContract;Source pub const SOFTMAX_SCALED_MASKED_BACKWARD: OperationContract;Source pub const SOFTPLUS: OperationContract;Source pub const SOFTPLUS_BACKWARD: OperationContract;Source pub const SPLIT_HEADS: OperationContract;Source pub const SWIGLU: OperationContract;Source pub const SWIGLU_BACKWARD: OperationContract;Source pub const TANH: OperationContract;Source pub const TANH_BACKWARD: OperationContract;Source pub const UPSAMPLE_2D: OperationContract;Source pub const UPSAMPLE_2D_BACKWARD: OperationContract;Source pub const VQ_ASSIGN: OperationContract;Source pub const VQ_EMA_UPDATE: OperationContract;Source pub const VQ_LOOKUP: OperationContract;Source Constants & Variables
Types
40 members
An owned OA path value. Wraps std::path::PathBuf and adds the canonical OA named-location resolvers as associated functions. All std::fs calls and crate::Filesystem methods accept &oa::Path directly through Deref. ⓘlet wav = oa::Path::asset_rel("audio/oaNarration.wav"); let out = oa::Path::var_rel("example/audio/out.wav"); let ckpt = oa::Path::temp().join("model.oam");
Types
14 members
Rolling-window performance statistics. No GPU dependency; pure CPU value struct.
SourceTypes
7 members
UTC human-readable date/time. For log display and file naming only — never for consensus or deterministic math.
Source2 members
RAII scoped timer. Borrows a f64 and writes elapsed seconds on drop. ⓘlet mut elapsed = 0.0_f64; { let _t = oa::ScopedTimer::new(&mut elapsed); expensive_work(); } println!("took {elapsed:.3}s");
Source10 members
Accumulating stopwatch. ⓘlet mut sw = oa::Stopwatch::new(); sw.start(); // ... work ... sw.stop(); println!("{:.3}ms", sw.elapsed_ms());
Source18 members
Nanosecond-precision monotonic timestamp. Internally stores nanoseconds elapsed since an arbitrary monotonic origin. Two Timestamp values from the same process can be subtracted; the result is meaningful as a Duration. Do not compare values across processes.
Functions
Recover a unit quaternion from a 6-component rotation representation. Donor: oa::FnTransform::quaternionFromSixD.
Pack a unit quaternion into a 6-component continuous rotation representation. The first two columns of the rotation matrix (rows in row-vector convention) are stored as [r0x, r0y, r0z, r1x, r1y, r1z]. The third column is recovered by the cross product at decode time. Donor: oa::FnTransform::quaternionToSixD.
Types
24 members
Semantic local spatial transform value. Stores translation + unit-quaternion rotation + per-axis scale + optional dimensionless row-basis shear (XY, XZ, YZ). All constructed values are finite; operations that would produce a non-finite result leave the value unchanged and return an error. Donor: oa::Transform.
Types
10 members
Global validation controller. Port provenance: oa::Validation.
Source0 members
Optional custom callback type for validation messages.
SourceEnums
Severity levels for validation messages. Port provenance: oa::ValidationSeverity.
Verbose = 0 · Info = 1 · Warning = 2 · Error = 3 · Fatal = 4
Functions
Take the absolute value of every FP32 matrix element. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.
Add two matrices elementwise using multidirectional broadcasting. Shapes use multidirectional broadcasting over at most eight axes. The I32 route uses two’s-complement wrapping arithmetic. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.
Add a scalar to every FP32 matrix element. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.
Count rows whose last-axis FP32 argmax equals the integer class label. The returned [1] U32 Matrix remains device-resident. Reading it is an explicit synchronization boundary. Errors Returns an error when logits are not a nonempty rank-two-or-greater FP32 Matrix, labels do not match the leading logits shape or use U8/U32/I32, inputs belong to different engines, a size exceeds the shader ABI, allocation fails, or recording fails.
Cap every FP32 matrix element at an upper bound. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.
Raise every FP32 matrix element to a lower bound. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.
Concatenate one or more same-dtype matrices along one axis. This is the direct Rust spelling of OA C++ FnMatrix::concat. One semantic operation lowers to one copy-region dispatch per nonempty input. Errors Returns an error when there are no inputs, rank is outside one through four, dtype, engine, rank, or non-concatenated extents differ, the axis is invalid, shape or shader-ABI arithmetic overflows, allocation fails, or recording fails.
Deep-copy a dense matrix into independent device storage. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.
Take the cosine of every FP32 matrix element. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.
Divide two FP32 matrices elementwise using multidirectional broadcasting. Shapes use multidirectional broadcasting over at most eight axes. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.
Divide every FP32 matrix element by a scalar. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.
Apply inverted Dropout with a Philox-generated mask. Kept values are scaled by 1 / (1 - probability). The effective seed is retained for the reverse pass, and captured execution advances its random counter once per replay without rebuilding the graph. Errors Returns an error unless input is FP32, probability is finite and in [0, 1), or runtime allocation/recording fails.
Compare every FP32 element with one scalar and return an FP32 zero/one mask. Equality follows the device’s ordinary IEEE comparison: NaN never compares equal, while positive and negative zero compare equal. The result is intentionally detached because a discrete mask has no admitted adjoint. Errors Returns an error when input is not FP32, its element count exceeds the shader ABI, allocation fails, or runtime recording fails.
Take the exponential of every FP32 matrix element. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.
Create an FP32 matrix on this thread’s default engine. Errors Returns an error when the default engine cannot be initialized, the shape does not match values, or allocation and upload fail.
Create an FP32 matrix on a particular engine. Errors Returns an error when the shape does not match values, or allocation and upload fail.
Create an FP32 matrix filled with value. Errors Returns an error when the shape or storage size overflows, or allocation and upload fail.
Gather rows from an FP32 table using arbitrary-shape integer indices. The table must be [rows,width]; indices are flattened and output is [num_indices,width], matching OA C++ FnMatrix::gather. U8, U32, and I32 indices use one bounded kernel. Invalid rows produce NaN without reading outside the table. Errors Returns an error for incompatible rank, dtype, Engine ownership, shader ABI, allocation, or recording.
Gather I32-selected elements from every row’s final axis. input is FP32 [R, C] and indices is I32 [R, K]; the result is FP32 [R, K]. Out-of-range indices produce zero, matching OA C++. Repeated indices accumulate deterministically in the reverse pass. Errors Returns an error unless both inputs are rank two on the same engine, row counts agree, dtypes match the contract, the input width is positive, sizes fit the shader ABI, allocation fails, or runtime recording fails.
Take the natural logarithm of every FP32 matrix element. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.
Stable LogSoftmax over dim, where -1 selects the last dimension. The operation records asynchronously and returns its output immediately. Errors Returns an error when the input is empty or not FP32, dim is invalid, an axis extent or dispatch count exceeds the shader ABI, allocation fails, or runtime recording fails.
Count correct categorical predictions only where the FP32 mask is nonzero. The returned [1] U32 Matrix remains device-resident. Reading it is an explicit synchronization boundary. Errors Returns an error under the same conditions as categorical_accuracy_count, or when the mask is not FP32, does not match the labels shape, or belongs to another engine.
Multiply A by the transpose of B using the OA weight-layout convention. left has shape [M, K], right has shape [N, K], and the returned matrix has shape [M, N]. This matches OA’s native weight-layout convention and does not transpose storage. The call records device work and returns without a host wait. Errors Returns an error when either input is not a rank-two FP32 matrix, their K extents differ, they belong to different engines, a dimension exceeds the admitted shader ABI, or allocation or recording fails.
Build a stable dropless expert-major plan from I32 [T, K] indices. Within every expert, routes preserve their original token-major order. The operation accepts at most 256 experts, matching the shader’s shared state. Errors Returns an error unless indices are nonempty rank-two I32, the expert count is in 1..=256, sizes fit the admitted ABI, allocation succeeds, or runtime recording succeeds.
Update an FP32 expert-routing bias from a dense FP32 selection mask. selection_mask is [T, E]; bias may be [E] or [1, E]. Each expert receives -gamma, +gamma, or no update when its observed route count is above, below, or equal to the balanced target T * K / E. The update stays device-resident and mutates bias through its existing value identity. Errors Returns an error unless both matrices are FP32 on the same engine, the mask and bias shapes agree, experts_per_token is in 1..=E, gamma is finite and positive, dimensions fit the shader ABI, or runtime recording fails.
Multiply two FP32 matrices elementwise. Shapes use multidirectional broadcasting over at most eight axes. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.
Negate every FP32 matrix element. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.
Create an FP32 matrix filled with ones. Errors Returns an error when the shape or storage size overflows, or allocation and upload fail.
Generate normally distributed FP32 values with input’s shape. Errors Returns an error unless input is FP32, mean and stddev are finite, stddev is nonnegative, or runtime allocation/recording fails.
Generate uniformly distributed FP32 values with input’s shape. input supplies shape, dtype, engine, and semantic lineage; its values are not read. A nonzero seed is exact. Zero consumes the thread-local seed sequence controlled by set_rng_seed. Errors Returns an error unless input is FP32, low < high, both bounds are finite, or runtime allocation/recording fails.
Raise every FP32 matrix element to a scalar exponent. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.
Take the reciprocal of every FP32 matrix element. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.
Repeat every FP32 element along one matrix axis. This is the direct Rust spelling of OA C++ FnMatrix::repeatInterleave. Rank-one through rank-four matrices are currently admitted. Errors Returns an error for an unsupported rank or dtype, non-positive repeat count, invalid axis, shape/ABI overflow, allocation failure, or recording failure.
Return a zero-copy dense view with a different shape. The result owns a new semantic value identity but shares storage, pending execution state, dtype, and element order with input. When a gradient tape is active, its adjoint reshapes the incoming gradient back to the input shape. Errors Returns an error when the requested shape overflows or changes the number of elements.
Sample one I32 class index from each final-axis row of FP32 logits. Nonpositive temperature selects the first maximum deterministically. Positive temperature uses the donor Philox categorical route; positive top_k restricts candidates and top_p applies nucleus truncation after descending TopK. Rank-one input is treated as one row. Errors Returns an error when logits are not nonempty rank-one or rank-two FP32, a sorted candidate count exceeds 1024, sizes do not fit the shader ABI, allocation fails, or runtime recording fails.
Multiply every FP32 matrix element by a scalar. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.
Replace the current thread’s implicit random seed source. Explicit nonzero operation seeds bypass this state. Passing zero to a Philox operation consumes one value from this deterministic thread-local sequence.
Take the sine of every FP32 matrix element. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.
Materialize a half-open interval along one matrix axis. This is the direct Rust spelling of OA C++ FnMatrix::slice. The current checkpoint admits rank-one through rank-four FP32 matrices. Errors Returns an error when the rank, dtype, axis, range, shader ABI, allocation, or runtime recording contract is invalid.
Stable Softmax over dim, where -1 selects the last dimension. The operation records asynchronously and returns its output immediately. Errors Returns an error when the input is empty or not FP32, dim is invalid, an axis extent or dispatch count exceeds the shader ABI, allocation fails, or runtime recording fails.
Take the square root of every FP32 matrix element. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.
Subtract two FP32 matrices elementwise using multidirectional broadcasting. Shapes use multidirectional broadcasting over at most eight axes. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.
Subtract a scalar from every FP32 matrix element. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.
Sum all values when dim is -1, or keep and reduce one selected axis. A full reduction returns shape [1]; an axis reduction preserves rank and replaces the selected extent with one. The operation records asynchronously. Errors Returns an error when the input is empty or not FP32, dim is invalid, a size exceeds the admitted shader ABI, allocation fails, or recording fails.
Return the largest k FP32 values and their I32 indices on the last axis. Rank-one and rank-two inputs are admitted. dim may be -1 or the exact last-axis index. Values are sorted descending; ties select lower indices. k is clamped to the last-axis extent, matching OA C++. Errors Returns an error for an unsupported rank, dtype, axis, negative k, a request above the admitted 1024-entry GPU limit, an empty last axis, size overflow, allocation failure, or runtime recording failure.
Expand I32 [T, K] expert indices into an exact FP32 [T, E] mask. Errors Returns an error unless the input is nonempty rank-two I32, num_experts is positive, all sizes fit the shader ABI, or runtime recording fails.
Materialize a swap of the last two axes of a rank-two or rank-three Matrix. dim0 and dim1 accept positive or negative axes, but the current donor contract only admits the final two axes in either order. The result owns new storage and preserves the input dtype and batch order. Errors Returns an error unless the input is rank-two or rank-three F32, the axes select the distinct final two dimensions, all geometry fits the shader ABI, allocation succeeds, and runtime recording succeeds.
Types
32 members
Device-visible numeric storage with explicit shape and dtype semantics. Arithmetic operators delegate to crate::matrix and return Result<Matrix>: use let sum = (&left + &right)?;. They preserve validation, allocation, and recording failures without panicking. Multiplication is elementwise; use crate::matrix::mat_mul_nt for matrix multiplication.
0 members
Device-resident stable dropless route plan returned by moe_expert_plan.
SourceFunctions
Converts Cartesian coordinates to (yaw, pitch, radius).
Converts spherical (yaw, pitch, radius) coordinates to Cartesian space.
Types
4 members
Translation, rotation, signed scale, row-basis shear, and reflection.
Source0 members
0 members
0 members
0 members
0 members
0 members
0 members
0 members
0 members
44 members
A floating-point scalar admitted by VLM. This sealed trait limits packed VLM values to f32 and f64 while allowing their shared implementation to stay generic and dependency-free.
30 members
53 members
41 members
4 members
Translation, rotation, signed scale, and reflection extracted from a strict TRS matrix.
Source32 members
42 members
33 members
7 members
A top-origin viewport with Vulkan [0, 1] depth.
SourceEnums
Constants & Variables
oa
Types
14 members
A fixed 32-byte SHAKE-256 digest.
Source1 members
An ML-DSA-65 secret signing key. The implementation stores the standard 32-byte seed plus its expanded signing state; both are zeroized by the RustCrypto dependency on drop.
Source10 members
A non-owning mutable byte range that is securely erased when reset or dropped. Linux page locking is best effort and observable through Self::is_locked. The borrow guarantees that the backing range remains alive for this guard.
SourceFunctions
Build a materialized Merkle tree.
Compute the canonical 32-byte SHAKE-256 digest.
Combine two Merkle nodes as SHAKE-256(left || right).
Apply the 24-round Keccak-f[1600] permutation in place.
Compute KMAC-256 according to NIST SP 800-185. Errors Returns an error when a bit length, encoded length, or allocation size overflows the platform or SP 800-185 u64 encoding.
Construct the inclusion proof for one leaf. Errors Returns an error for an empty tree or an out-of-range leaf index.
Compute the Merkle root, duplicating the final node of each odd level.
Produce SHAKE-128 output of exactly output.len() bytes.
Produce SHAKE-256 output of exactly output.len() bytes.
Verify one Merkle inclusion proof against root.
Types
14 members
A fixed 32-byte SHAKE-256 digest.
Source10 members
A non-owning mutable byte range that is securely erased when reset or dropped. Linux page locking is best effort and observable through Self::is_locked. The borrow guarantees that the backing range remains alive for this guard.
SourceFunctions
Apply Keccak-f[1600] independently to every 200-byte row. Errors Rejects invalid shapes, dtypes, shader address limits, allocation or recording failures.
Reduce 32-byte leaf hashes to one Merkle root. Errors Rejects invalid shapes, dtypes, shader address limits, allocation or recording failures.
Hash every row with SHAKE-128. An output_length of zero selects 16 bytes. Output rows are padded to an eight-byte boundary, matching the OA donor ABI. Errors Rejects invalid shapes, dtypes, shader address limits, allocation or recording failures.
Hash every row with SHAKE-256. An output_length of zero selects 32 bytes. Output rows are padded to an eight-byte boundary, matching the OA donor ABI. Errors Rejects invalid shapes, dtypes, shader address limits, allocation or recording failures.
Functions
Generate a random ML-DSA-65 key pair using the operating-system RNG.
Sign an arbitrary message with ML-DSA-65.
Sign a canonical OA hash with ML-DSA-65.
Verify an ML-DSA-65 message signature. Malformed encodings fail closed.
Verify ML-DSA-65 signatures on the originating Vulkan device, empty context. Each workgroup processes one (message, signature, public_key) triple. Results are device-resident U32 [batch_size]: 1 = valid, 0 = invalid or malformed. Every invalid path in the shader writes 0; no short-circuit path converts an invalid signature to valid. Arguments messages — U8 rank-1 [total_message_bytes] flat byte buffer. msg_offsets — U32 rank-1 [batch_size] byte start of each message. msg_lengths — U32 rank-1 [batch_size] byte length of each message. signatures — U8 rank-1 [batch_size × 3309] packed signatures in FIPS 204 6.4 wire format. public_keys — U8 rank-1 [batch_size × 1952] packed public keys in FIPS 204 6.2 wire format. Errors Returns an error for mismatched shapes, dtypes, engines, address limits, or an unavailable Vulkan pipeline. Out-of-range message offsets and lengths produce 0 for that row without host readback of the offset/length vectors. Status Experimental. Named software Vulkan execution is a correctness checkpoint; physical-device, performance and side-channel qualification remain separate.
Verify a selected ML-DSA batch with one shared FIPS 204 context. context is a byte range within messages, of length at most 255. Message offsets still identify each row independently; the context is a zero-copy view and is framed as 0x00 || len(context) || context || message. The context may overlap a message. Use separate batches for different contexts. All other inputs and results follow verify_batch_with_parameters. Capture retains the message value and records the context range as semantic attributes. Rebinding that input also rebinds its context bytes. This is pure ML-DSA verification, not the distinct HashML-DSA prehash interface. Errors Rejects reversed, out-of-bounds, or longer-than-255-byte context ranges, including for empty batches, plus the errors of verify_batch. This Experimental public-data route does not admit private-key execution.
Verify a batch using the selected FIPS 204 parameter set, empty context. Inputs and results follow verify_batch. Packed key and signature strides are MlDsaParameters::public_key_size and MlDsaParameters::signature_size; selecting a different parameter set never truncates, pads, or converts the encodings. Errors Rejects mismatched shapes, dtypes, engines, address limits, or unavailable Vulkan pipelines. Malformed encodings and out-of-range message rows return zero on the device. This Experimental public-data operation does not admit private-key execution or claim physical-device qualification.
Verify an ML-DSA-65 signature over a canonical OA hash.
Types
1 members
An ML-DSA-65 secret signing key. The implementation stores the standard 32-byte seed plus its expanded signing state; both are zeroized by the RustCrypto dependency on drop.
SourceEnums
FIPS 204 parameter set for device-resident batch verification. Host key and signature types in this module continue to describe ML-DSA-65.
MlDsa44 · MlDsa65 · MlDsa87
Constants & Variables
oa
Types
1 members
Batched output: x [B, …] and optional y [B, …]. Corresponds to oa::DataLoader::Batch.
Source5 members
Stateful batch iterator over a borrowed Dataset. Corresponds to oa::DataLoader.
Source3 members
Configuration for DataLoader. Corresponds to oa::DataLoaderConfig.
Source5 members
Object-safe dataset contract: indexed access and a total count. Corresponds to the C++ pure-virtual oa::Dataset base class.
Source3 members
Multi-tensor sample: input x and optional label y. Corresponds to oa::Dataset::Sample.
Source0 members
Result of a train / validation / test split. Corresponds to oa::FnDataset::SplitResult.
Source8 members
Zero-copy indexed view returned by Dataset::subset. Used for train/val/test splits, subsampling, and index filtering. get_item(i) forwards to parent.get_item(indices[i]) without copying data. Corresponds to oa::DsSubset.
SourceFunctions
Stack samples into a leading batch dimension using device-side concatenation. Inputs must be nonempty matrices of rank at most three, with any admitted Matrix dtype (U8, F32, I32, or U32). Labels must be present on every sample or absent on every sample. Each component must have equal shapes, dtypes, and one engine owner. A one-sample batch reuses its Matrix storage through zero-copy views. No default Engine or host readback is used. Errors Returns an error for empty input, inconsistent samples, unsupported rank, allocation failure, or GPU recording failure.
Randomly split indices into train, validation, and test subsets. Matches donor FnDataset::randomSplit: clamp train to [0, 1] and validation to [0, 1 - train], truncate their FP32 counts, and assign the remainder to test. The donor header’s claim that the remainder goes to train contradicts its implementation; this port follows the implementation. Errors Returns an error for a negative size, non-finite ratios, allocation failure, or failure to derive a clock seed when seed is zero.
Fisher-Yates shuffle using the donor’s PCG32 stream and unbiased rejection. A nonzero seed reproduces the C++ oa::Random(seed) permutation. Zero uses the system clock. This generator is for sampling, not cryptography. Errors Returns an error when seed zero cannot be derived from the system clock.
Types
1 members
Batched output: x [B, …] and optional y [B, …]. Corresponds to oa::DataLoader::Batch.
Source5 members
Stateful batch iterator over a borrowed Dataset. Corresponds to oa::DataLoader.
Source3 members
Configuration for DataLoader. Corresponds to oa::DataLoaderConfig.
Source5 members
Object-safe dataset contract: indexed access and a total count. Corresponds to the C++ pure-virtual oa::Dataset base class.
Source3 members
Multi-tensor sample: input x and optional label y. Corresponds to oa::Dataset::Sample.
Source0 members
Result of a train / validation / test split. Corresponds to oa::FnDataset::SplitResult.
Source8 members
Zero-copy indexed view returned by Dataset::subset. Used for train/val/test splits, subsampling, and index filtering. get_item(i) forwards to parent.get_item(indices[i]) without copying data. Corresponds to oa::DsSubset.
Sourceoa
Types
16 members
Handle-free lifetime and stable-frame evidence for one captured resource. Resource IDs follow deterministic graph-resource order and never expose a Vulkan handle or bindless descriptor. Alias-candidate state records completed liveness, external-output, and storage-owner qualification; physical storage is not shared until a later materialization stage succeeds transactionally.
Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.
Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.
Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.
Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.
Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.
Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.
Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.
Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.
3 members
Hardware identity and resource facts captured at engine construction. Vulkan limits and exposed memory capacity can change with driver policy. Budget and usage are snapshots, not immutable hardware properties. Descriptor capacities describe the allocated heap after negotiation.
Source27 members
Immutable device facts captured for the device owned by one engine. Composes DeviceHardwareInfo (PCI, local memory, limits, queue presence) and DeviceSoftwareInfo (driver/API version, feature booleans).
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
3 members
Immutable software facts for the device owned by one engine. These reflect the installed driver: API version, driver version, driver identity, and queried feature support. They may change across driver updates without any hardware change.
Source7 members
Discovery-only identity for an enumerated Vulkan device. Includes software and unsupported devices. Discovery creates no logical device or pipelines and does not imply OA admission. Indices belong to the current loader/ICD enumeration; they are not persistent device identities.
Source19 members
Sole owner of OA’s local execution services. The current one-device recorder is thread-affine. Engine intentionally remains neither Send nor Sync until concurrent queue scheduling and submission synchronization are implemented and verified.
Examples
9 members
Configuration used to construct one OA execution engine.
Source8 members
Optional services that the selected device must provide. Compute is always required. These predicates constrain physical-device admission before the logical device is created; they do not expose kernel selection or vendor policy. Presentation readiness proves a graphics queue and swapchain support for an instance created with surface extensions. The eventual Presenter still verifies the concrete window surface.
Source6 members
Exact completion point for work submitted to an OA engine. Dropping an event never waits. The originating engine’s retirement service keeps submitted resources and their Vulkan device alive through completion.
Source13 members
Engine-associated executable work captured for repeated submission. The captured executable structure is immutable. Read-only Matrix inputs may be rebound to shape- and dtype-identical storage; changing a binding invalidates the recorded Vulkan command while preserving the graph identity. Unchanged untimed replays share one simultaneously submittable command buffer.
Source46 members
7 members
Compact one-to-four-character diagnostic component tag.
Source11 members
Configuration for the logging session owned by an Engine.
Source22 members
Engine-borrowing presentation session. Construction creates and owns the SDL3 Vulkan surface, then records whether the Engine’s retained graphics queue can present to that exact surface. Swapchain acquire/present is intentionally the next lifecycle phase rather than a fabricated method on this real surface session.
Create a presentation session for one SDL3 window. The Engine must have been built using EngineRequirements::presentation() and window.required_instance_extensions().
5 members
Proven storage alias from one fresh semantic output version to its input.
Source10 members
Provenance between one forward output and its autograd tape expansion.
Source19 members
12 members
Deterministic many-to-many provenance summary for semantic lowering.
Source19 members
7 members
Canonical graph-local identity of one semantic operation.
Source8 members
Deterministic bridge from one semantic value to a captured resource.
Source20 members
7 members
Canonical graph-local identity of one semantic value.
SourceEnums
Broad Vulkan physical-device kind reported for diagnostics. Election never assigns a performance rank to this value. Integrated, discrete, virtual, and other hardware all compete using queried features and resource capacities.
Integrated · Discrete · Virtual · Cpu · Other
Severity threshold and record level for OA diagnostics.
Trace = 0 · Debug = 1 · Info = 2 · Warn = 3 · Error = 4 · Fatal = 5 · Off = 6
Types
16 members
Handle-free lifetime and stable-frame evidence for one captured resource. Resource IDs follow deterministic graph-resource order and never expose a Vulkan handle or bindless descriptor. Alias-candidate state records completed liveness, external-output, and storage-owner qualification; physical storage is not shared until a later materialization stage succeeds transactionally.
Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.
Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.
Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.
Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.
Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.
Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.
Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.
Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.
3 members
Hardware identity and resource facts captured at engine construction. Vulkan limits and exposed memory capacity can change with driver policy. Budget and usage are snapshots, not immutable hardware properties. Descriptor capacities describe the allocated heap after negotiation.
Source27 members
Immutable device facts captured for the device owned by one engine. Composes DeviceHardwareInfo (PCI, local memory, limits, queue presence) and DeviceSoftwareInfo (driver/API version, feature booleans).
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
3 members
Immutable software facts for the device owned by one engine. These reflect the installed driver: API version, driver version, driver identity, and queried feature support. They may change across driver updates without any hardware change.
Source7 members
Discovery-only identity for an enumerated Vulkan device. Includes software and unsupported devices. Discovery creates no logical device or pipelines and does not imply OA admission. Indices belong to the current loader/ICD enumeration; they are not persistent device identities.
Source19 members
Sole owner of OA’s local execution services. The current one-device recorder is thread-affine. Engine intentionally remains neither Send nor Sync until concurrent queue scheduling and submission synchronization are implemented and verified.
Examples
9 members
Configuration used to construct one OA execution engine.
Source8 members
Optional services that the selected device must provide. Compute is always required. These predicates constrain physical-device admission before the logical device is created; they do not expose kernel selection or vendor policy. Presentation readiness proves a graphics queue and swapchain support for an instance created with surface extensions. The eventual Presenter still verifies the concrete window surface.
Source6 members
Exact completion point for work submitted to an OA engine. Dropping an event never waits. The originating engine’s retirement service keeps submitted resources and their Vulkan device alive through completion.
Source13 members
Engine-associated executable work captured for repeated submission. The captured executable structure is immutable. Read-only Matrix inputs may be rebound to shape- and dtype-identical storage; changing a binding invalidates the recorded Vulkan command while preserving the graph identity. Unchanged untimed replays share one simultaneously submittable command buffer.
Source46 members
7 members
Compact one-to-four-character diagnostic component tag.
Source11 members
Configuration for the logging session owned by an Engine.
Source3 members
Backend-neutral surface capabilities used to validate a future swapchain.
Source4 members
Select the valid swapchain extent for one SDL drawable-pixel extent. None means the window is minimized and callers must defer allocation or acquisition until SDL reports a non-zero drawable extent.
22 members
Engine-borrowing presentation session. Construction creates and owns the SDL3 Vulkan surface, then records whether the Engine’s retained graphics queue can present to that exact surface. Swapchain acquire/present is intentionally the next lifecycle phase rather than a fabricated method on this real surface session.
Create a presentation session for one SDL3 window. The Engine must have been built using EngineRequirements::presentation() and window.required_instance_extensions().
5 members
Proven storage alias from one fresh semantic output version to its input.
Source10 members
Provenance between one forward output and its autograd tape expansion.
Source19 members
12 members
Deterministic many-to-many provenance summary for semantic lowering.
Source19 members
7 members
Canonical graph-local identity of one semantic operation.
Source8 members
Deterministic bridge from one semantic value to a captured resource.
Source20 members
7 members
Canonical graph-local identity of one semantic value.
SourceEnums
Broad Vulkan physical-device kind reported for diagnostics. Election never assigns a performance rank to this value. Integrated, discrete, virtual, and other hardware all compete using queried features and resource capacities.
Integrated · Discrete · Virtual · Cpu · Other
Severity threshold and record level for OA diagnostics.
Trace = 0 · Debug = 1 · Info = 2 · Warn = 3 · Error = 4 · Fatal = 5 · Off = 6