llama.cpp icon indicating copy to clipboard operation
llama.cpp copied to clipboard

Compilation error using HIP SDK on Windows

Open lastrosade opened this issue 1 year ago • 1 comments

Building with:

cmake -B "%LLAMA_DIR%\build.hip" -S "%LLAMA_DIR%" ^
    -DCMAKE_BUILD_TYPE=Release ^
    -DCMAKE_C_COMPILER=clang ^
    -DCMAKE_CXX_COMPILER=clang++ ^
    -DLLAMA_NATIVE=ON ^
    -DLLAMA_HIPBLAS=ON ^
    -DAMDGPU_TARGETS=gfx1100 ^
    -G Ninja

Yields:

B:/Users/pedr0/Desktop/llama.cpp/build/llama.cpp/ggml-cuda/common.cuh:374:31: error: no matching function for call to '__shfl_xor'
        const half2 a_other = __shfl_xor_sync(0xffffffff, a, mask, 32);
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
B:/Users/pedr0/Desktop/llama.cpp/build/llama.cpp/ggml-cuda/common.cuh:43:53: note: expanded from macro '__shfl_xor_sync'
#define __shfl_xor_sync(mask, var, laneMask, width) __shfl_xor(var, laneMask, width)
                                                    ^~~~~~~~~~

Full log: llama_win.txt

lastrosade avatar May 12 '24 14:05 lastrosade

__shfl_xor() for half2 was added in ROCm 5.6. You could install the newer HIP SDK version 5.7 and use that instead, or try this PR: #7263

Engininja2 avatar May 13 '24 18:05 Engininja2