Skip to content

Commit b7ee729

Browse files
committed
Add network export to CI
verify the network written by export_net matches the original closes #4613 No functional change
1 parent 932f5a2 commit b7ee729

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/instrumented.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,20 @@ for args in "eval" \
7070
"go depth 10" \
7171
"go movetime 1000" \
7272
"go wtime 8000 btime 8000 winc 500 binc 500" \
73-
"bench 128 $threads 8 default depth"
73+
"bench 128 $threads 8 default depth" \
74+
"export_net verify.nnue"
7475
do
7576

7677
echo "$prefix $exeprefix ./stockfish $args $postfix"
7778
eval "$prefix $exeprefix ./stockfish $args $postfix"
7879

7980
done
8081

82+
# verify the generated net equals the base net
83+
network=`./stockfish uci | grep 'option name EvalFile type string default' | awk '{print $NF}'`
84+
echo "Comparing $network to the written verify.nnue"
85+
diff $network verify.nnue
86+
8187
# more general testing, following an uci protocol exchange
8288
cat << EOF > game.exp
8389
set timeout 240

0 commit comments

Comments
 (0)