I'm curious to know does WASI need to implement capabilities to execute GPU code? All of the efforts around WASM/WASI has been around CPU compute, but a great deal of ML/AI is done on GPU. So wandering where the community stands in regards to this effort :smile:
wasi-nn has an execution-target that includes GPUs. A while back I experimented with inferences on a GPU (with OpenVINO, FWIW) and things seemed to work fine.
Sorry for jumping in. I also have a question about execution-target
Now I want to use NPU(DSP) for AI/ML task. It seems external_delegation is used for TFLite. So I want to say it doesn't seem GPU, TPU, but extra AI/ML accelerator.
In this case, which execution-target should I use? gpu or tpu ?
I am asking it because I am trying to push this implementation to WAMR.
@Ayako Akasaka, if you feel like it is a sufficiently different execution target than the ones that currently exist and TFLite also has explicit support for it, you could submit a PR to add it to the wasi-nn execution-target list.
@Andrew Brown Thank you for the reply. I will consider creating PR for it
Do we have any general interface for this ? except that WASI-NN specifically is for ML inference. I went through the wasi-nn.wit that defines the core abstractions. But unable to understand if the api can be extended in a general way, or if creation of new api is possible without making it too complicated! We have wasi-gfx, which as far as I understood is for graphics and wgpu too
what do you want to do?
you can also define your own custom api in WIT; not everything needs to be "wasi", but if it's largely generalizable......
Last updated: Dec 06 2025 at 06:05 UTC