Compare C++ ggml tensor (dumped as [ne0, ne1, ne2]) vs Python NHWC [1, H, W, E] ggml stores: flat[e + w*E + h*E*W] where ne0=E, ne1=W, ne2=H Python NHWC: flat[h*W*E + w*E + e] (with optional batch dim) These are actually the same flat layout!
| 22 | // Python NHWC: flat[h*W*E + w*E + e] (with optional batch dim) |
| 23 | // These are actually the same flat layout! |
| 24 | static compare_result compare_ggml_vs_nhwc(const ref_tensor_f32& cpp, |
| 25 | const ref_tensor_f32& ref) { |
| 26 | return compare_tensors(cpp.data.data(), ref.data.data(), |
| 27 | std::min(cpp.numel(), ref.numel())); |
| 28 | } |
| 29 | |
| 30 | // Compare C++ ggml tensor (dumped as [C, W, H]) vs Python NCHW [1, C, H, W] |
| 31 | // ggml stores: flat[c + w*C + h*C*W] |
no test coverage detected