|
ONE - On-device Neural Engine
|
#include <ExecTime.h>
Public Member Functions | |
| ExecTime (const std::vector< const backend::Backend * > &backends) | |
| int64_t | getOperationExecTime (const backend::Backend *backend, const std::string &operation, bool quant, uint32_t op_size) const |
| Get exec time of an operation with input size or linearly interpolated value based on size if there is no record for given size. | |
| void | updateOperationExecTime (const backend::Backend *backend, const std::string &operation, bool quant, uint32_t op_size, int64_t time) |
| Update exec time of the operation on a backend with given input size or add new entity if there is no one. | |
| int64_t | getPermuteTime (const backend::Backend *from_backend, const backend::Backend *to_backend, bool quant, uint32_t op_size) const |
| Get the permute time from one backend to another. | |
| void | updatePermuteTime (const backend::Backend *from_backend, const backend::Backend *to_backend, bool quant, uint32_t op_size, int64_t time) |
| Update permute time from one backend to another. | |
| void | storeOperationsExecTime () const |
| Update metrics file with new data. | |
Static Public Member Functions | |
| static int64_t | getMax () |
| Get the max value of int32_t in int64_t. | |
Static Public Attributes | |
| static const int64_t | NOT_FOUND = -1 |
Definition at line 31 of file ExecTime.h.
|
inlineexplicit |
Definition at line 34 of file ExecTime.h.
|
inlinestatic |
Get the max value of int32_t in int64_t.
Definition at line 91 of file ExecTime.h.
Referenced by updateOperationExecTime().
| int64_t onert::exec::ExecTime::getOperationExecTime | ( | const backend::Backend * | backend, |
| const std::string & | operation, | ||
| bool | quant, | ||
| uint32_t | op_size | ||
| ) | const |
Get exec time of an operation with input size or linearly interpolated value based on size if there is no record for given size.
| [in] | backend | id of a backend |
| [in] | operation | name of an operation |
| [in] | quant | if input type quantized |
| [in] | op_size | sum of operation's flattened sizes of inputs and outputs |
Definition at line 25 of file ExecTime.cc.
References NOT_FOUND.
Referenced by getPermuteTime().
| int64_t onert::exec::ExecTime::getPermuteTime | ( | const backend::Backend * | from_backend, |
| const backend::Backend * | to_backend, | ||
| bool | quant, | ||
| uint32_t | op_size | ||
| ) | const |
Get the permute time from one backend to another.
| [in] | from_backend | |
| [in] | to_backend | |
| [in] | quant | if input type quantized |
| [in] | op_size | sum of operation's flattened sizes of inputs and outputs |
Definition at line 125 of file ExecTime.cc.
References onert::backend::Backend::config(), and getOperationExecTime().
|
inline |
Update metrics file with new data.
Definition at line 95 of file ExecTime.h.
References onert::exec::JSON::storeOperationsExecTime().
| void onert::exec::ExecTime::updateOperationExecTime | ( | const backend::Backend * | backend, |
| const std::string & | operation, | ||
| bool | quant, | ||
| uint32_t | op_size, | ||
| int64_t | time | ||
| ) |
Update exec time of the operation on a backend with given input size or add new entity if there is no one.
| [in] | backend | id of a backend |
| [in] | operation | name of an operation |
| [in] | quant | if input type quantized |
| [in] | op_size | sum of operation's flattened sizes of inputs and outputs |
| [in] | time | real measured value |
Definition at line 93 of file ExecTime.cc.
Referenced by updatePermuteTime().
| void onert::exec::ExecTime::updatePermuteTime | ( | const backend::Backend * | from_backend, |
| const backend::Backend * | to_backend, | ||
| bool | quant, | ||
| uint32_t | op_size, | ||
| int64_t | time | ||
| ) |
Update permute time from one backend to another.
| [in] | from_backend | |
| [in] | to_backend | |
| [in] | quant | if input type quantized |
| [in] | time | measured permutation time |
| [in] | op_size | sum of operation's flattened sizes of inputs and outputs |
Definition at line 118 of file ExecTime.cc.
References onert::backend::Backend::config(), and updateOperationExecTime().
|
inlinestatic |
Definition at line 96 of file ExecTime.h.
Referenced by getOperationExecTime().