From 3b4875ba7757f3269a656942767eaf3e65a7ece2 Mon Sep 17 00:00:00 2001 From: Rahul Garg Date: Fri, 20 Apr 2018 17:34:48 +0530 Subject: [PATCH 1/3] Mark hipCtx APIs as deprecated [ROCm/hip commit: a039dbf2dd7518e84a043f0d7533712ee29c58ea] --- .../docs/markdown/hip_deprecated_api_list.md | 22 ++++++++++++ .../include/hip/hcc_detail/hip_runtime_api.h | 35 ++++++++++--------- 2 files changed, 41 insertions(+), 16 deletions(-) create mode 100644 projects/hip/docs/markdown/hip_deprecated_api_list.md diff --git a/projects/hip/docs/markdown/hip_deprecated_api_list.md b/projects/hip/docs/markdown/hip_deprecated_api_list.md new file mode 100644 index 0000000000..a96f7f4d3f --- /dev/null +++ b/projects/hip/docs/markdown/hip_deprecated_api_list.md @@ -0,0 +1,22 @@ +# HIP Deprecated API List + +## HIP Context API + +CUDA supports cuCtx API, the Driver API that defines "Context" and "Devices" as separate entities. Contexts contain a single device, and a device can theoretically have multiple contexts. HIP initially added limited support for these API to facilitate easy porting from existing driver codes. These API are marked as deprecated now since there are better alternate interface (such as hipSetDevice or the stream API) to achieve the required functions. + +###hipCtxCreate +###hipCtxDestroy +###hipCtxPopCurrent +###hipCtxPushCurrent +###hipCtxSetCurrent +###hipCtxGetCurrent +###hipCtxGetDevice +###hipCtxGetApiVersion +###hipCtxGetCacheConfig +###hipCtxSetCacheConfig +###hipCtxSetSharedMemConfig +###hipCtxGetSharedMemConfig +###hipCtxSynchronize +###hipCtxGetFlags +###hipCtxEnablePeerAccess +###hipCtxDisablePeerAccess diff --git a/projects/hip/include/hip/hcc_detail/hip_runtime_api.h b/projects/hip/include/hip/hcc_detail/hip_runtime_api.h index 8674824c48..f7a5718894 100644 --- a/projects/hip/include/hip/hcc_detail/hip_runtime_api.h +++ b/projects/hip/include/hip/hcc_detail/hip_runtime_api.h @@ -42,6 +42,9 @@ THE SOFTWARE. #include #include +#define DEPRECATED(msg, func) func __attribute__ ((deprecated(msg))) +#define DEPRECATED_MSG "This API is marked as deprecated and may not be supported in future releases.For more details please refer https://github.com/ROCm-Developer-Tools/HIP/tree/master/docs/markdown/hip_deprecated_api_list" + #if defined(__HCC__) && (__hcc_workweek__ < 16155) #error("This version of HIP requires a newer version of HCC."); #endif @@ -1828,7 +1831,7 @@ hipError_t hipInit(unsigned int flags); * @see hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxPushCurrent, * hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice */ -hipError_t hipCtxCreate(hipCtx_t* ctx, unsigned int flags, hipDevice_t device); +DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxCreate(hipCtx_t* ctx, unsigned int flags, hipDevice_t device)); /** * @brief Destroy a HIP context. @@ -1840,7 +1843,7 @@ hipError_t hipCtxCreate(hipCtx_t* ctx, unsigned int flags, hipDevice_t device); * @see hipCtxCreate, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,hipCtxSetCurrent, * hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize , hipCtxGetDevice */ -hipError_t hipCtxDestroy(hipCtx_t ctx); +DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxDestroy(hipCtx_t ctx)); /** * @brief Pop the current/default context and return the popped context. @@ -1852,7 +1855,7 @@ hipError_t hipCtxDestroy(hipCtx_t ctx); * @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxSetCurrent, hipCtxGetCurrent, * hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice */ -hipError_t hipCtxPopCurrent(hipCtx_t* ctx); +DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxPopCurrent(hipCtx_t* ctx)); /** * @brief Push the context to be set as current/ default context @@ -1864,7 +1867,7 @@ hipError_t hipCtxPopCurrent(hipCtx_t* ctx); * @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, * hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize , hipCtxGetDevice */ -hipError_t hipCtxPushCurrent(hipCtx_t ctx); +DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxPushCurrent(hipCtx_t ctx)); /** * @brief Set the passed context as current/default @@ -1876,7 +1879,7 @@ hipError_t hipCtxPushCurrent(hipCtx_t ctx); * @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, * hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize , hipCtxGetDevice */ -hipError_t hipCtxSetCurrent(hipCtx_t ctx); +DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxSetCurrent(hipCtx_t ctx)); /** * @brief Get the handle of the current/ default context @@ -1888,7 +1891,7 @@ hipError_t hipCtxSetCurrent(hipCtx_t ctx); * @see hipCtxCreate, hipCtxDestroy, hipCtxGetDevice, hipCtxGetFlags, hipCtxPopCurrent, * hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice */ -hipError_t hipCtxGetCurrent(hipCtx_t* ctx); +DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxGetCurrent(hipCtx_t* ctx)); /** * @brief Get the handle of the device associated with current/default context @@ -1901,7 +1904,7 @@ hipError_t hipCtxGetCurrent(hipCtx_t* ctx); * hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize */ -hipError_t hipCtxGetDevice(hipDevice_t* device); +DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxGetDevice(hipDevice_t* device)); /** * @brief Returns the approximate HIP api version. @@ -1920,7 +1923,7 @@ hipError_t hipCtxGetDevice(hipDevice_t* device); * @see hipCtxCreate, hipCtxDestroy, hipCtxGetDevice, hipCtxGetFlags, hipCtxPopCurrent, * hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice */ -hipError_t hipCtxGetApiVersion(hipCtx_t ctx, int* apiVersion); +DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxGetApiVersion(hipCtx_t ctx, int* apiVersion)); /** * @brief Set Cache configuration for a specific function @@ -1935,7 +1938,7 @@ hipError_t hipCtxGetApiVersion(hipCtx_t ctx, int* apiVersion); * @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, * hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice */ -hipError_t hipCtxGetCacheConfig(hipFuncCache_t* cacheConfig); +DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxGetCacheConfig(hipFuncCache_t* cacheConfig)); /** * @brief Set L1/Shared cache partition. @@ -1950,7 +1953,7 @@ hipError_t hipCtxGetCacheConfig(hipFuncCache_t* cacheConfig); * @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, * hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice */ -hipError_t hipCtxSetCacheConfig(hipFuncCache_t cacheConfig); +DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxSetCacheConfig(hipFuncCache_t cacheConfig)); /** * @brief Set Shared memory bank configuration. @@ -1965,7 +1968,7 @@ hipError_t hipCtxSetCacheConfig(hipFuncCache_t cacheConfig); * @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, * hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice */ -hipError_t hipCtxSetSharedMemConfig(hipSharedMemConfig config); +DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxSetSharedMemConfig(hipSharedMemConfig config)); /** * @brief Get Shared memory bank configuration. @@ -1980,7 +1983,7 @@ hipError_t hipCtxSetSharedMemConfig(hipSharedMemConfig config); * @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, * hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice */ -hipError_t hipCtxGetSharedMemConfig(hipSharedMemConfig* pConfig); +DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxGetSharedMemConfig(hipSharedMemConfig* pConfig)); /** * @brief Blocks until the default context has completed all preceding requested tasks. @@ -1993,7 +1996,7 @@ hipError_t hipCtxGetSharedMemConfig(hipSharedMemConfig* pConfig); * @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, * hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxGetDevice */ -hipError_t hipCtxSynchronize(void); +DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxSynchronize(void)); /** * @brief Return flags used for creating default context. @@ -2005,7 +2008,7 @@ hipError_t hipCtxSynchronize(void); * @see hipCtxCreate, hipCtxDestroy, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxGetCurrent, * hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice */ -hipError_t hipCtxGetFlags(unsigned int* flags); +DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxGetFlags(unsigned int* flags)); /** * @brief Enables direct access to memory allocations in a peer context. @@ -2026,7 +2029,7 @@ hipError_t hipCtxGetFlags(unsigned int* flags); * hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice * @warning PeerToPeer support is experimental. */ -hipError_t hipCtxEnablePeerAccess(hipCtx_t peerCtx, unsigned int flags); +DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxEnablePeerAccess(hipCtx_t peerCtx, unsigned int flags)); /** * @brief Disable direct access from current context's virtual address space to memory allocations @@ -2044,7 +2047,7 @@ hipError_t hipCtxEnablePeerAccess(hipCtx_t peerCtx, unsigned int flags); * hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice * @warning PeerToPeer support is experimental. */ -hipError_t hipCtxDisablePeerAccess(hipCtx_t peerCtx); +DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxDisablePeerAccess(hipCtx_t peerCtx)); /** * @brief Get the state of the primary context. From c4df5688c46305e98616fdc3ef44ac4b96b5af54 Mon Sep 17 00:00:00 2001 From: Rahul Garg Date: Fri, 20 Apr 2018 21:57:23 +0530 Subject: [PATCH 2/3] Moved deprecated macro to the end [ROCm/hip commit: 19cb6c61abb84a107932f689be6a71435ec54d61] --- .../include/hip/hcc_detail/hip_runtime_api.h | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/projects/hip/include/hip/hcc_detail/hip_runtime_api.h b/projects/hip/include/hip/hcc_detail/hip_runtime_api.h index f7a5718894..86678f90ef 100644 --- a/projects/hip/include/hip/hcc_detail/hip_runtime_api.h +++ b/projects/hip/include/hip/hcc_detail/hip_runtime_api.h @@ -42,7 +42,7 @@ THE SOFTWARE. #include #include -#define DEPRECATED(msg, func) func __attribute__ ((deprecated(msg))) +#define DEPRECATED(msg) __attribute__ ((deprecated(msg))) #define DEPRECATED_MSG "This API is marked as deprecated and may not be supported in future releases.For more details please refer https://github.com/ROCm-Developer-Tools/HIP/tree/master/docs/markdown/hip_deprecated_api_list" #if defined(__HCC__) && (__hcc_workweek__ < 16155) @@ -1831,7 +1831,7 @@ hipError_t hipInit(unsigned int flags); * @see hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxPushCurrent, * hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice */ -DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxCreate(hipCtx_t* ctx, unsigned int flags, hipDevice_t device)); +hipError_t hipCtxCreate(hipCtx_t* ctx, unsigned int flags, hipDevice_t device)DEPRECATED(DEPRECATED_MSG); /** * @brief Destroy a HIP context. @@ -1843,7 +1843,7 @@ DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxCreate(hipCtx_t* ctx, unsigned int fl * @see hipCtxCreate, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,hipCtxSetCurrent, * hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize , hipCtxGetDevice */ -DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxDestroy(hipCtx_t ctx)); +hipError_t hipCtxDestroy(hipCtx_t ctx) DEPRECATED(DEPRECATED_MSG); /** * @brief Pop the current/default context and return the popped context. @@ -1855,7 +1855,7 @@ DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxDestroy(hipCtx_t ctx)); * @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxSetCurrent, hipCtxGetCurrent, * hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice */ -DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxPopCurrent(hipCtx_t* ctx)); +hipError_t hipCtxPopCurrent(hipCtx_t* ctx) DEPRECATED(DEPRECATED_MSG); /** * @brief Push the context to be set as current/ default context @@ -1867,7 +1867,7 @@ DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxPopCurrent(hipCtx_t* ctx)); * @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, * hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize , hipCtxGetDevice */ -DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxPushCurrent(hipCtx_t ctx)); +hipError_t hipCtxPushCurrent(hipCtx_t ctx) DEPRECATED(DEPRECATED_MSG); /** * @brief Set the passed context as current/default @@ -1879,7 +1879,7 @@ DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxPushCurrent(hipCtx_t ctx)); * @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, * hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize , hipCtxGetDevice */ -DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxSetCurrent(hipCtx_t ctx)); +hipError_t hipCtxSetCurrent(hipCtx_t ctx) DEPRECATED(DEPRECATED_MSG); /** * @brief Get the handle of the current/ default context @@ -1891,7 +1891,7 @@ DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxSetCurrent(hipCtx_t ctx)); * @see hipCtxCreate, hipCtxDestroy, hipCtxGetDevice, hipCtxGetFlags, hipCtxPopCurrent, * hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice */ -DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxGetCurrent(hipCtx_t* ctx)); +hipError_t hipCtxGetCurrent(hipCtx_t* ctx) DEPRECATED(DEPRECATED_MSG); /** * @brief Get the handle of the device associated with current/default context @@ -1904,7 +1904,7 @@ DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxGetCurrent(hipCtx_t* ctx)); * hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize */ -DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxGetDevice(hipDevice_t* device)); +hipError_t hipCtxGetDevice(hipDevice_t* device) DEPRECATED(DEPRECATED_MSG); /** * @brief Returns the approximate HIP api version. @@ -1923,7 +1923,7 @@ DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxGetDevice(hipDevice_t* device)); * @see hipCtxCreate, hipCtxDestroy, hipCtxGetDevice, hipCtxGetFlags, hipCtxPopCurrent, * hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice */ -DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxGetApiVersion(hipCtx_t ctx, int* apiVersion)); +hipError_t hipCtxGetApiVersion(hipCtx_t ctx, int* apiVersion) DEPRECATED(DEPRECATED_MSG); /** * @brief Set Cache configuration for a specific function @@ -1938,7 +1938,7 @@ DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxGetApiVersion(hipCtx_t ctx, int* apiV * @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, * hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice */ -DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxGetCacheConfig(hipFuncCache_t* cacheConfig)); +hipError_t hipCtxGetCacheConfig(hipFuncCache_t* cacheConfig) DEPRECATED(DEPRECATED_MSG); /** * @brief Set L1/Shared cache partition. @@ -1953,7 +1953,7 @@ DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxGetCacheConfig(hipFuncCache_t* cacheC * @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, * hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice */ -DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxSetCacheConfig(hipFuncCache_t cacheConfig)); +hipError_t hipCtxSetCacheConfig(hipFuncCache_t cacheConfig) DEPRECATED(DEPRECATED_MSG); /** * @brief Set Shared memory bank configuration. @@ -1968,7 +1968,7 @@ DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxSetCacheConfig(hipFuncCache_t cacheCo * @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, * hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice */ -DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxSetSharedMemConfig(hipSharedMemConfig config)); +hipError_t hipCtxSetSharedMemConfig(hipSharedMemConfig config) DEPRECATED(DEPRECATED_MSG); /** * @brief Get Shared memory bank configuration. @@ -1983,7 +1983,7 @@ DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxSetSharedMemConfig(hipSharedMemConfig * @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, * hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice */ -DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxGetSharedMemConfig(hipSharedMemConfig* pConfig)); +hipError_t hipCtxGetSharedMemConfig(hipSharedMemConfig* pConfig) DEPRECATED(DEPRECATED_MSG); /** * @brief Blocks until the default context has completed all preceding requested tasks. @@ -1996,7 +1996,7 @@ DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxGetSharedMemConfig(hipSharedMemConfig * @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, * hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxGetDevice */ -DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxSynchronize(void)); +hipError_t hipCtxSynchronize(void) DEPRECATED(DEPRECATED_MSG); /** * @brief Return flags used for creating default context. @@ -2008,7 +2008,7 @@ DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxSynchronize(void)); * @see hipCtxCreate, hipCtxDestroy, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxGetCurrent, * hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice */ -DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxGetFlags(unsigned int* flags)); +hipError_t hipCtxGetFlags(unsigned int* flags) DEPRECATED(DEPRECATED_MSG); /** * @brief Enables direct access to memory allocations in a peer context. @@ -2029,7 +2029,7 @@ DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxGetFlags(unsigned int* flags)); * hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice * @warning PeerToPeer support is experimental. */ -DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxEnablePeerAccess(hipCtx_t peerCtx, unsigned int flags)); +hipError_t hipCtxEnablePeerAccess(hipCtx_t peerCtx, unsigned int flags) DEPRECATED(DEPRECATED_MSG); /** * @brief Disable direct access from current context's virtual address space to memory allocations @@ -2047,7 +2047,7 @@ DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxEnablePeerAccess(hipCtx_t peerCtx, un * hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice * @warning PeerToPeer support is experimental. */ -DEPRECATED(DEPRECATED_MSG,hipError_t hipCtxDisablePeerAccess(hipCtx_t peerCtx)); +hipError_t hipCtxDisablePeerAccess(hipCtx_t peerCtx) DEPRECATED(DEPRECATED_MSG); /** * @brief Get the state of the primary context. From 6538884ebed8471c899d26cd9254b9ce93f383b3 Mon Sep 17 00:00:00 2001 From: Rahul Garg Date: Fri, 20 Apr 2018 22:43:58 +0530 Subject: [PATCH 3/3] Added deprecation note in cuCtx section [ROCm/hip commit: 39b5b07dc30bc2903ed8f662332acc48e8874474] --- projects/hip/docs/markdown/hip_porting_driver_api.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/hip/docs/markdown/hip_porting_driver_api.md b/projects/hip/docs/markdown/hip_porting_driver_api.md index 47cb7fb009..e0489d5c16 100644 --- a/projects/hip/docs/markdown/hip_porting_driver_api.md +++ b/projects/hip/docs/markdown/hip_porting_driver_api.md @@ -39,7 +39,8 @@ HIP as well as a recent versions of CUDA Runtime provide other mechanisms to acc The CUDA Runtime API unifies the Context API with the Device API. This simplifies the APIs and has little loss of functionality since each Context can contain a single device, and the benefits of multiple contexts has been replaced with other interfaces. HIP provides a context API to facilitate easy porting from existing Driver codes. In HIP, the Ctx functions largely provide an alternate syntax for changing the active device. -Most new applications will prefer to use `hipSetDevice` or the stream APIs. + +Most new applications will prefer to use `hipSetDevice` or the stream APIs , therefore HIP has marked hipCtx APIs as **deprecated**. Support for these APIs may not be available in future releases. For more details on deprecated APIs please refer [HIP deprecated APIs](https://github.com/ROCm-Developer-Tools/HIP/tree/master/docs/markdown/hip_deprecated_api_list.md). ## HIP Module and Ctx APIs