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

Update HIPBLAS CMake #847

Merged
merged 5 commits into from
Jun 5, 2024
Merged

Update HIPBLAS CMake #847

merged 5 commits into from
Jun 5, 2024

Conversation

daniandtheweb
Copy link
Contributor

@daniandtheweb daniandtheweb commented Jun 2, 2024

The old code for building HIPBLAS with CMake didn't work at all with my self-built ROCm sdk so I've updated it based on the llama.cpp implementation.

Some newer commit also causes linking problems on Debian Unstable with undefined references to cuda code using hipcc.

This new CMake code works with the self-built packages and it should keep the compatibility with the typical ROCm install made with the package manager (Ubuntu 22.04 and Debian Unstable have been tested and both work fine).

Debian Unstable still needs to build using hipcc as there's no ROCm's Clang available (or at least I haven't found any).

@daniandtheweb
Copy link
Contributor Author

daniandtheweb commented Jun 2, 2024

Right now I've tested on Debian with the distribution's HIPBlas and everything works fine.

@daniandtheweb
Copy link
Contributor Author

Setting the CC and CXX to rocm's clang and clang++ on Ubuntu 22.04, the same as llama.cpp's CI, works fine.

@daniandtheweb
Copy link
Contributor Author

daniandtheweb commented Jun 2, 2024

When I try to replicate the build process from llama.cpp with this:
cmake -B build -S . -DCMAKE_HIP_COMPILER="$(hipconfig -l)/clang" -DGGML_HIPBLAS=ON; the build fails while compiling the tests with the error: unrecognized command-line option '--hip-link'.

However building specifying -DCMAKE_C_COMPILER and -DCMAKE_CXX_COMPILER instead of -DCMAKE_HIP_COMPILER results in a working build.

@ggerganov ggerganov merged commit 9d562d7 into ggerganov:master Jun 5, 2024
4 checks passed
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.

None yet

2 participants