WebAssembly / wasi-nn

Neural Network proposal for WASI
429 stars 34 forks source link

Add enum for tensor layout #67

Open oovm opened 4 months ago

oovm commented 4 months ago

Is it possible to add an interface to get the tensor layout (memory format) of tensor?

Such as NCHW or NWHC, I hope that incorrect arrangements can be determined and rejected in wasm ​

abrown commented 4 months ago

We've discussed this a few times in the past; maybe a summary of the current state is that we need some way to read graph metadata and potentially attach it to tensors. Your feedback on what is motivating this would be pretty helpful — can you attend the ML working group on the 18th of this month (details)?

oovm commented 4 months ago

Sorry, I can't attend this meeting, I am not an English speaker, I use Google and chatgpt to translate the conversation, but I will pay attention to the meeting minutes.

abrown commented 4 months ago

No problem; I will relay this request in the meeting then.

abrown commented 4 months ago

@oovm, we discussed this at the last ML meeting (here) and here is a summary of that discussion:

I believe there is plenty of room above the system API level for an ease-of-use wrapper library; there are the beginnings of this kind of thing over in this repository.