@@ -3218,16 +3218,16 @@ def GPU_WarpExecuteOnLane0Op : GPU_Op<"warp_execute_on_lane_0",
32183218def GPU_BroadcastType : I32EnumAttr<"BroadcastType",
32193219 "a lane to broadcast from",
32203220 [
3221- I32EnumAttrCase<"first_lane ", 0>,
3221+ I32EnumAttrCase<"first_active_lane ", 0>,
32223222 I32EnumAttrCase<"any_lane", 1>,
3223- I32EnumAttrCase<"lane ", 2>
3223+ I32EnumAttrCase<"specific_lane ", 2>
32243224 ]>{
32253225 let genSpecializedAttr = 0;
32263226 let cppNamespace = "::mlir::gpu";
32273227}
32283228def GPU_BroadcastTypeAttr : EnumAttr<GPU_Dialect, GPU_BroadcastType, "broadcast">;
32293229
3230- def GPU_BroadcastLaneOp : GPU_Op<"broadcast_lane ",
3230+ def GPU_SubgroupBroadcastOp : GPU_Op<"subgroup_broadcast ",
32313231 [NoMemoryEffect, AllTypesMatch<["result", "src"]>,
32323232 DeclareOpInterfaceMethods<InferIntRangeInterface, ["inferResultRanges"]>,
32333233 DeclareOpInterfaceMethods<ConditionallySpeculatable, ["getSpeculatability"]>] #
@@ -3237,23 +3237,24 @@ def GPU_BroadcastLaneOp : GPU_Op<"broadcast_lane",
32373237 GPU_BroadcastTypeAttr:$broadcast_type)> {
32383238 let summary = "Broadcasts a value from the specific lane across subgroup";
32393239 let description = [{
3240- Broadcasts a value from one lane to all lanes in a subgroup. The
3241- result is guaranteed to be uniform across the subgroup.
3240+ Broadcasts a value from one lane to all active lanes in a subgroup. The
3241+ result is guaranteed to be uniform across the active lanes in subgroup.
32423242
32433243 The possible broadcast types are:
32443244
3245- * `first_lane` - broadcasts the value from the first active lane in the
3246- subgroup.
3247- * `lane` - broadcasts from the specified lane. The lane index must be
3248- uniform and within the subgroup size. The result is poison if the lane
3249- index is invalid or non-subgroup-uniform.
3245+ * `first_active_lane` - broadcasts the value from the first active lane
3246+ in the subgroup.
3247+ * `specific_lane` - broadcasts from the specified lane. The lane index
3248+ must be uniform and within the subgroup size. The result is poison if the
3249+ lane index is invalid, non subgroup-uniform, or if the source lane is not
3250+ active.
32503251 * `any_lane` - broadcasts the value from any lane of the subgroup,
3251- active or inactive, assuming the input is already subgroup uniform. The
3252- result is poison if the input is not uniform. This is useful to convey
3253- uniformity to the compiler to enable more optimizations. Also, it allows
3254- more speculation opportunities than `first_lane ` since `first_lane`
3255- results can depend on active lanes which may change during speculation
3256- across control flow.
3252+ assuming the input is already subgroup uniform. The result is poison if
3253+ the input is not uniform. This is useful to convey uniformity to the
3254+ compiler to enable more optimizations. Also, it allows more speculation
3255+ opportunities than `first_active_lane ` since `first_active_lane` results
3256+ can depend on active lanes which may change during speculation across
3257+ control flow.
32573258 }];
32583259 let results = (outs AnyType:$result);
32593260 let assemblyFormat = [{
0 commit comments