CMakeLists refinements for CUBLAS and phthread#57
CMakeLists refinements for CUBLAS and phthread#57luav wants to merge 2 commits intocmp-nct:masterfrom
Conversation
luav
commented
Jul 11, 2023
- CUDA_ARCHITECTURES set to all ("all" works instead of "native" on various platforms) instead of OFF when a) they are not defined explicitly and b) CUBLAS is used;
- pthread linked properly on Linux;
- CUDA-based std is enabled when CUBLAS is used;
- cmake version fixed in README to reflect the CMakeLists.txt (3.17 is required for LLAMA_CUBLAS).
…BLAS when not defined explicitly, cuda_std_11 enabled on CUBLAS
|
The compilation is validated on Linux Ubuntu 20.04 x64 with GeForce MX150 and Windows 10 x64 with GeForce RTX 3050 TI for both CPU and CUDA GPU builds. build$ cmake -DCMAKE_CUDA_ARCHITECTURES="all" -DLLAMA_F16C=0 -DLLAMA_FMA=0 -DLLAMA_AVX=0 -DLLAMA_AVX2=0 -DCMAKE_C_FLAGS="-march=native" -DLLAMA_CUBLAS=1 ..
build$ cmake --build . --config Release -j 4 |
|
I'll need to look at that in greater detail. Regarding the fixes, I recall there were troubles with the architectures changes they had on llama.cpp. But I don't know the actual implications of the change. I've compiled it fine on linux, windows and wsl with and without cuda support. I'm not sure which exact scenarios are improved now (and of that introduces issues we didn't have before) |