#include <Config.h>
|
virtual | ~Config () |
|
std::string | id () override |
| Returns ID of the backend.
|
|
bool | initialize () override |
| Initialize the backend. This is called as soon as the backend is loaded.
|
|
bool | supportPermutation () override |
|
bool | supportDynamicTensor () override |
|
bool | supportFP16 () override |
|
std::unique_ptr< util::ITimer > | timer () override |
| Returns Timer object for this backend. For some computing units, it may need its own Timer implementation.
|
|
virtual | ~IConfig ()=default |
|
virtual void | sync () const |
| The function that is called after each Operation run on profiling mode. This may be useful for profiling GPU-based or special computing units.
|
|
Definition at line 31 of file Config.h.
◆ ~Config()
onert::backend::xnnpack::Config::~Config |
( |
| ) |
|
|
virtual |
Definition at line 28 of file Config.cc.
28{ xnn_deinitialize(); }
◆ id()
std::string onert::backend::xnnpack::Config::id |
( |
| ) |
|
|
inlineoverridevirtual |
◆ initialize()
bool onert::backend::xnnpack::Config::initialize |
( |
| ) |
|
|
overridevirtual |
Initialize the backend. This is called as soon as the backend is loaded.
- Returns
- true Initialization succeeded
-
false Initialization failed, so it cannot use this backend
Implements onert::backend::IConfig.
Definition at line 30 of file Config.cc.
31{
32 xnn_status status = xnn_initialize(nullptr );
33 if (status != xnn_status_success)
34 {
35 throw std::runtime_error{"failed to initialize XNNPACK"};
36 }
37 return true;
38}
◆ supportDynamicTensor()
bool onert::backend::xnnpack::Config::supportDynamicTensor |
( |
| ) |
|
|
inlineoverridevirtual |
◆ supportFP16()
bool onert::backend::xnnpack::Config::supportFP16 |
( |
| ) |
|
|
inlineoverridevirtual |
◆ supportPermutation()
bool onert::backend::xnnpack::Config::supportPermutation |
( |
| ) |
|
|
inlineoverridevirtual |
◆ timer()
std::unique_ptr< util::ITimer > onert::backend::xnnpack::Config::timer |
( |
| ) |
|
|
inlineoverridevirtual |
Returns Timer object for this backend. For some computing units, it may need its own Timer implementation.
- Returns
- std::unique_ptr<util::ITimer> Timer object for this backend
Reimplemented from onert::backend::IConfig.
Definition at line 43 of file Config.h.
43{ return std::make_unique<util::CPUTimer>(); }
The documentation for this class was generated from the following files: