[PATCH] D13283: [test-suite] Don't allow FP_TOLERANCE and HASH_PROGRAM_OUTPUT to occur toghether.
Charlie Turner via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 30 05:24:12 PDT 2015
chatur01 created this revision.
chatur01 added reviewers: kristof.beyls, ddunbar.
chatur01 added a subscriber: llvm-commits.
LNT's benchmarks produce their output into files which are then compared in
various ways.
The benchmarks output numerical scores, which can then be compared by a custom
program in the test-suite tree which does a floating-point comparison with a
given tolerance (fpcmp).
The test-suite system allows allows users to do a hash of the program output
for a subsequently speedier comparison. This is used for benchmarks that
generate a significant amount of output (currently defined as >100k), The
problem is that some benchmarks that chose this feature also chose a
floating-point comparison of these hashes, which at best is nonsense, and at
worse causes an infinite loop.
The fpcmp program is not resilient when it's input is weird like this. For a
particular case of an observed mafft failure, it caused fpcmp to go into an
infinite loop.
http://reviews.llvm.org/D13283
Files:
Makefile.programs
MultiSource/Benchmarks/MiBench/automotive-basicmath/Makefile
MultiSource/Benchmarks/Olden/voronoi/Makefile
MultiSource/Benchmarks/VersaBench/beamformer/Makefile
MultiSource/Benchmarks/mafft/Makefile
Index: Makefile.programs
===================================================================
--- Makefile.programs
+++ Makefile.programs
@@ -500,6 +500,11 @@
# If the program wants its output hashed, add an output filter.
ifdef ENABLE_HASHED_PROGRAM_OUTPUT
ifdef HASH_PROGRAM_OUTPUT
+# If the program also wants a floating-point comparison, give
+# and error.
+ifdef FP_TOLERANCE
+$(error Cannot use both FP_TOLERNANCE and HASH_PROGRAM_OUTPUT)
+endif
PROGRAM_OUTPUT_FILTER := $(PROGDIR)/HashProgramOutput.sh
endif
endif
Index: MultiSource/Benchmarks/MiBench/automotive-basicmath/Makefile
===================================================================
--- MultiSource/Benchmarks/MiBench/automotive-basicmath/Makefile
+++ MultiSource/Benchmarks/MiBench/automotive-basicmath/Makefile
@@ -2,7 +2,6 @@
PROG = automotive-basicmath
LDFLAGS = -lm
-FP_TOLERANCE := 0.00000000001
HASH_PROGRAM_OUTPUT = 1
include $(LEVEL)/MultiSource/Makefile.multisrc
Index: MultiSource/Benchmarks/mafft/Makefile
===================================================================
--- MultiSource/Benchmarks/mafft/Makefile
+++ MultiSource/Benchmarks/mafft/Makefile
@@ -10,7 +10,6 @@
RUN_OPTIONS = -b 62 -g 0.100 -f 2.00 -h 0.100 -L
STDIN_FILENAME = $(PROJ_SRC_DIR)/pyruvate_decarboxylase.fasta
LDFLAGS = -lm
-FP_TOLERANCE = 0.00001
HASH_PROGRAM_OUTPUT = 1
ifeq ($(ARCH),XCore)
Index: MultiSource/Benchmarks/Olden/voronoi/Makefile
===================================================================
--- MultiSource/Benchmarks/Olden/voronoi/Makefile
+++ MultiSource/Benchmarks/Olden/voronoi/Makefile
@@ -4,7 +4,6 @@
INCLUDES = defines.h
CPPFLAGS = -DTORONTO
LDFLAGS = -lm
-FP_TOLERANCE = 0.0001
ifdef LARGE_PROBLEM_SIZE
RUN_OPTIONS = 1000000 20 32 7
else
Index: MultiSource/Benchmarks/VersaBench/beamformer/Makefile
===================================================================
--- MultiSource/Benchmarks/VersaBench/beamformer/Makefile
+++ MultiSource/Benchmarks/VersaBench/beamformer/Makefile
@@ -2,7 +2,6 @@
LDFLAGS += -lm
PROG = beamformer
-FP_TOLERANCE = 0.000001
ifdef LARGE_PROBLEM_SIZE
RUN_OPTIONS = -i 400
else
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13283.36086.patch
Type: text/x-patch
Size: 2147 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150930/5af146f6/attachment.bin>
More information about the llvm-commits
mailing list