/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-composable-kernel/checkouts/develop/include/ck/tensor_operation/gpu/grid/gridwise_gemm_pipeline_selector.hpp Source File

/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-composable-kernel/checkouts/develop/include/ck/tensor_operation/gpu/grid/gridwise_gemm_pipeline_selector.hpp Source File#

Composable Kernel: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-composable-kernel/checkouts/develop/include/ck/tensor_operation/gpu/grid/gridwise_gemm_pipeline_selector.hpp Source File
gridwise_gemm_pipeline_selector.hpp
Go to the documentation of this file.
1 // Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
2 // SPDX-License-Identifier: MIT
3 
4 #pragma once
5 
6 #if !defined(__HIPCC_RTC__) || !defined(CK_CODE_GEN_RTC)
7 #include <iostream>
8 #endif
9 
15 
16 namespace ck {
17 
18 template <PipelineVersion PipelineVer,
19  index_t NumPrefetch = 1,
21  bool AEnableLds = true,
22  bool BEnableLds = true>
24 {
25  if constexpr(PipelineVer == PipelineVersion::v1)
26  {
27  if constexpr(LoopSched == LoopScheduler::Default)
28  {
30  }
31  else if constexpr(LoopSched == LoopScheduler::Interwave)
32  {
34  }
35  }
36  else if constexpr(PipelineVer == PipelineVersion::v2)
37  {
38  return GridwiseGemmPipeline_v2{};
39  }
40  else if constexpr(PipelineVer == PipelineVersion::v4)
41  {
43  }
44  else if constexpr(PipelineVer == PipelineVersion::weight_only)
45  {
47  }
48  else
49  {
50 #if !defined(__HIPCC_RTC__) || !defined(CK_CODE_GEN_RTC)
51  std::cerr << "GridwiseGemmPipeline configuration is not available" << std::endl;
52 #endif
53  }
54 }
55 
56 } // namespace ck
Definition: ck.hpp:270
constexpr auto GridwiseGemmPipeline_Selector()
Definition: gridwise_gemm_pipeline_selector.hpp:23
LoopScheduler
Loop scheduler enumeration.
Definition: scheduler_enum.hpp:41
@ Default
Default scheduling strategy.
@ Interwave
Cross-wavefront scheduling.
int32_t index_t
Definition: ck.hpp:301
PipelineVersion
Pipeline version enumeration for GEMM kernels.
Definition: pipeline_enum.hpp:17
@ v2
Version 2 pipeline.
@ v4
Version 4 pipeline.
@ v1
Version 1 pipeline.
@ weight_only
Weight-only specialized pipeline.
Definition: gridwise_gemm_pipeline_v1.hpp:555
Definition: gridwise_gemm_pipeline_v1.hpp:13
Definition: gridwise_gemm_pipeline_v2.hpp:11
Definition: gridwise_gemm_pipeline_v4_direct_load.hpp:27
Definition: gridwise_gemm_pipeline_v1.hpp:658