diff --git a/README.md b/README.md index 6d28a9986..56ce7d3e9 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,24 @@ ## Overview Stockfish NNUE is a port of a shogi neural network named NNUE (efficiently updateable neural network backwards) to Stockfish 11. To learn more about the Stockfish chess engine, look [here](stockfish.md) for an overview and [here](https://github.com/official-stockfish/Stockfish) for the official repository. +## Compilation Instructions for Mac + +1. Ensure that you have OpenBlas Installed +``` +brew install openblas +``` +2. Go to src then build using the makefile +``` +cd src +make learn ARCH=x86-64 COMP=gcc +``` +or +``` +cd src +make profile-learn ARCH=x86-64 COMP=gcc +``` + + ## Training Guide ### Generating Training Data To generate training data from the classic eval, use the gensfen command with the setting "Use NNUE" set to "false". The given example is generation in its simplest form. There are more commands. diff --git a/src/Makefile b/src/Makefile index 9372b915f..e4c5a8366 100644 --- a/src/Makefile +++ b/src/Makefile @@ -888,16 +888,16 @@ icc-profile-use: learn: config-sanity $(MAKE) ARCH=$(ARCH) COMP=$(COMP) \ - EXTRACXXFLAGS=' -DEVAL_LEARN -DEVAL_NNUE -DENABLE_TEST_CMD -DUSE_BLAS -I/mingw64/include/OpenBLAS -fopenmp ' \ - EXTRALDFLAGS=' -lopenblas -fopenmp -Wl,-s ' \ + EXTRACXXFLAGS=' -DEVAL_LEARN -DEVAL_NNUE -DENABLE_TEST_CMD -DUSE_BLAS -I/usr/local/opt/openblas/include' \ + EXTRALDFLAGS=' -L/usr/local/opt/openblas/lib -Wl,-s -lcblas' \ all profile-learn: config-sanity objclean profileclean @echo "" @echo "Step 1/4. Building instrumented executable ..." $(MAKE) ARCH=$(ARCH) COMP=$(COMP) $(profile_make) \ - LEARNCXXFLAGS=' -DEVAL_LEARN -DEVAL_NNUE -DENABLE_TEST_CMD -DUSE_BLAS -I/mingw64/include/OpenBLAS -fopenmp ' \ - LEARNLDFLAGS=' -lopenblas -fopenmp -Wl,-s ' + LEARNCXXFLAGS=' -DEVAL_LEARN -DEVAL_NNUE -DENABLE_TEST_CMD -DUSE_BLAS -I/usr/local/opt/openblas/include' \ + LEARNLDFLAGS=' -L/usr/local/opt/openblas/lib -Wl,-s -lcblas' @echo "" @echo "Step 2/4. Running benchmark for pgo-build ..." $(PGOGENSFEN) @@ -905,8 +905,8 @@ profile-learn: config-sanity objclean profileclean @echo "Step 3/4. Building optimized executable ..." $(MAKE) ARCH=$(ARCH) COMP=$(COMP) objclean $(MAKE) ARCH=$(ARCH) COMP=$(COMP) $(profile_use) \ - LEARNCXXFLAGS=' -DEVAL_LEARN -DEVAL_NNUE -DENABLE_TEST_CMD -DUSE_BLAS -I/mingw64/include/OpenBLAS -fopenmp ' \ - LEARNLDFLAGS=' -lopenblas -fopenmp -Wl,-s ' + LEARNCXXFLAGS=' -DEVAL_LEARN -DEVAL_NNUE -DENABLE_TEST_CMD -DUSE_BLAS -I/usr/local/opt/openblas/include' \ + LEARNLDFLAGS=' -L/usr/local/opt/openblas/lib -Wl,-s -lcblas' @echo "" @echo "Step 4/4. Deleting profile data ..." $(MAKE) ARCH=$(ARCH) COMP=$(COMP) profileclean