ONE - On-device Neural Engine
Loading...
Searching...
No Matches
kbenchmark Namespace Reference

Namespaces

namespace  kernels
 
namespace  operation
 

Data Structures

class  Args
 
class  ConfigFile
 
class  Operation
 
class  OperationLoader
 

Typedefs

using OperationInfo = std::map< std::string, std::string >
 

Functions

void check_valid_key (const std::string &key, OperationInfo &info)
 
std::vector< int > dims (const std::string &src)
 
std::vector< int > get_key_dims (const std::string &key, OperationInfo &info)
 
int get_key_int (const std::string &key, OperationInfo &info)
 
std::string get_key_string (const std::string &key, OperationInfo &info)
 

Typedef Documentation

◆ OperationInfo

using kbenchmark::OperationInfo = typedef std::map<std::string, std::string>

Definition at line 62 of file ConfigFile.h.

Function Documentation

◆ check_valid_key()

void kbenchmark::check_valid_key ( const std::string &  key,
OperationInfo info 
)

Definition at line 28 of file Utils.h.

29{
30 OperationInfo::const_iterator it;
31 it = info.find(key);
32 assert(it != info.end());
33}
volatile const char info[]

References info.

Referenced by get_key_dims(), get_key_int(), and get_key_string().

◆ dims()

std::vector< int > kbenchmark::dims ( const std::string &  src)

Definition at line 35 of file Utils.h.

36{
37 std::vector<int> dim;
38
39 std::stringstream ss(src);
40 int i;
41 while (ss >> i)
42 {
43 dim.push_back(i);
44 if (ss.peek() == ',')
45 ss.ignore();
46 }
47 return dim;
48}

Referenced by get_key_dims().

◆ get_key_dims()

std::vector< int > kbenchmark::get_key_dims ( const std::string &  key,
OperationInfo info 
)

Definition at line 50 of file Utils.h.

51{
53 return dims(info[key]);
54}
std::vector< int > dims(const std::string &src)
Definition Utils.h:35
void check_valid_key(const std::string &key, OperationInfo &info)
Definition Utils.h:28

References check_valid_key(), dims(), and info.

Referenced by kbenchmark::operation::Convolution::params(), and kbenchmark::operation::TransposeConv::params().

◆ get_key_int()

int kbenchmark::get_key_int ( const std::string &  key,
OperationInfo info 
)

Definition at line 56 of file Utils.h.

57{
59 return std::stoi(info[key]);
60}

References check_valid_key(), and info.

Referenced by kbenchmark::operation::Convolution::params(), and kbenchmark::operation::TransposeConv::params().

◆ get_key_string()

std::string kbenchmark::get_key_string ( const std::string &  key,
OperationInfo info 
)

Definition at line 62 of file Utils.h.

63{
65 return info[key];
66}

References check_valid_key(), and info.

Referenced by kbenchmark::operation::Convolution::params(), and kbenchmark::operation::TransposeConv::params().