File tree 1 file changed +5
-0
lines changed
1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -211,6 +211,7 @@ int main(int argc, char ** argv) {
211
211
printf (" Iteration;NThreads; SizeX; SizeY; SizeZ; Required_FLOPS; Elapsed_u_Seconds; gigaFLOPS\n " );
212
212
printf (" =====================================================================================\n " );
213
213
214
+ double gflops_sum = 0 ;
214
215
for (int i=0 ;i<benchmark_params.n_iterations ;i++) {
215
216
216
217
long long int start = ggml_time_us ();
@@ -219,6 +220,7 @@ int main(int argc, char ** argv) {
219
220
long long int stop = ggml_time_us ();
220
221
long long int usec = stop-start;
221
222
double gflops = (double )(flops_per_matrix)/usec/1000.0 ;
223
+ gflops_sum += gflops;
222
224
printf (" %9i;%8i;%6i;%6i;%6i;%15lli;%18lli;%10.2f\n " ,
223
225
i,
224
226
gf31.n_threads ,
@@ -248,4 +250,7 @@ int main(int argc, char ** argv) {
248
250
// Running a different graph computation to make sure we override the CPU cache lines
249
251
ggml_graph_compute (ctx, &gf32);
250
252
}
253
+ printf (" \n " );
254
+ printf (" Average%78.2f\n " ,gflops_sum/((double )benchmark_params.n_iterations ));
255
+ printf (" =====================================================================================\n " );
251
256
}
You can’t perform that action at this time.
0 commit comments