[Mlir-commits] [llvm] [mlir] [MLIR][NVVM] Add NVVMRequiresSM op trait (PR #126886)
Guray Ozen
llvmlistbot at llvm.org
Mon Mar 17 10:37:06 PDT 2025
================
@@ -1793,6 +1793,22 @@ void GPUModuleOp::setTargets(ArrayRef<TargetAttrInterface> targets) {
targetsAttr = ArrayAttr::get(getContext(), targetsVector);
}
+LogicalResult GPUModuleOp::verify() {
+ auto targets = getOperation()->getAttrOfType<ArrayAttr>("targets");
+
+ if (!targets)
+ return success();
+
----------------
grypp wrote:
The LLVM backend already has those checks, so what we’re doing here is useful but redundant.
How about we take a big kernel and see how much compile-time it takes?
I’m not sure about a pass that verifies the operations. But it’s definitely a good idea to have a way to enable or disable it.
https://github.com/llvm/llvm-project/pull/126886
More information about the Mlir-commits
mailing list