From 505fc1e98ccd013f2242fc42e96ee5d714e15fcf Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Mon, 25 Mar 2019 11:41:20 +0530 Subject: [PATCH] hipExtMallocWithFlags needs hcc workweek 19115 or higher [ROCm/clr commit: 45255ab492b791ce18681fe749c976c4470540b3] --- projects/clr/hipamd/src/hip_memory.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/clr/hipamd/src/hip_memory.cpp b/projects/clr/hipamd/src/hip_memory.cpp index 1875b2219c..ecdb53b2a3 100644 --- a/projects/clr/hipamd/src/hip_memory.cpp +++ b/projects/clr/hipamd/src/hip_memory.cpp @@ -267,6 +267,8 @@ hipError_t hipMalloc(void** ptr, size_t sizeBytes) { hipError_t hipExtMallocWithFlags(void** ptr, size_t sizeBytes, unsigned int flags) { HIP_INIT_SPECIAL_API(hipExtMallocWithFlags, (TRACE_MEM), ptr, sizeBytes, flags); HIP_SET_DEVICE(); + +#if (__hcc_workweek__ >= 19115) hipError_t hip_status = hipSuccess; auto ctx = ihipGetTlsDefaultCtx(); @@ -292,6 +294,9 @@ hipError_t hipExtMallocWithFlags(void** ptr, size_t sizeBytes, unsigned int flag hip_status = hipErrorMemoryAllocation; } } +#else + hipError_t hip_status = hipErrorMemoryAllocation; +#endif return ihipLogStatus(hip_status); }