[Mlir-commits] [mlir] [mlir][spirv] Add definition for OpGroupNonUniformBallotBitCount (PR #126055)

Igor Wodiany llvmlistbot at llvm.org
Thu Feb 6 08:29:04 PST 2025


================
@@ -1287,4 +1297,70 @@ def SPIRV_GroupNonUniformLogicalXorOp :
 
 // -----
 
+def SPIRV_GroupNonUniformBallotBitCountOp : SPIRV_Op<"GroupNonUniformBallotBitCount", [
+  SPIRV_ExecutionScopeAttrIs<"execution_scope", "Subgroup">,
+  SPIRV_GroupOperationAttrIs<"group_operation", "Reduce">
----------------
IgWod-IMG wrote:

It comes from me misreading the spec. I interpreted:

> The identity I for Operation is 0. 

As: "Operation must be 0", where 0 happens to be [Reduce](https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#Group_Operation). Thanks for pointing this out, my mistake.

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


More information about the Mlir-commits mailing list