ChihweiLHBird opened PR #15056 from ChihweiLHBird:wasi-nn-onnx-input-types to bytecodealliance:main:
The ONNX backend can decode only
f32input tensors. For other types,computereturnsUnsupportedTensorType, so models that takei64token IDs cannot run.This change decodes input tensors of all seven wasi-nn tensor types with one generic helper. For
f16andbf16, it turns on thehalffeature ofortand addshalfas a dependency.half2.4.1 is already inCargo.lock, so no new crate comes in. The setup step now also accepts models withf16andbf16tensors. The change also removesbytes_to_f32_vec, which has no users now.Outputs are still
f32only. That can be a follow-up.CI does not run the wasi-nn tests. To run the new unit tests:
cargo test -p wasmtime-wasi-nn --features onnx-download --lib
ChihweiLHBird removed the review request for wasmtime-wasi-reviewers from PR #15056.
ChihweiLHBird requested rvolosatovs for a review on PR #15056.
ChihweiLHBird requested wasmtime-wasi-reviewers for a review on PR #15056.
ChihweiLHBird requested fitzgen for a review on PR #15056.
ChihweiLHBird removed the review request for wasmtime-default-reviewers from PR #15056.
ChihweiLHBird requested wasmtime-default-reviewers for a review on PR #15056.
ChihweiLHBird commented on PR #15056:
CC: @rahulchaphalkar
ChihweiLHBird commented on PR #15056:
CC: @alexcrichton
Last updated: Oct 31 2026 at 23:03 UTC