Add human supervised learning network setup and GPU error tests #100
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
paths: | |
- 'cpp/**' | |
- '.github/workflows/build.yml' | |
jobs: | |
xcodebuild: | |
runs-on: macos-13 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Run Xcode build | |
run: | | |
cd cpp/xcode | |
/Applications/Xcode_15.0.1.app/Contents/Developer/usr/bin/xcodebuild -derivedDataPath DerivedData -scheme katago -configuration Debug build | |
- name: Setup configuration | |
run: | | |
ln -s ../../../../../configs/misc/coreml_example.cfg cpp/xcode/DerivedData/Build/Products/Debug/gtp.cfg | |
ln -s ../../../../../configs/misc/metal_gtp.cfg cpp/xcode/DerivedData/Build/Products/Debug/metal_gtp.cfg | |
- name: Setup network | |
run: | | |
mkdir -p models | |
cd models | |
wget https://github.com/ChinChangYang/KataGo/releases/download/v1.13.2-coreml1/kata1-b18c384nbt-s7709731328-d3715293823.bin.gz | |
ln -s ../../../../../../models/kata1-b18c384nbt-s7709731328-d3715293823.bin.gz ../cpp/xcode/DerivedData/Build/Products/Debug/model.bin.gz | |
- name: Setup network of version 8 | |
run: | | |
mkdir -p models | |
cd models | |
wget https://github.com/lightvector/KataGo/releases/download/v1.4.5/g170-b40c256x2-s5095420928-d1229425124.bin.gz | |
ln -s ../../../../../../models/g170-b40c256x2-s5095420928-d1229425124.bin.gz ../cpp/xcode/DerivedData/Build/Products/Debug/modelv8.bin.gz | |
- name: Setup CoreML model FP16 | |
run: | | |
mkdir -p models | |
cd models | |
wget https://github.com/ChinChangYang/KataGo/releases/download/v1.13.2-coreml1/KataGoModel19x19fp16v14s7709731328.mlpackage.zip | |
unzip KataGoModel19x19fp16v14s7709731328.mlpackage.zip | |
ln -s ../../../../../../models/KataGoModel19x19fp16v14s7709731328.mlpackage ../cpp/xcode/DerivedData/Build/Products/Debug/KataGoModel19x19fp16.mlpackage | |
- name: Setup CoreML model FP32 | |
run: | | |
mkdir -p models | |
cd models | |
wget https://github.com/ChinChangYang/KataGo/releases/download/v1.13.2-coreml1/KataGoModel19x19fp32v14s7709731328.mlpackage.zip | |
unzip KataGoModel19x19fp32v14s7709731328.mlpackage.zip | |
ln -s ../../../../../../models/KataGoModel19x19fp32v14s7709731328.mlpackage ../cpp/xcode/DerivedData/Build/Products/Debug/KataGoModel19x19fp32.mlpackage | |
- name: Setup CoreML model FP32 meta | |
run: | | |
mkdir -p models | |
cd models | |
wget https://github.com/ChinChangYang/KataGo/releases/download/v1.15.1-coreml1/KataGoModel19x19fp32meta1.mlpackage.zip | |
unzip KataGoModel19x19fp32meta1.mlpackage.zip | |
ln -s ../../../../../../models/KataGoModel19x19fp32meta1.mlpackage ../cpp/xcode/DerivedData/Build/Products/Debug/KataGoModel19x19fp32meta1.mlpackage | |
- name: Setup test data | |
run: | | |
ln -s ../../../../../tests cpp/xcode/DerivedData/Build/Products/Debug/tests | |
- name: Run Xcode test | |
run: | | |
cd cpp/xcode | |
/Applications/Xcode_15.0.1.app/Contents/Developer/usr/bin/xcodebuild -derivedDataPath DerivedData -scheme katago -configuration Debug test | |
- name: Run KataGo tests | |
run: | | |
cd cpp/xcode/DerivedData/Build/Products/Debug | |
./katago runnnlayertests | |
./katago runoutputtests | |
./katago runnnontinyboardtest model.bin.gz false false 0 false | |
./katago runnnsymmetriestest model.bin.gz false false false | |
./katago runownershiptests gtp.cfg model.bin.gz | |
cmake-macos: | |
runs-on: macos-13 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup ninja | |
run: | | |
brew install ninja | |
- name: Setup Eigen | |
run: | | |
brew install eigen | |
- name: Setup Xcode | |
run: | | |
xcode-select -p | |
sudo xcode-select -s /Applications/Xcode_15.0.1.app/Contents/Developer | |
- name: Build KataGo with Eigen backend | |
run: | | |
mkdir -p cpp/build | |
cd cpp/build | |
cmake -G Ninja -DUSE_BACKEND=EIGEN ../ | |
ninja | |
- name: Setup network | |
run: | | |
mkdir -p models | |
cd models | |
wget https://github.com/ChinChangYang/KataGo/releases/download/v1.13.2-coreml1/kata1-b18c384nbt-s7709731328-d3715293823.bin.gz | |
ln -s ../../models/kata1-b18c384nbt-s7709731328-d3715293823.bin.gz ../cpp/build/model.bin.gz | |
- name: Run KataGo GPU error test with Eigen backend | |
run: | | |
cd cpp/build | |
./katago testgpuerror -config ../configs/gtp_example.cfg -model model.bin.gz -boardsize 9 -reference-file base.bin | |
- name: Setup human SL network | |
run: | | |
mkdir -p models | |
cd models | |
wget https://github.com/lightvector/KataGo/releases/download/v1.15.0/b18c384nbt-humanv0.bin.gz | |
ln -s ../../models/b18c384nbt-humanv0.bin.gz ../cpp/build/b18c384nbt-humanv0.bin.gz | |
- name: Run KataGo GPU error test of human SL network with Eigen backend | |
run: | | |
cd cpp/build | |
./katago testgpuerror -config ../configs/misc/gtp_human5k_coreml.cfg -model b18c384nbt-humanv0.bin.gz -boardsize 9 -reference-file base-humanv0.bin | |
- name: Build KataGo with CoreML backend | |
run: | | |
cd cpp | |
mv CMakeLists.txt-macos CMakeLists.txt | |
mkdir -p build | |
cd build | |
cmake -G Ninja ../ | |
ninja | |
- name: Setup configuration | |
run: | | |
ln -s ../configs/misc/coreml_example.cfg cpp/build/gtp.cfg | |
- name: Setup CoreML model FP16 | |
run: | | |
mkdir -p models | |
cd models | |
wget https://github.com/ChinChangYang/KataGo/releases/download/v1.13.2-coreml1/KataGoModel19x19fp16v14s7709731328.mlpackage.zip | |
unzip KataGoModel19x19fp16v14s7709731328.mlpackage.zip | |
ln -s ../../models/KataGoModel19x19fp16v14s7709731328.mlpackage ../cpp/build/KataGoModel19x19fp16.mlpackage | |
- name: Setup CoreML model FP32 | |
run: | | |
mkdir -p models | |
cd models | |
wget https://github.com/ChinChangYang/KataGo/releases/download/v1.13.2-coreml1/KataGoModel19x19fp32v14s7709731328.mlpackage.zip | |
unzip KataGoModel19x19fp32v14s7709731328.mlpackage.zip | |
ln -s ../../models/KataGoModel19x19fp32v14s7709731328.mlpackage ../cpp/build/KataGoModel19x19fp32.mlpackage | |
- name: Run KataGo GPU error test with CoreML backend | |
run: | | |
cd cpp/build | |
./katago testgpuerror -config gtp.cfg -model model.bin.gz -boardsize 9 -reference-file base.bin | |
- name: Setup CoreML model FP16 of human SL network | |
run: | | |
mkdir -p models | |
cd models | |
wget https://github.com/ChinChangYang/KataGo/releases/download/v1.15.1-coreml1/KataGoModel19x19fp16meta1.mlpackage.zip | |
unzip KataGoModel19x19fp16meta1.mlpackage.zip | |
ln -s ../../models/KataGoModel19x19fp16meta1.mlpackage ../cpp/build/KataGoModel19x19fp16meta1.mlpackage | |
- name: Setup CoreML model FP32 of human SL network | |
run: | | |
mkdir -p models | |
cd models | |
wget https://github.com/ChinChangYang/KataGo/releases/download/v1.15.1-coreml1/KataGoModel19x19fp32meta1.mlpackage.zip | |
unzip KataGoModel19x19fp32meta1.mlpackage.zip | |
ln -s ../../models/KataGoModel19x19fp32meta1.mlpackage ../cpp/build/KataGoModel19x19fp32meta1.mlpackage | |
- name: Run KataGo GPU error test of human SL network with CoreML backend | |
run: | | |
cd cpp/build | |
./katago testgpuerror -config ../configs/misc/gtp_human5k_coreml.cfg -model b18c384nbt-humanv0.bin.gz -boardsize 9 -reference-file base-humanv0.bin | |
- name: Setup test data | |
run: | | |
ln -s ../tests cpp/build/tests | |
- name: Run KataGo tests | |
run: | | |
cd cpp/build | |
./katago runnnlayertests | |
./katago runoutputtests | |
./katago runnnontinyboardtest model.bin.gz false false 0 false | |
./katago runnnsymmetriestest model.bin.gz false false false | |
./katago runownershiptests gtp.cfg model.bin.gz |