You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: llvm/docs/NVPTXUsage.rst
+12-9Lines changed: 12 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -685,12 +685,18 @@ Syntax:
685
685
Overview:
686
686
"""""""""
687
687
688
-
The *effects* of the ``@llvm.nvvm.discard.L2*`` intrinsics are those of a non-atomic non-volatile ``llvm.memset`` that writes ``undef`` to the destination address range ``[%ptr, %ptr + immarg)``.
689
-
Subsequent reads from the address range may read ``undef`` until the memory is overwritten with a different value.
690
-
These operations *hint* the implementation that data in the L2 cache can be destructively discarded without writing it back to memory.
691
-
The operand ``immarg`` is an integer constant that specifies the length in bytes of the address range ``[%ptr, %ptr + immarg)`` to write ``undef`` into.
688
+
The *effects* of the ``@llvm.nvvm.discard.L2*`` intrinsics are those of a non-atomic
689
+
non-volatile ``llvm.memset`` that writes ``undef`` to the destination
690
+
address range ``[%ptr, %ptr + immarg)``.
691
+
Subsequent reads from the address range may read ``undef`` until the memory is overwritten
692
+
with a different value.
693
+
These operations *hint* the implementation that data in the L2 cache can be destructively
694
+
discarded without writing it back to memory.
695
+
The operand ``immarg`` is an integer constant that specifies the length in bytes of the
696
+
address range ``[%ptr, %ptr + immarg)`` to write ``undef`` into.
692
697
The only supported value for the ``immarg`` operand is ``128``.
693
-
If generic addressing is used and the specified address does not fall within the address window of global memory (``addrspace(1)``) the behavior is undefined.
698
+
If generic addressing is used and the specified address does not fall within the
699
+
address window of global memory (``addrspace(1)``) the behavior is undefined.
694
700
695
701
.. code-block:: llvm
696
702
@@ -702,10 +708,7 @@ If generic addressing is used and the specified address does not fall within the
For more information, refer to the `CUDA C++ discard documentation <https://nvidia.github.io/cccl/libcudacxx/extended_api/memory_access_properties/discard_memory.html>`__ and the `PTX ISA discard documentation <https://docs.nvidia.com/cuda/parallel-thread-execution/#data-movement-and-conversion-instructions-discard>`__ .
For more information, refer to the `CUDA C++ discard documentation <https://nvidia.github.io/cccl/libcudacxx/extended_api/memory_access_properties/discard_memory.html>`__ and to the `PTX ISA discard documentation <https://docs.nvidia.com/cuda/parallel-thread-execution/#data-movement-and-conversion-instructions-discard>`__ .
0 commit comments