mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-24 11:06:58 +08:00
mac specific makefile with compilation instructions
This commit is contained in:
18
README.md
18
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.
|
||||
|
||||
12
src/Makefile
12
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
|
||||
|
||||
Reference in New Issue
Block a user