stockfish/stockfish-remove-net.patch
Michael Vetter 3a26c5575b - Update to 16.1:
* In our testing against its predecessor, Stockfish 16.1 shows a
    notable improvement in performance, with an Elo gain of up to
    27 points and winning over 2 times more game pairs than it loses.
  * Updated neural network architecture: The neural network architecture
    has undergone two updates and is currently in its 8th version.
  * Removal of handcrafted evaluation (HCE): This release marks the
    removal of the traditional handcrafted evaluation and the transition
    to a fully neural network-based approach.
  * Dual NNUE: For the first time, Stockfish includes a secondary neural
    network, used to quickly evaluate positions that are easily decided.
  * Use NNUE and UCI_AnalyseMode have been removed as they no longer had
    any effect. SlowMover has also been removed in favor of Move Overhead.
- Use %autosetup macro. Allows to eliminate the usage of deprecated PatchN.

OBS-URL: https://build.opensuse.org/package/show/games/stockfish?expand=0&rev=32
2024-02-26 12:18:29 +00:00

100 lines
3.6 KiB
Diff

Index: Stockfish-sf_16.1/src/Makefile
===================================================================
--- Stockfish-sf_16.1.orig/src/Makefile
+++ Stockfish-sf_16.1/src/Makefile
@@ -806,7 +806,6 @@ help:
@echo "help > Display architecture details"
@echo "profile-build > standard build with profile-guided optimization"
@echo "build > skip profile-guided optimization"
- @echo "net > Download the default nnue nets"
@echo "strip > Strip executable"
@echo "install > Install executable"
@echo "clean > Clean up"
@@ -867,20 +866,20 @@ ifneq ($(SUPPORTED_ARCH), true)
endif
-.PHONY: help analyze build profile-build strip install clean net \
+.PHONY: help analyze build profile-build strip install clean \
objclean profileclean config-sanity \
icx-profile-use icx-profile-make \
gcc-profile-use gcc-profile-make \
clang-profile-use clang-profile-make FORCE \
format analyze
-analyze: net config-sanity objclean
+analyze: config-sanity objclean
$(MAKE) -k ARCH=$(ARCH) COMP=$(COMP) $(OBJS)
-build: net config-sanity
+build: config-sanity
$(MAKE) ARCH=$(ARCH) COMP=$(COMP) all
-profile-build: net config-sanity objclean profileclean
+profile-build: config-sanity objclean profileclean
@echo ""
@echo "Step 1/4. Building instrumented executable ..."
$(MAKE) ARCH=$(ARCH) COMP=$(COMP) $(profile_make)
@@ -922,44 +921,6 @@ profileclean:
@rm -f stockfish.res
@rm -f ./-lstdc++.res
-define fetch_network
- @echo "Default net: $(nnuenet)"
- @if [ "x$(curl_or_wget)" = "x" ]; then \
- echo "Neither curl nor wget is installed. Install one of these tools unless the net has been downloaded manually"; \
- fi
- @if [ "x$(shasum_command)" = "x" ]; then \
- echo "shasum / sha256sum not found, skipping net validation"; \
- elif test -f "$(nnuenet)"; then \
- if [ "$(nnuenet)" != "nn-"`$(shasum_command) $(nnuenet) | cut -c1-12`".nnue" ]; then \
- echo "Removing invalid network"; rm -f $(nnuenet); \
- fi; \
- fi;
- @for nnuedownloadurl in "$(nnuedownloadurl1)" "$(nnuedownloadurl2)"; do \
- if test -f "$(nnuenet)"; then \
- echo "$(nnuenet) available : OK"; break; \
- else \
- if [ "x$(curl_or_wget)" != "x" ]; then \
- echo "Downloading $${nnuedownloadurl}"; $(curl_or_wget) $${nnuedownloadurl} > $(nnuenet);\
- else \
- echo "No net found and download not possible"; exit 1;\
- fi; \
- fi; \
- if [ "x$(shasum_command)" != "x" ]; then \
- if [ "$(nnuenet)" != "nn-"`$(shasum_command) $(nnuenet) | cut -c1-12`".nnue" ]; then \
- echo "Removing failed download"; rm -f $(nnuenet); \
- fi; \
- fi; \
- done
- @if ! test -f "$(nnuenet)"; then \
- echo "Failed to download $(nnuenet)."; \
- fi;
- @if [ "x$(shasum_command)" != "x" ]; then \
- if [ "$(nnuenet)" = "nn-"`$(shasum_command) $(nnuenet) | cut -c1-12`".nnue" ]; then \
- echo "Network validated"; break; \
- fi; \
- fi;
-endef
-
# set up shell variables for the net stuff
define netvariables
$(eval nnuenet := $(shell grep $(1) evaluate.h | grep define | sed 's/.*\(nn-[a-z0-9]\{12\}.nnue\).*/\1/'))
@@ -989,7 +950,7 @@ default:
all: $(EXE) .depend
-config-sanity: net
+config-sanity:
@echo ""
@echo "Config:"
@echo "debug: '$(debug)'"
@@ -1098,6 +1059,6 @@ icx-profile-use:
.depend: $(SRCS)
-@$(CXX) $(DEPENDFLAGS) -MM $(SRCS) > $@ 2> /dev/null
-ifeq (, $(filter $(MAKECMDGOALS), help strip install clean net objclean profileclean config-sanity))
+ifeq (, $(filter $(MAKECMDGOALS), help strip install clean objclean profileclean config-sanity))
-include .depend
endif