[clang] [llvm] [clang][NVPTX] Add support for mixed-precision FP arithmetic (PR #168359)

Srinivasa Ravi via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 26 20:02:48 PST 2025


================
@@ -1694,6 +1702,22 @@ multiclass FMA_INST {
 
 defm INT_NVVM_FMA : FMA_INST;
 
+foreach rnd = ["_rn", "_rz", "_rm", "_rp"] in {
+  foreach sat = ["", "_sat"] in {
+    foreach type = ["f16", "bf16"] in {
+      def INT_NVVM_MIXED_FMA # rnd # sat # _f32_ # type : 
+        BasicNVPTXInst<(outs B32:$dst), (ins B16:$a, B16:$b, B32:$c),
----------------
Wolfram70 wrote:

The mixed precision instructions don't support the `ftz` modifier so I excluded those here.

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


More information about the llvm-commits mailing list