@@ -36,17 +36,29 @@ class FeaturePTX<int version>:
3636
3737foreach sm = [20, 21, 30, 32, 35, 37, 50, 52, 53,
3838 60, 61, 62, 70, 72, 75, 80, 86, 87,
39- 89, 90, 100, 101, 120] in
39+ 89, 90, 100, 101, 103, 120, 121 ] in
4040 def SM#sm: FeatureSM<""#sm, !mul(sm, 10)>;
4141
42- def SM90a: FeatureSM<"90a", 901>;
42+ // Arch-specific targets. PTX for these is not compatible with any other
43+ // architectures.
44+ def SM90a : FeatureSM<"90a", 901>;
4345def SM100a: FeatureSM<"100a", 1001>;
4446def SM101a: FeatureSM<"101a", 1011>;
47+ def SM103a: FeatureSM<"103a", 1031>;
4548def SM120a: FeatureSM<"120a", 1201>;
49+ def SM121a: FeatureSM<"121a", 1211>;
50+
51+ // Family-specific targets. PTX for these is compatible with all subsequent
52+ // targets in the same family.
53+ def SM100f: FeatureSM<"100f", 1002>;
54+ def SM101f: FeatureSM<"101f", 1012>;
55+ def SM103f: FeatureSM<"103f", 1032>;
56+ def SM120f: FeatureSM<"120f", 1202>;
57+ def SM121f: FeatureSM<"121f", 1212>;
4658
4759foreach version = [32, 40, 41, 42, 43, 50, 60, 61, 62, 63, 64, 65,
4860 70, 71, 72, 73, 74, 75, 76, 77, 78,
49- 80, 81, 82, 83, 84, 85, 86, 87] in
61+ 80, 81, 82, 83, 84, 85, 86, 87, 88 ] in
5062 def PTX#version: FeaturePTX<version>;
5163
5264//===----------------------------------------------------------------------===//
@@ -56,33 +68,42 @@ foreach version = [32, 40, 41, 42, 43, 50, 60, 61, 62, 63, 64, 65,
5668class Proc<string Name, list<SubtargetFeature> Features>
5769 : Processor<Name, NoItineraries, Features>;
5870
59- def : Proc<"sm_20", [SM20, PTX32]>;
60- def : Proc<"sm_21", [SM21, PTX32]>;
61- def : Proc<"sm_30", [SM30]>;
62- def : Proc<"sm_32", [SM32, PTX40]>;
63- def : Proc<"sm_35", [SM35, PTX32]>;
64- def : Proc<"sm_37", [SM37, PTX41]>;
65- def : Proc<"sm_50", [SM50, PTX40]>;
66- def : Proc<"sm_52", [SM52, PTX41]>;
67- def : Proc<"sm_53", [SM53, PTX42]>;
68- def : Proc<"sm_60", [SM60, PTX50]>;
69- def : Proc<"sm_61", [SM61, PTX50]>;
70- def : Proc<"sm_62", [SM62, PTX50]>;
71- def : Proc<"sm_70", [SM70, PTX60]>;
72- def : Proc<"sm_72", [SM72, PTX61]>;
73- def : Proc<"sm_75", [SM75, PTX63]>;
74- def : Proc<"sm_80", [SM80, PTX70]>;
75- def : Proc<"sm_86", [SM86, PTX71]>;
76- def : Proc<"sm_87", [SM87, PTX74]>;
77- def : Proc<"sm_89", [SM89, PTX78]>;
78- def : Proc<"sm_90", [SM90, PTX78]>;
79- def : Proc<"sm_90a", [SM90a, PTX80]>;
80- def : Proc<"sm_100", [SM100, PTX86]>;
71+ def : Proc<"sm_20", [SM20, PTX32]>;
72+ def : Proc<"sm_21", [SM21, PTX32]>;
73+ def : Proc<"sm_30", [SM30]>;
74+ def : Proc<"sm_32", [SM32, PTX40]>;
75+ def : Proc<"sm_35", [SM35, PTX32]>;
76+ def : Proc<"sm_37", [SM37, PTX41]>;
77+ def : Proc<"sm_50", [SM50, PTX40]>;
78+ def : Proc<"sm_52", [SM52, PTX41]>;
79+ def : Proc<"sm_53", [SM53, PTX42]>;
80+ def : Proc<"sm_60", [SM60, PTX50]>;
81+ def : Proc<"sm_61", [SM61, PTX50]>;
82+ def : Proc<"sm_62", [SM62, PTX50]>;
83+ def : Proc<"sm_70", [SM70, PTX60]>;
84+ def : Proc<"sm_72", [SM72, PTX61]>;
85+ def : Proc<"sm_75", [SM75, PTX63]>;
86+ def : Proc<"sm_80", [SM80, PTX70]>;
87+ def : Proc<"sm_86", [SM86, PTX71]>;
88+ def : Proc<"sm_87", [SM87, PTX74]>;
89+ def : Proc<"sm_89", [SM89, PTX78]>;
90+ def : Proc<"sm_90", [SM90, PTX78]>;
91+ def : Proc<"sm_90a", [SM90a, PTX80]>;
92+ def : Proc<"sm_100", [SM100, PTX86]>;
8193def : Proc<"sm_100a", [SM100a, PTX86]>;
82- def : Proc<"sm_101", [SM101, PTX86]>;
94+ def : Proc<"sm_100f", [SM100f, PTX88]>;
95+ def : Proc<"sm_101", [SM101, PTX86]>;
8396def : Proc<"sm_101a", [SM101a, PTX86]>;
84- def : Proc<"sm_120", [SM120, PTX87]>;
97+ def : Proc<"sm_101f", [SM101f, PTX88]>;
98+ def : Proc<"sm_103", [SM103, PTX88]>;
99+ def : Proc<"sm_103a", [SM103a, PTX88]>;
100+ def : Proc<"sm_103f", [SM103f, PTX88]>;
101+ def : Proc<"sm_120", [SM120, PTX87]>;
85102def : Proc<"sm_120a", [SM120a, PTX87]>;
103+ def : Proc<"sm_120f", [SM120f, PTX88]>;
104+ def : Proc<"sm_121", [SM121, PTX88]>;
105+ def : Proc<"sm_121a", [SM121a, PTX88]>;
106+ def : Proc<"sm_121f", [SM121f, PTX88]>;
86107
87108def NVPTXInstrInfo : InstrInfo {
88109}
0 commit comments