-
Notifications
You must be signed in to change notification settings - Fork 614
[Tools] Include What You Use #11552
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
[Tools] Include What You Use #11552
Conversation
|
O2 linter results: ❌ 36 errors, |
Tools/ML/model.h
Outdated
| #define TOOLS_ML_MODEL_H_ | ||
|
|
||
| // C++ and system includes | ||
| #include <onnxruntime_c_api.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrong, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It provides OrtAllocatorType and OrtMemType.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be inside the ifdef?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the else branch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In both cases onnxruntime_c_api is included so I removed it.
Tools/ML/model.cxx
Outdated
| // ONNX includes | ||
| #include "Tools/ML/model.h" | ||
|
|
||
| #include <onnxruntime_c_api.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also this one, I guess. It should be inside the ifdef.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It provides GraphOptimizationLevel, ORT_LOGGING_LEVEL_WARNING.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
Tools/ML/model.h
Outdated
|
|
||
| // ROOT includes | ||
| #include "TSystem.h" | ||
| #include <fairlogger/Logger.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one should be fixed in Framework/Logger.h
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I'll wait for the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
No description provided.