|
ONE - On-device Neural Engine
|
Data Structures | |
| class | Context |
| struct | GGMAConfig |
| struct | KVCache |
| struct | ModelConfig |
| class | SentencePieceTokenizer |
| class | Tokenizer |
| class | TokenizerFactory |
Enumerations | |
| enum class | KVCacheDataType { FLOAT32 , UINT8 } |
Functions | |
| template<typename T > | |
| void | load_config_field (const Json::Value &root, const std::string &field_name, T &target, bool is_optional=false) |
| template<> | |
| void | load_config_field< bool > (const Json::Value &root, const std::string &field_name, bool &target, bool is_optional) |
| template<> | |
| void | load_config_field< std::optional< int > > (const Json::Value &root, const std::string &field_name, std::optional< int > &target, bool is_optional) |
| bool | validate_model_config (const ModelConfig &config) |
| std::string | to_string (const ModelConfig &config) |
| nnfw_session * | create_and_prepare_session (const std::string &model_path) |
| uint64_t | num_elems (const nnfw_tensorinfo *tensor_info) |
| uint64_t | bufsize_for (const nnfw_tensorinfo *ti) |
| template void | Context::decode_impl< false, std::vector< uint8_t > > (ggma_token token_id, std::vector< uint8_t > &output) |
| template void | Context::decode_impl< true, std::vector< float > > (ggma_token token_id, std::vector< float > &output) |
| const char * | to_string (KVCacheDataType type) |
| KVCacheDataType | from_string (const std::string &type_str) |
| bool | is_supported_type (KVCacheDataType type) |
|
strong |
| uint64_t ggma::bufsize_for | ( | const nnfw_tensorinfo * | ti | ) |
Definition at line 63 of file Context.cc.
References nnfw_tensorinfo::dtype, and num_elems().
Referenced by ggma::Context::prefill(), and ggma::Context::unemb().
| template void ggma::Context::decode_impl< false, std::vector< uint8_t > > | ( | ggma_token | token_id, |
| std::vector< uint8_t > & | output | ||
| ) |
| template void ggma::Context::decode_impl< true, std::vector< float > > | ( | ggma_token | token_id, |
| std::vector< float > & | output | ||
| ) |
| nnfw_session * ggma::create_and_prepare_session | ( | const std::string & | model_path | ) |
Definition at line 45 of file Context.cc.
References nnfw_create_session(), NNFW_ENSURE_STATUS, nnfw_load_model_from_file(), and nnfw_prepare().
Referenced by ggma::Context::prefill(), and ggma::Context::unemb().
| KVCacheDataType ggma::from_string | ( | const std::string & | type_str | ) |
Definition at line 42 of file KVCache.cc.
| bool ggma::is_supported_type | ( | KVCacheDataType | type | ) |
Definition at line 56 of file KVCache.cc.
| void ggma::load_config_field | ( | const Json::Value & | root, |
| const std::string & | field_name, | ||
| T & | target, | ||
| bool | is_optional = false |
||
| ) |
Definition at line 28 of file Config.cc.
Referenced by ggma::ModelConfig::load_from_json().
| void ggma::load_config_field< bool > | ( | const Json::Value & | root, |
| const std::string & | field_name, | ||
| bool & | target, | ||
| bool | is_optional | ||
| ) |
| void ggma::load_config_field< std::optional< int > > | ( | const Json::Value & | root, |
| const std::string & | field_name, | ||
| std::optional< int > & | target, | ||
| bool | is_optional | ||
| ) |
| uint64_t ggma::num_elems | ( | const nnfw_tensorinfo * | tensor_info | ) |
Definition at line 55 of file Context.cc.
References nnfw_tensorinfo::dims, and nnfw_tensorinfo::rank.
Referenced by bufsize_for(), and ggma::Context::unemb().
| std::string ggma::to_string | ( | const ModelConfig & | config | ) |
| const char * ggma::to_string | ( | KVCacheDataType | type | ) |
| bool ggma::validate_model_config | ( | const ModelConfig & | config | ) |