[Mlir-commits] [llvm] [mlir] [MLIR][NVVM] Add NVVMRequiresSM op trait (PR #126886)
Mehdi Amini
llvmlistbot at llvm.org
Fri Mar 14 08:34:40 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();
+
----------------
joker-eph wrote:
I don't think that "compile time" is a valid reason to remove this during development: the impact in terms of compile-time should be low (otherwise I question whether it is suitable for a verifier check in the first place: the verifier runs in production where the compile-time is critical, contrary to the development flow).
I suspect @durga4github didn't have compile-time in mind as a motivation though.
https://github.com/llvm/llvm-project/pull/126886
More information about the Mlir-commits
mailing list