Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions mlir/include/mlir/Dialect/GPU/IR/CompilationAttrInterfaces.td
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,18 @@ def GPUTargetAttrInterface : AttrInterface<"TargetAttrInterface"> {
is meant to be used for passing additional options that are not in the
attribute.
}],
"std::optional<SmallVector<char, 0>>", "serializeToObject",
(ins "Operation*":$module, "const gpu::TargetOptions&":$options)>,
"std::optional<::mlir::SmallVector<char, 0>>", "serializeToObject",
(ins "::mlir::Operation*":$module,
"const ::mlir::gpu::TargetOptions&":$options)>,
InterfaceMethod<[{
Creates a GPU object attribute from a binary string.

The `object` parameter is a binary string. The `options` parameter is
meant to be used for passing additional options that are not in the
attribute.
}], "Attribute", "createObject",
(ins "const SmallVector<char, 0>&":$object,
"const gpu::TargetOptions&":$options)>
}], "::mlir::Attribute", "createObject",
(ins "const ::llvm::SmallVector<char, 0>&":$object,
"const ::mlir::gpu::TargetOptions&":$options)>
];
}

Expand Down Expand Up @@ -112,9 +113,10 @@ def OffloadingLLVMTranslationAttrInterface :
The first argument has to be a GPU binary operation.
If the function fails at any point, it must return `failure`.
}],
"LogicalResult", "embedBinary",
(ins "Operation*":$binaryOp, "llvm::IRBuilderBase&":$hostBuilder,
"LLVM::ModuleTranslation&":$hostModuleTranslation)
"::mlir::LogicalResult", "embedBinary",
(ins "::mlir::Operation*":$binaryOp,
"::llvm::IRBuilderBase&":$hostBuilder,
"::mlir::LLVM::ModuleTranslation&":$hostModuleTranslation)
>,
InterfaceMethod<[{
Translates a `gpu.launch_func` op into a sequence of LLVM IR
Expand All @@ -128,10 +130,10 @@ def OffloadingLLVMTranslationAttrInterface :
respectively. If the function fails at any point, it must return
`failure`.
}],
"LogicalResult", "launchKernel",
(ins "Operation*":$launchFunc, "Operation*":$binaryOp,
"llvm::IRBuilderBase&":$hostBuilder,
"LLVM::ModuleTranslation&":$hostModuleTranslation)
"::mlir::LogicalResult", "launchKernel",
(ins "::mlir::Operation*":$launchFunc, "::mlir::Operation*":$binaryOp,
"::llvm::IRBuilderBase&":$hostBuilder,
"::mlir::LLVM::ModuleTranslation&":$hostModuleTranslation)
>
];
}
Expand Down