Skip to content

Commit 9eb6011

Browse files
authored
Merge pull request #2107 from oneapi-src/v0.10.6rc
Candidate for the v0.10.6 release tag
2 parents 672ac18 + a8b8972 commit 9eb6011

File tree

5 files changed

+1742
-962
lines changed

5 files changed

+1742
-962
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
55

66
cmake_minimum_required(VERSION 3.20.0 FATAL_ERROR)
7-
project(unified-runtime VERSION 0.10.5)
7+
project(unified-runtime VERSION 0.10.6)
88

99
# Check if unified runtime is built as a standalone project.
1010
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR UR_STANDALONE_BUILD)

scripts/templates/trcddi.cpp.mako

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,19 @@ namespace ur_tracing_layer
4545
${th.make_pfncb_param_type(n, tags, obj)} params = { &${",&".join(th.make_param_lines(n, tags, obj, format=["name"]))} };
4646
uint64_t instance = getContext()->notify_begin(${th.make_func_etor(n, tags, obj)}, "${th.make_func_name(n, tags, obj)}", &params);
4747

48-
getContext()->logger.info("---> ${th.make_func_name(n, tags, obj)}");
48+
auto &logger = getContext()->logger;
49+
50+
logger.info("---> ${th.make_func_name(n, tags, obj)}");
4951

5052
${x}_result_t result = ${th.make_pfn_name(n, tags, obj)}( ${", ".join(th.make_param_lines(n, tags, obj, format=["name"]))} );
5153

5254
getContext()->notify_end(${th.make_func_etor(n, tags, obj)}, "${th.make_func_name(n, tags, obj)}", &params, &result, instance);
5355

54-
std::ostringstream args_str;
55-
ur::extras::printFunctionParams(args_str, ${th.make_func_etor(n, tags, obj)}, &params);
56-
getContext()->logger.info("({}) -> {};\n", args_str.str(), result);
56+
if (logger.getLevel() <= logger::Level::INFO) {
57+
std::ostringstream args_str;
58+
ur::extras::printFunctionParams(args_str, ${th.make_func_etor(n, tags, obj)}, &params);
59+
logger.info("({}) -> {};\n", args_str.str(), result);
60+
}
5761

5862
return result;
5963
}

source/adapters/level_zero/kernel.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,11 +661,19 @@ ur_result_t ur_queue_handle_legacy_t_::enqueueDeviceGlobalVariableRead(
661661

662662
std::scoped_lock<ur_shared_mutex> lock(Queue->Mutex);
663663

664+
ze_module_handle_t ZeModule{};
665+
auto It = Program->ZeModuleMap.find(Queue->Device->ZeDevice);
666+
if (It != Program->ZeModuleMap.end()) {
667+
ZeModule = It->second;
668+
} else {
669+
ZeModule = Program->ZeModule;
670+
}
671+
664672
// Find global variable pointer
665673
size_t GlobalVarSize = 0;
666674
void *GlobalVarPtr = nullptr;
667675
ZE2UR_CALL(zeModuleGetGlobalPointer,
668-
(Program->ZeModule, Name, &GlobalVarSize, &GlobalVarPtr));
676+
(ZeModule, Name, &GlobalVarSize, &GlobalVarPtr));
669677
if (GlobalVarSize < Offset + Count) {
670678
setErrorMessage("Read from device global variable is out of range.",
671679
UR_RESULT_ERROR_INVALID_VALUE,

source/common/logger/ur_logger_details.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ class Logger {
3030

3131
void setLevel(logger::Level level) { this->level = level; }
3232

33+
logger::Level getLevel() { return this->level; }
34+
3335
void setFlushLevel(logger::Level level) {
3436
if (sink) {
3537
this->sink->setFlushLevel(level);

0 commit comments

Comments
 (0)