Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
429 commits
Select commit Hold shift + click to select a range
738db68
Add stone drawing functionality to GobanView
ChinChangYang Sep 2, 2023
7a98604
Refactor GobanView
ChinChangYang Sep 3, 2023
d4e8fcc
Create shared objects for command and goban views
ChinChangYang Sep 4, 2023
1eb0b33
Add stones and board objects as environment objects for CommandView a…
ChinChangYang Sep 4, 2023
f8a8982
Change allowResignation to false in default_gtp.cfg
ChinChangYang Sep 4, 2023
8b5c331
Add ButtonView and PlayerObject to handle player turns, and update Go…
ChinChangYang Sep 5, 2023
e8e9296
Enlarge goban with an additional space
ChinChangYang Sep 6, 2023
0863517
Add StoneView.swift to the project
ChinChangYang Sep 6, 2023
d45cbbd
Update light effect in StoneView
ChinChangYang Sep 7, 2023
a9db151
Add AnalysisView.swift with analysis visualization
ChinChangYang Sep 8, 2023
4a0e269
Refactor CommandView and add toggling functionality
ChinChangYang Sep 8, 2023
aab5bf9
Add AnalysisView.swift and implement analysis feature.
ChinChangYang Sep 8, 2023
67f08d2
Update maxTime value in default_gtp.cfg to 0.1
ChinChangYang Sep 8, 2023
ebd2c98
Improve color computation in AnalysisView
ChinChangYang Sep 8, 2023
595cde1
Refactor dimensions calculation in AnalysisView, GobanView, and Stone…
ChinChangYang Sep 8, 2023
7ac342b
Extract BoardLineView.swift from GobanView.swift.
ChinChangYang Sep 9, 2023
d8d3130
Add BoardLineView.swift to the project and update GobanView to use it
ChinChangYang Sep 9, 2023
27ad2cd
Improve tap gesture handling and add location-to-move conversion
ChinChangYang Sep 9, 2023
0988172
Adjust tab padding and reduce displayed analysis data in ContentView.…
ChinChangYang Sep 9, 2023
7d88c0b
Add more commands to ButtonView
ChinChangYang Sep 9, 2023
692f8a4
Add board ownership visualization and ownership standard deviation to…
ChinChangYang Sep 10, 2023
4ced5b1
Enhancements to Analysis View & Performance
ChinChangYang Sep 11, 2023
963d82f
Add ConfigView.swift for configuring maximum message characters and a…
ChinChangYang Sep 30, 2023
18f203c
Decreased analysisPVLen to 1, increased analysisWideRootNoise to 0.2
ChinChangYang Sep 30, 2023
efb4047
Refactor message text truncation logic
ChinChangYang Sep 30, 2023
468aa63
Update Core ML model and related files
ChinChangYang Sep 30, 2023
13f2c0b
Add KataGoModel.swift with board, stones, player, analysis, config, d…
ChinChangYang Oct 1, 2023
d3ec715
Update GobanView and AnalysisView for board dimensions and color changes
ChinChangYang Oct 1, 2023
58863ef
Update last upgrade version to "1500" in Xcode project settings and s…
ChinChangYang Oct 1, 2023
d2a4342
Add ToolbarView.swift for iOS project.
ChinChangYang Oct 1, 2023
f728c3f
Add ToolbarView.swift to project
ChinChangYang Oct 1, 2023
b8efc93
EditButtonBar and ConfigItems for ConfigView
ChinChangYang Oct 3, 2023
649972d
Update analysis interval in Config model
ChinChangYang Oct 3, 2023
acaf2ff
Update configuration view and content view
ChinChangYang Oct 3, 2023
138b1fd
Refactor coordinate calculation and move mapping logic in GobanView.s…
ChinChangYang Oct 8, 2023
7ea1059
Add max message lines configuration to ConfigView and ContentView, an…
ChinChangYang Oct 8, 2023
46809d7
Refactor mish_torch_ne function to use mish_torch_softplus for better…
ChinChangYang Oct 9, 2023
ca959e7
Add support for compiling MLModel for KataGoModel
ChinChangYang Oct 10, 2023
efa0887
Revert analysisWideRootNoise to 0.04
ChinChangYang Oct 10, 2023
00fada1
Add PickModelButton.swift for updating the ML model URL
ChinChangYang Oct 22, 2023
07087f4
Refactor model name generation in CoreMLProcess
ChinChangYang Oct 22, 2023
3c8d4ff
Refactor CoreMLBackend to compile MLModel from Application Support or…
ChinChangYang Oct 22, 2023
1b27980
Add method to get the ML model URL
ChinChangYang Oct 22, 2023
181fdfa
Add PickModelButton to ConfigView
ChinChangYang Oct 22, 2023
db5e5f2
Change the model compilation process in CoreMLBackend.
ChinChangYang Oct 25, 2023
9135fd6
Move Analysis toggle to ConfigView
ChinChangYang Oct 25, 2023
05185ed
Adjust stone size and add dimensions for better rendering
ChinChangYang Oct 25, 2023
68ee11c
Merge remote-tracking branch 'origin/master' into ios-dev
ChinChangYang Oct 25, 2023
53b8b92
Refactor GobanView and ToolbarView for responsive layout
ChinChangYang Oct 26, 2023
753be4a
Remove an invalid test
ChinChangYang Oct 29, 2023
bbd110a
Refactor: C++/Swift interoperability
ChinChangYang Oct 30, 2023
bfa170d
Refactor: More C++/Swift interoperability
ChinChangYang Oct 30, 2023
c9c4e35
Change runs-on from macos-latest to macos-13
ChinChangYang Oct 31, 2023
6a87bfb
Update Xcode build command for macOS CI workflow
ChinChangYang Oct 31, 2023
19eaded
Add build.yml to push paths
ChinChangYang Oct 31, 2023
a06b7ee
Refactor: More C++/Swift interoperability
ChinChangYang Oct 31, 2023
8cdce60
Resize output buffers in layer test functions
ChinChangYang Oct 31, 2023
7602c59
Add indentation setting for metalbackend.h
ChinChangYang Nov 1, 2023
6a26e24
Refactor: Cleanup metalbackend.cpp
ChinChangYang Nov 1, 2023
72a178e
Fix typo in coreml_example.cfg
ChinChangYang Nov 2, 2023
fd718d2
Enhance GPU Batch Distribution
ChinChangYang Nov 5, 2023
799c854
Add indentWidth option for "benchmark.cpp" and "setup.cpp" files in X…
ChinChangYang Nov 5, 2023
e13b67e
Update benchmark command line arguments in katago.xcscheme
ChinChangYang Nov 5, 2023
ef7ed28
Optimize search threads and batch sizes
ChinChangYang Nov 5, 2023
b8f51bf
Merge branch 'metal-coreml' into cpp-swift-interoperability
ChinChangYang Nov 5, 2023
5e50bd1
Improve Metal backend performance
ChinChangYang Nov 5, 2023
69ba36b
Modify test cases to increase coverage
ChinChangYang Nov 5, 2023
df94029
Gather code coverage from NN layer tests
ChinChangYang Nov 5, 2023
15fcad1
Update Xcode build and test configurations
ChinChangYang Nov 5, 2023
ab43668
Update project.pbxproj with new code signing identity and bundle iden…
ChinChangYang Nov 5, 2023
60d55b7
Update accuracy threshold in NestedBottleneckResidualBlockTest
ChinChangYang Nov 5, 2023
68f142d
Clean up Xcode project file
ChinChangYang Nov 6, 2023
4f83d68
Perform Xcode recommended settings
ChinChangYang Nov 6, 2023
907c016
Refactor nnLayerTests.mm to testnn.mm and update import statement in …
ChinChangYang Nov 6, 2023
ea825b6
Refactor model path retrieval and add fallback for nil paths
ChinChangYang Nov 6, 2023
9c6b312
Update log messages for CoreML backend
ChinChangYang Nov 6, 2023
25c71ab
Convert Objective-C functions into Swift functions
ChinChangYang Nov 9, 2023
c2a0bc9
Implement batch processing for CoreML backend
ChinChangYang Nov 9, 2023
fafd843
A fix for GitHub Actions build
ChinChangYang Nov 10, 2023
0a11b6d
Fix derived data path for Xcode build and test
ChinChangYang Nov 11, 2023
bec81ad
Update file paths and create symbolic links for model and test data.
ChinChangYang Nov 11, 2023
ae5e4a2
Setup configuration and network for GitHub actions
ChinChangYang Nov 11, 2023
3de5bae
Change model file path in testnn.mm
ChinChangYang Nov 11, 2023
bd925a6
Fix model compilation bug and handle errors
ChinChangYang Nov 11, 2023
5761123
Update command line arguments in katago.xcscheme
ChinChangYang Nov 11, 2023
0c25374
Create and reuse CoreML files in testnn.mm
ChinChangYang Nov 11, 2023
6abd89b
Enhance CoreML Model Compilation Process
ChinChangYang Nov 11, 2023
7348eb1
Refactor assertions to resolve compiler warnings
ChinChangYang Nov 12, 2023
c94bc8f
Create Core ML computation context
ChinChangYang Nov 12, 2023
e1bf619
Handle null values in CoreML backend
ChinChangYang Nov 12, 2023
c7840d7
Refactor "shouldCompile" check in KataGoModel
ChinChangYang Nov 12, 2023
84d95e0
Refactor GPU handling in MetalBackend and Tester
ChinChangYang Nov 12, 2023
faf25a6
Change build configuration to "Debug" for kataGo.xcscheme
ChinChangYang Nov 12, 2023
3a0fa54
Adjust CoreML analysis config for performance
ChinChangYang Nov 13, 2023
b61999f
Fix compatibility issues from merging metal-coreml
ChinChangYang Nov 18, 2023
a444e21
Adjust GTP configuration to improve performance
ChinChangYang Nov 18, 2023
75b9c60
Fix compatibility issues for command line project
ChinChangYang Nov 18, 2023
217a233
Change code signing style to manual in Xcode project file
ChinChangYang Nov 18, 2023
8795a7a
Update MACOSX_DEPLOYMENT_TARGET to 13.2
ChinChangYang Nov 18, 2023
319ce0f
Rename job to "xcodebuild" and add new job "ios"
ChinChangYang Nov 18, 2023
fd1133f
Revert "Rename job to "xcodebuild" and add new job "ios""
ChinChangYang Nov 18, 2023
7169a7f
[cmake] Build KataGo for macOS
ChinChangYang Nov 20, 2023
98a202d
Rename Xcode build, add CMake build
ChinChangYang Nov 20, 2023
87a2a15
Add setup for ninja
ChinChangYang Nov 20, 2023
978bd01
Set up Xcode for cmake-macos
ChinChangYang Nov 20, 2023
0689556
Fix Xcode setup for cmake-macos
ChinChangYang Nov 20, 2023
7cbff84
Modify Xcode Selection Command to Use Sudo in CI
ChinChangYang Nov 20, 2023
49afe3c
Add setup and test steps in GitHub workflow
ChinChangYang Nov 21, 2023
0c6191f
Add KataGoSwift.framework to CopyFiles Build Phase
ChinChangYang Nov 22, 2023
0641694
Update build.yml to run KataGo tests
ChinChangYang Nov 22, 2023
7ebbec5
Add warning for Intel-based processors
ChinChangYang Nov 23, 2023
12fb7de
Add CoreML configuration files to Xcode project
ChinChangYang Nov 25, 2023
b7bcc1f
Refactor Xcode scheme to profile for benchmarking
ChinChangYang Nov 25, 2023
c9f44c6
Add setup script to configure KataGo models
ChinChangYang Nov 25, 2023
fc480ef
Adjust analysis configuration for performance
ChinChangYang Nov 25, 2023
2b378c4
Resolve compiler warnings
ChinChangYang Nov 25, 2023
367d2c2
Update build flags to remove unused warnings
ChinChangYang Nov 25, 2023
ecb5f8a
Merge branch 'cmake' into metal-coreml
ChinChangYang Nov 25, 2023
998ec3a
Merge branch 'master' into metal-coreml
ChinChangYang Nov 25, 2023
cbcfcac
Add parallel.cpp and writetrainingdata.cpp
ChinChangYang Nov 25, 2023
fa2f1b1
Add parallel.cpp and writetrainingdata.cpp (cmake)
ChinChangYang Nov 25, 2023
be36543
Fix neural network score values in Metal backend
ChinChangYang Nov 27, 2023
88b23e6
Merge branch 'master' into metal-coreml
ChinChangYang Nov 28, 2023
9bf22a5
Save and load NN outputs for cross-backend test
ChinChangYang Nov 29, 2023
04a5bc9
Merge branch 'testgpuerror' into metal-coreml
ChinChangYang Nov 30, 2023
08fca57
Fix model version variable names in Metal backend
ChinChangYang Dec 1, 2023
2f22dfa
Optimize CoreML configs
ChinChangYang Dec 2, 2023
79e45e3
Use built-in mish and logsumexp functions
ChinChangYang Dec 2, 2023
5ccfb5c
Test neural network on a tiny board with fp16
ChinChangYang Dec 2, 2023
4214827
Log digests and saved locations
ChinChangYang Dec 2, 2023
d0c8ed1
Optimize default_gtp.cfg for iOS
ChinChangYang Dec 2, 2023
71460b5
Remove unused ML package from Xcode project
ChinChangYang Dec 2, 2023
aad7106
Optimize configuration for improved throughput
ChinChangYang Dec 2, 2023
bfe4a39
Refactor getModelName to include length parameters
ChinChangYang Dec 3, 2023
e9487d6
Refactor to handle extended board sizes
ChinChangYang Dec 3, 2023
036803b
Update macOS deployment target to 14.1
ChinChangYang Dec 9, 2023
c4cf21b
Revert "Update macOS deployment target to 14.1"
ChinChangYang Dec 9, 2023
1700781
Build Eigen/CoreML backends, and test GPU error
ChinChangYang Dec 10, 2023
ff1a27e
Fix option to enable Eigen backend for CMake
ChinChangYang Dec 10, 2023
91aea91
Add setup for Eigen dependency
ChinChangYang Dec 10, 2023
0853398
Return 1 if testgpuerror is not successful
ChinChangYang Dec 10, 2023
ae14075
Merge branch 'testgpuerror' into metal-coreml
ChinChangYang Dec 10, 2023
8c03674
Test GPU error in testnn.mm
ChinChangYang Dec 10, 2023
3514467
Remove unnecessary test methods from testnn.mm
ChinChangYang Dec 10, 2023
bf816e7
Set expected concurrent evals to 2 for Eigen
ChinChangYang Dec 11, 2023
ff76c07
Merge branch 'testgpuerror' into metal-coreml
ChinChangYang Dec 11, 2023
8380a78
Support model version 15
ChinChangYang Dec 11, 2023
0b34103
Set macOS deployment target to 13.2
ChinChangYang Dec 11, 2023
eb8c393
Implement Torch Mish Operator with Sigmoid Approximation
ChinChangYang Dec 13, 2023
8425342
Use Metal and CoreML; Adjust resign conditions
ChinChangYang Dec 14, 2023
fe4a4a5
Use all compute units for CoreML model configuration
ChinChangYang Dec 14, 2023
54955cc
Assert that testgpuerror returns 0
ChinChangYang Dec 14, 2023
f63bf9b
Merge branch 'master' into metal-coreml
ChinChangYang Dec 14, 2023
b1f734c
Update KataGo version to 1.13.2-coreml2
ChinChangYang Dec 14, 2023
0d5ac66
Improve thread settings for efficient Metal + CoreML usage
ChinChangYang Dec 14, 2023
31dd42c
Setup CoreML models for FP16 and FP32
ChinChangYang Dec 14, 2023
f4f71b7
Change Xcode build configuration to Debug mode
ChinChangYang Dec 15, 2023
c3d83e5
Add documentation for Metal and CoreML backends
ChinChangYang Dec 15, 2023
9d524e8
Improve CoreML backend to use CPU and Neural Engine
ChinChangYang Dec 25, 2023
c103ed3
Refactor setup script to streamline model deployment
ChinChangYang Dec 25, 2023
f5899fc
Add DEBUG compile definition
ChinChangYang Jan 3, 2024
b8e4416
Merge branch 'master' into metal-coreml
ChinChangYang Jan 3, 2024
c72e9da
Fix CoreML ownership results
ChinChangYang Jan 4, 2024
69a49a2
Fix GPU error test commands to use new flag naming
ChinChangYang Jan 4, 2024
9dd4dec
Upgrade iOS project configuration to 1510
ChinChangYang Jan 4, 2024
9be1fbe
Add parallel source files to iOS project
ChinChangYang Jan 3, 2024
1f22bb5
Fix iOS project setup for large board sizes
ChinChangYang Jan 5, 2024
6e0ff01
Set coremlDeviceToUse to Neural Engine for optimal performance
ChinChangYang Jan 5, 2024
b413ab7
Update CoreML backend setup and model conversion documentation
ChinChangYang Jan 5, 2024
ab40d71
Document for larger 29x29 board sizes in CoreML conversion script
ChinChangYang Jan 5, 2024
33542ad
Merge remote-tracking branch 'origin/stable' into metal-coreml
ChinChangYang Apr 1, 2024
a27263f
Remove testGpuError function
ChinChangYang May 6, 2024
c228240
Update GitHub Actions checkout action version to v4
ChinChangYang May 7, 2024
7d379aa
Merge remote-tracking branch 'origin/humansl' into metal-coreml-humansl
ChinChangYang May 19, 2024
bd341f0
Add support for SGF metadata encoding in Metal backend
ChinChangYang May 19, 2024
221d3f7
Fix xcode KataGo Swift tests
ChinChangYang May 20, 2024
95bdb0e
Update MetalComputeHandle creation and destruction logic
ChinChangYang May 20, 2024
c10d6db
Convert network to CoreML model with metadata encoder
ChinChangYang May 21, 2024
de2cd39
Support meta encoder version in model conversion
ChinChangYang Jun 17, 2024
bde38e6
Output a string to standard error
ChinChangYang Jun 17, 2024
7727c6b
Include new Swift file for additional functionality
ChinChangYang Jun 17, 2024
8d3f8ed
Add meta features to CoreML backend
ChinChangYang Jun 17, 2024
b945c19
Merge branch 'master' into metal-coreml
ChinChangYang Jun 24, 2024
350633c
Enable Swift strict concurrency check
ChinChangYang Jul 19, 2024
d393702
Fix compile error of KataGoSwiftTests.swift from the previous commit
ChinChangYang Jul 19, 2024
4b6a2b0
Increase test coverage of metalbackend.swift to 100%
ChinChangYang Jul 19, 2024
0915786
Merge remote-tracking branch 'origin/master' into metal-coreml
ChinChangYang Jul 19, 2024
d045e9d
Create test cases for CoreML backend
ChinChangYang Jul 20, 2024
b8117ca
Merge branch 'master' into metal-coreml
ChinChangYang Jul 20, 2024
83f5829
Simplify and test coremlmodel.swift
ChinChangYang Jul 20, 2024
8f05a03
Setup and test version 8 network
ChinChangYang Jul 20, 2024
3ace8e7
Fix a test case in model version 15 meta
ChinChangYang Jul 20, 2024
1dbe409
Improved model version reporting consistency
ChinChangYang Jul 20, 2024
3dbeaad
Update build process to include CoreML model FP32 meta setup
ChinChangYang Jul 20, 2024
8bfaf26
Include human-trained model in KataGo setup script
ChinChangYang Jul 20, 2024
7cb5ff1
Configuring Human SL Policy Parameters for CoreML
ChinChangYang Jul 21, 2024
6b279c7
Update documentation for running human-trained CoreML models
ChinChangYang Jul 21, 2024
24851e9
Updated version numbers to 1.15.1-coreml2
ChinChangYang Jul 21, 2024
7e8a620
Update gtp_human5k_coreml.cfg
ChinChangYang Jul 21, 2024
87a92c8
Add human supervised learning network setup and GPU error tests
ChinChangYang Jul 22, 2024
491f59d
Disable Neural Engine Usage in CoreML Configuration
ChinChangYang Jul 22, 2024
1344aea
Improve Performance by Optimizing Thread Usage in CoreML Backend
ChinChangYang Jul 27, 2024
474a98b
Refactor and Enhance KataGo Benchmarking and CoreML Backend Integration
ChinChangYang Jul 27, 2024
6be8e7a
Simplify PolicyHead for Full Neural Engine Support and Update CoreML …
ChinChangYang Jul 27, 2024
f88412d
Update CoreML model versions in GitHub Actions workflow and setup script
ChinChangYang Jul 27, 2024
0b8ac4a
Update Documentation for CoreML Backend
ChinChangYang Jul 27, 2024
f435ce4
Implement thread-safe creation of ComputeHandle in NeuralNet
ChinChangYang Jul 28, 2024
0945e13
Update model version to resolve GPU error test failure
ChinChangYang Jul 28, 2024
825305e
Update KataGo version from 1.15.1-coreml2 to 1.15.1-coreml3
ChinChangYang Jul 28, 2024
322ee23
Improve consistency and documentation
ChinChangYang Jul 28, 2024
c229f25
Merge remote-tracking branch 'origin/master' into metal-coreml
ChinChangYang Aug 5, 2024
7e727f0
Merge remote-tracking branch 'origin/master' into metal-coreml
ChinChangYang Aug 11, 2024
85346d1
Implement model compression using CoreMLTools
ChinChangYang Aug 25, 2024
6182cc8
Implement `safelyPredict` function to enhance model prediction reliab…
ChinChangYang Aug 28, 2024
71129f5
Improve model recompilation logic in CoreMLBackend
ChinChangYang Aug 29, 2024
beb9842
Add command-line argument for specifying bits in weight palettization
ChinChangYang Sep 19, 2024
78128d2
Add target sparsity argument for weight pruning in CoreML conversion
ChinChangYang Sep 20, 2024
8ba8bbc
Add linear quantization for 8-bit weights in CoreML conversion
ChinChangYang Sep 20, 2024
2ac94d1
Enhance model descriptions in convert_coreml_pytorch.py
ChinChangYang Sep 23, 2024
45f347d
Add pruning option to export script
ChinChangYang Sep 23, 2024
5dc2039
Refactor convert_coreml_pytorch.py for improved structure and readabi…
ChinChangYang Sep 24, 2024
8c03d96
Enhance quantization and palettization configurations
ChinChangYang Sep 26, 2024
2aadd12
Correct metadata encoder version retrieval in convert_coreml_pytorch.py
ChinChangYang Sep 29, 2024
1ef26b8
Improve minimum deployment target determination logic
ChinChangYang Oct 3, 2024
90da8bb
Fix compatibility issues in training scripts for MacOS
ChinChangYang Nov 24, 2024
46b800c
Merge branch 'mac-training' into metal-coreml
ChinChangYang Nov 25, 2024
2f7b38f
Add output path argument to Core ML converter
ChinChangYang Nov 26, 2024
d295240
Optimize Game Threads and Batch Size for Metal Backend
ChinChangYang Nov 26, 2024
b45b742
Enhance Self-Play Model Exporting and Core ML Integration
ChinChangYang Nov 27, 2024
08b1f5b
Extend KataGoCommandLine for Core ML model file support
ChinChangYang Nov 27, 2024
ddd6198
Update gatekeeper to utilize Core ML model paths
ChinChangYang Nov 27, 2024
509cce1
Fix issue with duplicate ML model instances by compiling to a unique …
ChinChangYang Nov 28, 2024
7042517
Switch Gatekeeper and Selfplay Configurations to Neural Engine
ChinChangYang Nov 28, 2024
8b44044
Update Xcode version in build.yml to 15.4.0
ChinChangYang Nov 28, 2024
244dc87
Revert "Update Xcode version in build.yml to 15.4.0"
ChinChangYang Feb 3, 2025
0ca48af
Remove CoreML model compilation tests from CoreMLModelTest.swift
ChinChangYang Feb 3, 2025
a0c2acd
Merge remote-tracking branch 'origin/stable' into metal-coreml
ChinChangYang May 12, 2025
2be2a09
Fix build error and assertion failure after merging v1.16.0
ChinChangYang May 12, 2025
fdbae16
Fix Xcode project build issue caused by removed misc.swift
ChinChangYang May 12, 2025
0011781
Update assertion for policy channels of model version 16
ChinChangYang May 12, 2025
6ff0bf0
Merge branch 'master' into metal-coreml
ChinChangYang Jun 22, 2025
3a14fb3
Fix build warnings and errors in Metal backend
ChinChangYang Jun 22, 2025
244616d
Merge remote-tracking branch 'origin/fix-metal-build-error' into meta…
ChinChangYang Jun 23, 2025
4130b4a
Merge remote-tracking branch 'origin/master' into metal-coreml
ChinChangYang Jun 30, 2025
1798d8b
Fix build issues after upgrading KataGo to v1.16.3
ChinChangYang Jun 30, 2025
d6d4477
Comment out layer tests in KataGo test runs
ChinChangYang Jun 30, 2025
0c68518
Speed up CoreML Model Loading
ChinChangYang Jun 30, 2025
66c8d24
Fix import path for load_model in convert_coreml_pytorch.py
ChinChangYang Jul 5, 2025
4ae3750
Refine CoreML Backend to Support Model Directory Specification
ChinChangYang Jul 7, 2025
1e25beb
Update documentation to include Xcode installation requirement for Co…
ChinChangYang Jul 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
197 changes: 197 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
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.15.1-coreml2/kata1-b18c384nbt-s9996604416-d4316597426.bin.gz
ln -s ../../../../../../models/kata1-b18c384nbt-s9996604416-d4316597426.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.15.1-coreml2/KataGoModel19x19fp16v14s9996604416.mlpackage.zip
unzip KataGoModel19x19fp16v14s9996604416.mlpackage.zip
ln -s ../../../../../../models/KataGoModel19x19fp16v14s9996604416.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.15.1-coreml2/KataGoModel19x19fp32v14s9996604416.mlpackage.zip
unzip KataGoModel19x19fp32v14s9996604416.mlpackage.zip
ln -s ../../../../../../models/KataGoModel19x19fp32v14s9996604416.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-coreml2/KataGoModel19x19fp32v15m1humanv0.mlpackage.zip
unzip KataGoModel19x19fp32v15m1humanv0.mlpackage.zip
ln -s ../../../../../../models/KataGoModel19x19fp32v15m1humanv0.mlpackage ../cpp/xcode/DerivedData/Build/Products/Debug/KataGoModel19x19fp32m1.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.15.1-coreml2/kata1-b18c384nbt-s9996604416-d4316597426.bin.gz
ln -s ../../models/kata1-b18c384nbt-s9996604416-d4316597426.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.15.1-coreml2/KataGoModel19x19fp16v14s9996604416.mlpackage.zip
unzip KataGoModel19x19fp16v14s9996604416.mlpackage.zip
ln -s ../../models/KataGoModel19x19fp16v14s9996604416.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.15.1-coreml2/KataGoModel19x19fp32v14s9996604416.mlpackage.zip
unzip KataGoModel19x19fp32v14s9996604416.mlpackage.zip
ln -s ../../models/KataGoModel19x19fp32v14s9996604416.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-coreml2/KataGoModel19x19fp16v15m1humanv0.mlpackage.zip
unzip KataGoModel19x19fp16v15m1humanv0.mlpackage.zip
ln -s ../../models/KataGoModel19x19fp16v15m1humanv0.mlpackage ../cpp/build/KataGoModel19x19fp16m1.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-coreml2/KataGoModel19x19fp32v15m1humanv0.mlpackage.zip
unzip KataGoModel19x19fp32v15m1humanv0.mlpackage.zip
ln -s ../../models/KataGoModel19x19fp32v15m1humanv0.mlpackage ../cpp/build/KataGoModel19x19fp32m1.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
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,16 @@ GPATH
GRTAGS
GTAGS

# For Xcode
xcuserdata/
DerivedData/
*.plist

# For KataGo-iOS
ios/KataGo\ iOS/Resources/*.bin.gz
ios/KataGo\ iOS/Resources/*.mlpackage

# misc
cpp/external/httplib/cpp-httplib/
cpp/external/nlohmann_json/nlohmann_json
gtp.cfg
Expand Down
Loading