Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update deprecated API list #3591

Merged
merged 2 commits into from
Oct 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
228 changes: 156 additions & 72 deletions docs/reference/deprecated_api_list.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,87 +6,171 @@
HIP deprecated runtime API functions
**********************************************************************************************

Several of our API functions have been flagged for deprecation. Using the following functions results in
errors and unexpected results, so we encourage you to update your code accordingly.
Several of our API functions have been flagged for deprecation. Using the
following functions results in errors and unexpected results, so we encourage
you to update your code accordingly.

Context management
Deprecated since ROCm 6.1.0
============================================================

CUDA supports cuCtx API, which is the driver API that defines "Context" and "Devices" as separate
entities. Context contains a single device, and a device can theoretically have multiple contexts. HIP
initially added limited support for these APIs in order to facilitate porting from existing driver codes.
These APIs are now marked as deprecated because there are better alternate interfaces (such as
``hipSetDevice`` or the stream API) to achieve these functions.

* ``hipCtxCreate``
* ``hipCtxDestroy``
* ``hipCtxPopCurrent``
* ``hipCtxPushCurrent``
* ``hipCtxSetCurrent``
* ``hipCtxGetCurrent``
* ``hipCtxGetDevice``
* ``hipCtxGetApiVersion``
* ``hipCtxGetCacheConfig``
* ``hipCtxSetCacheConfig``
* ``hipCtxSetSharedMemConfig``
* ``hipCtxGetSharedMemConfig``
* ``hipCtxSynchronize``
* ``hipCtxGetFlags``
* ``hipCtxEnablePeerAccess``
* ``hipCtxDisablePeerAccess``
* ``hipDevicePrimaryCtxGetState``
* ``hipDevicePrimaryCtxRelease``
* ``hipDevicePrimaryCtxRetain``
* ``hipDevicePrimaryCtxReset``
* ``hipDevicePrimaryCtxSetFlags``

Memory management
Deprecated texture management functions.

.. list-table::
:widths: 40
:header-rows: 1
:align: left

* - function
* - :cpp:func:`hipTexRefGetBorderColor`
* - :cpp:func:`hipTexRefGetArray`

Deprecated since ROCm 5.7.0
============================================================

Deprecated texture management functions.

.. list-table::
:widths: 40
:header-rows: 1
:align: left

* - function
* - :cpp:func:`hipBindTextureToMipmappedArray`

Deprecated since ROCm 5.3.0
============================================================

Deprecated texture management functions.

.. list-table::
:widths: 40
:header-rows: 1
:align: left

* - function
* - :cpp:func:`hipGetTextureReference`
* - :cpp:func:`hipTexRefSetAddressMode`
* - :cpp:func:`hipTexRefSetArray`
* - :cpp:func:`hipTexRefSetFlags`
* - :cpp:func:`hipTexRefSetFilterMode`
* - :cpp:func:`hipTexRefSetBorderColor`
* - :cpp:func:`hipTexRefSetMipmapFilterMode`
* - :cpp:func:`hipTexRefSetMipmapLevelBias`
* - :cpp:func:`hipTexRefSetMipmapLevelClamp`
* - :cpp:func:`hipTexRefSetMipmappedArray`

Deprecated since ROCm 4.3.0
============================================================

Deprecated texture management functions.

.. list-table::
:widths: 40
:header-rows: 1
:align: left

* - function
* - :cpp:func:`hipTexRefSetFormat`
* - :cpp:func:`hipTexRefGetAddress`
* - :cpp:func:`hipTexRefGetAddressMode`
* - :cpp:func:`hipTexRefGetFilterMode`
* - :cpp:func:`hipTexRefGetFlags`
* - :cpp:func:`hipTexRefGetFormat`
* - :cpp:func:`hipTexRefGetMaxAnisotropy`
* - :cpp:func:`hipTexRefGetMipmapFilterMode`
* - :cpp:func:`hipTexRefGetMipmapLevelBias`
* - :cpp:func:`hipTexRefGetMipmapLevelClamp`
* - :cpp:func:`hipTexRefGetMipMappedArray`
* - :cpp:func:`hipTexRefSetAddress`
* - :cpp:func:`hipTexRefSetAddress2D`
* - :cpp:func:`hipTexRefSetMaxAnisotropy`

Deprecated since ROCm 3.8.0
============================================================

Deprecated memory management and texture management functions.

.. list-table::
:widths: 40
:header-rows: 1
:align: left

* - function
* - :cpp:func:`hipBindTexture`
* - :cpp:func:`hipBindTexture2D`
* - :cpp:func:`hipBindTextureToArray`
* - :cpp:func:`hipGetTextureAlignmentOffset`
* - :cpp:func:`hipUnbindTexture`
* - :cpp:func:`hipMemcpyToArray`
* - :cpp:func:`hipMemcpyFromArray`

Deprecated since ROCm 3.1.0
============================================================

* ``hipMallocHost`` (replaced with ``hipHostAlloc``)
* ``hipMemAllocHost`` (replaced with ``hipHostAlloc``)
* ``hipMemcpyToArray``
* ``hipMemcpyFromArray``
Deprecated memory management functions.

.. list-table::
:widths: 40, 60
:header-rows: 1
:align: left

* - function
-
* - :cpp:func:`hipMallocHost`
- replaced with :cpp:func:`hipHostAlloc`
* - :cpp:func:`hipMemAllocHost`
- replaced with :cpp:func:`hipHostAlloc`

Profiler control
Deprecated since ROCm 3.0.0
============================================================

* ``hipProfilerStart`` (use roctracer/rocTX)
* ``hipProfilerStop`` (use roctracer/rocTX)
The ``hipProfilerStart`` and ``hipProfilerStop`` functions are deprecated.
Instead, you can use ``roctracer`` or ``rocTX`` for profiling which provide more
flexibility and detailed profiling capabilities.

.. list-table::
:widths: 40
:header-rows: 1
:align: left

Texture management
* - function
* - :cpp:func:`hipProfilerStart`
* - :cpp:func:`hipProfilerStop`

Deprecated since ROCm 1.9.0
============================================================

* ``hipGetTextureReference``
* ``hipTexRefSetAddressMode``
* ``hipTexRefSetArray``
* ``hipTexRefSetFilterMode``
* ``hipTexRefSetFlags``
* ``hipTexRefSetFormat``
* ``hipTexRefGetAddress``
* ``hipTexRefGetAddressMode``
* ``hipTexRefGetFilterMode``
* ``hipTexRefGetFlags``
* ``hipTexRefGetFormat``
* ``hipTexRefGetMaxAnisotropy``
* ``hipTexRefGetMipmapFilterMode``
* ``hipTexRefGetMipmapLevelBias``
* ``hipTexRefGetMipmapLevelClamp``
* ``hipTexRefGetMipMappedArray``
* ``hipTexRefSetAddress``
* ``hipTexRefSetAddress2D``
* ``hipTexRefSetMaxAnisotropy``
* ``hipTexRefSetBorderColor``
* ``hipTexRefSetMipmapFilterMode``
* ``hipTexRefSetMipmapLevelBias``
* ``hipTexRefSetMipmapLevelClamp``
* ``hipTexRefSetMipmappedArray``
* ``hipTexRefGetBorderColor``
* ``hipTexRefGetArray``
* ``hipBindTexture``
* ``hipBindTexture2D``
* ``hipBindTextureToArray``
* ``hipGetTextureAlignmentOffset``
* ``hipUnbindTexture``
* ``hipBindTextureToMipmappedArray``
CUDA supports cuCtx API, which is the driver API that defines "Context" and
"Devices" as separate entities. Context contains a single device, and a device
can theoretically have multiple contexts. HIP initially added limited support
for context APIs in order to facilitate porting from existing driver codes. These
APIs are now marked as deprecated because there are better alternate interfaces
(such as ``hipSetDevice`` or the stream API) to achieve these functions.

.. list-table::
:widths: 40
:header-rows: 1
:align: left

* - function
* - :cpp:func:`hipCtxCreate`
* - :cpp:func:`hipCtxDestroy`
* - :cpp:func:`hipCtxPopCurrent`
* - :cpp:func:`hipCtxPushCurrent`
* - :cpp:func:`hipCtxSetCurrent`
* - :cpp:func:`hipCtxGetCurrent`
* - :cpp:func:`hipCtxGetDevice`
* - :cpp:func:`hipCtxGetApiVersion`
* - :cpp:func:`hipCtxGetCacheConfig`
* - :cpp:func:`hipCtxSetCacheConfig`
* - :cpp:func:`hipCtxSetSharedMemConfig`
* - :cpp:func:`hipCtxGetSharedMemConfig`
* - :cpp:func:`hipCtxSynchronize`
* - :cpp:func:`hipCtxGetFlags`
* - :cpp:func:`hipCtxEnablePeerAccess`
* - :cpp:func:`hipCtxDisablePeerAccess`
* - :cpp:func:`hipDevicePrimaryCtxGetState`
* - :cpp:func:`hipDevicePrimaryCtxRelease`
* - :cpp:func:`hipDevicePrimaryCtxRetain`
* - :cpp:func:`hipDevicePrimaryCtxReset`
* - :cpp:func:`hipDevicePrimaryCtxSetFlags`
Loading