Skip to content

Commit e78a0a7

Browse files
committed
apply comments
1 parent 149119f commit e78a0a7

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

unified-runtime/source/adapters/level_zero/device.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1794,7 +1794,7 @@ ur_result_t ur_device_handle_t_::initialize(int SubSubDeviceOrdinal,
17941794
if (numQueueGroups == 0) {
17951795
return UR_RESULT_ERROR_UNKNOWN;
17961796
}
1797-
UR_LOG_LEGACY(Error,
1797+
UR_LOG_LEGACY(Info,
17981798
logger::LegacyMessage("NOTE: Number of queue groups = {}"),
17991799
"Number of queue groups = {}", numQueueGroups);
18001800

unified-runtime/source/common/linux/ur_lib_loader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ LibLoader::loadAdapterLibrary(const char *name) {
5959
(strstr(err, name) == NULL || strstr(err, "required by") != NULL)) {
6060
// If the adapter cannot be loaded due to missing dependencies or any
6161
// other related error, it is considered as an error.
62-
UR_LOG(Error, "failed to load adapter '{}' with error: {}", name, err);
62+
UR_LOG(Info, "failed to load adapter '{}' with error: {}", name, err);
6363
} else {
6464
// Simply having the adapter library missing isn't an error.
6565
UR_LOG(Info, "failed to load adapter '{}' with error: {}", name,

unified-runtime/source/common/logger/ur_logger.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ get_logger(std::string name = "common",
3030

3131
inline void init(const std::string &name) { get_logger(name.c_str()); }
3232

33-
#define UR_LOG(...) URLOG_(logger::get_logger(), __VA_ARGS__)
34-
#define UR_LOG_LEGACY(...) URLOG_LEGACY_(logger::get_logger(), __VA_ARGS__)
33+
#define UR_LOG(...) URLOG_(::logger::get_logger(), __VA_ARGS__)
34+
#define UR_LOG_LEGACY(...) URLOG_LEGACY_(::logger::get_logger(), __VA_ARGS__)
3535

3636
// TODO: consider removing UR_LOG_L and maybe UR_LOG_LEGACY macros, using UR_LOG
3737
// instead

unified-runtime/source/common/logger/ur_logger_details.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
#ifndef UR_LOGGER_DETAILS_HPP
88
#define UR_LOGGER_DETAILS_HPP 1
99

10+
#include <string>
11+
#include <algorithm>
12+
1013
#include "ur_level.hpp"
1114
#include "ur_sinks.hpp"
1215

@@ -107,7 +110,7 @@ class Logger {
107110
} // namespace logger
108111

109112
#ifdef SRC_PATH_SIZE
110-
#define SHORT_FILE ((__FILE__) + (SRC_PATH_SIZE))
113+
#define SHORT_FILE ((__FILE__ + SRC_PATH_SIZE < __FILE__ + sizeof(__FILE__)) ? (__FILE__ + SRC_PATH_SIZE) : __FILE__)
111114
#else
112115
#define SHORT_FILE __FILE__
113116
#endif

0 commit comments

Comments
 (0)