/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-composable-kernel/checkouts/develop/include/ck_tile/ops/gemm/warp/warp_gemm_attribute_smfmac.hpp Source File

/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-composable-kernel/checkouts/develop/include/ck_tile/ops/gemm/warp/warp_gemm_attribute_smfmac.hpp Source File#

Composable Kernel: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-composable-kernel/checkouts/develop/include/ck_tile/ops/gemm/warp/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 
9 namespace ck_tile {
10 
24 template <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 
50  sequence<>,
55  sequence<1>>;
56 
58  sequence<>,
63  sequence<1>>;
64 
66  sequence<>,
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: cluster_descriptor.hpp:13
int32_t index_t
Definition: integer.hpp:9
remove_cv_t< std::remove_reference_t< T > > remove_cvref_t
Definition: type_traits.hpp:21
int32_t int32_t
Definition: integer.hpp:10
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
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
static constexpr CK_TILE_HOST_DEVICE auto get_num_of_access()
Definition: warp_gemm_attribute_smfmac.hpp:44
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
typename Impl::CDataType CDataType
Definition: warp_gemm_attribute_smfmac.hpp:32
typename Impl::ADataType ADataType
Definition: warp_gemm_attribute_smfmac.hpp:29
typename Impl::BDataType BDataType
Definition: warp_gemm_attribute_smfmac.hpp:30
typename Impl::BVecType BVecType
Definition: warp_gemm_attribute_smfmac.hpp:35
Definition: integral_constant.hpp:13
Definition: sequence.hpp:49
Definition: tile_distribution_encoding.hpp:26
Definition: tuple.hpp:192