|
@@ -43,6 +43,7 @@ static char *symbol = NULL;
|
|
|
static char *archname = NULL;
|
|
|
/* Unless a FxT file is specified, we just display the model */
|
|
|
static int no_fxt_file = 1;
|
|
|
+static int gflops = 0;
|
|
|
|
|
|
#ifdef STARPU_USE_FXT
|
|
|
static struct starpu_fxt_codelet_event *dumped_codelets;
|
|
@@ -67,6 +68,7 @@ given perfmodel\n");
|
|
|
fprintf(stderr, "Options:\n");
|
|
|
fprintf(stderr, " -l display all available models\n");
|
|
|
fprintf(stderr, " -s <symbol> specify the symbol\n");
|
|
|
+ fprintf(stderr, " -f draw GFlops instead of time\n");
|
|
|
fprintf(stderr, " -i <Fxt files> input FxT files generated by StarPU\n");
|
|
|
fprintf(stderr, " -a <arch> specify the architecture (e.g. cpu, cpu:x, cuda, cuda_d, opencl, opencl_d)\n");
|
|
|
fprintf(stderr, " -h, --help display this help and exit\n");
|
|
@@ -119,6 +121,12 @@ static void parse_args(int argc, char **argv)
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
+ if (strcmp(argv[i], "-f") == 0)
|
|
|
+ {
|
|
|
+ gflops = 1;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
if (strcmp(argv[i], "-a") == 0)
|
|
|
{
|
|
|
archname = argv[++i];
|
|
@@ -184,7 +192,7 @@ static void display_perf_model(FILE *gnuplot_file, struct starpu_perfmodel *mode
|
|
|
fprintf(stderr,"Arch: %s\n", arch_name);
|
|
|
|
|
|
#ifdef STARPU_USE_FXT
|
|
|
- if (!no_fxt_file && archtype_is_found[arch] && nimpl == 0)
|
|
|
+ if (!gflops && !no_fxt_file && archtype_is_found[arch] && nimpl == 0)
|
|
|
{
|
|
|
print_comma(gnuplot_file, first);
|
|
|
fprintf(gnuplot_file, "\"< grep -w \\^%d %s\" using 2:3 title \"Profiling %s\"", arch, data_file_name, arch_name);
|
|
@@ -192,7 +200,7 @@ static void display_perf_model(FILE *gnuplot_file, struct starpu_perfmodel *mode
|
|
|
#endif
|
|
|
|
|
|
/* Only display the regression model if we could actually build a model */
|
|
|
- if (arch_model->regression.valid && !arch_model->regression.nl_valid)
|
|
|
+ if (!gflops && arch_model->regression.valid && !arch_model->regression.nl_valid)
|
|
|
{
|
|
|
print_comma(gnuplot_file, first);
|
|
|
|
|
@@ -204,7 +212,7 @@ static void display_perf_model(FILE *gnuplot_file, struct starpu_perfmodel *mode
|
|
|
arch_model->regression.alpha, arch_model->regression.beta, arch_name);
|
|
|
}
|
|
|
|
|
|
- if (arch_model->regression.nl_valid)
|
|
|
+ if (!gflops && arch_model->regression.nl_valid)
|
|
|
{
|
|
|
print_comma(gnuplot_file, first);
|
|
|
|
|
@@ -286,7 +294,13 @@ static void display_history_based_perf_models(FILE *gnuplot_file, struct starpu_
|
|
|
struct starpu_perfmodel_history_entry *entry = ptr->entry;
|
|
|
if (entry->size == minimum)
|
|
|
{
|
|
|
- fprintf(datafile, "\t%-15le\t%-15le", 0.001*entry->mean, 0.001*entry->deviation);
|
|
|
+ if (gflops)
|
|
|
+ fprintf(datafile, "\t%-15le\t%-15le", entry->flops / (entry->mean * 1000),
|
|
|
+ entry->flops / ((entry->mean + entry->deviation) * 1000) -
|
|
|
+ entry->flops / (entry->mean * 1000)
|
|
|
+ );
|
|
|
+ else
|
|
|
+ fprintf(datafile, "\t%-15le\t%-15le", 0.001*entry->mean, 0.001*entry->deviation);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
@@ -346,7 +360,10 @@ static void display_selected_models(FILE *gnuplot_file, struct starpu_perfmodel
|
|
|
fprintf(gnuplot_file, "set output \"starpu_%s.eps\"\n", symbol);
|
|
|
fprintf(gnuplot_file, "set title \"Model for codelet %s\"\n", symbol);
|
|
|
fprintf(gnuplot_file, "set xlabel \"Total data size\"\n");
|
|
|
- fprintf(gnuplot_file, "set ylabel \"Time (ms)\"\n");
|
|
|
+ if (gflops)
|
|
|
+ fprintf(gnuplot_file, "set ylabel \"GFlops\"\n");
|
|
|
+ else
|
|
|
+ fprintf(gnuplot_file, "set ylabel \"Time (ms)\"\n");
|
|
|
fprintf(gnuplot_file, "\n");
|
|
|
fprintf(gnuplot_file, "set key top left\n");
|
|
|
fprintf(gnuplot_file, "set logscale x\n");
|