/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-composable-kernel/checkouts/develop/include/ck/utility/scheduler_enum.hpp Source File

/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-composable-kernel/checkouts/develop/include/ck/utility/scheduler_enum.hpp Source File#

Composable Kernel: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-composable-kernel/checkouts/develop/include/ck/utility/scheduler_enum.hpp Source File
scheduler_enum.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 <ostream>
8 #endif
9 
10 namespace ck {
11 
17 {
18  // For GEMM
19  v1,
20  v2,
21  v3,
22  v4,
23  v5,
24 
25  // For GEMM with preshuffled weight
26  // v1, single lds buffer
27  // v2, double lds buffer
28 };
29 
33 {
34  Intrawave,
35  Interwave,
36 };
37 
40 enum struct LoopScheduler
41 {
42  Default,
43  Interwave,
44 };
45 
48 enum struct TailNumber
49 {
50  // Single / Double buffer pipeline
51  Odd,
52  Even,
53 
54  // Long prefetch pipeline, up to 8
55  One,
56  Two,
57  Three,
58  Four,
59  Five,
60  Six,
61  Seven,
62 
63  // Unroll stages > Prefetch stages, number of loop is multiple of unroll stages
64  Empty,
65  // Unroll stages <= Prefetch stages, number of loop is multiple of unroll stages add
66  // prefetchstages
67  Full,
68 };
69 
70 } // namespace ck
71 
72 #if !defined(__HIPCC_RTC__) || !defined(CK_CODE_GEN_RTC)
73 inline std::ostream& operator<<(std::ostream& os, const ck::LoopScheduler& s)
74 {
75  switch(s)
76  {
77  case ck::LoopScheduler::Default: os << "Default"; break;
78  case ck::LoopScheduler::Interwave: os << "Interwave"; break;
79  default: os << "";
80  }
81  return os;
82 }
83 #endif
Definition: ck.hpp:270
BlockGemmPipelineVersion
Block GEMM pipeline version enumeration.
Definition: scheduler_enum.hpp:17
@ v2
Memory-optimized pipeline.
@ v3
Compute-optimized pipeline.
@ v5
Compute-optimized with double global prefetch register buffer.
@ v4
Compute-optimized with double LDS buffer.
TailNumber
Tail number enumeration for pipeline buffering.
Definition: scheduler_enum.hpp:49
@ One
One tail iteration.
@ Seven
Seven tail iterations.
@ Even
Even number of iterations.
@ Odd
Odd number of iterations.
@ Four
Four tail iterations.
@ Two
Two tail iterations.
@ Full
Full tail iterations.
@ Three
Three tail iterations.
@ Empty
No tail iterations.
@ Five
Five tail iterations.
@ Six
Six tail iterations.
BlockGemmPipelineScheduler
Block GEMM pipeline scheduler enumeration.
Definition: scheduler_enum.hpp:33
@ Intrawave
Schedule within a single wavefront.
@ Interwave
Schedule across multiple wavefronts.
LoopScheduler
Loop scheduler enumeration.
Definition: scheduler_enum.hpp:41
@ Default
Default scheduling strategy.
@ Interwave
Cross-wavefront scheduling.
std::ostream & operator<<(std::ostream &os, const ck::LoopScheduler &s)
Definition: scheduler_enum.hpp:73