[Mlir-commits] [mlir] [mlir][gpu] Pass GPU module to `TargetAttrInterface::createObject`. (PR #94910)

Fabian Mora llvmlistbot at llvm.org
Tue Aug 27 09:13:26 PDT 2024


================
@@ -47,8 +47,9 @@ def GPUTargetAttrInterface : AttrInterface<"TargetAttrInterface"> {
         meant to be used for passing additional options that are not in the
         attribute.
       }], "::mlir::Attribute", "createObject",
-        (ins "const ::llvm::SmallVector<char, 0>&":$object,
-             "const ::mlir::gpu::TargetOptions&":$options)>
+        (ins "::mlir::Operation *":$module,
----------------
fabianmcg wrote:

The `GPUModuleOp` vs `Operation*` goes back to the original introduction of these attributes. If you see, all other methods also use `Operation*`. Back then, there was a build dependency that required the interfaces to be generated before the dialect, hence the types were not available (I'm not sure this is needed anymore, I'll check). Then a second reason, was to make the header independent of `GPUDialect.h`

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


More information about the Mlir-commits mailing list