Repository navigation
Conversation
6 tasks
mtavenrath
pushed a commit
to rustnn/rustnn
that referenced
this pull request
Nov 8, 2026
## Summary - [ ] Describe the user-visible and code-level changes. The OrtEnvironment has to stay a singleton instead of a context option because having only one environment per process is a limitation of the `ort` crate https://github.com/pykeio/ort/blob/6ed2423cc08ca21d0b07f467b6e4387ef1bee2ce/src/environment.rs#L515-L517 (and probably also safer to have only one from a onnxruntime perspective). This feature allows registering additional EPs (also in pywebnn rustnn/pywebnn#33) or to let the user define the path to the onnxruntime library, ort log level and ort log destination. We could consider in another PR to bind ORT log level with our Rust log level and implement an ort logger that uses log. I believe `ort` using tracing for logging to simply using tracing_subscriber could get us logging. ## Validation - [ ] `make test` - [ ] Relevant WPT or integration checks ## Documentation See `docs/development/documentation-policy.md` for which page belongs to which change. - [ ] Updated the rustdoc comments and docs pages that describe the changed behavior (or no documented behavior changed) - [ ] If backend converter/executor operator support changed, ran `make docs-backend-ops` and committed `docs/development/backend-operator-support.md` - [ ] `make docs-api` and `make ci-docs` pass if rustdoc or docs pages changed
theHamsta
marked this pull request as ready for review
November 9, 2026 11:13
onnxruntime-ep-nv-tensorrt-rtxonnxruntime-ep-nv-tensorrt-rtx
Contributor
Author
|
CI pass requires #31 |
Contributor
Author
|
Yes, when switching out pretty_env_logger with tracing_subscriber we don't need a dedicated OrtLogger implementation anymore. It is still necessary to set the log level on the OrtEnvironment or when we want to print the log_level to stdout without RUST_LOG. It is a bit more tidied up when ORT integrates with RUST_LOG, but it might also be unexpected if the user doesn't see anything when they are setting the log level. Maybe give a warning single stdout warning if they are setting the log without RUST_LOG or just go back to plain stdout log as before? |
theHamsta
force-pushed
the
set-ortenv
branch
2 times, most recently
from
November 9, 2026 14:56
5bf6791 to
086b6f2
Compare
This gives us automatic ORT logs without an dedicated OrtLogger implementation.
This branch has not been deployed
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.
feat: allow to register EP libraries and test with onnxruntime-ep-nv-tensorrt-rtx
Depends on rustnn/rustnn#373
Probably we should drop the last commit that is setting the ORT log level using tracing for testing and add the functionality to control ORT log level and destination into RustNN. It might be enough to just replace
pretty_env_loggerhere withtracing_subscriberasortseems to be usingtracing