| 949 | : assets_(std::move(assets)), |
| 950 | backend_(backend), |
| 951 | backend_type_(backend_type), |
| 952 | threads_(threads), |
| 953 | weights_(std::move(weights)), |
| 954 | encoder_tokens_(encoder_tokens_capacity) { |
| 955 | build(graph_arena_bytes); |
| 956 | } |
| 957 | |
| 958 | ~CrossAttentionCacheGraph() { |
| 959 | if (backend_ != nullptr && graph_ != nullptr) { |
| 960 | engine::core::release_backend_graph_resources(backend_, graph_); |
| 961 | } |
| 962 | if (buffer_ != nullptr) { |
| 963 | ggml_backend_buffer_free(buffer_); |
| 964 | } |
| 965 | } |
no test coverage detected