| 690 | } |
| 691 | |
| 692 | void llm_graph_result::set_outputs() { |
| 693 | if (t_logits != nullptr) { |
| 694 | ggml_set_output(t_logits); |
| 695 | } |
| 696 | if (t_embd != nullptr) { |
| 697 | ggml_set_output(t_embd); |
| 698 | } |
| 699 | if (t_embd_pooled != nullptr) { |
| 700 | ggml_set_output(t_embd_pooled); |
| 701 | } |
| 702 | for (auto & [seq_id, t] : t_sampled) { |
| 703 | if (t != nullptr) { |
| 704 | ggml_set_output(t); |
| 705 | } |
| 706 | } |
| 707 | for (auto & [seq_id, t] : t_sampled_probs) { |
| 708 | if (t != nullptr) { |
| 709 | ggml_set_output(t); |
| 710 | } |
| 711 | } |
| 712 | for (auto & [seq_id, t] : t_sampled_logits) { |
| 713 | if (t != nullptr) { |
| 714 | ggml_set_output(t); |
| 715 | } |
| 716 | } |
| 717 | for (auto & [seq_id, t] : t_candidates) { |
| 718 | if (t != nullptr) { |
| 719 | ggml_set_output(t); |
| 720 | } |
| 721 | } |
| 722 | } |
| 723 | |
| 724 | bool llm_graph_result::can_reuse(const llm_graph_params & params) { |
| 725 | if (!this->params.allow_reuse(params)) { |
no test coverage detected