benchmark-matmul: Print the average of the test results

This commit is contained in:
rankaiyx 2023-05-17 02:17:51 +08:00 committed by GitHub
parent 9560655409
commit cc2eb3f3fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -211,6 +211,7 @@ int main(int argc, char ** argv) {
printf("Iteration;NThreads; SizeX; SizeY; SizeZ; Required_FLOPS; Elapsed_u_Seconds; gigaFLOPS\n");
printf("=====================================================================================\n");
double gflops_average = 0;
for (int i=0;i<benchmark_params.n_iterations ;i++) {
long long int start = ggml_time_us();
@ -225,6 +226,13 @@ int main(int argc, char ** argv) {
sizex, sizey, sizez, flops_per_matrix,
usec,gflops);
gflops_average += gflops;
if (i+1 == benchmark_params.n_iterations) {
printf("\n");
printf("Average %10.2f\n",gflops_average/((double)benchmark_params.n_iterations));
printf("=====================================================================================\n");
}
#ifdef VERBOSE_DEBUGGING
TENSOR_DUMP("res",gf31.nodes[0])
#endif