Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/marian-regression-tests.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRoman Grundkiewicz <rgrundkiewicz@gmail.com>2020-11-12 16:54:58 +0300
committerRoman Grundkiewicz <rgrundkiewicz@gmail.com>2020-11-12 16:54:58 +0300
commit9af8ca2068122fb744d4af9027f7186e1b007a63 (patch)
tree9a38c4923d1276e577b6441e6ec47884313d4dc3 /tests
parent8a8549709a5b60ae250e6acedd6ecd286b437bce (diff)
Add script for updating expected outputs
Diffstat (limited to 'tests')
-rw-r--r--tests/decoder/intgemm/update_expected_outputs.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/decoder/intgemm/update_expected_outputs.sh b/tests/decoder/intgemm/update_expected_outputs.sh
new file mode 100644
index 0000000..76ce42c
--- /dev/null
+++ b/tests/decoder/intgemm/update_expected_outputs.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+# Script for re-generatting expected outputs and BLEU scores for CPUs with
+# avx/avx2/avx512 architectures after running regression tests.
+#
+# On Valhalla the machines could be gna/hodor/sigyn, respectively.
+#
+# An example scenario on hodor:
+# 1. Compile Marian with -DUSE_FBGEMM=on -DUSE_SENTENCEPIECE-on on hodor
+# 2. Run regression tests, which fail due to updates in intgemm
+# 3. Run `bash update_expected_outputs.sh avx2` from this directory
+# 4. Add and commit *.expected* files
+
+[[ $# -eq 1 ]] || (echo "This script must take avx/avx2/avx512 as the first argument" && exit 1)
+
+avx=$1
+
+for suffix in '' .bleu; do
+ test -f fbgemm_intgemm_8bit.$avx.expected && cp fbgemm_intgemm_8bit.out$suffix fbgemm_intgemm_8bit.$avx.expected$suffix
+ test -f intgemm_8bit.$avx.expected && cp intgemm_16bit.out$suffix intgemm_16bit.$avx.expected$suffix
+ test -f intgemm_8bit.$avx.expected && cp intgemm_8bit.out$suffix intgemm_8bit.$avx.expected$suffix
+ test -f intgemm_8bit_shifted.$avx.expected && cp intgemm_8bit_shifted.out$suffix intgemm_8bit_shifted.$avx.expected$suffix
+done