Skip to content

Commit

Permalink
Set the reference nps for SFNNv8:L1-2560
Browse files Browse the repository at this point in the history
Fishtest with Stockfish 11 had 1.6Mnps as reference nps and
0.7Mnps as threshold for the slow worker.
Set the new reference nps to 560knps according to the 65% slowdown
of SF16 with SFNNv8:L1-2560 wrt SF11 on ARCH=x86-64-bmi2
Set the new threshold for slow worker to 203knps according to the 71% slowdown
of SF16 with SFNNv8:L1-2560i wrt SF11 on ARCH=x86-64-sse41-popcnt

compiler clang++ 16.0.6

- arch=bmi2 (Intel Xeon CPU E5-2680 v3)
```
sf_base =  1579950 +/-   8197 (95%)
sf_test =   555524 +/-   4331 (95%)
diff    = -1024426 +/-   6115 (95%)
speedup = -64.839% +/- 0.387% (95%)
```
- arch=sse41-popcnt (Intel core i7 3770k)
```
sf_base =  1790486 +/-  19610 (95%)
sf_test =   532610 +/-   6143 (95%)
diff    = -1257876 +/-  13960 (95%)
speedup = -70.253% +/- 0.780% (95%)
```

Raise worker version to 218, also server side.
  • Loading branch information
ppigazzini committed Sep 24, 2023
1 parent c0ac793 commit cfe16ab
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion server/fishtest/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
on how frequently the main instance flushes its run cache.
"""

WORKER_VERSION = 217
WORKER_VERSION = 218


def validate_request(request):
Expand Down
2 changes: 1 addition & 1 deletion server/fishtest/rundb.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ def aggregate_unfinished_runs(self, username=None):
nps += concurrency * task["worker_info"]["nps"]
if task["worker_info"]["nps"] != 0:
games_per_minute += (
(task["worker_info"]["nps"] / 640000)
(task["worker_info"]["nps"] / 560000)
* (60.0 / estimate_game_duration(run["args"]["tc"]))
* (
int(task["worker_info"]["concurrency"])
Expand Down
2 changes: 1 addition & 1 deletion server/utils/delta_update_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def compute_games_rates(rundb, info_tuple):
# 1184000 nps is the reference core, also set in rundb.py and games.py
for machine in rundb.get_machines():
games_per_hour = (
(machine["nps"] / 640000)
(machine["nps"] / 560000)
* (3600.0 / estimate_game_duration(machine["run"]["args"]["tc"]))
* (int(machine["concurrency"]) // machine["run"]["args"].get("threads", 1))
)
Expand Down
7 changes: 4 additions & 3 deletions worker/games.py
Original file line number Diff line number Diff line change
Expand Up @@ -1335,15 +1335,16 @@ def parse_options(s):
games_concurrency * threads,
)

if base_nps < 231000 / (1 + math.tanh((worker_concurrency - 1) / 8)):
if base_nps < 203000 / (1 + math.tanh((worker_concurrency - 1) / 8)):
raise FatalException(
"This machine is too slow ({} nps / thread) to run fishtest effectively - sorry!".format(
base_nps
)
)
# 1184000 nps is the reference core benched with respect to SF 11,
# fishtest with Stockfish 11 had 1.6Mnps as reference nps and
# 0.7Mnps as threshold for the slow worker.
# also set in rundb.py and delta_update_users.py
factor = 640000 / base_nps
factor = 560000 / base_nps

# Adjust CPU scaling.
_, tc_limit_ltc = adjust_tc("60+0.6", factor)
Expand Down
2 changes: 1 addition & 1 deletion worker/sri.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"__version": 217, "updater.py": "Mg+pWOgGA0gSo2TuXuuLCWLzwGwH91rsW1W3ixg3jYauHQpRMtNdGnCfuD1GqOhV", "worker.py": "cFunWo4iviMvzdV9b/8PTfOLoXbovy4hWwmGR6OI70agi5dkwoCJ07BoYwBU+xjd", "games.py": "pqyY62ZE491mecjnXvByfr1mMuhXU5NDg6BbE6WZ4aKuzR12bSFQUSHrQnDt7374"}
{"__version": 218, "updater.py": "Mg+pWOgGA0gSo2TuXuuLCWLzwGwH91rsW1W3ixg3jYauHQpRMtNdGnCfuD1GqOhV", "worker.py": "JTcLpyoueO7A/L7xaZVhPowKXwqXzIcQL615cc0Gm+bwbefz9hUNuIUyUD+pL8is", "games.py": "4knSQ74ckM5BN87NeYNoUZHbOtD8c9/ykea612at3wEPO7g3c/ybxrlRFDalaslw"}
2 changes: 1 addition & 1 deletion worker/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
# Several packages are called "expression".
# So we make sure to use the locally installed one.

WORKER_VERSION = 217
WORKER_VERSION = 218
FILE_LIST = ["updater.py", "worker.py", "games.py"]
HTTP_TIMEOUT = 30.0
INITIAL_RETRY_TIME = 15.0
Expand Down

0 comments on commit cfe16ab

Please sign in to comment.