From ccf9b08949d4c68d032b33f1feb837e89d989588 Mon Sep 17 00:00:00 2001 From: Rahul Garg Date: Mon, 26 Sep 2016 10:58:46 +0530 Subject: [PATCH] Removed deprecated hipHostAlloc Change-Id: Ia592a3545c5d72f37e049ce29f910e404323c01c [ROCm/hip commit: daef1d29061ed9ba22ab12a1096c6c7328f3e573] --- projects/hip/bin/hipify | 2 +- projects/hip/include/hcc_detail/hip_runtime_api.h | 9 ++++----- projects/hip/src/hip_memory.cpp | 7 ------- projects/hip/tests/src/CMakeLists.txt | 4 ++-- .../tests/src/{hipHostAlloc.cpp => hipHostMalloc.cpp} | 0 5 files changed, 7 insertions(+), 15 deletions(-) rename projects/hip/tests/src/{hipHostAlloc.cpp => hipHostMalloc.cpp} (100%) diff --git a/projects/hip/bin/hipify b/projects/hip/bin/hipify index 7ecfccbd88..5c56465040 100755 --- a/projects/hip/bin/hipify +++ b/projects/hip/bin/hipify @@ -288,7 +288,7 @@ while (@ARGV) { $ft{'mem'} += s/\bcudaMallocHost\b/hipHostMalloc/g; # note conversion to standard hipHost* naming convention $ft{'mem'} += s/\bcudaFree\b/hipFree/g; $ft{'mem'} += s/\bcudaFreeHost\b/hipHostFree/g; # note conversion to standard hipHost* naming convention - $ft{'mem'} += s/\bcudaHostAlloc\b/hipHostAlloc/g; + $ft{'mem'} += s/\bcudaHostAlloc\b/hipHostMalloc/g; $ft{'mem'} += s/\bcudaHostGetDevicePointer\b/hipHostGetDevicePointer/g; $ft{'mem'} += s/\bcudaHostAllocDefault\b/hipHostMallocDefault/g; $ft{'mem'} += s/\bcudaHostAllocPortable\b/hipHostMallocPortable/g; diff --git a/projects/hip/include/hcc_detail/hip_runtime_api.h b/projects/hip/include/hcc_detail/hip_runtime_api.h index b266927a33..4de2797033 100644 --- a/projects/hip/include/hcc_detail/hip_runtime_api.h +++ b/projects/hip/include/hcc_detail/hip_runtime_api.h @@ -793,18 +793,17 @@ hipError_t hipMalloc(void** ptr, size_t size) ; * @see hipSetDeviceFlags, hipHostFree */ hipError_t hipHostMalloc(void** ptr, size_t size, unsigned int flags) ; -hipError_t hipHostAlloc(void** ptr, size_t size, unsigned int flags) __attribute__((deprecated("use hipHostMalloc instead"))) ;; /** - * @brief Get Device pointer from Host Pointer allocated through hipHostAlloc + * @brief Get Device pointer from Host Pointer allocated through hipHostMalloc * * @param[out] dstPtr Device Pointer mapped to passed host pointer - * @param[in] hstPtr Host Pointer allocated through hipHostAlloc + * @param[in] hstPtr Host Pointer allocated through hipHostMalloc * @param[in] flags Flags to be passed for extension * * @return #hipSuccess, #hipErrorInvalidValue, #hipErrorMemoryAllocation * - * @see hipSetDeviceFlags, hipHostAlloc + * @see hipSetDeviceFlags, hipHostMalloc */ hipError_t hipHostGetDevicePointer(void** devPtr, void* hstPtr, unsigned int flags) ; @@ -815,7 +814,7 @@ hipError_t hipHostGetDevicePointer(void** devPtr, void* hstPtr, unsigned int fla * @param[in] hostPtr Host Pointer allocated through hipHostMalloc * @return #hipSuccess, #hipErrorInvalidValue * - * @see hipHostAlloc + * @see hipHostMalloc */ hipError_t hipHostGetFlags(unsigned int* flagsPtr, void* hostPtr) ; diff --git a/projects/hip/src/hip_memory.cpp b/projects/hip/src/hip_memory.cpp index 75097cd33b..d2bb084fc5 100644 --- a/projects/hip/src/hip_memory.cpp +++ b/projects/hip/src/hip_memory.cpp @@ -172,13 +172,6 @@ hipError_t hipHostMalloc(void** ptr, size_t sizeBytes, unsigned int flags) return ihipLogStatus(hip_status); } -//--- -// TODO - remove me, this is deprecated. -hipError_t hipHostAlloc(void** ptr, size_t sizeBytes, unsigned int flags) -{ - return hipHostMalloc(ptr, sizeBytes, flags); -}; - // width in bytes hipError_t hipMallocPitch(void** ptr, size_t* pitch, size_t width, size_t height) { diff --git a/projects/hip/tests/src/CMakeLists.txt b/projects/hip/tests/src/CMakeLists.txt index b58b930f7f..2f8c8f0a69 100644 --- a/projects/hip/tests/src/CMakeLists.txt +++ b/projects/hip/tests/src/CMakeLists.txt @@ -184,7 +184,7 @@ build_hip_executable_libcpp(hipHcc hipHcc.cpp) # __workweek fix. #build_hip_executable_libcpp(hipPointerAttrib hipPointerAttrib.cpp) -build_hip_executable(hipHostAlloc hipHostAlloc.cpp) +build_hip_executable(hipHostMalloc hipHostMalloc.cpp) build_hip_executable(hipHostGetFlags hipHostGetFlags.cpp) build_hip_executable(hipHostRegister hipHostRegister.cpp) build_hip_executable(hipRandomMemcpyAsync hipRandomMemcpyAsync.cpp) @@ -208,7 +208,7 @@ make_test(hipLaunchParm " ") #make_test(hipPointerAttrib " ") -make_test(hipHostAlloc " ") +make_test(hipHostMalloc " ") # BS- comment out since test appears broken - asks for device pointer but pointer was never allocated. #make_test(hipHostGetFlags " ") make_test(hipHcc " ") diff --git a/projects/hip/tests/src/hipHostAlloc.cpp b/projects/hip/tests/src/hipHostMalloc.cpp similarity index 100% rename from projects/hip/tests/src/hipHostAlloc.cpp rename to projects/hip/tests/src/hipHostMalloc.cpp