Summary
The Spore WASM kernel (crates/symthaea-spore/) currently runs all HDC operations on CPU. WebGPU could accelerate bulk XOR/bind/bundle operations on 16,384-dimensional binary hypervectors.
Hot path to accelerate
- Encode — text/numeric to 16,384D binary hypervector
- Bind — XOR-based binding (associative memory)
- Bundle — majority-vote bundling (set union)
- Similarity — Hamming distance computation
These operations are embarrassingly parallel across the 16,384 dimensions and across batch inputs.
Constraints
- Current WASM binary size: 324KB (budget: 500KB)
- WebGPU adds ~50-100KB of binding overhead
- Must fall back gracefully to CPU when WebGPU is unavailable
- The
wgpu crate supports WebGPU targets via wasm-bindgen
Architecture considerations
- Compute shaders for bulk XOR (bind) and popcount (similarity)
- Buffer management for hypervector pools
- Async GPU readback vs synchronous CPU fallback
- Integration with the existing Spore module system (10 modules)
References
- wgpu — Rust WebGPU implementation
- WebGPU spec — W3C standard
- Spore browser demo uses tabbed UI with cognitive subsystem visualization
Summary
The Spore WASM kernel (
crates/symthaea-spore/) currently runs all HDC operations on CPU. WebGPU could accelerate bulk XOR/bind/bundle operations on 16,384-dimensional binary hypervectors.Hot path to accelerate
These operations are embarrassingly parallel across the 16,384 dimensions and across batch inputs.
Constraints
wgpucrate supports WebGPU targets viawasm-bindgenArchitecture considerations
References