File size: 3,367 Bytes
134b4c4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | /**************************************************************************************************
*
* Copyright (c) 2019-2024 Axera Semiconductor Co., Ltd. All Rights Reserved.
*
* This source file is the property of Axera Semiconductor Co., Ltd. and
* may not be copied or distributed in any isomorphic form without the prior
* written consent of Axera Semiconductor Co., Ltd.
*
**************************************************************************************************/
#include "middleware/axcl_runtime_runner_impl.hpp"
#if defined(ENV_AXCL_RUNTIME_API_ENABLE)
middleware::runtime_runner::runtime_runner() {
this->impl_ = new impl();
}
middleware::runtime_runner::~runtime_runner() {
delete this->impl_;
}
bool middleware::runtime_runner::init(const std::string& config_file, const uint32_t& device_index, const uint32_t& kind) {
return this->impl_->init(config_file, device_index, kind);
}
bool middleware::runtime_runner::final() {
return this->impl_->final();
}
bool middleware::runtime_runner::load(const std::string& model_path) {
return this->impl_->load(model_path);
}
bool middleware::runtime_runner::prepare(const bool& input_cached, const bool& output_cached, const uint32_t& group, const uint32_t& batch) {
return this->impl_->prepare(input_cached, output_cached, group, batch);
}
bool middleware::runtime_runner::run(const bool& parallel) {
return this->impl_->run(parallel);
}
uint32_t middleware::runtime_runner::get_input_count() const {
return this->impl_->get_input_count();
}
uint32_t middleware::runtime_runner::get_output_count() const {
return this->impl_->get_output_count();
}
std::string middleware::runtime_runner::get_input_name(const uint32_t& index) const {
return this->impl_->get_input_name(index);
}
std::string middleware::runtime_runner::get_output_name(const uint32_t& index) const {
return this->impl_->get_output_name(index);
}
void *middleware::runtime_runner::get_input_pointer(const uint32_t& index) const {
return this->impl_->get_input_pointer(index);
}
void *middleware::runtime_runner::get_output_pointer(const uint32_t& index) const {
return this->impl_->get_output_pointer(index);
}
uintmax_t middleware::runtime_runner::get_input_size(const uint32_t& index) const {
return this->impl_->get_input_size(index);
}
uintmax_t middleware::runtime_runner::get_output_size(const uint32_t& index) const {
return this->impl_->get_output_size(index);
}
uintmax_t middleware::runtime_runner::get_shape_group_count() const {
return this->impl_->get_shape_group_count();
}
std::string middleware::runtime_runner::get_library_version() const {
return impl::get_library_version();
}
std::string middleware::runtime_runner::get_model_version() const {
return this->impl_->get_model_version();
}
int32_t middleware::runtime_runner::get_model_type() const {
return this->impl_->get_model_type();
}
int32_t middleware::runtime_runner::get_npu_type() const {
return this->impl_->get_npu_type();
}
int32_t middleware::runtime_runner::get_batch_size() const {
return this->impl_->get_batch_size();
}
intmax_t middleware::runtime_runner::get_sys_usage() const {
return this->impl_->get_sys_usage();
}
intmax_t middleware::runtime_runner::get_cmm_usage() const {
return this->impl_->get_cmm_usage();
}
#endif
|