Hello! TVM looks like a nice project and is very exciting. I am keen to start a discussion around WebGPU native support: is there interest in it? how hard would it be to add? is anyone else keen to work on/collaborate on this?
For context; WebGPU native provides the same benefits as WebGPU in the browser, but natively on Windows/Linux/Mac/Android/iOS/etc. and is quickly rising as an appreciated graphics abstraction API for native applications.
I am specifically interested in this as we’re building a game engine and desktop/mobile app framework in Zig which uses WebGPU native as our graphics backend, it’d be nice to be able to use TVM with games and apps built with it.
My understanding is that TVM today has a web/
backend which can produce WGSL code on its own; I also found the web/emcc
directory which appears to be a TVM backend directing calls through emscripten to JS. tvm/web/src/runtime.ts
seems to be the bulk of the implementation otherwise which I assume would need to be ported to C/C++.
To complicate matters a bit, although WebGPU native implementations generally share the same native APIs, they do differ somewhat. The Rust/Mozilla wgpu-native webgpu.h
API is not exactly the same as the Dawn/Chrome webgpu.h
API-the biggest differences are around initialization of how WebGPU gets set up, so I think if it was usable in library form (desirable anyway) then it would mostly be fine as the compute APIs should be the same otherwise. The most ideal setup would be if the user could supply their own webgpu.h
header as part of compilation to ensure the implementation is compatible with what TVM targets.
I’m also curious if this has to be implemented in the TVM source tree, or if it is reasonable to implement as a separate project which depends on TVM?
Thanks for your time/thoughts