WasmEdge / WasmEdge

WasmEdge is a lightweight, high-performance, and extensible WebAssembly runtime for cloud native, edge, and decentralized applications. It powers serverless apps, embedded functions, microservices, smart contracts, and IoT devices.

Home Page:https://WasmEdge.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LFX Workspace: Integrate burn.rs as a new WASI-NN backend

derekwin opened this issue · comments

Summary

Motivation
Burn.rs is a new comprehensive dynamic Deep Learning Framework built using Rust with extreme flexibility, compute efficiency and portability as its primary goals. The task of this project is to integrate burn.rs as a WASI-NN backend in the form of a plugin within wasmedge.

Details

Milestones:

  1. The basics of Burn.rs: (week2)

  2. The basics of Burn.rs: (week3)

  3. Implement the detail of burn.rs plugin: (week4-8)

  4. The Unit test and examples code: (weeks9-10)

    • complete all test.
    • Design and implement some usages examples.
  5. Documents and Tutorials: (week11)

    • Finish the documents and tutorials of this plugin.
  6. 1 week as buffer for unexpected delay.

Appendix

Please notice that we are using wasmedge-wasi-nn, which is forked from wasi-nn with some LLM-required extensions
You can focus on the original wasi-nn spec first because our modification extends the original spec. Once finishing the basic features, you can move forward to support the whole wasmedge-wasi-nn extensions.

ok, i have added the wasmedge-wasi-nn to the plan.

week1 update:
After discussing with mentor, the following viewpoints were obtained:

  • Plug-in development will only focus on inference.
  • Plug-in development don't need no_std, only support native platform.
  • Plug-in development should focus on how to encapsulate the contents of burn.rs into the form required by wasmedge-wasi-nn
  • burn.rs may have provided some similar data structures like wasi-nn.

week2 update:

  • Conducted an in-depth study on the differences between wasi-nn and wasmedge-wasi-nn.
  • Essentially determined the division of mods.
  • Basically confirmed the structure of plugin implementation.
  • Sorted out the code logic of the relevant parts in burn.rs.

More details: https://zrsnlqw1xd.feishu.cn/docx/DOYodYbeSoMRuQx82YacWuUpnzc?from=from_copylink

week3&4 update:

  • Constructed the initial framework for the plugin.
  • At Wednesday's meeting, with the assistance of Hydai, clarified the use of 'loadbynamewithconfig' to address the multi-backend adaptation issue in Burn.
  • The device will be also determined by metadata and auto.

Since the mentee is no longer working on this mission, closing this. Thanks @derekwin