From 467d127c5877b099e1d0f605d38b74d221b6121c Mon Sep 17 00:00:00 2001 From: "Carson M." Date: Fri, 26 Apr 2024 19:00:51 -0500 Subject: [PATCH] 2.0.0-rc.2 --- Cargo.toml | 4 ++-- docs/introduction.mdx | 4 ++-- docs/migrating/opsets.mdx | 12 ++++++++++++ docs/migrating/v2.mdx | 2 +- docs/mint.json | 2 +- docs/perf/execution-providers.mdx | 2 +- docs/setup/cargo-features.mdx | 4 ++-- docs/setup/platforms.mdx | 2 +- ort-sys/Cargo.toml | 4 ++-- 9 files changed, 24 insertions(+), 12 deletions(-) create mode 100644 docs/migrating/opsets.mdx diff --git a/Cargo.toml b/Cargo.toml index 5939f27..e9c3ccf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ exclude = [ 'examples/cudarc' ] [package] name = "ort" description = "A safe Rust wrapper for ONNX Runtime 1.17 - Optimize and Accelerate Machine Learning Inferencing" -version = "2.0.0-rc.1" +version = "2.0.0-rc.2" edition = "2021" rust-version = "1.70" license = "MIT OR Apache-2.0" @@ -80,7 +80,7 @@ qnn = [ "ort-sys/qnn" ] [dependencies] ndarray = { version = "0.15", optional = true } thiserror = "1.0" -ort-sys = { version = "2.0.0-rc.1", path = "ort-sys" } +ort-sys = { version = "2.0.0-rc.2", path = "ort-sys" } libloading = { version = "0.8", optional = true } ureq = { version = "2.1", optional = true, default-features = false, features = [ "tls" ] } diff --git a/docs/introduction.mdx b/docs/introduction.mdx index f35ce5e..0ff676b 100644 --- a/docs/introduction.mdx +++ b/docs/introduction.mdx @@ -8,7 +8,7 @@ title: Introduction - These docs are for the latest alpha version of `ort`, `2.0.0-rc.1`. This version is production-ready (just not API stable) and we recommend new & existing projects use it. + These docs are for the latest alpha version of `ort`, `2.0.0-rc.2`. This version is production-ready (just not API stable) and we recommend new & existing projects use it. `ort` makes it easy to deploy your machine learning models to production via [ONNX Runtime](https://onnxruntime.ai/), a hardware-accelerated inference engine. With `ort` + ONNX Runtime, you can run almost any ML model (including ResNet, YOLOv8, BERT, LLaMA) on almost any hardware, often far faster than PyTorch, and with the added bonus of Rust's efficiency. @@ -33,7 +33,7 @@ Converting a neural network to a graph representation like ONNX opens the door t If you have a [supported platform](/setup/platforms) (and you probably do), installing `ort` couldn't be any simpler! Just add it to your Cargo dependencies: ```toml [dependencies] - ort = "2.0.0-rc.1" + ort = "2.0.0-rc.2" ``` diff --git a/docs/migrating/opsets.mdx b/docs/migrating/opsets.mdx new file mode 100644 index 0000000..4c2e0f1 --- /dev/null +++ b/docs/migrating/opsets.mdx @@ -0,0 +1,12 @@ +--- +title: ONNX opsets +description: Supported opsets by `ort` version +--- + +| **ort** | **ONNX opset version** | **ONNX ML opset version** | +| -------- |:----------------------:|:-------------------------:| +| v2.0.0+ | 20 | 4 | +| v1.16.0-v1.16.2 | 19 | 3 | +| v1.15.0-v1.15.5 | 19 | 3 | +| v1.14.0-v1.14.8 | 18 | 3 | +| v1.13.0-v1.13.3 | 17 | 3 | diff --git a/docs/migrating/v2.mdx b/docs/migrating/v2.mdx index 1359f03..a2f2020 100644 --- a/docs/migrating/v2.mdx +++ b/docs/migrating/v2.mdx @@ -180,7 +180,7 @@ let l = outputs["latents"].try_extract_tensor::()?; ``` ## Execution providers -Execution provider structs with public fields have been replaced with builder pattern structs. See the [API reference](https://docs.rs/ort/2.0.0-alpha.1/ort/index.html?search=ExecutionProvider) and the [execution providers reference](/perf/execution-providers) for more information. +Execution provider structs with public fields have been replaced with builder pattern structs. See the [API reference](https://docs.rs/ort/2.0.0-rc.2/ort/index.html?search=ExecutionProvider) and the [execution providers reference](/perf/execution-providers) for more information. ```diff -// v1.x diff --git a/docs/mint.json b/docs/mint.json index c870b41..8a6237b 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -22,7 +22,7 @@ "tabs": [ { "name": "API Reference", - "url": "https://docs.rs/ort/2.0.0-rc.1/ort/" + "url": "https://docs.rs/ort/2.0.0-rc.2/ort/" } ], "anchors": [ diff --git a/docs/perf/execution-providers.mdx b/docs/perf/execution-providers.mdx index 98bbf6d..03447b1 100644 --- a/docs/perf/execution-providers.mdx +++ b/docs/perf/execution-providers.mdx @@ -81,7 +81,7 @@ fn main() -> anyhow::Result<()> { ``` ## Configuring EPs -EPs have configuration options to control behavior or increase performance. Each `XXXExecutionProvider` struct returns a builder with configuration methods. See the [API reference](https://docs.rs/ort/2.0.0-alpha.1/ort/index.html?search=ExecutionProvider) for the EP structs for more information on which options are supported and what they do. +EPs have configuration options to control behavior or increase performance. Each `XXXExecutionProvider` struct returns a builder with configuration methods. See the [API reference](https://docs.rs/ort/2.0.0-rc.2/ort/index.html?search=ExecutionProvider) for the EP structs for more information on which options are supported and what they do. ```rust use ort::{CoreMLExecutionProvider, Session}; diff --git a/docs/setup/cargo-features.mdx b/docs/setup/cargo-features.mdx index 0d2b180..9fc9241 100644 --- a/docs/setup/cargo-features.mdx +++ b/docs/setup/cargo-features.mdx @@ -9,8 +9,8 @@ title: Cargo features - ✅ **`half`**: Enables support for float16 & bfloat16 tensors via the [`half`](https://crates.io/crates/half) crate. ONNX models that are converted to 16-bit precision will typically convert to/from 32-bit floats at the input/output, so you will likely never actually need to interact with a 16-bit tensor on the Rust side. Though, `half` isn't a heavy enough crate to worry about it affecting compile times. - ✅ **`copy-dylibs`**: In case dynamic libraries are used (like with the CUDA execution provider), creates a symlink to them in the relevant places in the `target` folder to make [compile-time dynamic linking](/setup/linking#compile-time-dynamic-linking) work. - ⚒️ **`load-dynamic`**: Enables [runtime dynamic linking](/setup/linking#runtime-loading-with-load-dynamic), which alleviates many of the troubles with compile-time dynamic linking and offers greater flexibility. -- ⚒️ **`fetch-models`**: Enables the [`SessionBuilder::commit_from_url`](https://docs.rs/ort/2.0.0-rc.1/ort/struct.SessionBuilder.html#method.commit_from_url) method, allowing you to quickly download & run a model from a URL. This should only be used for quick testing. -- ⚒️ **`operator-libraries`**: Allows for sessions to load custom operators from dynamic C++ libraries via [`SessionBuilder::with_operator_library`](https://docs.rs/ort/2.0.0-rc.1/ort/struct.SessionBuilder.html#method.with_operator_library). If possible, we recommend [writing your custom ops in Rust instead](/perf/custom-operators). +- ⚒️ **`fetch-models`**: Enables the [`SessionBuilder::commit_from_url`](https://docs.rs/ort/2.0.0-rc.2/ort/struct.SessionBuilder.html#method.commit_from_url) method, allowing you to quickly download & run a model from a URL. This should only be used for quick testing. +- ⚒️ **`operator-libraries`**: Allows for sessions to load custom operators from dynamic C++ libraries via [`SessionBuilder::with_operator_library`](https://docs.rs/ort/2.0.0-rc.2/ort/struct.SessionBuilder.html#method.with_operator_library). If possible, we recommend [writing your custom ops in Rust instead](/perf/custom-operators). ## Execution providers Each [execution provider](/perf/execution-providers) is also gated behind a Cargo feature. diff --git a/docs/setup/platforms.mdx b/docs/setup/platforms.mdx index db24d83..0244345 100644 --- a/docs/setup/platforms.mdx +++ b/docs/setup/platforms.mdx @@ -3,7 +3,7 @@ title: Platform support description: ONNX Runtime, and by extension `ort`, supports a wide variety of platforms. For most desktop users, pre-built binaries are available, so setting up `ort` is as simple as adding it to your `Cargo.toml`! --- -Here are the supported platforms and binary availability status, as of v2.0.0-rc.1. +Here are the supported platforms and binary availability status, as of v2.0.0-rc.2. * 🟢 - Supported. Dynamic & static binaries provided by pyke. * 🔷 - Supported. Static binaries provided by pyke. diff --git a/ort-sys/Cargo.toml b/ort-sys/Cargo.toml index ad736bd..9a6a3cf 100644 --- a/ort-sys/Cargo.toml +++ b/ort-sys/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ort-sys" description = "Unsafe Rust bindings for ONNX Runtime 1.17 - Optimize and Accelerate Machine Learning Inferencing" -version = "2.0.0-rc.1" +version = "2.0.0-rc.2" edition = "2021" rust-version = "1.70" license = "MIT OR Apache-2.0" @@ -12,7 +12,7 @@ categories = [ "algorithms", "mathematics", "science" ] authors = [ "pyke.io " ] -include = [ "src/", "build.rs", "LICENSE-APACHE", "LICENSE-MIT" ] +include = [ "src/", "dist.txt", "build.rs", "LICENSE-APACHE", "LICENSE-MIT" ] [features] default = []