[Mlir-commits] [mlir] [mlir][AMDGPU] Set uniform-work-group-size=true by default (PR #79077)

Fabian Mora llvmlistbot at llvm.org
Thu Feb 15 17:11:58 PST 2024


================
@@ -134,7 +140,19 @@ class ROCDLDialectLLVMIRTranslationInterface
       llvmAttrValue.append(value.getValue());
       llvmFunc->addFnAttr("amdgpu-flat-work-group-size", llvmAttrValue);
     }
-
+    if (ROCDL::ROCDLDialect::getUniformWorkGroupSizeAttrName() ==
+        attribute.getName()) {
+      auto func = dyn_cast<LLVM::LLVMFuncOp>(op);
+      if (!func)
+        return failure();
----------------
fabianmcg wrote:

I definitely don't like the idea of failing and not knowing why, because if these where safe to ignore, then they should return `success`  instead of `failure`. So I think either we `emitError`s or if they are safe to ignore then we return `success` instead of `failure`.

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


More information about the Mlir-commits mailing list