Skip to main content

Module auto_offload

Module auto_offload 

Source
Expand description

Pre-instantiation auto-offload analysis.

Walks Wasm bytes via wasmparser, extracts per-function operator sequences shaped like basic blocks, and runs each through tensor_wasm_jit::detector::classify. Verdicts are emitted as tracing events so operators can see which kernels would be GPU-offloaded once Wasmtime exposes the per-block compile hook documented in docs/WASMTIME-FORK.md.

This is consultation-only: the analysis runs, but Wasmtime’s Cranelift output is NOT replaced. Activating the swap requires the rewrite pipeline in tensor_wasm_jit::rewrite.

Structs§

OffloadVerdict
A single classification result for one function body.

Enums§

AnalyseError
Errors raised by the analyser.

Functions§

analyse
Analyse Wasm bytes, emit per-function tracing events, and return the list of verdicts, using the default detector configuration (DetectorConfig::default).
analyse_with_config
Analyse Wasm bytes against an explicit detector configuration, emit per-function tracing events, and return the list of verdicts.