| 1554 | } |
| 1555 | |
| 1556 | VibeVoiceDecoderPrefillOutput VibeVoiceDecoderWeightsRuntime::prefill_embeddings( |
| 1557 | const std::vector<float> & embeddings, |
| 1558 | int64_t steps) const { |
| 1559 | const auto & config = assets_->config.decoder; |
| 1560 | if (steps <= 0) { |
| 1561 | throw std::runtime_error("VibeVoice decoder prefill requires positive steps"); |
| 1562 | } |
| 1563 | if (static_cast<int64_t>(embeddings.size()) != steps * config.hidden_size) { |
| 1564 | throw std::runtime_error("VibeVoice decoder prefill embedding payload size mismatch"); |
| 1565 | } |
| 1566 | if (prefill_graph_ == nullptr || !prefill_graph_->matches(*this, 1, steps)) { |
| 1567 | prefill_graph_.reset(); |
| 1568 | prefill_graph_ = std::make_unique<VibeVoiceDecoderPrefillGraph>( |
| 1569 | *this, |
| 1570 | 1, |
| 1571 | steps, |
| 1572 | 1024ull * 1024ull * 1024ull); |
| 1573 | } |
| 1574 | return prefill_graph_->run(embeddings); |
| 1575 | } |
| 1576 | |
| 1577 | std::vector<VibeVoiceDecoderPrefillOutput> VibeVoiceDecoderWeightsRuntime::prefill_embeddings_batch( |
| 1578 | const std::vector<std::vector<float>> & embeddings, |
no test coverage detected