Skip to content
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

Fix Docker ROCM builds, use AMDGPU_TARGETS instead of GPU_TARGETS #9641

Merged
merged 2 commits into from
Sep 30, 2024

Conversation

serhii-nakon
Copy link
Contributor

@serhii-nakon serhii-nakon commented Sep 25, 2024

Small description: When use GPU_TARGETS it crash like out of memory, but with AMDGPU_TARGETS it properly works. Also in documentations described AMDGPU_TARGETS not GPU_TARGETS

@github-actions github-actions bot added the devops improvements to build systems and github actions label Sep 25, 2024
@no1wudi
Copy link
Contributor

no1wudi commented Sep 26, 2024

https://github.com/ROCm/rocBLAS/blob/4104188d27bf58f8de28be27b0d3fcb5a46e812d/CMakeLists.txt#L139-L146

Seems AMDGPU_TARGETS will be deprecated but not for now.

@slaren
Copy link
Collaborator

slaren commented Sep 26, 2024

Is this change required? Any comment from people experienced with ROCm would be appreciated. I don't think there are any maintainers working with ROCm at the moment, so we depend on feedback from the community to review these changes.

@serhii-nakon
Copy link
Contributor Author

serhii-nakon commented Sep 26, 2024

Also I just noticed that similar issue happened when I try build with multiple gfx IDs in ROCM_DOCKER_ARCH like here https://github.com/ggerganov/llama.cpp/pull/9641/files#diff-acc708a34f42e6226b0cf4eecfdb0123ca381b4b51b48106a2e2c3c667b5ec63L14-L24 but if I use ROCM_DOCKER_ARCH="gfx803 gfx900 gfx906 gfx908 gfx90a gfx1010 gfx1030 gfx1100 gfx1101 gfx1102" it works fine so I will commit it due it incorrectly works without this, even building time increase with this addition.

@serhii-nakon
Copy link
Contributor Author

serhii-nakon commented Sep 26, 2024

Is this change required? Any comment from people experienced with ROCm would be appreciated. I don't think there are any maintainers working with ROCm at the moment, so we depend on feedback from the community to review these changes.

Hello I started to use it, and it required due it does not work properly (even prebuilt containers does not work properly from here - https://github.com/ggerganov/llama.cpp/blob/master/docs/docker.md) also documentation describe AMDGPU_TARGETS not GPU_TARGETS - see https://github.com/ggerganov/llama.cpp/blob/master/docs/build.md#hipblas

@serhii-nakon
Copy link
Contributor Author

serhii-nakon commented Sep 26, 2024

@no1wudi It deprecated to build rocBLAS but in code base of llama.cpp it not used at all (at least I did not find it) - so currently docker containers built without any setted gfx ID
@slaren Yes it required to work - I have RX 7900 XTX and it works only with those commits

@tbocek
Copy link

tbocek commented Sep 30, 2024

When I build this project with my 7900XTX, I use:

ROCM_PATH=/opt/rocm-6.2.1/ make -j32 GGML_HIPBLAS=1 AMDGPU_TARGETS=gfx1100 GGML_CUDA_FA_ALL_QUANTS=1

Not sure, if all the parameters are still needed, but I also use AMDGPU_TARGETS, and it works

@slaren slaren merged commit 6f1d9d7 into ggerganov:master Sep 30, 2024
49 checks passed
@serhii-nakon
Copy link
Contributor Author

Thank you all!

dsx1986 pushed a commit to dsx1986/llama.cpp that referenced this pull request Oct 29, 2024
…erganov#9641)

* Fix Docker ROCM builds, use AMDGPU_TARGETS instead of GPU_TARGETS

* Set ROCM_DOCKER_ARCH as string due it incorrectly build and cause OOM exit code
arthw pushed a commit to arthw/llama.cpp that referenced this pull request Nov 15, 2024
…erganov#9641)

* Fix Docker ROCM builds, use AMDGPU_TARGETS instead of GPU_TARGETS

* Set ROCM_DOCKER_ARCH as string due it incorrectly build and cause OOM exit code
arthw pushed a commit to arthw/llama.cpp that referenced this pull request Nov 18, 2024
…erganov#9641)

* Fix Docker ROCM builds, use AMDGPU_TARGETS instead of GPU_TARGETS

* Set ROCM_DOCKER_ARCH as string due it incorrectly build and cause OOM exit code
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.

4 participants