warp_gemm_attribute_smfmac.hpp Source File

warp_gemm_attribute_smfmac.hpp Source File#

Composable Kernel: warp_gemm_attribute_smfmac.hpp Source File
warp_gemm_attribute_smfmac.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
6#include "ck_tile/core.hpp"
8
9namespace ck_tile {
10
24template <typename WarpGemmAttributeSmfmacImpl_>
26{
28
29 using ADataType = typename Impl::ADataType;
30 using BDataType = typename Impl::BDataType;
31 using IdxDataType = typename Impl::IdxDataType;
32 using CDataType = typename Impl::CDataType;
33
34 using AVecType = typename Impl::AVecType;
35 using BVecType = typename Impl::BVecType;
36 using CVecType = typename Impl::CVecType;
37
38 static constexpr index_t kM = Impl::kM;
39 static constexpr index_t kN = Impl::kN;
40 static constexpr index_t kK = Impl::kK;
41 static constexpr index_t kKPerThread = Impl::kABKPerLane;
42 static constexpr index_t kCompressionRatio = Impl::CompressionRatio;
43
44 CK_TILE_HOST_DEVICE static constexpr auto get_num_of_access() { return 1; }
45
46 static_assert(Impl::kAMBlock == 1 && Impl::kBNBlock == 1,
47 "Multi-block WarpGemmAttributeSmfmacImpl is not supported");
48
56
64
73
74 // c_vec += a_vec * b_vec[idx]
75 template <bool post_nop_ = false>
77 const AVecType& a_vec,
78 const BVecType& b_vec,
79 const int32_t& idx,
80 bool_constant<post_nop_> = {}) const
81 {
82 Impl{}(c_vec, a_vec, b_vec, idx, bool_constant<post_nop_>{});
83 }
84};
85} // 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
remove_cv_t< std::remove_reference_t< T > > remove_cvref_t
Definition type_traits.hpp:21
constant< b > bool_constant
Definition tile/core/numeric/integral_constant.hpp:43
int32_t int32_t
Definition integer.hpp:10
int32_t index_t
Definition integer.hpp:9
Class describing structured sparsity mfma instructions.
Definition warp_gemm_attribute_smfmac.hpp:26
static constexpr index_t kKPerThread
Definition warp_gemm_attribute_smfmac.hpp:41
static constexpr index_t kK
Definition warp_gemm_attribute_smfmac.hpp:40
static constexpr index_t kCompressionRatio
Definition warp_gemm_attribute_smfmac.hpp:42
static constexpr index_t kM
Definition warp_gemm_attribute_smfmac.hpp:38
static constexpr index_t kN
Definition warp_gemm_attribute_smfmac.hpp:39
tile_distribution_encoding< sequence<>, tuple< sequence< Impl::kCM0PerLane, Impl::kCMLane, Impl::kCM1PerLane >, sequence< Impl::kCNLane > >, tuple< sequence< 1, 2 > >, tuple< sequence< 1, 0 > >, sequence< 1, 1 >, sequence< 0, 2 > > CWarpDstrEncoding
Definition warp_gemm_attribute_smfmac.hpp:65
remove_cvref_t< WarpGemmAttributeSmfmacImpl_ > Impl
Definition warp_gemm_attribute_smfmac.hpp:27
typename Impl::CVecType CVecType
Definition warp_gemm_attribute_smfmac.hpp:36
typename Impl::IdxDataType IdxDataType
Definition warp_gemm_attribute_smfmac.hpp:31
typename Impl::AVecType AVecType
Definition warp_gemm_attribute_smfmac.hpp:34
CK_TILE_DEVICE void operator()(CVecType &c_vec, const AVecType &a_vec, const BVecType &b_vec, const int32_t &idx, bool_constant< post_nop_ >={}) const
Definition warp_gemm_attribute_smfmac.hpp:76
tile_distribution_encoding< sequence<>, tuple< sequence< Impl::kAMLane >, sequence< Impl::kABKLane, Impl::kABKPerLane > >, tuple< sequence< 2, 1 > >, tuple< sequence< 0, 0 > >, sequence< 2 >, sequence< 1 > > AWarpDstrEncoding
Definition warp_gemm_attribute_smfmac.hpp:49
typename Impl::CDataType CDataType
Definition warp_gemm_attribute_smfmac.hpp:32
static CK_TILE_HOST_DEVICE constexpr auto get_num_of_access()
Definition warp_gemm_attribute_smfmac.hpp:44
typename Impl::ADataType ADataType
Definition warp_gemm_attribute_smfmac.hpp:29
tile_distribution_encoding< sequence<>, tuple< sequence< Impl::kBNLane >, sequence< Impl::kABKLane, Impl::kABKPerLane > >, tuple< sequence< 2, 1 > >, tuple< sequence< 0, 0 > >, sequence< 2 >, sequence< 1 > > BWarpDstrEncoding
Definition warp_gemm_attribute_smfmac.hpp:57
typename Impl::BDataType BDataType
Definition warp_gemm_attribute_smfmac.hpp:30
typename Impl::BVecType BVecType
Definition warp_gemm_attribute_smfmac.hpp:35
Definition tile_distribution_encoding.hpp:26
Definition tile/core/container/tuple.hpp:192