This repository has been archived on 2023-11-05. You can view files and clone it, but cannot push or open issues or pull requests.
wasm-micro-runtime/core/iwasm/libraries/wasi-nn
dependabot[bot] 2c5e7bc650
Bump tensorflow from 2.10.0 to 2.10.1 in /core/iwasm/libraries/wasi-nn/test (#1735)
Bumps [tensorflow](https://github.com/tensorflow/tensorflow) from 2.10.0 to 2.10.1.
- [Release notes](https://github.com/tensorflow/tensorflow/releases)
- [Changelog](https://github.com/tensorflow/tensorflow/blob/master/RELEASE.md)
- [Commits](https://github.com/tensorflow/tensorflow/compare/v2.10.0...v2.10.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-22 16:21:06 +08:00
..
test Bump tensorflow from 2.10.0 to 2.10.1 in /core/iwasm/libraries/wasi-nn/test (#1735) 2022-11-22 16:21:06 +08:00
.dockerignore Integrate WASI-NN into WAMR (#1521) 2022-10-12 12:09:29 +08:00
logger.h Integrate WASI-NN into WAMR (#1521) 2022-10-12 12:09:29 +08:00
README.md Integrate WASI-NN into WAMR (#1521) 2022-10-12 12:09:29 +08:00
wasi_nn_common.h Integrate WASI-NN into WAMR (#1521) 2022-10-12 12:09:29 +08:00
wasi_nn_native.c Integrate WASI-NN into WAMR (#1521) 2022-10-12 12:09:29 +08:00
wasi_nn_tensorflow.cpp Integrate WASI-NN into WAMR (#1521) 2022-10-12 12:09:29 +08:00
wasi_nn_tensorflow.hpp Integrate WASI-NN into WAMR (#1521) 2022-10-12 12:09:29 +08:00
wasi_nn.cmake Integrate WASI-NN into WAMR (#1521) 2022-10-12 12:09:29 +08:00
wasi_nn.h Integrate WASI-NN into WAMR (#1521) 2022-10-12 12:09:29 +08:00

WASI-NN

How to use

Enable WASI-NN in the WAMR by spefiying it in the cmake building configuration as follows,

set (WAMR_BUILD_WASI_NN  1)

The definition of the functions provided by WASI-NN is in the header file core/iwasm/libraries/wasi-nn/wasi_nn.h.

By only including this file in your WASM application you will bind WASI-NN into your module.

Tests

To run the tests we assume that the current directory is the root of the repository.

  1. Build the docker image,
docker build -t wasi-nn -f core/iwasm/libraries/wasi-nn/test/Dockerfile .
  1. Run the container
docker run wasi-nn

If all the tests have run properly you will the the following message in the terminal,

Tests: passed!

What is missing

  • Only 1 model at a time is supported.
    • graph and graph-execution-context are ignored.
  • Only tensorflow (lite) is supported.
  • Only cpu is supported.