diff --git a/docs/libcudacxx/extended_api/memory_model.rst b/docs/libcudacxx/extended_api/memory_model.rst index dfb6ed6789..6dd4097747 100644 --- a/docs/libcudacxx/extended_api/memory_model.rst +++ b/docs/libcudacxx/extended_api/memory_model.rst @@ -61,33 +61,39 @@ An atomic operation is atomic at the scope it specifies if: - it specifies a scope other than ``thread_scope_system``, **or** - the scope is ``thread_scope_system`` and: - - it affects an object in `unified + - it affects an object in `system allocated memory `__ and `pageableMemoryAccess `__ is ``1`` [0], **or** + - it affects an object in `managed memory `__ and `concurrentManagedAccess `__ is ``1``, **or** - - it affects an object in CPU memory and + - it affects an object in `mapped + memory `__ and `hostNativeAtomicSupported `__ is ``1``, **or** - it is a load or store that affects a naturally-aligned object of sizes ``1``, ``2``, ``4``, ``8``, or ``16`` bytes on `mapped - memory `__, + memory `__ [1], **or** - - it affects an object in GPU memory and only GPU threads access it. + - it affects an object in GPU memory, only GPU threads access it, and + - `p2pNativeAtomicSupported `__ between each accessing GPU and the GPU where the object resides is ``1``, or + - only GPU threads from a single GPU concurrently access it. .. note:: - If `hostNativeAtomicSupported` is `0`, atomic load or store operations at system scope that affect a - naturally-aligned 16-byte wide object in - `unified memory `__ or - `mapped memory `__ require system - support. NVIDIA is not aware of any system that lacks this support and there is no CUDA API query available to - detect such systems. + - [0] If `PageableMemoryAccessUsesHostPagetables `__ is ``0`` then atomic operations to memory mapped file or ``hugetlbfs`` allocations are not atomic. + - [1] If `hostNativeAtomicSupported `__ is ``0``, atomic load or store operations at system scope that affect a + naturally-aligned 16-byte wide object in + `unified memory `__ or + `mapped memory `__ require system + support. NVIDIA is not aware of any system that lacks this support and there is no CUDA API query available to + detect such systems. Refer to the `CUDA programming guide `__ for more information on -`unified memory `__, +`system allocated memory `__, +`managed memory `__, `mapped memory `__, -CPU memory, and GPU peer memory. +CPU memory, and GPU memory. Data Races ----------