smoothquant_pipeline_default_policy.hpp Source File

smoothquant_pipeline_default_policy.hpp Source File#

Composable Kernel: smoothquant_pipeline_default_policy.hpp Source File
smoothquant_pipeline_default_policy.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"
9
10namespace ck_tile {
11
13{
14 template <typename Problem>
29
30 template <typename Problem>
44
45 template <typename Problem>
46 CK_TILE_HOST_DEVICE static constexpr auto GetBlockReduce2d()
47 {
48 using P_ = BlockReduce2dProblem<typename Problem::ComputeDataType,
49 typename Problem::ComputeDataType,
50 typename Problem::BlockShape>;
51 return BlockReduce2d<P_>{};
52 }
53
54 template <typename Problem>
56 {
57 using P_ = BlockReduce2dProblem<typename Problem::ComputeDataType,
58 typename Problem::ComputeDataType,
59 typename Problem::BlockShape>;
60 return BlockReduce2dSync<P_>{};
61 }
62
63 template <typename Problem>
65 {
66 using P_ = BlockReduce2dProblem<typename Problem::ComputeDataType,
67 typename Problem::ComputeDataType,
68 typename Problem::BlockShape>;
70 }
71
72 template <typename Problem>
74 {
75 if constexpr(Problem::kNeedCrossWarpSync)
76 {
77 using P_ = BlockReduce2dProblem<typename Problem::XDataType,
78 typename Problem::ComputeDataType,
79 typename Problem::BlockShape>;
80
81 using block_reduce2d = BlockReduce2d<P_>;
82 using x_block_tile =
85 using y_block_tile = decltype(block_reduce2d::template MakeYBlockTile<x_block_tile>());
86
88 }
89 else
90 {
91 return 1; // zero size arrays are an extension
92 }
93 }
94};
95} // namespace ck_tile
#define CK_TILE_DEVICE
Definition config.hpp:41
#define CK_TILE_HOST_DEVICE
Definition config.hpp:42
Definition tile/core/algorithm/cluster_descriptor.hpp:13
CK_TILE_HOST_DEVICE constexpr auto make_static_distributed_tensor(const StaticTileDistribution &)
Definition static_distributed_tensor.hpp:142
int32_t index_t
Definition integer.hpp:9
CK_TILE_HOST_DEVICE constexpr auto make_static_tile_distribution(StaticTileDistributionEncoding_)
Definition tile_distribution.hpp:480
Definition block_reduce2d.hpp:334
Definition block_reduce2d.hpp:46
Definition block_reduce2d_problem.hpp:15
Definition block_reduce2d.hpp:224
Definition smoothquant_pipeline_default_policy.hpp:13
static CK_TILE_DEVICE constexpr auto MakeSmoothScaleBlockTileDistribution()
Definition smoothquant_pipeline_default_policy.hpp:31
static CK_TILE_HOST_DEVICE constexpr auto GetBlockReduce2dSync()
Definition smoothquant_pipeline_default_policy.hpp:55
static CK_TILE_DEVICE constexpr auto MakeXBlockTileDistribution()
Definition smoothquant_pipeline_default_policy.hpp:15
static CK_TILE_HOST_DEVICE constexpr auto GetBlockReduce2d()
Definition smoothquant_pipeline_default_policy.hpp:46
static CK_TILE_HOST_DEVICE constexpr auto GetBlockReduce2dCrossWarpSync()
Definition smoothquant_pipeline_default_policy.hpp:64
static CK_TILE_HOST_DEVICE constexpr index_t GetSmemSize()
Definition smoothquant_pipeline_default_policy.hpp:73
Definition tile_distribution_encoding.hpp:26
Definition tile/core/container/tuple.hpp:192