-
Notifications
You must be signed in to change notification settings - Fork 116
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
Refactor native cpu adapter to new logger #1345
Conversation
4bb899d
to
0052e4a
Compare
0052e4a
to
eb1ada9
Compare
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 looks good thank you, only one question: I'm trying to run a simple test built for Native CPU with UR_LOG_LOADER="level:debug;flush:debug;output:stderr"
set, what I expect is to see some warnings about functions that are not yet implemented in this adapter, e.g. urPlatformGetBackendOption
, but I only get <LOADER>[DEBUG]: Logger loader initialized successfully!
, I'm not familiar with the new logger, is there something I'm missing in the env variable?
} \ | ||
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE; | ||
do { \ | ||
logger::error("Not Implemented : {} - File : {} / Line : ", __FUNCTION__, \ |
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.
I'm not very familiar with the syntax for this format string, but isn't this missing a {}
for __LINE__
?
} \ | ||
return UR_RESULT_SUCCESS; | ||
do { \ | ||
logger::warning("Not Implemented : {} - File : {} / Line : ", \ |
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.
Same as above, maybe there's a {}
missing
Each component of UR has its own env variable to control verbosity of logging. This is so that it's possible for the user to see traces for the adapter, without getting spammed with potentially irrelevant messages about the loader. @lplewa please add docs here https://github.com/oneapi-src/unified-runtime/blob/main/scripts/core/INTRO.rst#environment-variables (for each adapter you are changing) |
eb1ada9
to
8c0636a
Compare
|
8c0636a
to
26ac4df
Compare
@PietroGhg - please review - if you are ok with changes please label it as ready to merge |
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.
LGTM, thank you
This commit refactors the native cpu adapter to adopt the new logger introduced in d9cd223 (Integrate logger with library, 2023-02-03). Signed-off-by: Łukasz Plewa <lukasz.plewa@intel.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #1345 +/- ##
==========================================
- Coverage 14.82% 12.46% -2.36%
==========================================
Files 250 241 -9
Lines 36220 36146 -74
Branches 4094 4097 +3
==========================================
- Hits 5369 4506 -863
- Misses 30800 31636 +836
+ Partials 51 4 -47 ☔ View full report in Codecov by Sentry. |
No description provided.