[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:36 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) {
+        m->emitError("ROCDLTargetAttr is empty on GPU module");
----------------
fabianmcg wrote:

```suggestion
        m->emitError("there are no target attributes to infer");
```

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


More information about the Mlir-commits mailing list