[llvm] [mlir] [MLIR][NVVM] Add NVVMRequiresSM op traits (PR #126886)

Guray Ozen via llvm-commits llvm-commits at lists.llvm.org
Sun May 18 23:51:10 PDT 2025


================
@@ -27,12 +27,17 @@ def RequiresSMInterface: OpInterface<"RequiresSMInterface"> {
   ];
 }
 
-class NVVMRequiresSM<int minVersion, string isArchAccelerated = "false",
-                    string exactMatch = "false"> :
-  ParamNativeOpTrait<"NVVMRequiresSM",
-                    !cast<string>(minVersion) # "," # isArchAccelerated # ","
-                      # exactMatch>;
-                      
-class NVVMRequiresSMa<int version> : NVVMRequiresSM<version, "true", "true">;
+class NVVMRequiresSM<int minVersion> :
----------------
grypp wrote:

```suggestion
// OP requires a specified minimum SM value or higher; 
// it is not architecture-specific.
"OP requires an exact SM match along with architecture acceleration."
class NVVMRequiresSM<int minVersion> :
```

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


More information about the llvm-commits mailing list