Skip to content

Commit 82a5a75

Browse files
committed
refine docs
1 parent 76128ce commit 82a5a75

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

llvm/docs/NVPTXUsage.rst

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -685,12 +685,18 @@ Syntax:
685685
Overview:
686686
"""""""""
687687

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.
692697
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.
694700

695701
.. code-block:: llvm
696702
@@ -702,10 +708,7 @@ If generic addressing is used and the specified address does not fall within the
702708
%fb = freeze i64 %b ;; freezes undef to stable bit-pattern
703709
;; %fa may compare different to %fb!
704710
705-
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>`__ .
706-
707-
For more information, refer to the PTX ISA
708-
`<https://docs.nvidia.com/cuda/parallel-thread-execution/#data-movement-and-conversion-instructions-discard>`_.
711+
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>`__ .
709712

710713
'``llvm.nvvm.cp.async.bulk.tensor.g2s.tile.[1-5]d``'
711714
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)