[Mlir-commits] [mlir] [mlir][gpu] Add `subgroup_broadcast` op (PR #152808)

Jianhui Li llvmlistbot at llvm.org
Fri Aug 15 09:01:27 PDT 2025


Jianhui-Li wrote:

After the discussion, I don't have issue with first_lane and specific_lane op semantics.  They have counterpart in the SPIV op definition so lowering should not be a problem, and I agree that GPU op definition can be slightly higher level than the exact HW semantics (like shuffle) as long as it captures common use case.  
//non-uniform broadcast for a specific lane
https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#OpGroupNonUniformBroadcast
//non-uniform broadcasts the first active value:
https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#OpGroupNonUniformBroadcastFirst

I still have reservation on the "any_lane" variant. I am not sure how user will use it,  whether the usage is tied to a specific target implementation, and whether there is alternative way to represent compiler hint so may or may not have to tie with broadcast.   

@grypp @Hardcode84 @krzysz00 @kuhar 


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


More information about the Mlir-commits mailing list