SWDEV-271274 - Changing DevLogPrintf to LogPrintf for cases where error condition is being returned
Change-Id: I153d071f7859e9412ea0c69f53c53d190453d73d
Tento commit je obsažen v:
@@ -77,8 +77,8 @@ extern "C" hip::FatBinaryInfo** __hipRegisterFatBinary(const void* data)
|
||||
{
|
||||
const __CudaFatBinaryWrapper* fbwrapper = reinterpret_cast<const __CudaFatBinaryWrapper*>(data);
|
||||
if (fbwrapper->magic != __hipFatMAGIC2 || fbwrapper->version != 1) {
|
||||
DevLogPrintfError("Cannot Register fat binary. FatMagic: %u version: %u ",
|
||||
fbwrapper->magic, fbwrapper->version);
|
||||
LogPrintfError("Cannot Register fat binary. FatMagic: %u version: %u ", fbwrapper->magic,
|
||||
fbwrapper->version);
|
||||
return nullptr;
|
||||
}
|
||||
return PlatformState::instance().addFatBinary(fbwrapper->binary);
|
||||
@@ -244,13 +244,13 @@ extern "C" hipError_t hipLaunchByPtr(const void *hostFunction)
|
||||
hip::Stream* stream = reinterpret_cast<hip::Stream*>(exec.hStream_);
|
||||
int deviceId = (stream != nullptr)? stream->DeviceId() : ihipGetDevice();
|
||||
if (deviceId == -1) {
|
||||
DevLogPrintfError("Wrong DeviceId: %d \n", deviceId);
|
||||
LogPrintfError("Wrong DeviceId: %d \n", deviceId);
|
||||
HIP_RETURN(hipErrorNoDevice);
|
||||
}
|
||||
hipFunction_t func = nullptr;
|
||||
hipError_t hip_error = PlatformState::instance().getStatFunc(&func, hostFunction, deviceId);
|
||||
if ((hip_error != hipSuccess) || (func == nullptr)) {
|
||||
DevLogPrintfError("Could not retrieve hostFunction: 0x%x \n", hostFunction);
|
||||
LogPrintfError("Could not retrieve hostFunction: 0x%x \n", hostFunction);
|
||||
HIP_RETURN(hipErrorInvalidDeviceFunction);
|
||||
}
|
||||
|
||||
@@ -300,12 +300,12 @@ hipError_t ihipCreateGlobalVarObj(const char* name, hipModule_t hmod, amd::Memor
|
||||
dev_program = program->getDeviceProgram(*hip::getCurrentDevice()->devices()[0]);
|
||||
|
||||
if (dev_program == nullptr) {
|
||||
DevLogPrintfError("Cannot get Device Function for module: 0x%x \n", hmod);
|
||||
LogPrintfError("Cannot get Device Function for module: 0x%x \n", hmod);
|
||||
HIP_RETURN(hipErrorInvalidDeviceFunction);
|
||||
}
|
||||
/* Find the global Symbols */
|
||||
if (!dev_program->createGlobalVarObj(amd_mem_obj, dptr, bytes, name)) {
|
||||
DevLogPrintfError("Cannot create Global Var obj for symbol: %s \n", name);
|
||||
LogPrintfError("Cannot create Global Var obj for symbol: %s \n", name);
|
||||
HIP_RETURN(hipErrorInvalidSymbol);
|
||||
}
|
||||
|
||||
@@ -578,13 +578,13 @@ void hipLaunchKernelGGLImpl(
|
||||
hip::Stream* s = reinterpret_cast<hip::Stream*>(stream);
|
||||
int deviceId = (s != nullptr)? s->DeviceId() : ihipGetDevice();
|
||||
if (deviceId == -1) {
|
||||
DevLogPrintfError("Wrong Device Id: %d \n", deviceId);
|
||||
LogPrintfError("Wrong Device Id: %d \n", deviceId);
|
||||
}
|
||||
|
||||
hipFunction_t func = nullptr;
|
||||
hipError_t hip_error = PlatformState::instance().getStatFunc(&func, reinterpret_cast<void*>(function_address), deviceId);
|
||||
if ((hip_error != hipSuccess) || (func == nullptr)) {
|
||||
DevLogPrintfError("Cannot find the static function: 0x%x", function_address);
|
||||
LogPrintfError("Cannot find the static function: 0x%x", function_address);
|
||||
}
|
||||
|
||||
hipModuleLaunchKernel(func,
|
||||
@@ -624,7 +624,7 @@ hipError_t ihipLaunchKernel(const void* hostFunction,
|
||||
hip::Stream* s = reinterpret_cast<hip::Stream*>(stream);
|
||||
int deviceId = (s != nullptr)? s->DeviceId() : ihipGetDevice();
|
||||
if (deviceId == -1) {
|
||||
DevLogPrintfError("Wrong Device Id: %d \n", deviceId);
|
||||
LogPrintfError("Wrong Device Id: %d \n", deviceId);
|
||||
HIP_RETURN(hipErrorNoDevice);
|
||||
}
|
||||
|
||||
@@ -779,7 +779,7 @@ hipError_t PlatformState::getDynFunc(hipFunction_t* hfunc, hipModule_t hmod,
|
||||
|
||||
auto it = dynCO_map_.find(hmod);
|
||||
if (it == dynCO_map_.end()) {
|
||||
DevLogPrintfError("Cannot find the module: 0x%x", hmod);
|
||||
LogPrintfError("Cannot find the module: 0x%x", hmod);
|
||||
return hipErrorNotFound;
|
||||
}
|
||||
if (0 == strlen(func_name)) {
|
||||
@@ -799,7 +799,7 @@ hipError_t PlatformState::getDynGlobalVar(const char* hostVar, hipModule_t hmod,
|
||||
|
||||
auto it = dynCO_map_.find(hmod);
|
||||
if (it == dynCO_map_.end()) {
|
||||
DevLogPrintfError("Cannot find the module: 0x%x", hmod);
|
||||
LogPrintfError("Cannot find the module: 0x%x", hmod);
|
||||
return hipErrorNotFound;
|
||||
}
|
||||
|
||||
@@ -824,13 +824,13 @@ hipError_t PlatformState::getDynTexGlobalVar(textureReference* texRef, hipDevice
|
||||
|
||||
auto tex_it = texRef_map_.find(texRef);
|
||||
if (tex_it == texRef_map_.end()) {
|
||||
DevLogPrintfError("Cannot find the texRef Entry: 0x%x", texRef);
|
||||
LogPrintfError("Cannot find the texRef Entry: 0x%x", texRef);
|
||||
return hipErrorNotFound;
|
||||
}
|
||||
|
||||
auto it = dynCO_map_.find(tex_it->second.first);
|
||||
if (it == dynCO_map_.end()) {
|
||||
DevLogPrintfError("Cannot find the module: 0x%x", tex_it->second.first);
|
||||
LogPrintfError("Cannot find the module: 0x%x", tex_it->second.first);
|
||||
return hipErrorNotFound;
|
||||
}
|
||||
|
||||
@@ -847,7 +847,7 @@ hipError_t PlatformState::getDynTexRef(const char* hostVar, hipModule_t hmod, te
|
||||
|
||||
auto it = dynCO_map_.find(hmod);
|
||||
if (it == dynCO_map_.end()) {
|
||||
DevLogPrintfError("Cannot find the module: 0x%x", hmod);
|
||||
LogPrintfError("Cannot find the module: 0x%x", hmod);
|
||||
return hipErrorNotFound;
|
||||
}
|
||||
|
||||
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele