SWDEV-301667 - Use right macros and level for logging
- Sometimes we want to mask out kernel names, use right level for kernel
logging
Change-Id: Ideae9647c57b86ae390ff2f4131f6d8c6df5c086
[ROCm/clr commit: f1adecd186]
This commit is contained in:
@@ -1477,7 +1477,7 @@ void Kernel::InitPrintf(const std::vector<std::string>& printfInfoStrings) {
|
||||
} while (end != std::string::npos);
|
||||
|
||||
if (tokens.size() < 2) {
|
||||
ClPrint(amd::LOG_WARNING, amd::LOG_KERN, "Invalid PrintInfo string: \"%s\"", str.c_str());
|
||||
LogPrintfError("Invalid PrintInfo string: \"%s\"", str.c_str());
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1503,7 +1503,7 @@ void Kernel::InitPrintf(const std::vector<std::string>& printfInfoStrings) {
|
||||
|
||||
// ensure that we have the correct number of tokens
|
||||
if (tokens.size() < end + 1 /*last token is the fmtString*/) {
|
||||
ClPrint(amd::LOG_WARNING, amd::LOG_KERN, "Invalid PrintInfo string: \"%s\"", str.c_str());
|
||||
LogPrintfError("Invalid PrintInfo string: \"%s\"", str.c_str());
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -337,8 +337,7 @@ hsa_kernel_dispatch_packet_t* HSAILKernel::loadArguments(
|
||||
if (amd::IS_HIP) {
|
||||
uintptr_t buffer = reinterpret_cast<uintptr_t>(gpu.getOrCreateHostcallBuffer());
|
||||
if (!buffer) {
|
||||
ClPrint(amd::LOG_ERROR, amd::LOG_KERN,
|
||||
"Kernel expects a hostcall buffer, but none found");
|
||||
LogError("Kernel expects a hostcall buffer, but none found");
|
||||
}
|
||||
assert(it.size_ == sizeof(buffer) && "check the sizes");
|
||||
WriteAqlArgAt(hidden_arguments, buffer, it.size_, it.offset_);
|
||||
|
||||
@@ -714,7 +714,7 @@ inline void VirtualGPU::logVmMemory(const std::string name, const Memory* memory
|
||||
if (PAL_EMBED_KERNEL_MD) {
|
||||
iCmd()->CmdCommentString(buf);
|
||||
}
|
||||
ClPrint(amd::LOG_INFO, amd::LOG_KERN, "%s", buf);
|
||||
ClPrint(amd::LOG_INFO, amd::LOG_MEM, "%s", buf);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3056,14 +3056,12 @@ bool VirtualGPU::submitKernelInternal(const amd::NDRangeContainer& sizes,
|
||||
uintptr_t buffer = reinterpret_cast<uintptr_t>(
|
||||
roc_device_.getOrCreateHostcallBuffer(gpu_queue_, coopGroups, cuMask_));
|
||||
if (!buffer) {
|
||||
ClPrint(amd::LOG_ERROR, amd::LOG_KERN,
|
||||
"Kernel expects a hostcall buffer, but none found");
|
||||
LogError("Kernel expects a hostcall buffer, but none found");
|
||||
return false;
|
||||
}
|
||||
WriteAqlArgAt(hidden_arguments, buffer, it.size_, it.offset_);
|
||||
} else {
|
||||
ClPrint(amd::LOG_ERROR, amd::LOG_KERN,
|
||||
"Pcie atomics not enabled, hostcall not supported");
|
||||
LogError("Pcie atomics not enabled, hostcall not supported");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Fai riferimento in un nuovo problema
Block a user