mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-06-29 03:07:02 +00:00
[ck_tile] Merge get_partition_index() and get_partition_index_v2() to get_partition_index() with bool_constant parameter
This commit is contained in:
@@ -114,22 +114,8 @@ struct tile_distribution
|
||||
}
|
||||
else if constexpr(NDimP == 2)
|
||||
{
|
||||
return array<index_t, 2>{get_warp_id_to_sgpr(), get_lane_id()};
|
||||
}
|
||||
}
|
||||
|
||||
CK_TILE_HOST_DEVICE static auto _get_partition_index_v2()
|
||||
{
|
||||
// only support warp-tile and block-tile
|
||||
static_assert(NDimP == 1 or NDimP == 2, "wrong!");
|
||||
|
||||
if constexpr(NDimP == 1)
|
||||
{
|
||||
return array<index_t, 1>{get_lane_id()};
|
||||
}
|
||||
else if constexpr(NDimP == 2)
|
||||
{
|
||||
return array<index_t, 2>{get_warp_id_to_vgpr(), get_lane_id()};
|
||||
return array<index_t, 2>{get_warp_id(bool_constant<save_warp_id_in_sgpr>{}),
|
||||
get_lane_id()};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user