A tvn metadata reader.
More...
A tvn metadata reader.
Definition at line 31 of file TrixLoader.cc.
◆ TrixMetaReader()
onert::trix_loader::TrixMetaReader::TrixMetaReader |
( |
| ) |
|
|
default |
◆ ~TrixMetaReader()
onert::trix_loader::TrixMetaReader::~TrixMetaReader |
( |
| ) |
|
|
inline |
◆ init()
void onert::trix_loader::TrixMetaReader::init |
( |
const char * |
path | ) |
|
Definition at line 61 of file TrixLoader.cc.
62{
63 assert(path);
64 _meta = getNPUmodel_metadata(path, false);
65 if (_meta == nullptr)
66 {
67 throw std::runtime_error("Failed to get TRIX model metadata");
68 }
69 if (NPUBIN_VERSION(_meta->magiccode) != 3)
70 {
71 throw std::runtime_error("TRIX model metadata version mismatched.");
72 }
73}
Referenced by onert::trix_loader::TrixLoader::loadFromFile().
◆ input_seg_dims()
uint32_t onert::trix_loader::TrixMetaReader::input_seg_dims |
( |
uint32_t |
n, |
|
|
uint32_t |
axis |
|
) |
| const |
|
inline |
Definition at line 48 of file TrixLoader.cc.
49 {
50 return _meta->input_seg_dims[n][axis];
51 }
◆ input_seg_layout()
data_layout onert::trix_loader::TrixMetaReader::input_seg_layout |
( |
uint32_t |
n | ) |
const |
|
inline |
Definition at line 38 of file TrixLoader.cc.
38{ return _meta->input_seg_layout[n]; }
◆ input_seg_num()
uint32_t onert::trix_loader::TrixMetaReader::input_seg_num |
( |
| ) |
const |
|
inline |
Definition at line 46 of file TrixLoader.cc.
46{ return _meta->input_seg_num; }
◆ input_seg_quant_scale()
float onert::trix_loader::TrixMetaReader::input_seg_quant_scale |
( |
uint32_t |
n | ) |
const |
|
inline |
Definition at line 42 of file TrixLoader.cc.
42{ return _meta->input_seg_quant_s[n]; }
◆ input_seg_quant_type()
data_type onert::trix_loader::TrixMetaReader::input_seg_quant_type |
( |
uint32_t |
n | ) |
const |
|
inline |
Definition at line 40 of file TrixLoader.cc.
40{ return _meta->input_seg_quant_type[n]; }
◆ input_seg_quant_zp()
int32_t onert::trix_loader::TrixMetaReader::input_seg_quant_zp |
( |
uint32_t |
n | ) |
|
|
inline |
Definition at line 44 of file TrixLoader.cc.
44{ return _meta->input_seg_quant_z[n]; }
◆ output_seg_dims()
uint32_t onert::trix_loader::TrixMetaReader::output_seg_dims |
( |
uint32_t |
n, |
|
|
uint32_t |
axis |
|
) |
| const |
|
inline |
Definition at line 52 of file TrixLoader.cc.
53 {
54 return _meta->output_seg_dims[n][axis];
55 }
◆ output_seg_layout()
data_layout onert::trix_loader::TrixMetaReader::output_seg_layout |
( |
uint32_t |
n | ) |
const |
|
inline |
Definition at line 39 of file TrixLoader.cc.
39{ return _meta->output_seg_layout[n]; }
◆ output_seg_num()
uint32_t onert::trix_loader::TrixMetaReader::output_seg_num |
( |
| ) |
const |
|
inline |
Definition at line 47 of file TrixLoader.cc.
47{ return _meta->output_seg_num; }
◆ output_seg_quant_scale()
float onert::trix_loader::TrixMetaReader::output_seg_quant_scale |
( |
uint32_t |
n | ) |
const |
|
inline |
Definition at line 43 of file TrixLoader.cc.
43{ return _meta->output_seg_quant_s[n]; }
◆ output_seg_quant_type()
data_type onert::trix_loader::TrixMetaReader::output_seg_quant_type |
( |
uint32_t |
n | ) |
const |
|
inline |
Definition at line 41 of file TrixLoader.cc.
41{ return _meta->output_seg_quant_type[n]; }
◆ output_seg_quant_zp()
int32_t onert::trix_loader::TrixMetaReader::output_seg_quant_zp |
( |
uint32_t |
n | ) |
|
|
inline |
Definition at line 45 of file TrixLoader.cc.
45{ return _meta->output_seg_quant_z[n]; }
The documentation for this class was generated from the following file: