Coder Social home page Coder Social logo

uchiiii / altius Goto Github PK

View Code? Open in Web Editor NEW

This project forked from maekawatoshiki/altius

0.0 0.0 0.0 3.54 MB

Small ONNX inference runtime written in Rust

License: MIT License

Shell 0.78% C++ 2.70% Python 12.59% C 0.36% Rust 81.75% TypeScript 1.13% CSS 0.05% Cuda 0.43% Makefile 0.15% HTML 0.06%

altius's Introduction

altius

CI codecov

Small ONNX inference runtime written in Rust

Feel free to create issues and discussions

Requirements

  • Python 3.x (Used in some tests; You can disable them by just ignoring tests in ./altius-py)

Run

# Download large models.
(cd models && ./download.sh)

# Run examples.
# {mnist, mobilenet, deit, vit} are available.
# You can specify the number of threads for computation by editing the code.
./run.sh mnist
./run.sh mobilenet
./run.sh deit
./run.sh vit

# Experimental CPU backend (that generates code in C)
./run_cpu.sh mnist_cpu --iters 3
./run_cpu.sh mobilenet_cpu --iters 3 --profile
./run_cpu.sh deit_cpu --iters 3 --threads 8 --profile

# On macOS, you can use 'accelerate' library.
cargo run --release --features accelerate --example mobilenet

Run from WebAssembly

Currently, mobilenet v3 runs on web browsers.

cd wasm
cargo install wasm-pack
wasm-pack build --target web
yarn
yarn serve

Run from Python

cd altius-py
python -m venv .env
source .env/bin/activate
pip install -r requirements.txt
RUSTFLAGS="-C target-cpu=native" maturin develop -r --features blis
python mobilenet.py

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.