bytecodealliance / bytecodealliance/wasi-nn

Problem with wasi-nn 0.6.0 TensorType

Open
#98 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
CSS
Stars
55
Forks
36
PR merge metrics
No merged PRs in 30d

Description

I was running a wasmedge server with inference support cloned from [here](https://github.com/WasmEdge/wasmedge_hyper_demo/tree/main/server-tflite), but with newer dependencies and was facing an error in the `GraphExecutionContext`'s `set_input` function.
It was an issue with the `TensorType` parameter. I was passing `U8` but it was causing an error in the function
`[error] [WASI-NN] Expect tensor type U8, but got I32`

It works in wasi-nn 0.4, 0.5 but breaks in 0.6
Now I almost found the change and reason it is happening, [This](https://github.com/bytecodealliance/wasi-nn/commit/f3cf58396856449b5d5e6eb2d51c1c00e44999fa) commit is changing the order of the generated TensorType enum (The new position of U8 is the previous position of I32).
So I tried setting the input with `TensorType::F64` and it worked.

I couldn't figure out where it is breaking though. Since these are just the bindings for rust, I would like to know where the implementation of it is.
I would love to help if someone can point me in the right direction...

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.