Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/rust-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
- ""
- "vision"
- "vlm"
- "ort-download-binaries,ort-api-24"
- "ort-load-dynamic,ort-api-24"
- "ort-download-binaries,ort-api-27"
- "ort-load-dynamic,ort-api-27"
- "video"
- "viewer"
- "annotator"
Expand All @@ -49,7 +49,7 @@ jobs:
- name: Clippy
run: |
if [ "${{ matrix.feature }}" = "all-features" ]; then
cargo clippy --no-default-features --features "all-models,video,viewer,annotator,ort-download-binaries,ort-load-dynamic,ort-api-24" --all-targets -- -D warnings
cargo clippy --no-default-features --features "all-models,video,viewer,annotator,ort-download-binaries,ort-load-dynamic,ort-api-27" --all-targets -- -D warnings
elif [ "${{ matrix.feature }}" = "" ]; then
cargo clippy --no-default-features --all-targets -- -D warnings
else
Expand All @@ -74,7 +74,7 @@ jobs:
uses: dtolnay/rust-toolchain@stable

- name: Check
run: cargo check --no-default-features --features "all-models,video,viewer,annotator,ort-download-binaries,ort-load-dynamic,ort-api-24" --all-targets
run: cargo check --no-default-features --features "all-models,video,viewer,annotator,ort-download-binaries,ort-load-dynamic,ort-api-27" --all-targets

test:
name: cargo-test
Expand All @@ -94,7 +94,7 @@ jobs:
uses: dtolnay/rust-toolchain@nightly

- name: Test
run: cargo +nightly test --no-default-features --features "all-models,video,viewer,annotator,ort-download-binaries,ort-load-dynamic,ort-api-24" --all-targets
run: cargo +nightly test --no-default-features --features "all-models,video,viewer,annotator,ort-download-binaries,ort-load-dynamic,ort-api-27" --all-targets

build-linux:
needs: test
Expand All @@ -120,4 +120,4 @@ jobs:
uses: dtolnay/rust-toolchain@stable

- name: Build
run: cargo build --no-default-features --features "all-models,video,viewer,annotator,ort-download-binaries,ort-load-dynamic,ort-api-24"
run: cargo build --no-default-features --features "all-models,video,viewer,annotator,ort-download-binaries,ort-load-dynamic,ort-api-27"
10 changes: 7 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ fast_image_resize = { version = "5.5.0", default-features = false, features = ["
minifb = { version = "0.28.0", optional = true }
video-rs = { version = "0.11.0", features = ["ndarray"], optional = true }
ndarray-npy = { version = "0.10", optional = true }
ort = { version = "=2.0.0-rc.12", default-features = false, features = [
ort = { git = "https://github.com/pykeio/ort", rev = "31c8f1443bb579bfddb82705288347697e468fb3", default-features = false, features = [
"tls-rustls",
"copy-dylibs",
"half",
"ndarray",
"std",
] }
cudarc = { version = "0.19", optional = true, default-features = false, features = [
Expand Down Expand Up @@ -75,7 +76,7 @@ strip = true


[features]
default = ["ort-download-binaries", "vision", "annotator", "ort-api-24"]
default = ["ort-download-binaries", "vision", "annotator", "ort-api-27"]

# ONNXRuntime loading strategies
ort-download-binaries = ["ort/download-binaries"]
Expand All @@ -90,6 +91,9 @@ ort-api-21 = ["ort/api-21"]
ort-api-22 = ["ort/api-22"]
ort-api-23 = ["ort/api-23"]
ort-api-24 = ["ort/api-24"]
ort-api-25 = ["ort/api-25"]
ort-api-26 = ["ort/api-26"]
ort-api-27 = ["ort/api-27"]

# Cuda features (Internal use)
cuda-runtime = ["dep:cudarc"]
Expand Down Expand Up @@ -324,4 +328,4 @@ required-features = ["vision", "annotator"]
[[example]]
name = "gaze-estimation"
path = "examples/gaze-estimation/main.rs"
required-features = ["vision", "annotator", "video"]
required-features = ["vision", "annotator", "video"]
11 changes: 7 additions & 4 deletions docs/cargo-features/ort.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ONNX Runtime configuration and API version management.

### API Version Selection

This library supports ONNX Runtime versions 1.17 through 1.24 via API version features.
This library supports ONNX Runtime versions 1.17 through 1.27 via API version features.

| Feature | ONNX Runtime | Requirements |
|---------|--------------|--------------|
Expand All @@ -21,11 +21,14 @@ This library supports ONNX Runtime versions 1.17 through 1.24 via API version fe
| `ort-api-21` | v1.21 | - |
| `ort-api-22` | v1.22 | - |
| `ort-api-23` | v1.23 | - |
| `ort-api-24` | v1.24 | **Default** - Latest features |
| `ort-api-24` | v1.24 | - |
| `ort-api-25` | v1.25 | - |
| `ort-api-26` | v1.26 | - |
| `ort-api-27` | v1.27 | **Default** - Latest features |

!!! tip "API Version Selection"
```toml
# Default uses api-24 (latest)
# Default uses api-27 (latest)
usls = { version = "0.2", features = ["vision"] }

# Specify API version explicitly
Expand All @@ -34,4 +37,4 @@ This library supports ONNX Runtime versions 1.17 through 1.24 via API version fe

!!! note "Version Compatibility"
- Each API version includes all features from previous versions
- Check [ORT multiversion docs](https://ort.pyke.io/setup/multiversion) for minimum version requirements
- Check [ORT multiversion docs](https://ort.pyke.io/setup/multiversion) for minimum version requirements
1 change: 1 addition & 0 deletions src/ort/dtype.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ impl From<TensorElementType> for crate::DType {
TensorElementType::Complex128 => Self::Complex128,
TensorElementType::Bool => Self::Uint8,
TensorElementType::String | TensorElementType::Undefined => Self::Auto,
_ => Self::Auto,
}
}
}
Loading