[llvm] [NVPTX] Add family-specific architectures support (PR #141899)

Durgadoss R via llvm-commits llvm-commits at lists.llvm.org
Fri May 30 03:37:39 PDT 2025


================
@@ -36,17 +36,27 @@ class FeaturePTX<int version>:
 
 foreach sm = [20, 21, 30, 32, 35, 37, 50, 52, 53,
               60, 61, 62, 70, 72, 75, 80, 86, 87,
-              89, 90, 100, 101, 103, 120, 121] in
-  def SM#sm: FeatureSM<""#sm, !mul(sm, 10)>;
-
-// Arch-specific targets. PTX for these is not compatible with any other
-// architectures.
-def SM90a : FeatureSM<"90a", 901>;
-def SM100a: FeatureSM<"100a", 1001>;
-def SM101a: FeatureSM<"101a", 1011>;
-def SM103a: FeatureSM<"103a", 1031>;
-def SM120a: FeatureSM<"120a", 1201>;
-def SM121a: FeatureSM<"121a", 1211>;
+              89, 90, 100, 101, 103, 120, 121] in {
+  // Base SM version (e.g. FullSMVersion for sm_100 is 10000)
+  def SM#sm : FeatureSM<""#sm, !mul(sm, 100)>;
+
+  // Note: Subset of the architecture-specific features, normally
+  // available in a that will be compatible with subsequent targets
+  // in the same family. I.e they are only ordered within the major architecture,
+  // but are not comparable with other major architectures
+
+  // Family-specific targets with compatible PTX within same family
----------------
durga4github wrote:

"targets which are compatible..."
(same below in line 54)

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


More information about the llvm-commits mailing list