elementwise_shape.hpp Source File

elementwise_shape.hpp Source File#

Composable Kernel: elementwise_shape.hpp Source File
elementwise_shape.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
2// Copyright (c) 2025, Advanced Micro Devices, Inc. All rights reserved.
3
4#pragma once
5
7
8namespace ck_tile {
9
10template <typename BlockWarps, typename BlockTile, typename WarpTile, typename ComputeDataType>
12{
13 static constexpr index_t kBlockM = BlockTile::at(number<0>{});
14
15 static constexpr index_t kWarpM = WarpTile::at(number<0>{});
16
17 static constexpr index_t kVectorM =
18 min(static_cast<index_t>(16 / sizeof(ComputeDataType)), kWarpM / get_warp_size());
19
20 static constexpr index_t kWarpPerBlockM = BlockWarps::at(number<0>{});
21
23
25
26 static constexpr index_t kBlockSize =
28};
29
30} // 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
CK_TILE_HOST_DEVICE constexpr T min(T x)
Definition tile/core/numeric/math.hpp:210
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 elementwise_shape.hpp:12
static constexpr index_t kRepeatM
Definition elementwise_shape.hpp:24
static constexpr index_t kWarpPerBlockM
Definition elementwise_shape.hpp:20
static constexpr index_t kWarpM
Definition elementwise_shape.hpp:15
static constexpr index_t kBlockSize
Definition elementwise_shape.hpp:26
static constexpr index_t kBlockM
Definition elementwise_shape.hpp:13
static constexpr index_t kThreadPerWarpM
Definition elementwise_shape.hpp:22
static constexpr index_t kVectorM
Definition elementwise_shape.hpp:17
Definition tile/core/numeric/math.hpp:98