Skip to main content

Module wasm

Module wasm 

Source
Expand description

WASM/SIMD integration for browser-based inference (spec §L) WASM/SIMD Integration Module

Provides WebAssembly support for browser-based inference with SIMD acceleration.

§QA Verification (Section L: 15 points)

  • L1: wasm32-unknown-unknown target compiles
  • L2: SIMD128 feature enabled in WASM
  • L3: WASM module size <5MB (without model)
  • L4: WASM loads in <500ms (tested in browser)
  • L5: Memory.grow() works for model loading
  • L6-L15: See tests below

§References

Structs§

SimdVerification
SIMD operation results for verification
WasmInferenceSession
WASM inference session for streaming token generation
WasmMemoryConfig
WASM memory configuration for model loading
WasmTensorView
Zero-copy view into WASM linear memory

Functions§

dot_simd_friendly
Dot product using SIMD-friendly accumulation
matmul_simd_friendly
Matrix multiplication using SIMD-friendly layout
verify_f32x4_operations
Verify SIMD f32x4 operations produce correct results
verify_i32x4_operations
Verify SIMD i32x4 operations produce correct results

Type Aliases§

MatrixF64
Type alias for f64 matrices (standard precision)
VectorF64
Type alias for f64 vectors (standard precision)