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

Change-Id: I153d071f7859e9412ea0c69f53c53d190453d73d
This commit is contained in:
cjatin
2021-02-17 23:54:39 +05:30
committed by Jatin Chaudhary
parent abff21c4fc
commit 23f33d5f20
9 changed files with 67 additions and 65 deletions
+11 -7
View File
@@ -392,7 +392,7 @@ inline bool ihipGetTextureAlignmentOffset(size_t* offset,
// If the device memory pointer was returned from hipMalloc(),
// the offset is guaranteed to be 0 and NULL may be passed as the offset parameter.
if ((alignedOffset != 0) && (offset == nullptr)) {
DevLogPrintfError("Texture object not aligned with offset %u \n", alignedOffset);
LogPrintfError("Texture object not aligned with offset %u \n", alignedOffset);
return false;
}
@@ -734,8 +734,10 @@ hipError_t hipTexRefGetAddressMode(hipTextureAddressMode* pam,
// Currently, the only valid value for dim are 0 and 1.
if ((dim != 0) && (dim != 1)) {
DevLogPrintfError("Currently only 2 dimensions (0,1) are valid,"
"dim : %d \n", dim);
LogPrintfError(
"Currently only 2 dimensions (0,1) are valid,"
"dim : %d \n",
dim);
HIP_RETURN(hipErrorInvalidValue);
}
@@ -754,8 +756,10 @@ hipError_t hipTexRefSetAddressMode(textureReference* texRef,
}
if ((dim < 0) || (dim > 2)) {
DevLogPrintfError("Currently only 3 dimensions (0,1,2) are valid,"
"dim : %d \n", dim);
LogPrintfError(
"Currently only 3 dimensions (0,1,2) are valid,"
"dim : %d \n",
dim);
HIP_RETURN(hipErrorInvalidValue);
}
@@ -849,8 +853,8 @@ hipError_t hipTexRefGetAddress(hipDeviceptr_t* dptr,
// TODO use ihipGetTextureObjectResourceDesc() to not pollute the API trace.
hipError_t error = hipGetTextureObjectResourceDesc(&resDesc, texRef->textureObject);
if (error != hipSuccess) {
DevLogPrintfError("hipGetTextureObjectResourceDesc failed with error code: %s \n",
hipGetErrorName(error));
LogPrintfError("hipGetTextureObjectResourceDesc failed with error code: %s \n",
hipGetErrorName(error));
HIP_RETURN(error);
}