SWDEV-271274 - Changing DevLogPrintf to LogPrintf for cases where error condition is being returned

Change-Id: I153d071f7859e9412ea0c69f53c53d190453d73d


[ROCm/hip commit: 23f33d5f20]
Этот коммит содержится в:
cjatin authored and Jatin Chaudhary committed 2021-03-01 14:33:46 -05:00
1 родитель d5110c4be8
Коммит 201d7951de
9 files changed
+67 -65

No files matched your search

+5 -5
Просмотреть файл
@@ -23,19 +23,19 @@ DeviceVar::DeviceVar(std::string name, hipModule_t hmod) : shadowVptr(nullptr),
amd::Program* program = as_amd(reinterpret_cast<cl_program>(hmod));
device::Program* dev_program = program->getDeviceProgram(*hip::getCurrentDevice()->devices()[0]);
if (dev_program == nullptr) {
DevLogPrintfError("Cannot get Device Program for module: 0x%x \n", hmod);
LogPrintfError("Cannot get Device Program for module: 0x%x \n", hmod);
guarantee(false, "Cannot get Device Program");
}
if(!dev_program->createGlobalVarObj(&amd_mem_obj_, &device_ptr_, &size_, name.c_str())) {
DevLogPrintfError("Cannot create Global Var obj for symbol: %s \n", name.c_str());
LogPrintfError("Cannot create Global Var obj for symbol: %s \n", name.c_str());
guarantee(false, "Cannot create GlobalVar Obj");
}
// Handle size 0 symbols
if (size_ != 0) {
if (amd_mem_obj_ == nullptr || device_ptr_ == nullptr) {
DevLogPrintfError("Cannot get memory for creating device Var: %s", name.c_str());
LogPrintfError("Cannot get memory for creating device Var: %s", name.c_str());
guarantee(false, "Cannot get memory for creating device var");
}
amd::MemObjMap::AddMemObj(device_ptr_, amd_mem_obj_);
@@ -65,13 +65,13 @@ DeviceFunc::DeviceFunc(std::string name, hipModule_t hmod) : dflock_("function l
const amd::Symbol *symbol = program->findSymbol(name.c_str());
if (symbol == nullptr) {
DevLogPrintfError("Cannot find Symbol with name: %s \n", name.c_str());
LogPrintfError("Cannot find Symbol with name: %s \n", name.c_str());
guarantee(false, "Cannot find Symbol");
}
kernel_ = new amd::Kernel(*program, *symbol, name);
if (kernel_ == nullptr) {
DevLogPrintfError("Cannot create kernel with name: %s \n", name.c_str());
LogPrintfError("Cannot create kernel with name: %s \n", name.c_str());
guarantee(false, "Cannot Create kernel");
}
}