[Polybench-discussion] non-parametric polybench benchmarks
Brought to you by:
pouchet,
tomofumi-yuki
From: Sven V. <sk...@ko...> - 2012-02-01 11:22:11
|
Hi, The lastest PolyBench has proper support for parametric benchmarks, i.e., if you define POLYBENCH_USE_C99_PROTO, both iteration domains and array sizes are parametric. However, there does not seem to be any way of obtaining instances of the benchmarks for specific values of the parameters. If you don't define POLYBENCH_USE_C99_PROTO the arrays have a fixed size, but the iteration domains are still parametric. When generating CUDA code, you typically want to generate code for specific values of the parameters. If the iteration domains are still parametric, you just get a bunch of useless extra conditions on the parameters, slowing down the execution. Would it be possible to apply something like this to all benchmarks? diff --git a/trunk/linear-algebra/kernels/mvt/mvt.c b/trunk/linear-algebra/kernels/mvt/mvt.c index 619599d..b2a6f7d 100644 --- a/trunk/linear-algebra/kernels/mvt/mvt.c +++ b/trunk/linear-algebra/kernels/mvt/mvt.c @@ -72,11 +72,11 @@ void kernel_mvt(int n, int i, j; #pragma scop - for (i = 0; i < n; i++) - for (j = 0; j < n; j++) + for (i = 0; i < POLYBENCH_C99_SELECT(N,n); i++) + for (j = 0; j < POLYBENCH_C99_SELECT(N,n); j++) x1[i] = x1[i] + A[i][j] * y_1[j]; - for (i = 0; i < n; i++) - for (j = 0; j < n; j++) + for (i = 0; i < POLYBENCH_C99_SELECT(N,n); i++) + for (j = 0; j < POLYBENCH_C99_SELECT(N,n); j++) x2[i] = x2[i] + A[j][i] * y_2[j]; #pragma endscop Or do you have any other suggestions for obtaining fixed size instances? (Of course, we can always plug in the value of n after extracting a model, but this is error-prone since we need to ensure that the values of n and N are the same.) Thanks, skimo Btw, http://www.cse.ohio-state.edu/~pouchet/software/polybench/ doesn't seem to mention the mailing list. |