[Mlir-commits] [mlir] [MLIR][NVVM] Add family-conditional support to NVVMRequiresSM traits (PR #185909)
Durgadoss R
llvmlistbot at llvm.org
Mon Mar 16 02:10:17 PDT 2026
================
@@ -106,12 +128,50 @@ class NVVMRequiresSMa {
NVVMRequiresSMa<SMVersions...>::Impl>,
public mlir::NVVM::RequiresSMInterface::Trait<ConcreteOp> {
public:
- const NVVM::NVVMCheckSMVersion getRequiredMinSMVersion() const {
- return NVVM::NVVMCheckSMVersion(true, SMVersions...);
+ NVVM::NVVMCheckSMVersion getRequiredMinSMVersion() const {
+ return NVVM::NVVMCheckSMVersion(true, false, SMVersions...);
}
};
+
+ static NVVM::NVVMCheckSMVersion getRequiredMinSMVersion() {
+ return NVVM::NVVMCheckSMVersion(true, false, SMVersions...);
+ }
};
+template <int... SMVersions>
+class NVVMRequiresSMf {
+public:
+ template <typename ConcreteOp>
+ class Impl : public OpTrait::TraitBase<ConcreteOp,
+ NVVMRequiresSMf<SMVersions...>::Impl>,
+ public mlir::NVVM::RequiresSMInterface::Trait<ConcreteOp> {
+ public:
+ NVVM::NVVMCheckSMVersion getRequiredMinSMVersion() const {
+ return NVVM::NVVMCheckSMVersion(false, true, SMVersions...);
+ }
+ };
+
+ static NVVM::NVVMCheckSMVersion getRequiredMinSMVersion() {
+ return NVVM::NVVMCheckSMVersion(false, true, SMVersions...);
+ }
+};
+
+template <typename SMVersionsA, typename SMVersionsF>
----------------
durga4github wrote:
I notice that we have used "AA" and "FS" for variable names above. Can we stick to the same here too?
https://github.com/llvm/llvm-project/pull/185909
More information about the Mlir-commits
mailing list