[Mlir-commits] [mlir] [ROCDL] Use attached target on the GPU module when lowering GPU ops to ROCDL (PR #110735)
Fabian Mora
llvmlistbot at llvm.org
Fri Oct 4 07:02:37 PDT 2024
================
@@ -219,6 +219,28 @@ struct LowerGpuOpsToROCDLOpsPass
gpu::GPUModuleOp m = getOperation();
MLIRContext *ctx = m.getContext();
+ ArrayAttr targets = m.getTargetsAttr();
+ if (chipset == "infer") {
+ if (!targets) {
----------------
fabianmcg wrote:
Nit, move the `ArrayAttr targets = m.getTargetsAttr();` inside the if.
```suggestion
if (chipset == "infer") {
ArrayAttr targets = m.getTargetsAttr();
if (!targets) {
```
https://github.com/llvm/llvm-project/pull/110735
More information about the Mlir-commits
mailing list