MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / HeartMuLaSession

Method HeartMuLaSession

src/models/heartmula/session.cpp:173–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171
172HeartMuLaSession::HeartMuLaSession(
173 runtime::TaskSpec task,
174 runtime::SessionOptions options,
175 std::shared_ptr<const HeartMuLaAssets> assets,
176 std::shared_ptr<const engine::model_spec::ModelContract> contract)
177 : runtime::RuntimeSessionBase(require_supported_session_options(std::move(options), contract)),
178 task_(task),
179 assets_(require_assets(std::move(assets))),
180 contract_(require_contract(std::move(contract))),
181 text_tokenizer_(assets_),
182 mula_(
183 assets_,
184 RuntimeSessionBase::options().backend.type,
185 RuntimeSessionBase::options().backend.device,
186 RuntimeSessionBase::options().backend.threads,
187 runtime::parse_size_mb_option(
188 RuntimeSessionBase::options().options,
189 {"heartmula.generator_weight_context_mb"},
190 generator_weight_context_bytes_),
191 runtime::parse_size_mb_option(
192 RuntimeSessionBase::options().options,
193 {"heartmula.generator_constant_context_mb"},
194 generator_constant_context_bytes_),
195 runtime::parse_size_mb_option(
196 RuntimeSessionBase::options().options,
197 {"heartmula.backbone_prefill_graph_arena_mb"},
198 generator_backbone_prefill_graph_arena_bytes_),
199 runtime::parse_size_mb_option(
200 RuntimeSessionBase::options().options,
201 {"heartmula.backbone_step_graph_arena_mb"},
202 generator_backbone_step_graph_arena_bytes_),
203 runtime::parse_size_mb_option(
204 RuntimeSessionBase::options().options,
205 {"heartmula.decoder_prefill_graph_arena_mb"},
206 generator_decoder_prefill_graph_arena_bytes_),
207 runtime::parse_size_mb_option(
208 RuntimeSessionBase::options().options,
209 {"heartmula.decoder_step_graph_arena_mb"},
210 generator_decoder_step_graph_arena_bytes_),
211 runtime::parse_size_mb_option(
212 RuntimeSessionBase::options().options,
213 {"heartmula.frame_embedding_graph_arena_mb"},
214 generator_frame_embedding_graph_arena_bytes_),
215 runtime::parse_tensor_storage_option(
216 RuntimeSessionBase::options().options,
217 "heartmula.generator_weight_type",
218 "heartmula.weight_type",
219 mula_weight_storage_type_,
220 {
221 engine::assets::TensorStorageType::Native,
222 engine::assets::TensorStorageType::F32,
223 engine::assets::TensorStorageType::F16,
224 engine::assets::TensorStorageType::BF16,
225 engine::assets::TensorStorageType::Q8_0,
226 })),
227 codec_(
228 assets_,
229 execution_context(),
230 runtime::parse_size_mb_option(

Callers

nothing calls this directly

Calls 9

parse_size_mb_optionFunction · 0.85
find_optionFunction · 0.85
parse_bool_optionFunction · 0.85
require_assetsFunction · 0.70
findMethod · 0.45
endMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected