Upgrade OnnxRuntime to 1.26.0#77
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Unity ONNX Runtime packages and native bindings to align with ONNX Runtime 1.26.0, including new device/EP compatibility APIs and a package version bump to 0.4.6.
Changes:
- Bump documented/tested ONNX Runtime version to 1.26.0 and update package references to 0.4.6.
- Update training interop to request a newer ORT API version and extend native method bindings for hardware-device/EP compatibility.
- Add
OrtEnvAPIs and supporting types to enumerate hardware devices and query EP incompatibility details.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Updates tested ONNX Runtime version and dependency examples to 0.4.6. |
| com.github.asus4.onnxruntime/Runtime/Training/NativeTrainingMethods.shared.cs | Updates training ORT API version used to resolve training API entry points. |
| com.github.asus4.onnxruntime/Runtime/OrtHardwareDevice.shared.cs | Exposes the native device handle internally for interop usage. |
| com.github.asus4.onnxruntime/Runtime/OrtEnv.shared.cs | Adds device enumeration and EP incompatibility querying APIs + wrapper types. |
| com.github.asus4.onnxruntime/Runtime/NativeMethods.shared.cs | Binds new native delegates for hardware-device/EP compatibility APIs. |
| com.github.asus4.onnxruntime/README.md | Updates dependency examples to 0.4.6 (but still contains older tested ORT version text). |
| com.github.asus4.onnxruntime/package.json | Bumps package version to 0.4.6. |
| com.github.asus4.onnxruntime.win-x64-gpu/README.md | Updates dependency examples to 0.4.6. |
| com.github.asus4.onnxruntime.win-x64-gpu/package.json | Bumps package version to 0.4.6 and dependency on core package. |
| com.github.asus4.onnxruntime.unity/README.md | Updates dependency examples to 0.4.6. |
| com.github.asus4.onnxruntime.unity/package.json | Bumps package version to 0.4.6 and dependency on core package. |
| com.github.asus4.onnxruntime.linux-x64-gpu/README.md | Updates dependency examples to 0.4.6. |
| com.github.asus4.onnxruntime.linux-x64-gpu/package.json | Bumps package version to 0.4.6 and dependency on core package. |
| com.github.asus4.onnxruntime-genai/README.md | Updates dependency examples to 0.4.6. |
| com.github.asus4.onnxruntime-genai/package.json | Bumps package version to 0.4.6 and dependency on core package. |
| com.github.asus4.onnxruntime-extensions/README.md | Updates dependency examples to 0.4.6. |
| com.github.asus4.onnxruntime-extensions/package.json | Bumps package version to 0.4.6 and dependency on core package. |
| .github/workflows/publish-packages.yml | Updates ORT_VERSION used by the publish workflow to 1.26.0. |
Comments suppressed due to low confidence (1)
com.github.asus4.onnxruntime/Runtime/Training/NativeTrainingMethods.shared.cs:85
- ORT_API_VERSION is hardcoded to 26 here, while NativeMethods uses ORT_API_VERSION = 14. Please centralize the API version(s) (or add an explicit comment explaining why training requires a different version) to avoid accidental mismatches that can cause OrtGetApi/OrtGetTrainingApi to return null at runtime.
#endif
const uint ORT_API_VERSION = 26;
#if NETSTANDARD2_0
IntPtr ortApiPtr = OrtGetApi(ORT_API_VERSION);
api_ = (OrtApi)Marshal.PtrToStructure(ortApiPtr, typeof(OrtApi));
#else
// TODO: Make this save the pointer, and not copy the whole structure across
api_ = (OrtApi)OrtGetApi(ORT_API_VERSION);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
73
to
+76
| "dependencies": { | ||
| "com.github.asus4.onnxruntime": "0.4.5", | ||
| "com.github.asus4.onnxruntime.unity": "0.4.5", | ||
| "com.github.asus4.onnxruntime-extensions": "0.4.5", | ||
| "com.github.asus4.onnxruntime": "0.4.6", | ||
| "com.github.asus4.onnxruntime.unity": "0.4.6", | ||
| "com.github.asus4.onnxruntime-extensions": "0.4.6", |
Comment on lines
73
to
+76
| "dependencies": { | ||
| "com.github.asus4.onnxruntime": "0.4.5", | ||
| "com.github.asus4.onnxruntime.unity": "0.4.5", | ||
| "com.github.asus4.onnxruntime-extensions": "0.4.5", | ||
| "com.github.asus4.onnxruntime": "0.4.6", | ||
| "com.github.asus4.onnxruntime.unity": "0.4.6", | ||
| "com.github.asus4.onnxruntime-extensions": "0.4.6", |
Comment on lines
73
to
+76
| "dependencies": { | ||
| "com.github.asus4.onnxruntime": "0.4.5", | ||
| "com.github.asus4.onnxruntime.unity": "0.4.5", | ||
| "com.github.asus4.onnxruntime-extensions": "0.4.5", | ||
| "com.github.asus4.onnxruntime": "0.4.6", | ||
| "com.github.asus4.onnxruntime.unity": "0.4.6", | ||
| "com.github.asus4.onnxruntime-extensions": "0.4.6", |
Comment on lines
73
to
+76
| "dependencies": { | ||
| "com.github.asus4.onnxruntime": "0.4.5", | ||
| "com.github.asus4.onnxruntime.unity": "0.4.5", | ||
| "com.github.asus4.onnxruntime-extensions": "0.4.5", | ||
| "com.github.asus4.onnxruntime": "0.4.6", | ||
| "com.github.asus4.onnxruntime.unity": "0.4.6", | ||
| "com.github.asus4.onnxruntime-extensions": "0.4.6", |
Comment on lines
73
to
+76
| "dependencies": { | ||
| "com.github.asus4.onnxruntime": "0.4.5", | ||
| "com.github.asus4.onnxruntime.unity": "0.4.5", | ||
| "com.github.asus4.onnxruntime-extensions": "0.4.5", | ||
| "com.github.asus4.onnxruntime": "0.4.6", | ||
| "com.github.asus4.onnxruntime.unity": "0.4.6", | ||
| "com.github.asus4.onnxruntime-extensions": "0.4.6", |
Comment on lines
73
to
+76
| "dependencies": { | ||
| "com.github.asus4.onnxruntime": "0.4.5", | ||
| "com.github.asus4.onnxruntime.unity": "0.4.5", | ||
| "com.github.asus4.onnxruntime-extensions": "0.4.5", | ||
| "com.github.asus4.onnxruntime": "0.4.6", | ||
| "com.github.asus4.onnxruntime.unity": "0.4.6", | ||
| "com.github.asus4.onnxruntime-extensions": "0.4.6", |
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
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.
No description provided.