WebAssembly / wasi-nn

Neural Network proposal for WASI
429 stars 34 forks source link

Help understanding codebase? #45

Closed AnonymousAmalgrams closed 11 months ago

AnonymousAmalgrams commented 11 months ago

I was asked to work on a ggml backend for your wasi-nn proposal but I’m honestly not that familiar with rust, nor do I really have any experience with crate type things. If you don’t mind, I would like to ask a bit about implementation details. If I’m understanding the codebase correctly, would it be valid to add a new number as a value graphencoding target in generated.rs and assume that graph.rs will properly direct it past that? I also noticed that the backend is implemented off of some sort of generated wasi_ephemeral_nn package, where can I find it? I don’t fully understand what was meant in the byte code alliance article by Andrew Brown 3 years ago on the matter and would like to go through it if possible to try and figure things out. Should I build a new crate implementing all the relevant functions for my new backend? How would I get it inserted into wasi-nn after? I realize this might be a bit much but I’m truly a little lost with all of this so if I could borrow a bit of time any assistance would be greatly appreciated. Thanks in advance!