fix ROCm on Windows - #683
Conversation
|
Is there any reason to not add the library to the ggml-rocm target instead? |
On windows we need the following commands to complete the build. mkdir build
cd build
cmake .. -G "Ninja" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DRWKV_HIPBLAS=ON -DCMAKE_BUILD_TYPE=Release -DAMDGPU_TARGETS=gfx1100
cmake --build . --config ReleaseWe will get the following error report: lld-link: error: could not open 'm.lib': no such file or directory
CLANG_~1: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.The conclusion from my analysis is that ROCm's clang/clang++ does not have |
|
@slaren I also searched on google and I found similar questions: conda-forge/fftw-feedstock#75, |
|
I have been checking how this is done in Otherwise, if I understand the issue, under Windows there is no need to link to the if (WIN32)
target_link_libraries(${TARGET} PUBLIC ${GGML_EXTRA_LIBS} ${CMAKE_THREAD_LIBS_INIT})
else()
target_link_libraries(${TARGET} PUBLIC m ${GGML_EXTRA_LIBS} ${CMAKE_THREAD_LIBS_INIT})
endif() |
|
I have forgotten why this |
|
I also added some settings, which are the same as llama.cpp. |
|
ok |
|
It looks like ci failed |
|
I have changed it to |
|
I suspect the reason why it is not necessary to link with it explicitly in |
|
it is working |
There is no need for the m link library in the Windows environment. If we try to link, an error will occur.
I can make sure it's correct because at rwkv, that's what I do. We can also check in the rwkv release that the built library is correct.