From a52cb887c2db551496367da2009e0fef14dfa44e Mon Sep 17 00:00:00 2001 From: Rahul Garg Date: Thu, 8 Sep 2016 23:12:12 +0530 Subject: [PATCH] Removed return code related doxygen from hip_device src file Change-Id: Iffe51b69dd6be064b7898d06e537a505e27edb0b --- include/hcc_detail/hip_runtime_api.h | 11 +++++ src/hip_device.cpp | 64 ---------------------------- 2 files changed, 11 insertions(+), 64 deletions(-) diff --git a/include/hcc_detail/hip_runtime_api.h b/include/hcc_detail/hip_runtime_api.h index bcb2053a70..e447fb609c 100644 --- a/include/hcc_detail/hip_runtime_api.h +++ b/include/hcc_detail/hip_runtime_api.h @@ -278,6 +278,11 @@ hipError_t hipDeviceGetAttribute(int* pi, hipDeviceAttribute_t attr, int deviceI * @param [out] prop written with device properties * @param [in] deviceId which device to query for information * + * @return #hipSuccess, #hipErrorInvalidDevice + * @bug HCC always returns 0 for maxThreadsPerMultiProcessor + * @bug HCC always returns 0 for regsPerBlock + * @bug HCC always returns 0 for l2CacheSize + * * Populates hipGetDeviceProperties with information for the specified device. */ hipError_t hipGetDeviceProperties(hipDeviceProp_t* prop, int deviceId); @@ -289,6 +294,7 @@ hipError_t hipGetDeviceProperties(hipDeviceProp_t* prop, int deviceId); /** * @brief Set L1/Shared cache partition. * + * @returns #hipSuccess * Note: AMD devices and recent Nvidia GPUS do not support reconfigurable cache. This hint is ignored on those architectures. * */ @@ -298,6 +304,7 @@ hipError_t hipDeviceSetCacheConfig ( hipFuncCache cacheConfig ); /** * @brief Set Cache configuration for a specific function * + * @returns #hipSuccess * Note: AMD devices and recent Nvidia GPUS do not support reconfigurable cache. This hint is ignored on those architectures. * */ @@ -307,6 +314,7 @@ hipError_t hipDeviceGetCacheConfig ( hipFuncCache *cacheConfig ); /** * @brief Set Cache configuration for a specific function * + * @returns #hipSuccess * Note: AMD devices and recent Nvidia GPUS do not support reconfigurable cache. This hint is ignored on those architectures. * */ @@ -318,6 +326,7 @@ hipError_t hipFuncSetCacheConfig ( hipFuncCache config ); /** * @brief Get Shared memory bank configuration. * + * @returns #hipSuccess * Note: AMD devices and recent Nvidia GPUS do not support shared cache banking, and the hint is ignored on those architectures. * */ @@ -327,6 +336,7 @@ hipError_t hipDeviceGetSharedMemConfig ( hipSharedMemConfig * pConfig ); /** * @brief Set Shared memory bank configuration. * + * @returns #hipSuccess * Note: AMD devices and recent Nvidia GPUS do not support shared cache banking, and the hint is ignored on those architectures. * */ @@ -335,6 +345,7 @@ hipError_t hipDeviceSetSharedMemConfig ( hipSharedMemConfig config ); /** * @brief Set Device flags * + * @returns #hipSuccess * Note: Only hipDeviceScheduleAuto and hipDeviceMapHost are supported * */ diff --git a/src/hip_device.cpp b/src/hip_device.cpp index 5abafe6748..fdfb25d7b0 100644 --- a/src/hip_device.cpp +++ b/src/hip_device.cpp @@ -24,10 +24,6 @@ THE SOFTWARE. //------------------------------------------------------------------------------------------------- //Devices //------------------------------------------------------------------------------------------------- -//--- -/** - * @return #hipSuccess, hipErrorInvalidDevice - */ // TODO - does this initialize HIP runtime? hipError_t hipGetDevice(int *deviceId) { @@ -47,11 +43,6 @@ hipError_t hipGetDevice(int *deviceId) return ihipLogStatus(e); } - -//--- -/** - * @return #hipSuccess, #hipErrorNoDevice - */ // TODO - does this initialize HIP runtime? hipError_t hipGetDeviceCount(int *count) { @@ -66,11 +57,6 @@ hipError_t hipGetDeviceCount(int *count) } } - -//--- -/** - * @returns #hipSuccess - */ hipError_t hipDeviceSetCacheConfig ( hipFuncCache cacheConfig ) { HIP_INIT_API(cacheConfig); @@ -80,11 +66,6 @@ hipError_t hipDeviceSetCacheConfig ( hipFuncCache cacheConfig ) return ihipLogStatus(hipSuccess); } - -//--- -/** - * @returns #hipSuccess - */ hipError_t hipDeviceGetCacheConfig ( hipFuncCache *cacheConfig ) { HIP_INIT_API(cacheConfig); @@ -94,11 +75,6 @@ hipError_t hipDeviceGetCacheConfig ( hipFuncCache *cacheConfig ) return ihipLogStatus(hipSuccess); } - -//--- -/** - * @returns #hipSuccess - */ hipError_t hipFuncSetCacheConfig ( hipFuncCache cacheConfig ) { HIP_INIT_API(cacheConfig); @@ -108,12 +84,6 @@ hipError_t hipFuncSetCacheConfig ( hipFuncCache cacheConfig ) return ihipLogStatus(hipSuccess); } - - -//--- -/** - * @returns #hipSuccess - */ hipError_t hipDeviceSetSharedMemConfig ( hipSharedMemConfig config ) { HIP_INIT_API(config); @@ -123,12 +93,6 @@ hipError_t hipDeviceSetSharedMemConfig ( hipSharedMemConfig config ) return ihipLogStatus(hipSuccess); } - - -//--- -/** - * @returns #hipSuccess - */ hipError_t hipDeviceGetSharedMemConfig ( hipSharedMemConfig * pConfig ) { HIP_INIT_API(pConfig); @@ -138,10 +102,6 @@ hipError_t hipDeviceGetSharedMemConfig ( hipSharedMemConfig * pConfig ) return ihipLogStatus(hipSuccess); } -//--- -/** - * @return #hipSuccess, #hipErrorInvalidDevice - */ hipError_t hipSetDevice(int deviceId) { HIP_INIT_API(deviceId); @@ -153,22 +113,12 @@ hipError_t hipSetDevice(int deviceId) } } - -//--- -/** - * @return #hipSuccess - */ hipError_t hipDeviceSynchronize(void) { HIP_INIT_API(); return ihipLogStatus(ihipSynchronize()); } - -//--- -/** - * @return @ref hipSuccess - */ hipError_t hipDeviceReset(void) { HIP_INIT_API(); @@ -188,9 +138,6 @@ hipError_t hipDeviceReset(void) return ihipLogStatus(hipSuccess); } -/** - * - */ hipError_t hipDeviceGetAttribute(int* pi, hipDeviceAttribute_t attr, int device) { HIP_INIT_API(pi, attr, device); @@ -260,13 +207,6 @@ hipError_t hipDeviceGetAttribute(int* pi, hipDeviceAttribute_t attr, int device) return ihipLogStatus(e); } - -/** - * @return #hipSuccess, #hipErrorInvalidDevice - * @bug HCC always returns 0 for maxThreadsPerMultiProcessor - * @bug HCC always returns 0 for regsPerBlock - * @bug HCC always returns 0 for l2CacheSize - */ hipError_t hipGetDeviceProperties(hipDeviceProp_t* props, int device) { HIP_INIT_API(props, device); @@ -285,7 +225,6 @@ hipError_t hipGetDeviceProperties(hipDeviceProp_t* props, int device) return ihipLogStatus(e); } - hipError_t hipSetDeviceFlags( unsigned int flags) { HIP_INIT_API(flags); @@ -306,9 +245,6 @@ hipError_t hipSetDeviceFlags( unsigned int flags) return ihipLogStatus(e); }; - - - hipError_t hipDeviceGetFromId(hipDevice_t *device, int deviceId) { HIP_INIT_API(device, deviceId);