[Mlir-commits] [mlir] [mlir][SPIR-V] Support bitwise and/or/xor in gpu reduction lowering (PR #202351)
Igor Wodiany
llvmlistbot at llvm.org
Mon Jul 27 09:56:14 PDT 2026
================
@@ -718,6 +718,33 @@ static Value createGroupReduceOpImpl(OpBuilder &builder, Location loc,
.getResult();
}
+template <typename NonUniformOp>
+static Value createGroupNonUniformBitwiseReduceOpImpl(
+ OpBuilder &builder, Location loc, Value arg, bool isGroup, bool isUniform,
+ std::optional<uint32_t> clusterSize) {
+ if (isUniform)
+ return Value();
+
+ Type type = arg.getType();
+ auto scope = mlir::spirv::ScopeAttr::get(builder.getContext(),
+ isGroup ? spirv::Scope::Workgroup
----------------
IgWod wrote:
For the 3 ops you implemented I don't think Workgroup is allowed. Unless there is a bitwise op that will allow it, we probably should bail here.
https://github.com/llvm/llvm-project/pull/202351
More information about the Mlir-commits
mailing list