[llvm] [NVPTX] Fix PTX and SM conditions for narrow FP conversions (PR #168680)

Srinivasa Ravi via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 20 21:53:43 PST 2025


================
@@ -177,6 +177,27 @@ class NVPTXSubtarget : public NVPTXGenSubtargetInfo {
            hasPTXWithAccelSMs(86, {100, 101});
   }
 
+  // Checks support for conversions involving e4m3x2 and e5m2x2.
+  bool hasFP8ConversionSupport() const {
+    if (PTXVersion >= 81)
+      return SmVersion >= 89;
+
+    if (PTXVersion >= 78)
+      return SmVersion >= 90;
+
+    return false;
+  }
+
+  // Checks support for conversions involving the following types:
+  // - e2m3x2/e3m2x2
+  // - e2m1x2
+  // - ue8m0x2
+  bool hasNarrowFPConversionSupport() const {
----------------
Wolfram70 wrote:

Resolving as discussed offline.

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


More information about the llvm-commits mailing list