ONE - On-device Neural Engine
|
NPU device context of trix backend. More...
#include <DevContext.h>
Public Member Functions | |
DevContext () | |
Construct a new device Context object. | |
~DevContext () | |
Destroy the device Context object. | |
DevContext (const DevContext &)=delete | |
DevContext & | operator= (const DevContext &)=delete |
ModelID | registerModel (const std::string &model_file_path) |
Register a trix model for all NPU devices. | |
void | unRegisterModel (ModelID model_id) |
Unregister a trix model. | |
void | requestRun (ModelID model_id, input_buffers *input_bufs, tensors_data_info *in_info, output_buffers *output_bufs, tensors_data_info *out_info, size_t batch_size) |
Request a trix model to be run on NPU. | |
NPU device context of trix backend.
Definition at line 40 of file DevContext.h.
onert::backend::trix::DevContext::DevContext | ( | ) |
Construct a new device Context object.
Definition at line 32 of file DevContext.cc.
onert::backend::trix::DevContext::~DevContext | ( | ) |
Destroy the device Context object.
Definition at line 59 of file DevContext.cc.
|
delete |
|
delete |
ModelID onert::backend::trix::DevContext::registerModel | ( | const std::string & | model_file_path | ) |
Register a trix model for all NPU devices.
model_file_path | File path of a trix model |
Definition at line 72 of file DevContext.cc.
void onert::backend::trix::DevContext::requestRun | ( | ModelID | model_id, |
input_buffers * | input_bufs, | ||
tensors_data_info * | in_info, | ||
output_buffers * | output_bufs, | ||
tensors_data_info * | out_info, | ||
size_t | batch_size | ||
) |
Request a trix model to be run on NPU.
model_id | Internal ID of a trix model |
input_bufs | Buffer data of inputs |
in_info | Data info of inputs |
output_bufs | Buffer data of outputs |
out_info | data info of outputs |
batch_size | Batch size |
Definition at line 138 of file DevContext.cc.
void onert::backend::trix::DevContext::unRegisterModel | ( | ModelID | model_id | ) |
Unregister a trix model.
model_id | Internal ID of the trix model to be unregistered |
Definition at line 121 of file DevContext.cc.