| 44 | } |
| 45 | |
| 46 | static 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 |
nothing calls this directly
no test coverage detected