mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-09-05 17:32:26 +00:00
wasi-nn: do not pretend to support legacy abi in openvino and llamacpp (#4468)
as tested by core/iwasm/libraries/wasi-nn/test/test_tensorflow.c, the legacy "wasi_nn" abi uses the number of fp32 for get_output. because these backends don't implement the abi, bail out explicitly in build time. cf. https://github.com/bytecodealliance/wasm-micro-runtime/issues/4376
This commit is contained in:
parent
933e49df18
commit
56f87b7ee9
|
@ -17,6 +17,10 @@ extern char const *LLAMA_COMMIT;
|
||||||
extern char const *LLAMA_COMPILER;
|
extern char const *LLAMA_COMPILER;
|
||||||
extern char const *LLAMA_BUILD_TARGET;
|
extern char const *LLAMA_BUILD_TARGET;
|
||||||
|
|
||||||
|
#if WASM_ENABLE_WASI_EPHEMERAL_NN == 0
|
||||||
|
#error This backend doesn't support legacy "wasi_nn" abi. Please enable WASM_ENABLE_WASI_EPHEMERAL_NN.
|
||||||
|
#endif
|
||||||
|
|
||||||
// compatible with WasmEdge
|
// compatible with WasmEdge
|
||||||
// https://github.com/second-state/WasmEdge-WASINN-examples/blob/master/wasmedge-ggml/README.md#parameters
|
// https://github.com/second-state/WasmEdge-WASINN-examples/blob/master/wasmedge-ggml/README.md#parameters
|
||||||
// https://github.com/WasmEdge/WasmEdge/blob/master/plugins/wasi_nn/ggml.cpp
|
// https://github.com/WasmEdge/WasmEdge/blob/master/plugins/wasi_nn/ggml.cpp
|
||||||
|
|
|
@ -9,6 +9,10 @@
|
||||||
|
|
||||||
#include "openvino/c/openvino.h"
|
#include "openvino/c/openvino.h"
|
||||||
|
|
||||||
|
#if WASM_ENABLE_WASI_EPHEMERAL_NN == 0
|
||||||
|
#error This backend doesn't support legacy "wasi_nn" abi. Please enable WASM_ENABLE_WASI_EPHEMERAL_NN.
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* refer to
|
* refer to
|
||||||
* https://docs.openvino.ai/2024/openvino-workflow/running-inference/integrate-openvino-with-your-application.html
|
* https://docs.openvino.ai/2024/openvino-workflow/running-inference/integrate-openvino-with-your-application.html
|
||||||
|
|
Loading…
Reference in New Issue
Block a user