block_gemm_asmem_breg_creg_v1_default_policy.hpp Source File

block_gemm_asmem_breg_creg_v1_default_policy.hpp Source File#

Composable Kernel: block_gemm_asmem_breg_creg_v1_default_policy.hpp Source File
block_gemm_asmem_breg_creg_v1_default_policy.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
2// Copyright (c) 2018-2024, Advanced Micro Devices, Inc. All rights reserved.
3
4#pragma once
5
6#include "ck_tile/core.hpp"
8
9namespace ck_tile {
10
11// Default policy for BlockGemmASmemBRegCRegV1
12// Default policy class should not be templated, put template on member functions instead
14{
15 template <typename Problem>
17 {
18 if constexpr(std::is_same_v<typename Problem::ADataType, half_t> &&
19 std::is_same_v<typename Problem::BDataType, half_t> &&
20 std::is_same_v<typename Problem::CDataType, float>)
21 {
22#if 0
23 constexpr index_t kBlockSize = Problem::kBlockSize;
24
25 constexpr index_t kMPerBlock = Problem::BlockGemmShape::kM;
26 constexpr index_t kNPerBlock = Problem::BlockGemmShape::kN;
27 constexpr index_t kKPerBlock = Problem::BlockGemmShape::kK;
28
29 static_assert(kBlockSize % get_warp_size() == 0, "wrong!");
30
31 constexpr index_t NumWarp = kBlockSize / get_warp_size();
32
33 // FIXME
34 if constexpr(NumWarp == 4 && kMPerBlock % 128 == 0 &&
35 kNPerBlock % 128 == 0 % kKPerBlock % 16 == 0)
36 {
38 }
39 else
40 {
42 }
43#else
45#endif
46 }
47 else if constexpr(std::is_same_v<typename Problem::ADataType, bf16_t> &&
48 std::is_same_v<typename Problem::BDataType, bf16_t> &&
49 std::is_same_v<typename Problem::CDataType, float>)
50 {
52 }
53 }
54};
55
56} // namespace ck_tile
#define CK_TILE_HOST_DEVICE
Definition config.hpp:42
Definition tile/core/algorithm/cluster_descriptor.hpp:13
CK_TILE_HOST_DEVICE constexpr index_t get_warp_size()
Definition arch.hpp:63
WarpGemmImpl< WarpGemmAttributeMfmaTransposedCDistribution< WarpGemmAttributeMfmaImplBf16Bf16F32M32N32K8< WGAttrCtlEnum::Default_ > > > WarpGemmMfmaBf16Bf16F32M32N32K8TransposedCDistribution
Definition warp_gemm.hpp:197
WarpGemmImpl< WarpGemmAttributeMfma< WarpGemmAttributeMfmaImplF16F16F32M32N32K8< WGAttrCtlEnum::Default_ > > > WarpGemmMfmaF16F16F32M32N32K8
Definition warp_gemm.hpp:35
int32_t index_t
Definition integer.hpp:9
WarpGemmImpl< WarpGemmAttributeMfmaTransposedCDistribution< WarpGemmAttributeMfmaImplF16F16F32M32N32K8< WGAttrCtlEnum::Default_ > > > WarpGemmMfmaF16F16F32M32N32K8TransposedCDistribution
Definition warp_gemm.hpp:75
CK_TILE_HOST_DEVICE constexpr auto make_tuple(Xs &&... xs)
Definition tile/core/container/tuple.hpp:360
Definition block_gemm_asmem_breg_creg_v1_default_policy.hpp:14
static CK_TILE_HOST_DEVICE constexpr auto GetWarpGemmMWarpNWarp()
Definition block_gemm_asmem_breg_creg_v1_default_policy.hpp:16