-
Notifications
You must be signed in to change notification settings - Fork 589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve KataGo performance on M2 Mac #857
Comments
Try this v1.13.2-coreml1 which implements the Core ML backend for KataGo. Replace xcodebuild by xcodebuild -derivedDataPath DerivedData/KataGo if DerivedData is not found. |
Do you have plan to merge your coreml implementation to main repository? |
Metal, the GPU framework, is compatible with KataGo’s design, and I plan to merge the Metal backend into the main branch of KataGo. However, CoreML, which uses the ANE, is not compatible with KataGo’s design. Therefore, I don’t have any plans to merge the CoreML backend into the main branch. |
@ChinChangYang Then, may I expect your CoreML fork maintained in the future? |
Yes. The latest update can be found in #865. |
@ChinChangYang Thanks for your works. hope that I can contribute your repo someday. |
What's the status? This fork's instructions provide a huge gain on Mac over the mainline katago: |
The latest status can be seen in #865. I believe this will never be merged into the main KataGo because the KataGo author doesn't seem to have an Mac to maintain the Metal and CoreML backends. |
What? But surely one of the several dozen contributors do? Can't maintenance be contributed? |
@lightvector would be the best person to answer this. If I were the author of KataGo, I’d likely focus on what could be learned from feedback and advancements. I appreciate the author’s responsibility in releasing a new version for Windows, though Mac isn’t currently the main focus. |
Hi @ChinChangYang I got this error when trying to compile using your branch. Any ideas?
|
The issue appears to be an architecture mismatch. Your toolchain is likely building for Steps to Resolve
This should figure out why the architecture mismatch and allow the build to complete successfully when the toolchain builds for arm64. |
My results for
|
To ensure everything is set up correctly, follow these steps:
After completing these steps, your environment should be configured correctly, and you’re ready to proceed with the build. |
Please could you add a comment to your Documentation on which models are supported? ie M3/M4? It might also be helpful to provide a link to Katrain or other front-end install instructions I found these instructions for M1 |
@ChinChangYang Thanks for the reply. I managed to uninstall and install cmake and ninja in the correct directory to compile KataGo with the metal backend successfully. However, when I try to use it in Lizzie I get the below error. I'm using the binary model that you indicated in the instructions.
|
If you've successfully built KataGo with the Metal backend, you can run GTP protocol with a binary model by this command:
The |
@ChinChangYang Thanks but how about the KataGoModel19x19fp16.mlpackage? Do I need to care about that especially when converting the latest checkpoint file on my own? One thing I didn't understand from the steps was how to link the new model.bin.gz and the new KataGoModel19x19fp16.mlpackage together. |
I don't link the In the documentation, I |
@ChinChangYang Thank you for maintaining and contributing to this project! I'd like to use CoreML KataGo, but I'm wondering about the differences between versions. I notice there are v1.15.1-coreml3 and v1.15.1-coreml1 on the release page. What do the numbers '3' and '1' mean? They don't seem to refer to CoreML versions. |
The version is in the form:
The CoreML branch modifies KataGo source code to support CoreML backend. For example, the |
M4: https://www.apple.com/uk/shop/buy-mac/mac-studio |
I just got a new M2 Mac recently and I tried running KataGo on it through Lizzie.
The good thing is it ran without changing any configurations from my Intel Mac.
However, I saw that the visits/s hovered at around 600~800 only.
Is there a way to improve the KataGo performance on my M2 Mac?
I'm using the OpenCL option.
I saw another thread about converting the KataGO to OpenML.
Is it faster than OpenCL?
The text was updated successfully, but these errors were encountered: