Skip to content

Commit 08570e4

Browse files
[rocm-libraries] ROCm/rocm-libraries#6495 (commit 7e0c86f)
[rocthrust] Create an env var doc for rocThrust ## Motivation rocThrust needed an env var doc.
1 parent 3685280 commit 08570e4

3 files changed

Lines changed: 23 additions & 1 deletion

File tree

docs/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ The rocThrust project is located in https://github.com/ROCm/rocm-libraries/tree/
3838
.. grid-item-card:: Reference
3939

4040
* :ref:`bitwise-repro`
41-
* :ref:`api-reference`
41+
* :ref:`atomic-path`
42+
* :ref:`rocThrust API reference <api-reference>`
4243

4344
To contribute to the documentation, refer to
4445
`Contributing to ROCm <https://rocm.docs.amd.com/en/latest/contribute/contributing.html>`_.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
.. meta::
2+
:description: rocThrust and atomic path
3+
:keywords: rocThrust, rocPRIM, atomic path, ROCPRIM_USE_ATOMIC_BLOCK_ID, HIP
4+
5+
.. _atomic-path:
6+
7+
************************************
8+
rocThrust and atomic path
9+
************************************
10+
11+
When using the atomic path, block IDs are assigned by atomically incrementing a counter in global device memory. This produces a predictable ordering of block IDs for kernels that require path correctness.
12+
13+
The default rocThrust setting uses the atomic path only with gfx942 or gfx950 architectures.
14+
15+
This behavior can be changed through the ``ROCPRIM_USE_ATOMIC_BLOCK_ID`` environment variable. Set ``ROCPRIM_USE_ATOMIC_BLOCK_ID`` to 0, to never use the atomic path. Set ``ROCPRIM_USE_ATOMIC_BLOCK_ID`` to 2 to always use the atomic path. Set ``ROCPRIM_USE_ATOMIC_BLOCK_ID`` to 1 to return to the default behavior where the atomic path is used automatically only on gfx942 or gfx950 architectures.
16+
17+
Because using the atomic path can come at a performance cost, ``ROCPRIM_USE_ATOMIC_BLOCK_ID`` should be set to 2 only if there is a noticeable performance degradation or a deadlock in the rocThrust and rocPRIM kernels regardless of the underlying architecture.
18+
19+
``ROCPRIM_USE_ATOMIC_BLOCK_ID`` should be set to 0 only in the case where neither the gfx942 or gfx950 architectures are being used.

docs/sphinx/_toc.yml.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ subtrees:
4040
entries:
4141
- file: reference/rocThrust-bitwise-repro
4242
title: Bitwise reproducibility
43+
- file: reference/rocThrust-using-atomic-path
44+
title: Atomic path
4345
- file: cpp_api
4446

4547
- caption: About

0 commit comments

Comments
 (0)