# **Table of Structs** # 1. [CalrtCalbin](#calrtcalbin) 2. [CalbinModel](#calbinmodel) 3. [CalbinSection_s](#calbinsection_s) 4. [CalbinLLM_s](#calbinllm_s) 5. [KV_Cache_s](#kv_cache_s) 6. [CalbinTensorInfo_s](#calbintensorinfo_s) 7. [CalrtDevBuf_s](#calrtdevbuf_s) 8. [CalrtBufferInfo_s](#calrtbufferinfo_s) 9. [TaskInfo_s](#taskinfo_s) 10. [CalrtDeviceId_s](#calrtdeviceid_s) 11. [CalrtDeviceInfo_s](#calrtdeviceinfo_s) 12. [ModelHyperParameters_s](#modelhyperparameters_s) [Back to Main](../RuntimeAPI.md) ## **CalrtCalbin** ## Descript a calbin file ### ***Variables*** ### > `std::string name` calbin file name > `std::vector models` related models structs. [Back to Top](#table-of-structs) --- ## **CalbinModel** ## Descript a model related information. ### ***Variables*** ### > `bool isConfigured` indicate if this modole is configured on device. > `CalDevAccType_e devAccType` [CalDevAccType_e](./enum.md#caldevacctype_e) > `CalbinModelType_e modelType` [CalbinModelType_e](./enum.md#calbinmodeltype_e) > `CalbinModelArch_e modelArch` [CalbinModelArch_e](./enum.md#calbinmodelarch_e) > `ModelChipMode_e chipMode` [ModelChipMode_e](./enum.md#modelchipmode_e) > `std::string modelName` indicate model name > `CalbinLLM_s llm` indicate llm related information. Only invalid when `CalbinModelType_e == CNN` > `std::unordered_multimap sections` indicate this model component sections. [CalbinSectionType_e](./enum.md#calbinsectiontype_e), [CalbinSection_s](#calbinsection_s) > `std::vector tarChipN` indicate this model would be configured on which chips. [Back to Top](#table-of-structs) --- ## **CalbinSection_s** ## Descript the content of specific model. ### ***Variables*** ### > `CalbinSectionPlace_e place` indicate where this section is located at. [CalbinSectionPlace_e](./enum.md#calbinsectionplace_e) > `CalbinSectionType_e type` [CalbinSectionType_e](./enum.md#calbinsectiontype_e) > `std::string name` indicate section name > `std::string filePath` indicate related binary or txt file path > `int64_t offset` indicate .bss entry address > `int64_t devAddr` indicate located device memory address > `int64_t size` indicate section byte size > `int64_t progEntry` indicate program header entry address > `std::vector chipMask` indicate which chip would hold the current section > `std::vector tensorInfos` indicate a list of tensor info. [CalbinTensorInfo_s](#calbintensorinfo_s) [Back to Top](#table-of-structs) --- ## **CalbinLLM_s** ## Descript max limits for batch size, sequence length and related KV cache information. ### ***Variables*** ### > `uint32_t max_batch_size` indicate max batch size the current model support > `uint32_t max_seq_len` indicate max sequence length the current model support > `KV_Cache_s` kv_cache` [KV_Cache_s](#kv_cache_s) [Back to Top](#table-of-structs) --- ## **KV_Cache_s** ## Descript kv cache memory information. ### ***Variables*** ### > `PrimitiveType dtype` indicate data type. default value is `INVALID`. [PrimitiveType](./enum.md#primitivetype) > `uint32_t layer` indicate its transformer layer > `int64_t kv_base[2]` indicate k cache base memory address and v cache base memory address > `int64_t size` indicate kv cache byte size > `std::vector shape` indicate kv cahce shape. Current is *{head, batch, head_dim, d0, d2}* [Back to Top](#table-of-structs) --- ## **CalbinTensorInfo_s** ## Descript each tensor per model related informations. ### ***Variable*** ### > `std::string name` indicate tensor name > `std::vector shape` indicate tensor shape > `PrimitiveType dataType` indicate data type of the current tensor. [PrimitiveType](./enum.md#primitivetype) > `int64_t ping; int64_t pong` indicate ping-pong memory address > `int64_t size` indicate each ping-pong byte size [Back to Top](#table-of-structs) --- ## **CalrtDevBuf_s** ## Descript [Buffer](./class.md#calrtinputbuf) info. Reserved. [Back to Top](#table-of-structs) --- ## **CalrtBufferInfo_s** ## Used to construct calrt i/o buffer. ### ***Variables*** ### > `CalrtBufferDirection_e direction` indicate data flow direction. [CalrtBufferDirection_e](./enum.md#calrtbufferdirection_e) > `std::string name` indicate buffer name > `std::vector tensorInfos` indicate all tensors' info about the current model for either input or output. > `uint64_t devAddr0; uint64_t devAddr1; uint64_t size" indicate each tensor's ping pong memory address and each memory block byte size. They are duplicated in `CalbinTensorInfo_s`. [Back to Top](#table-of-structs) --- ## **TaskInfo_s** ## Descript an inference taks condition. For `JobEgnine` use. [Back to Top](#table-of-structs) --- ## **CalrtDeviceId_s** ## [Back to Top](#table-of-structs) --- ## **CalrtDeviceInfo_s** ## [Back to Top](#table-of-structs) --- ## **ModelHyperParameters_s** ## [Back to Top](#table-of-structs) ---