Skip to content

Commit

Permalink
Set the SF16 pure NNUE reference nps wrt SF11
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 0.64Mnps according to the 60% slowdown
of the SF 16 wrt SF 11 on the ARCH=x86-64-bmi2
Set the new threshold for slow worker to 0.231Mnps according to
the 67% slowdown of the SF 16 wrt SF 11 on the ARCH=x86-64-sse41-popcnt

compiler clang++ 16.0.6

- arch=bmi2 (Intel Xeon CPU E5-2680 v3)
```
sf_base =  1515099 +/-   6276 (95%)
sf_test =   610755 +/-   2686 (95%)
diff    =  -904343 +/-   5940 (95%)
speedup = -59.689% +/- 0.392% (95%)
```

- arch=sse41-popcnt (Intel core i7 3770k)
```
sf_base =  1929595 +/-  19733 (95%)
sf_test =   654161 +/-   5421 (95%)
diff    = -1275433 +/-  14999 (95%)
speedup = -66.099% +/- 0.777% (95%)
```

Raise worker version to 207, also server side.
  • Loading branch information
ppigazzini committed Jul 12, 2023
1 parent 5d74161 commit a72b999
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 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 = 206
WORKER_VERSION = 207


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 @@ -523,7 +523,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"] / 1184000)
(task["worker_info"]["nps"] / 640000)
* (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 @@ -47,7 +47,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"] / 1184000)
(machine["nps"] / 640000)
* (3600.0 / estimate_game_duration(machine["run"]["args"]["tc"]))
* (int(machine["concurrency"]) // machine["run"]["args"].get("threads", 1))
)
Expand Down
4 changes: 2 additions & 2 deletions worker/games.py
Original file line number Diff line number Diff line change
Expand Up @@ -1290,15 +1290,15 @@ def parse_options(s):
games_concurrency * threads,
)

if base_nps < 462000 / (1 + math.tanh((worker_concurrency - 1) / 8)):
if base_nps < 231000 / (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,
# also set in rundb.py and delta_update_users.py
factor = 1184000 / base_nps
factor = 640000 / 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": 206, "updater.py": "PHFUVXcoxBFiW2hTqFN5q5WdAw2pK8uzFC7hyMUC3cLY5bGZPhL8TBGThtqDmcXd", "worker.py": "R8rJ4c9ZQTbuSu80ayVyMs7D6/TOVR5qMn6R04XCsBp4BTkCKXfy7hSrpMaLa0nX", "games.py": "D+5sFwptbwAhvn+VM4oHyRwqUPfGUWLQPFbWHA/uK77rTUsU/r49gBMjjz6k5Ncq"}
{"__version": 207, "updater.py": "PHFUVXcoxBFiW2hTqFN5q5WdAw2pK8uzFC7hyMUC3cLY5bGZPhL8TBGThtqDmcXd", "worker.py": "6v8r4DGKbGAS8joczJrNjO3xX4/QImrKkU4xOpNXc5PGy4kFNgcyvxGc96FsUVww", "games.py": "LI8f72sm9yoqxO0sJPbpXTSGIgVfJhb0WuKPZ2AU2z0QCz/4IYnfYik+B/NiWG7x"}
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 = 206
WORKER_VERSION = 207
FILE_LIST = ["updater.py", "worker.py", "games.py"]
HTTP_TIMEOUT = 30.0
INITIAL_RETRY_TIME = 15.0
Expand Down

0 comments on commit a72b999

Please sign in to comment.