@@ -111,31 +111,21 @@ class AnyPred<list<Predicate> Preds>
111111// Checks PTX version and family-specific and architecture-specific SM versions.
112112// For example, sm_100{f/a} and any future variants in the same family will match.
113113class PTXWithFamilySMs<int PTXVersion, list<int> SMVersions> :
114- Predicate<"Subtarget->getPTXVersion() >= " # PTXVersion #
115- " && Subtarget->hasFamilySpecificFeatures()" #
116- " && (" #
117- !interleave(!foreach(sm, SMVersions,
118- "(Subtarget->getSmFamilyVersion() == " # !div(sm, 10) #
119- " && Subtarget->getSmVersion() >= " # sm # ")"),
120- " || ") #
121- ")">;
114+ Predicate<"Subtarget->hasPTXWithFamilySMs(" # PTXVersion # ", {" #
115+ !interleave(SMVersions, ", ") # "})">;
122116
123117// Checks PTX version and architecture-specific SM versions.
124118// For example, sm_100{a} will match.
125119class PTXWithAccelSMs<int PTXVersion, list<int> SMVersions> :
126- Predicate<"Subtarget->getPTXVersion() >= " # PTXVersion #
127- " && Subtarget->hasArchAccelFeatures()" #
128- " && (" #
129- !interleave(!foreach(sm, SMVersions,
130- "Subtarget->getSmVersion() == " # sm),
131- " || ") #
132- ")">;
120+ Predicate<"Subtarget->hasPTXWithAccelSMs(" # PTXVersion # ", {" #
121+ !interleave(SMVersions, ", ") # "})">;
133122
134123// Helper predicate to call a subtarget method.
135124class callSubtarget<string SubtargetMethod> : Predicate<"Subtarget->" # SubtargetMethod # "()">;
136125
137126// Composed predicate to check tcgen05.shift instructions support.
138127def hasTcgen05ShiftSupport : AnyPred<[
128+ // sm_101 renamed to sm_110 in PTX 9.0
139129 PTXWithAccelSMs<90, [100, 110, 103]>,
140130 PTXWithAccelSMs<88, [100, 101, 103]>,
141131 PTXWithAccelSMs<86, [100, 101]>
0 commit comments