MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / set_backend_f32_tensor

Method set_backend_f32_tensor

src/framework/assets/tensor_source.cpp:529–535  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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) ||

Callers 1

uploadMethod · 0.45

Calls 4

require_f32Function · 0.85
set_tensor_bytesFunction · 0.85
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected