1 #ifndef _MA_ENGINE_HALIO_H_
2 #define _MA_ENGINE_HALIO_H_
4 #include "../ma_common.h"
6 #if MA_USE_ENGINE_HALIO
15 #include <unordered_map>
17 #include <hailo/hailort.hpp>
22 using namespace hailort;
24 class EngineHalio final :
public Engine {
26 using ExternalHandler =
function<
ma_err_t(
int,
void*,
size_t)>;
29 ~EngineHalio()
override;
33 ma_err_t init(
void* pool,
size_t size)
override;
37 ma_err_t load(
const void* model_data,
size_t model_size)
override;
39 ma_err_t load(
const char* model_path)
override;
40 ma_err_t load(
const std::string& model_path)
override;
43 int32_t getInputSize()
override;
44 int32_t getOutputSize()
override;
47 ma_shape_t getInputShape(int32_t index)
override;
48 ma_shape_t getOutputShape(int32_t index)
override;
55 unique_ptr<VDevice> _vdevice;
56 shared_ptr<InferModel> _model;
57 shared_ptr<ConfiguredInferModel> _configured_model;
58 shared_ptr<ConfiguredInferModel::Bindings> _bindings;
60 unordered_map<string, shared_ptr<ma_tensor_t>> _io_buffers;
61 unordered_map<string, shared_ptr<ExternalHandler>> _external_handlers;
63 vector<shared_ptr<ma_tensor_t>> _input_tensors;
64 vector<shared_ptr<ma_tensor_t>> _output_tensors;
ma_err_t
Definition: ma_types.h:21
Definition: ma_engine_base.h:15
Definition: ma_types.h:44
Definition: ma_types.h:49
Definition: ma_types.h:74