[llvm] [NVPTX] Add family-specific architectures support (PR #141899)
Durgadoss R via llvm-commits
llvm-commits at lists.llvm.org
Thu May 29 03:58:10 PDT 2025
================
@@ -41,12 +41,14 @@ foreach sm = [20, 21, 30, 32, 35, 37, 50, 52, 53,
// 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>;
+foreach sm = [90, 100, 101, 103, 120, 121] in {
+ def SM#sm#a : FeatureSM<""#sm#"a", !add(!mul(sm, 10), 1)>;
+}
----------------
durga4github wrote:
The full-sm-version was more explicit in the above definitions.
Can we have a comment providing one example?
```
// The fullSMVersion of sm90a corresponds to 901.
```
https://github.com/llvm/llvm-project/pull/141899
More information about the llvm-commits
mailing list