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

Krzysztof Drewniak llvmlistbot at llvm.org
Thu Feb 15 08:42:39 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();
----------------
krzysz00 wrote:

The surrounding code doesn't seem to `emitError` but instead to silently ignore these attributes when they're on non-function ops.

Do we want to change that convention uniformly?

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


More information about the Mlir-commits mailing list