Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative backends #333

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Alternative backends #333

wants to merge 7 commits into from

Conversation

decahedron1
Copy link
Member

@decahedron1 decahedron1 commented Dec 14, 2024

This PR adds runtimes other than the ONNX Runtime.

There are plenty of alternative ONNX inference engines for Rust that each provide their own unique qualities:

  • candle boasts impressive performance and GPU acceleration.
  • tract is a battle-tested pure-Rust inference engine with excellent operator support.
  • wonnx focuses on broader GPU support is designed for the web.

With the removal of wasm32-unknown-unknown support from ort, and the Sisyphean task of getting the damn thing to link, it's clear that ONNX Runtime isn't always the best choice. Most often, though, it is the best choice for one platform, but not another. Applications wishing to target CUDA on desktop and WebGPU on web would need to have 2 different code paths using ort and wonnx. Adding support for wonnx & others directly in ort would mean that developers only need to use the ort API to target both backends, and only a single line of code is required to switch between them, e.g. ort::set_api(ort_candle::api());

Status

  • ort-candle
    • PoC
    • Tensor values
    • Session creation
    • Inference
    • Alternative 'execution providers' - appears to currently be unsupported by candle-onnx?
    • IoBinding
  • ort-tract
    • PoC
    • Tensor values
    • Session creation
    • Inference
  • ort-wonnx

p.s., sponsorships allow me to spend more time on this PR =)

@decahedron1 decahedron1 added the enhancement New feature or request label Dec 14, 2024
@decahedron1 decahedron1 self-assigned this Dec 14, 2024

This comment was marked as outdated.

@decahedron1 decahedron1 marked this pull request as draft December 14, 2024 06:15
@decahedron1 decahedron1 marked this pull request as ready for review December 30, 2024 15:56
@decahedron1 decahedron1 force-pushed the alternative-backends branch from 2ff9175 to f6f1f83 Compare January 8, 2025 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant