A High performance and tiny TVM graph executor library written in C which can compile to WebAssembly and use CUDA/WebGPU as the accelerator.
| Toolchain | Target | Backend | Runtime |
|---|---|---|---|
| wasi-sdk | WebAssembly | CPU | wasmer, WasmEdge, wasmtime, etc. |
| wasi-sdk | WebAssembly | CUDA | wasmer-gpu (not open-sourced now) |
| emscripten | WebAssembly | CPU | browser, nodejs |
| emscripten | WebAssembly | WebGPU | browser, nodejs (need dawn.node) |
| clang/gcc | native(x86_64,aarch64,etc.) | CPU | / |
| clang/gcc | native(x86_64,aarch64,etc.) | CUDA | / |
| clang/gcc | native(x86_64,aarch64,etc.) | WebGPU | link with use dawn or webgpu-native |
- cmake
- C compiler (clang/gcc/msvc for native target, wasi-sdk/emscripten for WebAssembly target)
WebAssembly target toolchain download: wasi-sdk github repo, emsdk github repo
USE_WASI_SDK: If use the wasi-sdk, set/path/to/wasi-sdkor setON/AUTO/TRUEto use default/opt/wasi-sdk.USE_EMSDK: If use the emscripten, set/path/to/emsdkor setON/AUTOTRUEto use default/opt/emsdk`.
Sample: build the wasm32-wasi target with CUDA support, the target can run with wasmer-gpu.
mkdir -p build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DUSE_WASI_SDK=ON
ninjaSee the examples