P4 to Git Change 1979123 by cpaquot@cpaquot-ocl-lc-lnx on 2019/08/06 17:15:10

SWDEV-198556 - [HIP] Gnarly bug due to macros:
	HIP_RETURN(ret) duplicates ret twice first by setting the last error
	then via LogDebugInfo. So if HIP_RETURN has a function as a parameter,
	the function would get called twice. So ihipMalloc and ihipMemcpy were
	being called twice (and perhaps more functions).
	Also logging the pointer returned by ihipMalloc so we can track memory
	in logs more easily.

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/hip/hip_internal.hpp#33 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_memory.cpp#65 edit
This commit is contained in:
foreman
2019-08-06 17:19:28 -04:00
parent 44813761ba
commit adf865621c
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ hipError_t ihipMalloc(void** ptr, size_t sizeBytes, unsigned int flags)
if (*ptr == nullptr) {
return hipErrorOutOfMemory;
}
LogPrintfInfo("ihipMalloc ptr=0x%zx", *ptr);
return hipSuccess;
}