From a06fa4b1b5ca6984a3d81d84cdb6e37f09713ffc Mon Sep 17 00:00:00 2001 From: Julia Longtin Date: Wed, 20 Mar 2024 21:12:22 +0000 Subject: [PATCH] use the same header as ggml.c, and remove some warnings. --- bench-phi-knc.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/bench-phi-knc.c b/bench-phi-knc.c index 7f5431d87..ee96715fb 100644 --- a/bench-phi-knc.c +++ b/bench-phi-knc.c @@ -3,11 +3,9 @@ #include #include #include /*for CLOCK_REALTIME? */ - -void ggml_vec_dot_f32(int n, float * restrict s, size_t bs, const float * restrict x, size_t bx, const float * restrict y, size_t by, int nrc); - #include +#include "ggml-phi-knc.h" #define MAXVEC 1024768 #define RUNTOTAL 12 @@ -19,7 +17,7 @@ int main(void) double scalar_time; float scalar = 0.0f; float vector = 0.0f; - uint32_t vecRuns[] = {10, 16, 17, 32, 33, 48, 49, 64, 65, 80, 81, 1024768}; + int vecRuns[] = {10, 16, 17, 32, 33, 48, 49, 64, 65, 80, 81, 1024768}; for (uint32_t runCount = 0; runCount < RUNTOTAL; ++runCount) { // Generate random input vector of [-1, 1] values. @@ -47,7 +45,7 @@ int main(void) clock_gettime(CLOCK_MONOTONIC, &end); - printf("vector\tvs\tscalar (%d items)\n", vector, scalar, vecRuns[runCount]); + printf("vector\tvs\tscalar (%d items)\n", vecRuns[runCount]); printf("%.9f\tvs\t%.9f\n", vector, scalar); vector_time = middle.tv_sec - start.tv_sec;