From cab119c8b29fa9b05f4d40c61e12be594aab3921 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 --- src/hip_memory.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/hip_memory.cpp b/src/hip_memory.cpp index 1875b2219c..ecdb53b2a3 100644 --- a/src/hip_memory.cpp +++ b/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); }