Skip to content

Conversation

Looong01
Copy link

Add ROCm backend
1st push
Testing...

@Looong01
Copy link
Author

Looong01 commented Aug 2, 2025

All test passed, we can merge it to main branch!

@Looong01
Copy link
Author

Looong01 commented Aug 2, 2025

Binary release has been published here: https://github.com/Looong01/KataGo-ROCm/releases

@Looong01
Copy link
Author

Add Bigger Boards Expensive version(bs50) for Binary release: https://github.com/Looong01/KataGo-ROCm/releases/tag/v1.16.3-rocm-25.8.13

@KurococLiu
Copy link

Thank you for adding the ROCm backend—it's a great contribution for AMD users!

I'm interested in using KataGo with ROCm on Windows. Do you have any plans to extend this backend to support Windows platforms in the future (e.g., via native HIP SDK or WSL)? If not, any advice on building it myself?

My setup: 7800XT Windows11 24H2。

@Looong01
Copy link
Author

Looong01 commented Sep 24, 2025

Thank you for adding the ROCm backend—it's a great contribution for AMD users!

I'm interested in using KataGo with ROCm on Windows. Do you have any plans to extend this backend to support Windows platforms in the future (e.g., via native HIP SDK or WSL)? If not, any advice on building it myself?

My setup: 7800XT Windows11 24H2。

Yes. Now my release could be used with WSL directly now. But for Windows locally support, Up to now, I don't have Windows environment with my AMD GPU. I could do that maybe in months.

@KurococLiu
Copy link

Thank you for adding the ROCm backend—it's a great contribution for AMD users!
I'm interested in using KataGo with ROCm on Windows. Do you have any plans to extend this backend to support Windows platforms in the future (e.g., via native HIP SDK or WSL)? If not, any advice on building it myself?
My setup: 7800XT Windows11 24H2。

Yes. Now my release could be used with WSL directly now. But for Windows locally support, Up to now, I don't have Windows environment with my AMD GPU. I could do that maybe in months.

Hi @Looong01 ,

Thank you for your quick response and for clarifying that the current release (v1.16.3-rocm-25.8.13) can be used via WSL—it's exciting to see ROCm support progressing for AMD users!

I tried running it on WSL2 (Ubuntu 24.04) with my setup (AMD Radeon RX 7800 XT, Windows 11 24H2), but encountered a HIP error during GTP initialization. The full output is:

KataGo v1.16.3
Using Chinese rules initially, unless GTP/GUI overrides this
Initializing board with boardXSize 19 boardYSize 19
Loaded config /mnt/c/Users/Administrator/katago/sabaki.cfg
Loaded model /mnt/c/Users/Administrator/katago/model/kata1-b28c512nbt-s10904468224-d5317014586.bin.gz
Model name: kata1-b28c512nbt-s10904468224-d5317014586
GTP ready, beginning main protocol loop
= KataGo

= 1.16.3+b28c512nbt-s10904M

=

terminate called after throwing an instance of 'StringError'
  what():  HIP Error @getOutput /home/loong/Codes/KataGo-ROCm/cpp/neuralnet/rocmbackend.cpp:hipPeekAtLastError():2599 : invalid device function

My GPU shows up correctly in rocminfo (gfx1101), and I'm using ROCm 6.4.2 (installed via amdgpu-install --usecase=wsl,rocm --no-dkms). I tried downgrading to ROCm 5.6 (to match the binary's naming) but hit dependency issues on Ubuntu 24.04 (e.g., unmet dependencies for rocm-gdb like libtinfo5, libncurses5, libpython3.10). Have you seen this error before? Could it be related to RDNA 3 (gfx1101) compatibility or a ROCm version mismatch? Any advice on troubleshooting or a recommended ROCm version for gfx1101?

Regarding Windows native support, since you mentioned not having an AMD GPU Windows environment yet, I'd be happy to help! I can assist with testing the Windows backend once you're ready—e.g., building from source, running benchmarks, providing logs, or verifying on my RX 7800 XT setup. Feel free to reach out to me directly at [email protected] if you need a tester or have specific instructions for Windows builds. I'm available to collaborate and contribute as much as I can!

@KurococLiu
Copy link

Thank you for adding the ROCm backend—it's a great contribution for AMD users!
I'm interested in using KataGo with ROCm on Windows. Do you have any plans to extend this backend to support Windows platforms in the future (e.g., via native HIP SDK or WSL)? If not, any advice on building it myself?
My setup: 7800XT Windows11 24H2。

Yes. Now my release could be used with WSL directly now. But for Windows locally support, Up to now, I don't have Windows environment with my AMD GPU. I could do that maybe in months.

Hi @Looong01 ,

Thank you for your quick response and for clarifying that the current release (v1.16.3-rocm-25.8.13) can be used via WSL—it's exciting to see ROCm support progressing for AMD users!

I tried running it on WSL2 (Ubuntu 24.04) with my setup (AMD Radeon RX 7800 XT, Windows 11 24H2), but encountered a HIP error during GTP initialization. The full output is:

KataGo v1.16.3
Using Chinese rules initially, unless GTP/GUI overrides this
Initializing board with boardXSize 19 boardYSize 19
Loaded config /mnt/c/Users/Administrator/katago/sabaki.cfg
Loaded model /mnt/c/Users/Administrator/katago/model/kata1-b28c512nbt-s10904468224-d5317014586.bin.gz
Model name: kata1-b28c512nbt-s10904468224-d5317014586
GTP ready, beginning main protocol loop
= KataGo

= 1.16.3+b28c512nbt-s10904M

=

terminate called after throwing an instance of 'StringError'
  what():  HIP Error @getOutput /home/loong/Codes/KataGo-ROCm/cpp/neuralnet/rocmbackend.cpp:hipPeekAtLastError():2599 : invalid device function

My GPU shows up correctly in rocminfo (gfx1101), and I'm using ROCm 6.4.2 (installed via amdgpu-install --usecase=wsl,rocm --no-dkms). I tried downgrading to ROCm 5.6 (to match the binary's naming) but hit dependency issues on Ubuntu 24.04 (e.g., unmet dependencies for rocm-gdb like libtinfo5, libncurses5, libpython3.10). Have you seen this error before? Could it be related to RDNA 3 (gfx1101) compatibility or a ROCm version mismatch? Any advice on troubleshooting or a recommended ROCm version for gfx1101?

Regarding Windows native support, since you mentioned not having an AMD GPU Windows environment yet, I'd be happy to help! I can assist with testing the Windows backend once you're ready—e.g., building from source, running benchmarks, providing logs, or verifying on my RX 7800 XT setup. Feel free to reach out to me directly at [email protected] if you need a tester or have specific instructions for Windows builds. I'm available to collaborate and contribute as much as I can!

Hi @Looong01,
Thank you again for your amazing work on the ROCm backend! Following up on my previous comment, I successfully compiled KataGo from your source code (https://github.com/Looong01/KataGo-ROCm.git) on WSL2 (Ubuntu 24.04, ROCm 6.4.2) with my RX 7800 XT (gfx1101). The build commands I used were:

git clone https://github.com/Looong01/KataGo-ROCm.git
sudo apt install libzip-dev
cd KataGo-ROCm/cpp
cmake . -DUSE_BACKEND=ROCM -DCMAKE_CXX_FLAGS="-DGPU_TARGETS=gfx1101"
make -j$(nproc)

The compiled binary now runs without the HIP Error: invalid device function, and I can confirm it works correctly with my setup, including GTP commands and LizzieYzy integration.
For your planned Windows native support, I'm happy to assist with testing on my setup (RX 7800 XT, Windows 11 24H2). Feel free to contact me at [email protected] if you need a tester for Windows builds, benchmarks, logs, or any other support. I'll respond as soon as I see your message!
Looking forward to your updates, and thanks again for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants