[Mlir-commits] [llvm] [mlir] [MLIR][NVVM] Add NVVMRequiresSM op trait (PR #126886)

Srinivasa Ravi llvmlistbot at llvm.org
Wed May 7 23:29:28 PDT 2025


================
@@ -2728,6 +2729,28 @@ def TestLinalgFillOp :
   }];
 }
 
+//===----------------------------------------------------------------------===//
+// Test NVVM RequiresSM trait.
+//===----------------------------------------------------------------------===//
+
+def TestNVVMRequiresSMOp : TEST_Op<"nvvm_requires_sm_80",
+                                    [NVVMRequiresSM<80>]> {
+  let arguments = (ins );
+  let assemblyFormat = "attr-dict";
+}
+
+def TestNVVMRequiresAtleastSMArchCondOp : 
+    TEST_Op<"nvvm_requires_sm_atleast_90_aa", [NVVMRequiresSM<90, "true">]> {
----------------
Wolfram70 wrote:

I did this mainly to decouple the testing of the trait from the usage in the Ops. My thought was that this would allow testing the different aspects of the trait without having to find the Ops with the exact requirements we need for testing.

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


More information about the Mlir-commits mailing list