[llvm] [NVPTX] Add intrinsics and codegen for tensormap.replace (PR #172458)

Durgadoss R via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 17 00:52:28 PST 2025


================
@@ -202,6 +203,34 @@ class NVPTXSubtarget : public NVPTXGenSubtargetInfo {
            hasPTXWithAccelSMs(86, {100, 101, 120});
   }
 
+  bool hasTensormapReplaceSupport() const {
+    return hasPTXWithFamilySMs(90, {90, 100, 110, 120}) ||
+           hasPTXWithFamilySMs(88, {90, 100, 101, 120}) ||
+           hasPTXWithAccelSMs(83, {90, 100, 101, 120});
+  }
+
+  bool hasTensormapReplaceElemtypeSupport(unsigned value) const {
+    if (value >= static_cast<unsigned>(nvvm::TensormapElemType::B4x16))
+      return hasPTXWithFamilySMs(90, {100, 110, 120}) ||
+             hasPTXWithFamilySMs(88, {100, 101, 120}) ||
+             hasPTXWithAccelSMs(87, {100, 101, 120});
----------------
durga4github wrote:

I had the same mixed thinking. So, yes, we can leave it as is for now.

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


More information about the llvm-commits mailing list