Skip to content

Commit eb1bc28

Browse files
authored
[SYCL][UR] Ignore errors in logger callback (#18025)
Fixes #18012 by having the `urLoggerCallback()` ignore messages which are not warnings as errors should be handled via other mechanisms, i.e. UR error codes translated into exception messages or by explicitly enabling logging.
1 parent 071f940 commit eb1bc28

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sycl/source/detail/ur.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ ur_code_location_t codeLocationCallback(void *);
7979

8080
void urLoggerCallback([[maybe_unused]] ur_logger_level_t level, const char *msg,
8181
[[maybe_unused]] void *userData) {
82-
std::cerr << msg << std::endl;
82+
if (level == UR_LOGGER_LEVEL_WARN) {
83+
std::cerr << msg << std::endl;
84+
}
8385
}
8486

8587
namespace ur {

0 commit comments

Comments
 (0)