Skip to content

Add logging of ORT version and build info. #1405

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

edgchen1
Copy link
Contributor

It is useful to be able to see the onnxruntime version and build info when switching between multiple onnxruntime shared libraries.

static std::ostream* gp_stream{&std::cerr};

static std::ostream*& GlobalLogStreamPtr() {
static std::ostream* stream = &std::cerr;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

avoid static initialization order race by making this a function. on Windows, I encountered the case where gp_stream was nullptr.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The root problem is that our onnxruntime header was not supposed to have any dependencies and is now calling genai code, I forget what calls Ort:: functions first but if there's a way to clean that up, we should do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants