[llvm] [NVPTX] Cleanup and document nvvm.fabs intrinsics, adding f16 support (PR #135644)

Alex MacLean via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 14 17:14:24 PDT 2025


================
@@ -309,6 +309,58 @@ space casted to this space), 1 is returned, otherwise 0 is returned.
 Arithmetic Intrinsics
 ---------------------
 
+'``llvm.nvvm.fabs.*``' Intrinsic
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Syntax:
+"""""""
+
+.. code-block:: llvm
+
+    declare float @llvm.nvvm.fabs.f32(float %a)
+    declare double @llvm.nvvm.fabs.f64(double %a)
+    declare half @llvm.nvvm.fabs.f16(half %a)
+    declare <2 x bfloat> @llvm.nvvm.fabs.v2bf16(<2 x bfloat> %a)
----------------
AlexMaclean wrote:

It was initially intended to be partial, but I agree it's confusing. In the latest version it includes all supported variants.

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


More information about the llvm-commits mailing list