Skip to content

release : fix windows hip release #13707

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

Merged
merged 2 commits into from
May 22, 2025
Merged

release : fix windows hip release #13707

merged 2 commits into from
May 22, 2025

Conversation

slaren
Copy link
Member

@slaren slaren commented May 22, 2025

Fixes #13698

@github-actions github-actions bot added the devops improvements to build systems and github actions label May 22, 2025
@slaren
Copy link
Member Author

slaren commented May 22, 2025

@no1wudi @IMbackK I would like to simplify the windows HIP releases, do you know if it would be possible to include all the GPU targets in a single binary, or is it strictly necessary to have a different release for each target? Currently we have different releases for gfx1100, gfx1101, gfx1030.

@IMbackK
Copy link
Collaborator

IMbackK commented May 22, 2025

Its not necessary, no. you can have fat binaries.

Im not sure how useful the windows builds are atm really since the list of targets is so small and rather random.
Unfortunately atm rocm on windows is not really supportable as, unlike linux rocm, its very inflexible with the target architectures, to support rdna2 you would have to build for all gfx103x variants for instance, despite these being identical in code generation. This is feasible neither in terms of binary size nor in terms of build time.

The only really feasible way to support windows rocm is to have people self build.

@slaren
Copy link
Member Author

slaren commented May 22, 2025

Thanks for the insight. I wonder how other projects handle this. @YellowRoseCx I believe you distribute koboldcpp packages for rocm, can you share some insights of how you handle the different GPU targets in a single release?

@IMbackK
Copy link
Collaborator

IMbackK commented May 22, 2025

koboldcpp is built for gfx803, gfx900, gfx906, gfx908, gfx90a, gfx1010, gfx1030, gfx1031, gfx1032, gfx1100, gfx1101 and gfx1102
This list includes various chips you can not actually run on windows anyhow (gfx803, gfx900, gfx906, gfx908, gfx90a) and fails to support various chips you could run on windows like gfx1012, gfx1033, gfx1034, gfx1035, gfx1036, gfx1103, gfx1150, gfx1151, gfx1152, gfx1153, gfx1200 and gfx1201

amd is currenly in the process of introducing generics ie gfx9-generic gfx10.3-generic, gfx11-generic and gfx12-generic that will make this mutch better as then we will only have to build those + gfx1100 and + gfx906, gfx908, gfx90a and gfx942 on linux. They are also in the process of introducing a amdgcn-spirv target to llvm that will allow similar functionality as building the cuda version for ptx

@slaren
Copy link
Member Author

slaren commented May 22, 2025

Alright, thanks. I am going to give it a try to include all of these targets in a single binary. The rocblas libraries that are included in our HIP releases are already 900MB, so I figure that even if the size of ggml-hip.dll increases by a factor of 10 it shouldn't change too much the size of the download. If that doesn't work then I guess I will just wait until AMD adds the generic targets.

@slaren
Copy link
Member Author

slaren commented May 22, 2025

Adding all of these targets didn't work very well, so instead I added the supported radeon targets listed in the documentation. This results in a 210MB ggml-hip.dll, which is similar to the size of the CUDA backend binary.

@slaren slaren merged commit 3079e9a into master May 22, 2025
2 checks passed
@slaren slaren deleted the sl/fix-win-hip-release branch May 22, 2025 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devops improvements to build systems and github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Misc. bug: HIP / ROCm memory allocation broken after release b5450
3 participants