benchmark-matmul: Print the average of the test results
This commit is contained in:
parent
9560655409
commit
cc2eb3f3fd
1 changed files with 8 additions and 0 deletions
|
@ -211,6 +211,7 @@ int main(int argc, char ** argv) {
|
||||||
printf("Iteration;NThreads; SizeX; SizeY; SizeZ; Required_FLOPS; Elapsed_u_Seconds; gigaFLOPS\n");
|
printf("Iteration;NThreads; SizeX; SizeY; SizeZ; Required_FLOPS; Elapsed_u_Seconds; gigaFLOPS\n");
|
||||||
printf("=====================================================================================\n");
|
printf("=====================================================================================\n");
|
||||||
|
|
||||||
|
double gflops_average = 0;
|
||||||
for (int i=0;i<benchmark_params.n_iterations ;i++) {
|
for (int i=0;i<benchmark_params.n_iterations ;i++) {
|
||||||
|
|
||||||
long long int start = ggml_time_us();
|
long long int start = ggml_time_us();
|
||||||
|
@ -225,6 +226,13 @@ int main(int argc, char ** argv) {
|
||||||
sizex, sizey, sizez, flops_per_matrix,
|
sizex, sizey, sizez, flops_per_matrix,
|
||||||
usec,gflops);
|
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
|
#ifdef VERBOSE_DEBUGGING
|
||||||
TENSOR_DUMP("res",gf31.nodes[0])
|
TENSOR_DUMP("res",gf31.nodes[0])
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue