[Mlir-commits] [llvm] [mlir] [MLIR][NVVM] Add NVVMRequiresSM op trait (PR #126886)
Guray Ozen
llvmlistbot at llvm.org
Wed May 7 09:07:48 PDT 2025
================
@@ -1558,6 +1559,34 @@ NVVMTargetAttr::verify(function_ref<InFlightDiagnostic()> emitError,
return success();
}
+LogicalResult NVVMTargetAttr::verifyTarget(Operation *gpuModule) {
+ if (!getVerifyTarget())
+ return success();
+
+ auto gpuModuleOp = llvm::dyn_cast<gpu::GPUModuleOp>(gpuModule);
+ if (!gpuModuleOp)
+ return emitError(gpuModule->getLoc(),
+ "NVVM target attribute must be attached to a GPU module");
----------------
grypp wrote:
nit: I'd add {} as multiline
https://github.com/llvm/llvm-project/pull/126886
More information about the Mlir-commits
mailing list