| 564 | } |
| 565 | |
| 566 | void compute() { |
| 567 | core::set_backend_threads(backend_, compute_threads_); |
| 568 | const auto compute_start = Clock::now(); |
| 569 | const ggml_status status = core::compute_backend_graph(backend_, graph_, plan_); |
| 570 | ggml_backend_synchronize(backend_); |
| 571 | const auto compute_end = Clock::now(); |
| 572 | if (status != GGML_STATUS_SUCCESS) { |
| 573 | throw std::runtime_error("ECAPA backend graph compute failed"); |
| 574 | } |
| 575 | debug::timing_log_scalar("ecapa.graph.compute_ms", engine::debug::elapsed_ms(compute_start, compute_end)); |
| 576 | } |
| 577 | |
| 578 | std::shared_ptr<const EcapaWeights> weights_; |
| 579 | std::shared_ptr<const EcapaBackendWeights> backend_weights_; |
no test coverage detected