wasi-nn: Apply new architecture (#3692)

ps.
https://github.com/bytecodealliance/wasm-micro-runtime/issues/3677
This commit is contained in:
liang.he
2024-08-13 09:14:52 +08:00
committed by GitHub
parent 4e31bd63b7
commit 140ff25d46
14 changed files with 482 additions and 315 deletions

View File

@ -0,0 +1,20 @@
/*
* Copyright (C) 2019 Intel Corporation. All rights reserved.
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
*/
#ifndef WASI_NN_HOST_H
#define WASI_NN_HOST_H
#include "lib_export.h"
uint32_t
get_wasi_nn_export_apis(NativeSymbol **p_native_symbols);
bool
wasi_nn_initialize();
void
wasi_nn_destroy();
#endif /* WASI_NN_HOST_H */

View File

@ -126,6 +126,7 @@ typedef enum {
tensorflowlite,
ggml,
autodetect,
unknown_backend,
} graph_encoding;
// Define where the graph should be executed.
@ -161,9 +162,6 @@ typedef struct {
BACKEND_DEINITIALIZE deinit;
} api_function;
bool
wasi_nn_register_backend(api_function apis);
void
wasi_nn_dump_tensor_dimension(tensor_dimensions *dim, int32_t output_len,
char *output);