Exploit Parallelism for AI Workloads with WASM and OpenMP
summary
Compiles the OpenMP runtime to WebAssembly (wasm32 with wasi-threads), runs binaries in wasmtime, and fixes porting issues like missing pthread_exit, unimplemented common symbols and varargs-induced deadlocks (adds a wasm backtrace to debug). Demonstrates matrix multiply: single-thread 14s → OpenMP 1.7s, larger case 17.6s → transpose+block 7.5s; SIMD flags cut 14s→9s. Shows blocking, OpenMP tile pragmas and SIMD get huge gains (native up to ~2000x vs naive, wasm ~785x); CNN kernel gets ~13.5x (native ~40x).
AI-written summary · about
chapters (13)
- 0:00AI and WebAssembly intro
- 1:05Optimizing OpenMP for WASM
- 2:29Threads challenges in WASM
- 3:11OpenMP parallel framework
- 5:19Compiling OpenMP to WASM
- 6:03Problems compiling OpenMP to WASM
- 8:57Live demo: matrix multiply
- 13:20Matrix multiply performance
- 16:26Optimizing cache blocking & vectorization
- 18:12Optimizing convolutional networks
- 21:02Results and limitations
- 22:24Contact & resources
- 22:53Q&A
related talks
26mA journey of multithreading using WebAssembly
35mBoost your JavaScript app
31mRunning AI workloads with WASM - is it production ready? [Panel]
53mWebAssembly
01h 42mWebAssembly: Writing Once and Running Everywhere NG
11mLightning Talk: MPIWasm: Executing WebAssembly on HPC Systems
28mWebAssembly: Of Portability, and Performance
30mRunning WASM in React Native apps
