Giter Club home page Giter Club logo

wasmedge-wasinn-examples's Introduction

WasmEdge WASI-NN Examples

High-level bindings for writing wasi-nn applications

CI status

Introduction

This project provides the examples of high-level wasi-nn bindings and WasmEdge-TensorFlow plug-ins on Rust programming language. Developers can refer to this project to write their machine learning application in a high-level language using the bindings, compile it to WebAssembly, and run it with a WebAssembly runtime that supports the wasi-nn proposal, such as WasmEdge.

Prerequisites

OpenVINO Installation

Developers should install the OpenVINO first before build and run WasmEdge with wasi-nn and the examples. For this project, we use the version 2023.0.0. Please refer to WasmEdge Docs and OpenVINO™(2023)

wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
echo "deb https://apt.repos.intel.com/openvino/2023 ubuntu20 main" | sudo tee /etc/apt/sources.list.d/intel-openvino-2023.list
sudo apt update
sudo apt-get -y install openvino
ldconfig

Rust Installation

For building the WASM files from rust source, please refer to the Rust Official Site for the Rust installation. After the installation, developers should add the wasm32-wasi target.

rustup target add wasm32-wasi

Download the wasi-nn Rust Crate

In Rust, download the crate from crates.io by adding wasi-nn = "0.4.0" as a Cargo dependency.

For using WasmEdge-TensorFlow plug-ins, please download the crate from crates.io by adding wasmedge_tensorflow_interface = "0.3.0" as a Cargo dependency.

WasmEdge Installation

You can refer to here to install WasmEdge.

For the examples with different wasi-nn backends or using the WasmEdge-Tensorflow plug-ins, please install with plug-ins and their dependencies:

Examples

Mobilenet

Related Links

License

This project is licensed under the Apache 2.0 license. See LICENSE for more details.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.

wasmedge-wasinn-examples's People

Contributors

q82419 avatar apepkuss avatar charles-schleich avatar gusye1234 avatar juntao avatar mash707 avatar shivaylamba avatar dm4 avatar hydai avatar captainvincent avatar yanghaku avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.