-
Notifications
You must be signed in to change notification settings - Fork 21
Modernise, update to Ort 2.0.0-rc.11 #47
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
Open
serpent213
wants to merge
11
commits into
elixir-nx:main
Choose a base branch
from
serpent213:refactor-modernise-clean
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+1,012
−810
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- replace rustler::resource! load closure with explicit ResourceTypeProvider impls and atomic resource type storage to avoid non-local impl warnings - register OrtexModel/OrtexTensor resource types once in load, using compare_exchange to avoid races - clarify lifetimes in concatenate macro filter helper to silence mismatched_lifetime_syntaxes - annotate initialize_from_raw_ptr return lifetime for the ArrayViewMut to match elision rules - drop unused lifetimes on NIF wrappers for slice/reshape/concatenate
- Validate binary size/shape and copy data safely instead of using raw pointers
- Respect element limits in to_binary and report invalid element sizes
- Convert slice/concat/reshape paths to return NIF errors instead of panics
- Check input counts and missing outputs in model run
- Handle bool tensors and unsupported types without crashing
- Make Elixir backend raise on NIF {:error, msg} responses
- deps update: bump nx/exla/torchx/tokenizers and update mix.lock - Update rustler crate to 0.37 and refresh Cargo.lock - Switch resource registration to resource_impl and new init macro - Mark OrtexModel unwind-safe for NIF returns - Suppress ORT lib warnings in test env while keeping explicit ORT_LIB_LOCATION errors
- bump ort to 2.0.0-rc.11 and align ndarray/half versions - adapt NIF to ort rc.11 API (session accessors, inputs/outputs, execution providers) - rework tensor conversions to use ort Value/Tensor APIs and handle unsupported dtypes - serialize access to Session to satisfy mutable run API - drop unused direct deps (rustls, tracing-subscriber, num-traits)
- NIF: require exact binary size for from_binary and return errors for unknown execution providers - NIF init now surfaces EP mapping errors instead of falling back to CPU - Backend inspect respects element limits when building binaries - Serving: use explicit Nx.Defn.Evaluator opts per partition instead of brittle jit_apply defaults - Docs: explain ORTEX_FEATURES and OS defaults - HEADS-UP: Linux now defaults to CPU-only unless ORTEX_FEATURES enables GPU providers
- Tests now exercise each concrete dtype instead of defaulting to s16
Gate Rustler crate compilation on ORTEX_SKIP_COMPILE so packagers can use prebuilt NIFs Document the precompiled-NIF workflow and env var in README for maintainers
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Modernise Ortex, increase robustness and packageability.
Requires ONNX >= 1.23.x (API 23). Linux build defaults for GPU changed!
See commit messages for details.
Tests untouched, except for small fix. Tested manually (a little) on arm64 (Darwin/Nix, devenv.sh, in-build downloads) and amd64 (NixOS, Nix package, sandboxed build).
Most work performed by Codex 5.2 under human supervision.