MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / tensor_dump

Function tensor_dump

examples/benchmark/benchmark-matmult.cpp:46–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46static void tensor_dump(const ggml_tensor * tensor, const char * name) {
47 printf("%15s: type = %i (%5s) ne = %5" PRIi64 " x %5" PRIi64 " x %5" PRIi64 ", nb = (%5zi, %5zi, %5zi) - ", name,
48 tensor->type, ggml_type_name(tensor->type),
49 tensor->ne[0], tensor->ne[1], tensor->ne[2], tensor->nb[0], tensor->nb[1], tensor->nb[2]);
50 float sum = tensor_sum_elements(tensor);
51 printf("Sum of tensor %s is %6.2f\n", name, sum);
52}
53
54#define TENSOR_DUMP(tensor) tensor_dump(tensor, #tensor)
55

Callers

nothing calls this directly

Calls 3

printfFunction · 0.85
tensor_sum_elementsFunction · 0.85
ggml_type_nameFunction · 0.50

Tested by

no test coverage detected