From ea62e6eca9b7a65a16ef9b4a3d68c58e92fcf0c5 Mon Sep 17 00:00:00 2001 From: goerch Date: Tue, 8 Aug 2023 19:13:16 +0200 Subject: [PATCH] Fix constants for matmul benchmark to work with Q4_0 --- examples/benchmark/benchmark-matmult.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/benchmark/benchmark-matmult.cpp b/examples/benchmark/benchmark-matmult.cpp index f7215f43b..52b0c876d 100644 --- a/examples/benchmark/benchmark-matmult.cpp +++ b/examples/benchmark/benchmark-matmult.cpp @@ -153,15 +153,15 @@ int main(int argc, char ** argv) { printf("Creating new tensors\n"); // printf("Creating new tensor m1\n"); struct ggml_tensor * m11 = ggml_new_tensor_2d(ctx, GGML_TYPE_F32, sizex, sizey); - ggml_set_f32(m11, 1.0f); + ggml_set_f32(m11, 1.2f); // printf("Creating new tensor m1\n"); struct ggml_tensor * m12 = ggml_new_tensor_2d(ctx, GGML_TYPE_F32, sizex, sizey); - ggml_set_f32(m12, 1.5f); + ggml_set_f32(m12, 1.0f); // printf("Creating new tensor m2\n"); struct ggml_tensor * m2 = ggml_new_tensor_2d(ctx, GGML_TYPE_F32, sizex, sizez); - ggml_set_f32(m2, 2.0f); + ggml_set_f32(m2, 0.8f); printf("\n------ Test 1 - Matrix Mult via F32 code ------------------------------------------------------------------------------\n"); // printf("Creating new tensor m11xm2\n"); @@ -244,7 +244,7 @@ int main(int argc, char ** argv) { usec,gflops); #ifdef VERBOSE_DEBUGGING - TENSOR_DUMP("res",gf31.nodes[0]) + TENSOR_DUMP(gf31.nodes[0]); #endif // Check that the matrix multiplication result is in the right ballpark