26 Commits

Author SHA1 Message Date
Carson M.
25a6760783 refactor: merge tensor module into value 2026-01-15 02:03:23 -06:00
Carson M.
98703f16cf refactor!: unify session/node/operator outlets 2025-12-13 14:11:31 -06:00
Carson M.
317be209b1 fix: let Environment drop, closes #441
Let it die, let it die! You shall die

Instead of creating an environment that lives throughout the duration of the process, we now hold the environment options we commit, and create the environment from those options (or grab the current env) whenever we need it. When all holders of the environment are dropped, the environment is dropped as well.

Previously, we held `Environment` as a static variable. Statics are never dropped, but ONNX Runtime's own destructors assumes that the environment is long gone by the time the process exits, which was not the case in `ort`! This led to issues like #441 and the dumb `0003-leak-logger-mutex.patch` from `ort-artifacts`.
2025-08-31 18:57:38 -05:00
Carson M.
d269461e21 refactor!: make metadata methods return Option<T>
The only error case occurs when the value is not present, so `Option<T>`s make more sense here.
2025-08-14 16:42:10 -05:00
Carson M.
072e162ce0 refactor!: rename extract_tensor -> extract_array, extract_raw_tensor -> extract_tensor
...and `extract_raw_map` to `extract_key_values`, but nobody cares about that
2025-03-20 00:44:15 -05:00
Carson M.
fccbf4daf7 chore: reduce dev dependencies 2025-03-17 01:00:33 -05:00
Carson M.
909e41f26a refactor!: opaque tensor shape, rename dimensions to shape 2025-03-12 22:28:18 -05:00
Carson M.
d738b1757b chore: start moving stuff off parcel 2025-02-21 23:31:14 -06:00
Carson M.
bd2aff711e refactor!: make Session::run take &mut self 2025-02-08 11:56:51 -06:00
Carson M.
9ea18d815b refactor!: allow zero-copy from_array for array views with TensorRef
This has all sorts of fun breaking changes:
- `ort::inputs!` no longer yields an `ort::Result<...>` (thank God)
- `Tensor::from_array` now only accepts owned data.
- Introduce `TensorRef::from_array_view` and `TensorRefMut::from_array_view_mut`.
- `TryFrom<A>` is no longer implemented for `Tensor<T>` for any variants.

This opens the door to new optimizations on top of fixing a few unsoundness issues.

TODO: update docs
2024-12-21 00:24:54 -06:00
Carson M.
d4f82fc50e refactor!: undo The Flattening 2024-11-12 22:19:15 -06:00
Carson M.
cdd6be7a66 chore(*): format code 2024-10-14 00:41:21 -05:00
Carson M
393f25f6e4 feat: value specialization (#178) 2024-03-27 19:45:41 -05:00
Carson M.
33938fde8b refactor: rename SessionBuilder commit methods 2024-02-28 21:17:54 -06:00
Carson M.
6e7c051a7a feat: custom ops & mutable tensors 2024-02-22 19:53:51 -06:00
Carson M.
a68370297d refactor: split out run_with_options 2024-01-12 11:12:20 -06:00
aykut-bozkurt
45f96c11bd feat: basic RunOptions support (#139) 2024-01-12 08:51:44 -06:00
Carson M.
153d7afdb9 refactor: remove model zoo URLs 2023-12-27 23:56:00 -06:00
Carson M.
534a42a80c refactor: improve onnxruntime logging 2023-12-05 16:33:40 -06:00
Carson M.
c69064f443 refactor: create environment in global OnceLock 2023-11-20 21:05:50 -06:00
Carson M.
a802cf4dc8 refactor: cleanup type names, make custom ops optional 2023-11-01 23:06:56 -05:00
Carson M.
98fd656f79 refactor: less cows and less IxDyns 2023-10-22 00:51:34 -05:00
Ivan Krivosheev
de7b70c8e6 feat: not only TensorType for Input-Output params (#102)
* ci: replace actions-rs with dtolnay/rust-toolchain (#101)

* Fixed work with parameters

* Fixed docs
2023-10-18 10:51:56 -05:00
Carson M.
9a631f1d0d simplify, fix leaks & bad error messages 2023-10-03 14:14:29 -05:00
Carson M
d54b5ece9d v2.0.0 alpha1 2023-08-16 15:03:46 -05:00
Carson M
447354a46c 1.15.0 2023-07-15 19:47:01 -05:00