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

Function write_tensor_f32

src/framework/core/backend.cpp:419–431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

417 size_t total_bytes = 0;
418 ggml_backend_dev_memory(device, &free_bytes, &total_bytes);
419 if (total_bytes > 0 && free_bytes <= total_bytes) {
420 snapshot.available = true;
421 snapshot.total_bytes = static_cast<int64_t>(total_bytes);
422 snapshot.free_bytes = static_cast<int64_t>(free_bytes);
423 snapshot.used_bytes = static_cast<int64_t>(total_bytes - free_bytes);
424 }
425 }
426 (void)device_hint;
427 return snapshot;
428}
429
430BackendMemorySnapshot query_backend_memory(const BackendConfig & config) {
431 BackendMemorySnapshot snapshot;
432 switch (config.type) {
433 case BackendType::Cpu:
434 return snapshot;

Callers 15

flushMethod · 0.70
encode_layersMethod · 0.50
ensure_graphMethod · 0.50
upload_runtime_masksMethod · 0.50
encodeMethod · 0.50
runMethod · 0.50
import_stateMethod · 0.50
runMethod · 0.50
run_projectedMethod · 0.50
infer_16k_monoMethod · 0.50
runMethod · 0.50
runMethod · 0.50

Calls 6

ggml_backend_tensor_setFunction · 0.85
num_elementsMethod · 0.80
stringFunction · 0.50
to_stringFunction · 0.50
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected