From f2c1bf3bc013aca86f8516e4208596c5529db18f Mon Sep 17 00:00:00 2001 From: Ben Sander Date: Thu, 11 Feb 2016 23:13:43 -0600 Subject: [PATCH] Remove ! USE_PINNED_HOST support --- hipamd/src/hip_hcc.cpp | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/hipamd/src/hip_hcc.cpp b/hipamd/src/hip_hcc.cpp index 21da73d1da..e63186692c 100644 --- a/hipamd/src/hip_hcc.cpp +++ b/hipamd/src/hip_hcc.cpp @@ -43,7 +43,6 @@ THE SOFTWARE. #include "hc_AM.cpp" -#define USE_PINNED_HOST (__hcc_workweek__ >= 1601) #define USE_ASYNC_COPY 0 #define USE_AM_TRACKER 1 /* use new AM memory tracker features */ @@ -1454,7 +1453,6 @@ hipError_t hipMallocHost(void** ptr, size_t sizeBytes) std::call_once(hip_initialized, ihipInit); hipError_t hip_status = hipSuccess; -#if USE_PINNED_HOST const unsigned am_flags = amHostPinned; auto device = ihipGetTlsDefaultDevice(); @@ -1472,20 +1470,6 @@ hipError_t hipMallocHost(void** ptr, size_t sizeBytes) return ihipLogStatus(hip_status); -#else - // TODO-hcc remove-me - - // This code only works on Kaveri: - *ptr = malloc(sizeBytes); // TODO - call am_alloc for device memory, this will only on KV HSA. - if (*ptr != NULL) { - //TODO-hsart : need memory pin APIs to implement this correctly. - // FOr now do our best to allocate the memory, but return an error since - // the returned pointer can only be used on the HOST not the GPU. - return ihipLogStatus(hipErrorMemoryAllocation); - } else { - return ihipLogStatus(hipErrorMemoryAllocation); - } -#endif } hipError_t hipMemcpyToSymbol(const char* symbolName, const void *src, size_t count, size_t offset, hipMemcpyKind kind) @@ -1695,12 +1679,8 @@ hipError_t hipFreeHost(void* ptr) std::call_once(hip_initialized, ihipInit); if (ptr) { -#if USE_PINNED_HOST tprintf (TRACE_MEM, " %s: %p\n", __func__, ptr); hc::AM_free(ptr); -#else - free(ptr); -#endif } return ihipLogStatus(hipSuccess);