Compute Library
 21.11
arm_compute::mlgo Namespace Reference

Namespaces

 parser
 

Data Structures

struct  Condition
 A branch condition expression evaluating: feature op threshold. More...
 
struct  GEMMConfigNative
 GEMM Configuration for Native kernel. More...
 
struct  GEMMConfigReshaped
 GEMM Configuration for Reshaped kernel. More...
 
struct  GEMMConfigReshapedOnlyRHS
 GEMM Configuration for Reshaped Only RHS kernel. More...
 
struct  GEMMShape
 GEMM Shape used for query. More...
 
class  HeuristicTree
 A binary decision tree based heuristic. More...
 
class  MLGOHeuristics
 MLGOHeuristics for configuring GEMM kernels. More...
 
struct  Query
 Query interface. More...
 

Typedefs

using GEMMType = CLGEMMKernelType
 

Enumerations

enum  HeuristicType { GEMM_Type, GEMM_Config_Native, GEMM_Config_Reshaped_Only_RHS, GEMM_Config_Reshaped }
 Types of Heuristic (tree) More...
 
enum  ConditionalOp {
  EQ, LT, LE, GT,
  GE
}
 Conditional ops. More...
 

Functions

bool operator== (const GEMMConfigNative &lhs, const GEMMConfigNative &rhs)
 
bool operator== (const GEMMConfigReshapedOnlyRHS &lhs, const GEMMConfigReshapedOnlyRHS &rhs)
 
bool operator== (const GEMMConfigReshaped &lhs, const GEMMConfigReshaped &rhs)
 
std::ostream & operator<< (std::ostream &os, const GEMMConfigNative &config)
 
std::ostream & operator<< (std::ostream &os, const GEMMConfigReshapedOnlyRHS &config)
 
std::ostream & operator<< (std::ostream &os, const GEMMConfigReshaped &config)
 
std::ostream & operator<< (std::ostream &os, HeuristicType ht)
 
std::ostream & operator<< (std::ostream &os, DataType dt)
 
std::ostream & operator<< (std::ostream &os, const HeuristicTree::Index &index)
 
std::ostream & operator<< (std::ostream &os, const Query &query)
 
std::string to_string (const GEMMConfigNative &config)
 
std::string to_string (const GEMMConfigReshapedOnlyRHS &config)
 
std::string to_string (const GEMMConfigReshaped &config)
 
std::string to_string (const Query &query)
 

Typedef Documentation

◆ GEMMType

Definition at line 43 of file Common.h.

Enumeration Type Documentation

◆ ConditionalOp

enum ConditionalOp
strong

Conditional ops.

Enumerator
EQ 

Equal.

LT 

Less than.

LE 

Less than or equal to.

GT 

Greater than.

GE 

Greater than or equal to.

Definition at line 40 of file HeuristicTree.h.

41 {
42  EQ, /**< Equal */
43  LT, /**< Less than */
44  LE, /**< Less than or equal to */
45  GT, /**< Greater than */
46  GE, /**< Greater than or equal to */
47 };
Greater than or equal to.

◆ HeuristicType

enum HeuristicType
strong

Types of Heuristic (tree)

Enumerator
GEMM_Type 

About the type of gemm.

GEMM_Config_Native 

About the gemm config for native kernel.

GEMM_Config_Reshaped_Only_RHS 

About the gemm config for reshaped only rhs kernel.

GEMM_Config_Reshaped 

About the gemm config for reshaped kernel.

Definition at line 35 of file Common.h.

36 {
37  GEMM_Type, /**< About the type of gemm */
38  GEMM_Config_Native, /**< About the gemm config for native kernel */
39  GEMM_Config_Reshaped_Only_RHS, /**< About the gemm config for reshaped only rhs kernel */
40  GEMM_Config_Reshaped /**< About the gemm config for reshaped kernel */
41 };
About the gemm config for reshaped kernel.
About the gemm config for native kernel.
About the gemm config for reshaped only rhs kernel.

Function Documentation

◆ operator<<() [1/7]

std::ostream & operator<< ( std::ostream &  os,
const GEMMConfigNative config 
)

Definition at line 43 of file Utils.cpp.

References GEMMConfigNative::k0, GEMMConfigNative::m0, and GEMMConfigNative::n0.

44 {
45  return os << "Native:{"
46  << "m0: " << config.m0 << ", "
47  << "n0: " << config.n0 << ", "
48  << "k0: " << config.k0 << ", "
49  << "}";
50 }

◆ operator<<() [2/7]

std::ostream & operator<< ( std::ostream &  os,
const GEMMConfigReshapedOnlyRHS config 
)

Definition at line 51 of file Utils.cpp.

References GEMMConfigReshapedOnlyRHS::export_cl_image, GEMMConfigReshapedOnlyRHS::h0, GEMMConfigReshapedOnlyRHS::interleave_rhs, GEMMConfigReshapedOnlyRHS::k0, GEMMConfigReshapedOnlyRHS::m0, GEMMConfigReshapedOnlyRHS::n0, and GEMMConfigReshapedOnlyRHS::transpose_rhs.

52 {
53  return os << "ReshapedOnlyRHS:{"
54  << "m0: " << config.m0 << ", "
55  << "n0: " << config.n0 << ", "
56  << "k0: " << config.k0 << ", "
57  << "h0: " << config.h0 << ", "
58  << "interleave_rhs: " << config.interleave_rhs << ", "
59  << "transpose_rhs: " << config.transpose_rhs << ", "
60  << "export_cl_image: " << config.export_cl_image
61  << "}";
62 }

◆ operator<<() [3/7]

std::ostream & operator<< ( std::ostream &  os,
const GEMMConfigReshaped config 
)

Definition at line 63 of file Utils.cpp.

References GEMMConfigReshaped::export_cl_image, GEMMConfigReshaped::h0, GEMMConfigReshaped::interleave_lhs, GEMMConfigReshaped::interleave_rhs, GEMMConfigReshaped::k0, GEMMConfigReshaped::m0, GEMMConfigReshaped::n0, GEMMConfigReshaped::transpose_rhs, and GEMMConfigReshaped::v0.

64 {
65  return os << "Reshaped:{"
66  << "m0: " << config.m0 << ", "
67  << "n0: " << config.n0 << ", "
68  << "k0: " << config.k0 << ", "
69  << "v0: " << config.v0 << ", "
70  << "h0: " << config.h0 << ", "
71  << "interleave_lhs: " << config.interleave_lhs << ", "
72  << "interleave_rhs: " << config.interleave_rhs << ", "
73  << "transpose_rhs: " << config.transpose_rhs << ", "
74  << "export_cl_image: " << config.export_cl_image
75  << "}";
76 }

◆ operator<<() [4/7]

std::ostream & operator<< ( std::ostream &  os,
HeuristicType  ht 
)

Definition at line 77 of file Utils.cpp.

References GEMM_Config_Reshaped, GEMM_Config_Reshaped_Only_RHS, and GEMM_Type.

78 {
79  switch(ht)
80  {
81  case HeuristicType::GEMM_Type:
82  {
83  os << "GEMM_Type";
84  break;
85  }
86  case HeuristicType::GEMM_Config_Reshaped_Only_RHS:
87  {
88  os << "GEMM_Config_Reshaped_Only_RHS";
89  break;
90  }
91  case HeuristicType::GEMM_Config_Reshaped:
92  {
93  os << "GEMM_Config_Reshaped";
94  break;
95  }
96  default:
97  {
98  os << "Unknown";
99  break;
100  }
101  }
102  return os;
103 }

◆ operator<<() [5/7]

std::ostream & operator<< ( std::ostream &  os,
DataType  dt 
)

Definition at line 104 of file Utils.cpp.

References arm_compute::F16, arm_compute::F32, and arm_compute::QASYMM8.

105 {
106  switch(dt)
107  {
108  case DataType::F32:
109  {
110  os << "F32";
111  break;
112  }
113  case DataType::F16:
114  {
115  os << "F16";
116  break;
117  }
118  case DataType::QASYMM8:
119  {
120  os << "QASYMM8";
121  break;
122  }
123  default:
124  {
125  os << "Unknown";
126  break;
127  }
128  }
129  return os;
130 }

◆ operator<<() [6/7]

std::ostream & operator<< ( std::ostream &  os,
const HeuristicTree::Index index 
)

Definition at line 131 of file Utils.cpp.

References dt.

132 {
133  HeuristicType ht;
134  std::string ip;
135  DataType dt;
136  std::tie(ht, ip, dt) = index;
137  os << "Index(";
138  os << "HeuristicType=" << ht << ",";
139  os << "IP=" << ip << ",";
140  os << "DataType=" << dt;
141  os << ")";
142  return os;
143 }
DataType
Definition: Acl.hpp:485
HeuristicType
Types of Heuristic (tree)
Definition: Common.h:35

◆ operator<<() [7/7]

std::ostream & operator<< ( std::ostream &  os,
const Query query 
)

Definition at line 144 of file Utils.cpp.

References Query::b, Query::data_type, Query::ip_target, Query::k, Query::m, and Query::n.

145 {
146  os << "Query(";
147  os << "IP=" << query.ip_target << ",";
148  os << "DataType=" << query.data_type << ",";
149  os << "M=" << query.m << ",";
150  os << "N=" << query.n << ",";
151  os << "K=" << query.k << ",";
152  os << "B=" << query.b << ")";
153  return os;
154 }
template std::pair< bool, GEMMType > query(GEMMShape shape) const
Explicit template instantiation.

◆ operator==() [1/3]

bool operator== ( const GEMMConfigNative lhs,
const GEMMConfigNative rhs 
)

Definition at line 36 of file MLGOHeuristics.cpp.

References GEMMConfigNative::k0, GEMMConfigNative::m0, and GEMMConfigNative::n0.

37 {
38  return std::tie(lhs.m0, lhs.n0, lhs.k0) == std::tie(rhs.m0, rhs.n0, rhs.k0);
39 }

◆ operator==() [2/3]

bool operator== ( const GEMMConfigReshapedOnlyRHS lhs,
const GEMMConfigReshapedOnlyRHS rhs 
)

Definition at line 40 of file MLGOHeuristics.cpp.

References GEMMConfigReshapedOnlyRHS::export_cl_image, GEMMConfigReshapedOnlyRHS::h0, GEMMConfigReshapedOnlyRHS::interleave_rhs, GEMMConfigReshapedOnlyRHS::k0, GEMMConfigReshapedOnlyRHS::m0, GEMMConfigReshapedOnlyRHS::n0, and GEMMConfigReshapedOnlyRHS::transpose_rhs.

41 {
42  return std::tie(lhs.m0, lhs.n0, lhs.k0, lhs.h0, lhs.interleave_rhs, lhs.transpose_rhs, lhs.export_cl_image) == std::tie(rhs.m0, rhs.n0, rhs.k0, rhs.h0, rhs.interleave_rhs, rhs.transpose_rhs,
43  rhs.export_cl_image);
44 }

◆ operator==() [3/3]

bool operator== ( const GEMMConfigReshaped lhs,
const GEMMConfigReshaped rhs 
)

Definition at line 45 of file MLGOHeuristics.cpp.

References GEMMConfigReshaped::export_cl_image, GEMMConfigReshaped::h0, GEMMConfigReshaped::interleave_lhs, GEMMConfigReshaped::interleave_rhs, GEMMConfigReshaped::k0, GEMMConfigReshaped::m0, GEMMConfigReshaped::n0, GEMMConfigReshaped::transpose_rhs, and GEMMConfigReshaped::v0.

46 {
47  return std::tie(lhs.m0, lhs.n0, lhs.k0, lhs.v0, lhs.h0, lhs.interleave_lhs, lhs.interleave_rhs, lhs.transpose_rhs, lhs.export_cl_image) == std::tie(rhs.m0, rhs.n0, rhs.k0, rhs.v0, rhs.h0,
48  rhs.interleave_lhs, rhs.interleave_rhs, rhs.transpose_rhs, rhs.export_cl_image);
49 }

◆ to_string() [1/4]

std::string to_string ( const GEMMConfigNative config)

◆ to_string() [2/4]

std::string to_string ( const GEMMConfigReshapedOnlyRHS config)

Definition at line 161 of file Utils.cpp.

162 {
163  return to_str(config);
164 }

◆ to_string() [3/4]

std::string to_string ( const GEMMConfigReshaped config)

Definition at line 166 of file Utils.cpp.

167 {
168  return to_str(config);
169 }

◆ to_string() [4/4]

std::string to_string ( const Query query)

Definition at line 171 of file Utils.cpp.

References GemmTuner::parser.

172 {
173  return to_str(query);
174 }
template std::pair< bool, GEMMType > query(GEMMShape shape) const
Explicit template instantiation.