[llvm] [NFC][Docs] Add documentation for NVPTX conversion intrinsics (PR #175536)

Alex MacLean via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 13 08:27:02 PST 2026


================
@@ -1045,6 +1045,173 @@ If the given pointer in the generic address space refers to memory which falls
 within the state space of the intrinsic (and therefore could be safely address
 space casted to this space), 1 is returned, otherwise 0 is returned.
 
+Narrow Floating-Point Conversion intrinsics
+-------------------------------------------
+
+``fp8`` Conversion Intrinsics
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Syntax:
+"""""""
+
+.. code-block:: llvm
+
+    declare i16 @llvm.nvvm.ff.to{.e4m3x2, .e5m2x2}.rn{.relu}(float %a, float %b)
+    declare i16 @llvm.nvvm.ff.to.ue8m0x2{.rz, .rp}{.satfinite}(float %a, float %b)
+    declare i16 @llvm.f16x2.to{.e4m3x2, .e5m2x2}.rn{.relu}(<2 x half> %a)
+    declare i16 @llvm.bf16x2.to{.e4m3x2, .e5m2x2}.rn{.relu}.satfinite(<2 x bfloat> %a)
+    declare i16 @llvm.bf16x2.to.ue8m0x2{.rz, .rp}{.satfinite}(<2 x bfloat> %a)
+    declare <2 x half> @llvm.nvvm{.e4m3x2, .e5m2x2}.to.f16x2.rn{.relu}(i16 %a)
+    declare <2 x bfloat> @llvm.nvvm.ue8m0x2.to.bf16x2(i16 %a)
+    declare <4 x i8> @llvm.nvvm.f32x4.to{.e4m3x4, .e5m2x4}.rs{.relu}.satfinite(<4 x f32> %a, i32 %rnd_bits)
----------------
AlexMaclean wrote:

Not sure what the right fix is but the rendering for intrinsics with `{}` is really bad: 

<img width="2065" height="435" alt="Image" src="https://github.com/user-attachments/assets/b0d7bd8b-5d57-484a-a42a-a26280c69aa8" />

Any thoughts on how to address this?

https://github.com/llvm/llvm-project/pull/175536


More information about the llvm-commits mailing list