diff --git a/api/hip/hip_internal.hpp b/api/hip/hip_internal.hpp index 5d32f1049f..86221b197e 100644 --- a/api/hip/hip_internal.hpp +++ b/api/hip/hip_internal.hpp @@ -159,7 +159,7 @@ extern amd::Memory* getMemoryObject(const void* ptr, size_t& offset); #define HIP_RETURN(ret) \ hip::g_lastError = ret; \ - LogPrintfInfo("[%zx] %s: Returned %s", std::this_thread::get_id(), __func__, hipGetErrorName(ret)); \ + LogPrintfInfo("[%zx] %s: Returned %s", std::this_thread::get_id(), __func__, hipGetErrorName(hip::g_lastError)); \ return hip::g_lastError; \ inline std::ostream& operator<<(std::ostream& os, const dim3& s) { diff --git a/api/hip/hip_memory.cpp b/api/hip/hip_memory.cpp index 46d84b8520..807874dc34 100644 --- a/api/hip/hip_memory.cpp +++ b/api/hip/hip_memory.cpp @@ -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; }