mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-04-19 22:39:03 +00:00
upgrade from clang-format-12 to clang-format-18 (#2568)
* upgrade to clang-format-18 * update to clang-format-18 in pre-commit-config
This commit is contained in:
@@ -69,8 +69,8 @@ struct GemmTile2DPartitioner
|
||||
* @param blockIdy WGP's Y index.
|
||||
* @return const tuple<index_t, index_t> Tuple containing 2D output C-tile index.
|
||||
*/
|
||||
CK_TILE_DEVICE static auto GetOutputTileIndex(index_t blockIdx, index_t blockIdy) noexcept
|
||||
-> const tuple<index_t, index_t>
|
||||
CK_TILE_DEVICE static auto
|
||||
GetOutputTileIndex(index_t blockIdx, index_t blockIdy) noexcept -> const tuple<index_t, index_t>
|
||||
{
|
||||
const index_t iM = __builtin_amdgcn_readfirstlane(blockIdx);
|
||||
const index_t iN = __builtin_amdgcn_readfirstlane(blockIdy);
|
||||
@@ -137,8 +137,8 @@ struct GemmTile1DPartitioner
|
||||
* @param blockIdx WGP's index.
|
||||
* @return const tuple<index_t, index_t> Tuple containing 2D output C-tile index.
|
||||
*/
|
||||
CK_TILE_DEVICE static auto GetOutputTileIndex(index_t blockIdx) noexcept
|
||||
-> const tuple<index_t, index_t>
|
||||
CK_TILE_DEVICE static auto
|
||||
GetOutputTileIndex(index_t blockIdx) noexcept -> const tuple<index_t, index_t>
|
||||
{
|
||||
const index_t NBlocks = integer_divide_ceil(N_, NPerBlock);
|
||||
|
||||
@@ -188,9 +188,8 @@ struct OffsettedTile1DPartitioner
|
||||
* @param [in] N Gemm's N dimension.
|
||||
* @return Returns a `tuple` [Im, In] with shifted index.
|
||||
*/
|
||||
[[nodiscard]] CK_TILE_DEVICE static auto
|
||||
GetOffsetedTileIndex(index_t block_start, index_t M, index_t N) noexcept
|
||||
-> const tuple<index_t, index_t>
|
||||
[[nodiscard]] CK_TILE_DEVICE static auto GetOffsetedTileIndex(
|
||||
index_t block_start, index_t M, index_t N) noexcept -> const tuple<index_t, index_t>
|
||||
{
|
||||
const auto [iM, iN] = TilePartitioner{M, N}.GetOutputTileIndex(blockIdx.x - block_start);
|
||||
return make_tuple(iM, iN);
|
||||
@@ -271,8 +270,8 @@ struct GemmSpatiallyLocalTilePartitioner
|
||||
* @param [in] block_1d_id WGP's index.
|
||||
* @return const tuple<index_t, index_t> Tuple containing 2D output C-tile index.
|
||||
*/
|
||||
CK_TILE_DEVICE auto GetOutputTileIndex(index_t block_1d_id) noexcept
|
||||
-> const tuple<index_t, index_t>
|
||||
CK_TILE_DEVICE auto
|
||||
GetOutputTileIndex(index_t block_1d_id) noexcept -> const tuple<index_t, index_t>
|
||||
{
|
||||
const auto M0 = integer_divide_ceil(M, MPerBlock);
|
||||
const auto N0 = integer_divide_ceil(N, NPerBlock);
|
||||
|
||||
@@ -144,8 +144,8 @@ struct GroupedGemmKernel
|
||||
// clang-format on
|
||||
}
|
||||
|
||||
CK_TILE_HOST static auto GetWorkSpaceSize(const std::vector<GroupedGemmHostArgs>& gemm_descs)
|
||||
-> std::size_t
|
||||
CK_TILE_HOST static auto
|
||||
GetWorkSpaceSize(const std::vector<GroupedGemmHostArgs>& gemm_descs) -> std::size_t
|
||||
{
|
||||
return gemm_descs.size() * sizeof(GemmTransKernelArg);
|
||||
}
|
||||
@@ -185,8 +185,8 @@ struct GroupedGemmKernel
|
||||
return dim3(grid_size, 1, 1);
|
||||
}
|
||||
|
||||
CK_TILE_HOST static auto MakeKargs(const std::vector<GroupedGemmHostArgs>& gemm_descs)
|
||||
-> std::vector<GemmTransKernelArg>
|
||||
CK_TILE_HOST static auto
|
||||
MakeKargs(const std::vector<GroupedGemmHostArgs>& gemm_descs) -> std::vector<GemmTransKernelArg>
|
||||
{
|
||||
std::vector<GemmTransKernelArg> gemm_kernel_args_;
|
||||
index_t group_count = ck_tile::type_convert<ck_tile::index_t>(gemm_descs.size());
|
||||
|
||||
Reference in New Issue
Block a user