[PATCH] D25346: [test-suite] [Polybench] run tests twice with -ffp-contract=on/off

Sebastian Pop via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 7 02:41:00 PDT 2016


sebpop added inline comments.


================
Comment at: SingleSource/Benchmarks/Polybench/linear-algebra/kernels/2mm/2mm.c:140
+         DATA_TYPE POLYBENCH_2D(D_Strict_FP,NI,NL,ni,nl)) {
+#pragma STDC FP_CONTRACT OFF
+  int i, j;
----------------
rengolin wrote:
> why do you need the pragma here, too?
Maybe adding the pragma here is "overkill", and would have no effects.
Thanks for pointing out.


================
Comment at: SingleSource/Benchmarks/Polybench/linear-algebra/kernels/2mm/2mm.c:146
+        /* FP_ABSTOLERANCE will be added to the defines when compiling this benchmark.  */
+#define FP_ABSTOLERANCE 0.0001
+        double V1 = D[i][j];
----------------
rengolin wrote:
> If this has to be defined at compilation time, do we need to re-refine here? Maybe it's better to get a compilation error, to make sure the users know what they're getting.
This is a quick "get it done" define.  Of course, I will modify the patch to add -DFP_ABSTOLERANCE from the CMake/Makefile to the C compilation, as the previous comment suggests.


================
Comment at: SingleSource/Benchmarks/Polybench/linear-algebra/kernels/2mm/2mm.c:208
+
+  if (check_FP(ni, nl, POLYBENCH_ARRAY(D), POLYBENCH_ARRAY(D_Strict_FP)))
+    return 1;
----------------
rengolin wrote:
> Why not do this to all arrays, not just D?
D is the only output of this test.
The other arrays are input, and input does not change.


https://reviews.llvm.org/D25346





More information about the llvm-commits mailing list