[Mlir-commits] [mlir] [mlir][spirv][gpu] Add lowering for `gpu.subgroup_broadcast` (PR #185818)
Igor Wodiany
llvmlistbot at llvm.org
Wed Mar 11 02:00:48 PDT 2026
================
@@ -135,6 +135,18 @@ LogicalResult GroupNonUniformBroadcastOp::verify() {
return success();
}
+//===----------------------------------------------------------------------===//
+// spirv.GroupNonUniformBroadcastFirstOp
+//===----------------------------------------------------------------------===//
+
+LogicalResult GroupNonUniformBroadcastFirstOp::verify() {
+ spirv::Scope scope = getExecutionScope();
+ if (scope != spirv::Scope::Workgroup && scope != spirv::Scope::Subgroup)
+ return emitOpError("execution scope must be 'Workgroup' or 'Subgroup'");
----------------
IgWod wrote:
I can't see `Workgroup` being supported in the spec. All I can see is:
> Execution is the [scope](https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#Scope) defining the [scope restricted tangle](https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#ScopeRestrictedTangle) affected by this command. It must be Subgroup.
If indeed only `Subgroup` is supported then we can verify it in ODS with `SPIRV_ExecutionScopeAttrIs<"execution_scope", "Subgroup">`, so we avoid having C++ verification all together.
https://github.com/llvm/llvm-project/pull/185818
More information about the Mlir-commits
mailing list