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

Function compute_graph

src/framework/core/backend.cpp:409–417  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

407}
408
409BackendMemorySnapshot query_backend_memory(ggml_backend_t backend, int device_hint) {
410 BackendMemorySnapshot snapshot;
411 if (backend == nullptr) {
412 return snapshot;
413 }
414 ggml_backend_dev_t device = ggml_backend_get_device(backend);
415 if (device != nullptr) {
416 size_t free_bytes = 0;
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;

Callers 10

run_in_placeMethod · 0.50
computeMethod · 0.50
computeMethod · 0.50
computeMethod · 0.50
computeMethod · 0.50
computeMethod · 0.50
runMethod · 0.50
stepMethod · 0.50
runMethod · 0.50

Calls 4

ggml_graph_computeFunction · 0.85
compute_backend_graphFunction · 0.85
activeMethod · 0.80
backendMethod · 0.45

Tested by

no test coverage detected