reduce2d_shape.hpp Source File

reduce2d_shape.hpp Source File#

Composable Kernel: reduce2d_shape.hpp Source File
reduce2d_shape.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
2// Copyright (c) 2018-2025, Advanced Micro Devices, Inc. All rights reserved.
3
4#pragma once
5
6#include "ck_tile/core.hpp"
7
8namespace ck_tile {
9
10template <typename BlockWarps, // num warps along seq<M, N>
11 typename BlockTile, // block size, seq<M, N>
12 typename WarpTile, // warp size, seq<M, N>
13 typename ThreadTile> // contiguous pixels(vector size) along seq<M, N>
15{
16 static constexpr index_t Block_M = BlockTile::at(number<0>{});
17 static constexpr index_t Block_N = BlockTile::at(number<1>{});
18
19 static constexpr index_t Warp_M = WarpTile::at(number<0>{});
20 static constexpr index_t Warp_N = WarpTile::at(number<1>{});
21
22 static constexpr index_t ThreadTile_M = ThreadTile::at(number<0>{});
23 static constexpr index_t ThreadTile_N = ThreadTile::at(number<1>{});
24
25 static constexpr index_t WarpPerBlock_M = BlockWarps::at(number<0>{});
26 static constexpr index_t WarpPerBlock_N = BlockWarps::at(number<1>{});
27
28 static constexpr index_t RepeatInWarp =
30 static constexpr index_t RepeatInWarp_M =
32 static constexpr index_t RepeatInWarp_N =
34
37
40
41 static constexpr index_t BlockSize =
43};
44} // namespace ck_tile
Definition tile/core/algorithm/cluster_descriptor.hpp:13
CK_TILE_HOST_DEVICE constexpr index_t get_warp_size()
Definition arch.hpp:63
constant< v > number
Definition tile/core/numeric/integral_constant.hpp:37
int32_t index_t
Definition integer.hpp:9
CK_TILE_HOST_DEVICE constexpr index_t reduce_on_sequence(Seq, Reduce f, number< Init >)
Definition tile/core/container/sequence.hpp:982
Definition reduce2d_shape.hpp:15
static constexpr index_t Warp_N
Definition reduce2d_shape.hpp:20
static constexpr index_t Block_M
Definition reduce2d_shape.hpp:16
static constexpr index_t WarpPerBlock_M
Definition reduce2d_shape.hpp:25
static constexpr index_t RepeatInWarp_M
Definition reduce2d_shape.hpp:30
static constexpr index_t ThreadTile_M
Definition reduce2d_shape.hpp:22
static constexpr index_t ThreadTile_N
Definition reduce2d_shape.hpp:23
static constexpr index_t Repeat_N
Definition reduce2d_shape.hpp:39
static constexpr index_t ThreadPerWarp_N
Definition reduce2d_shape.hpp:36
static constexpr index_t WarpPerBlock_N
Definition reduce2d_shape.hpp:26
static constexpr index_t RepeatInWarp
Definition reduce2d_shape.hpp:28
static constexpr index_t Warp_M
Definition reduce2d_shape.hpp:19
static constexpr index_t BlockSize
Definition reduce2d_shape.hpp:41
static constexpr index_t ThreadPerWarp_M
Definition reduce2d_shape.hpp:35
static constexpr index_t Block_N
Definition reduce2d_shape.hpp:17
static constexpr index_t RepeatInWarp_N
Definition reduce2d_shape.hpp:32
static constexpr index_t Repeat_M
Definition reduce2d_shape.hpp:38
Definition tile/core/numeric/math.hpp:98