/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-composable-kernel/checkouts/docs-7.1.0/include/ck_tile/ops/elementwise/pipeline/elementwise_shape.hpp Source File

/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-composable-kernel/checkouts/docs-7.1.0/include/ck_tile/ops/elementwise/pipeline/elementwise_shape.hpp Source File#

Composable Kernel: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-composable-kernel/checkouts/docs-7.1.0/include/ck_tile/ops/elementwise/pipeline/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 
8 namespace ck_tile {
9 
10 template <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 = 16 / sizeof(ComputeDataType);
18 
19  static constexpr index_t kWarpPerBlockM = BlockWarps::at(number<0>{});
20 
21  static constexpr index_t kThreadPerWarpM = kWarpM / kVectorM;
22 
23  static constexpr index_t kRepeatM = kBlockM / (kWarpPerBlockM * kWarpM);
24 
25  static constexpr index_t kBlockSize =
26  ck_tile::get_warp_size() * reduce_on_sequence(BlockWarps{}, multiplies{}, number<1>{});
27 };
28 
29 } // namespace ck_tile
Definition: cluster_descriptor.hpp:13
int32_t index_t
Definition: integer.hpp:9
constexpr CK_TILE_HOST_DEVICE index_t reduce_on_sequence(Seq, Reduce f, number< Init >)
Definition: sequence.hpp:973
__host__ constexpr __device__ index_t get_warp_size()
Definition: get_id.hpp:10
Definition: elementwise_shape.hpp:12
static constexpr index_t kRepeatM
Definition: elementwise_shape.hpp:23
static constexpr index_t kWarpPerBlockM
Definition: elementwise_shape.hpp:19
static constexpr index_t kWarpM
Definition: elementwise_shape.hpp:15
static constexpr index_t kBlockSize
Definition: elementwise_shape.hpp:25
static constexpr index_t kBlockM
Definition: elementwise_shape.hpp:13
static constexpr index_t kThreadPerWarpM
Definition: elementwise_shape.hpp:21
static constexpr index_t kVectorM
Definition: elementwise_shape.hpp:17
Definition: integral_constant.hpp:13
Definition: math.hpp:98