| 527 | const int64_t logical_names_key = gguf_find_key(gguf, "audiocpp.tensor_names"); |
| 528 | if (logical_names_key >= 0 && |
| 529 | (gguf_get_kv_type(gguf, logical_names_key) != GGUF_TYPE_ARRAY || |
| 530 | gguf_get_arr_type(gguf, logical_names_key) != GGUF_TYPE_STRING || |
| 531 | gguf_get_arr_n(gguf, logical_names_key) != static_cast<size_t>(gguf_get_n_tensors(gguf)))) { |
| 532 | throw std::runtime_error("GGUF audiocpp.tensor_names metadata is invalid"); |
| 533 | } |
| 534 | const int64_t count = gguf_get_n_tensors(gguf); |
| 535 | const int64_t ranks_key = gguf_find_key(gguf, "audiocpp.tensor_ranks"); |
| 536 | const int64_t shapes_key = gguf_find_key(gguf, "audiocpp.tensor_shapes"); |
| 537 | const bool has_exact_shapes = ranks_key >= 0 && shapes_key >= 0; |
| 538 | if ((ranks_key >= 0) != (shapes_key >= 0) || |
no test coverage detected