mirror of
https://github.com/tcsenpai/ollama.git
synced 2025-06-09 04:35:21 +00:00
mods to build_hipblas.sh
for linux
This commit is contained in:
parent
28bedcd807
commit
54f391309f
@ -26,18 +26,18 @@ additional_flags=""
|
|||||||
|
|
||||||
if [[ "$os" == "Windows_NT" || "$os" == "MINGW64_NT"* ]]; then
|
if [[ "$os" == "Windows_NT" || "$os" == "MINGW64_NT"* ]]; then
|
||||||
output="ggml-hipblas.dll"
|
output="ggml-hipblas.dll"
|
||||||
additional_flags="-Xclang --dependent-lib=msvcrt -Wl,/subsystem:console"
|
additional_flags=" -Xclang --dependent-lib=msvcrt -Wl,/subsystem:console"
|
||||||
else
|
else
|
||||||
output="libggml-hipblas.so"
|
output="libggml-hipblas.so"
|
||||||
archs+=("${linux_archs[@]}")
|
archs+=("${linux_archs[@]}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
offload_arch_flags=""
|
|
||||||
for arch in "${archs[@]}"; do
|
for arch in "${archs[@]}"; do
|
||||||
offload_arch_flags+=" --offload-arch=$arch"
|
additional_flags+=" --offload-arch=$arch"
|
||||||
done
|
done
|
||||||
|
|
||||||
hipcc \
|
hipcc \
|
||||||
|
-v \
|
||||||
-parallel-jobs=12 \
|
-parallel-jobs=12 \
|
||||||
-O3 \
|
-O3 \
|
||||||
-DGGML_USE_CUDA \
|
-DGGML_USE_CUDA \
|
||||||
@ -54,16 +54,17 @@ hipcc \
|
|||||||
-D_CRT_SECURE_NO_WARNINGS \
|
-D_CRT_SECURE_NO_WARNINGS \
|
||||||
-DCMAKE_POSITION_INDEPENDENT_CODE=on \
|
-DCMAKE_POSITION_INDEPENDENT_CODE=on \
|
||||||
-D_GNU_SOURCE \
|
-D_GNU_SOURCE \
|
||||||
$offload_arch_flags \
|
|
||||||
$additional_flags \
|
|
||||||
-Wno-expansion-to-defined \
|
-Wno-expansion-to-defined \
|
||||||
-Wno-invalid-noreturn \
|
-Wno-invalid-noreturn \
|
||||||
-Wno-ignored-attributes \
|
-Wno-ignored-attributes \
|
||||||
-Wno-pass-failed \
|
-Wno-pass-failed \
|
||||||
-Wno-deprecated-declarations \
|
-Wno-deprecated-declarations \
|
||||||
|
-Wno-unused-result \
|
||||||
-I. \
|
-I. \
|
||||||
|
-fPIC \
|
||||||
-lhipblas -lamdhip64 -lrocblas \
|
-lhipblas -lamdhip64 -lrocblas \
|
||||||
-shared \
|
-shared \
|
||||||
|
$additional_flags \
|
||||||
-o ggml-hipblas.dll \
|
-o ggml-hipblas.dll \
|
||||||
ggml-cuda.cu ggml-cuda/*.cu ggml.c ggml-backend.c ggml-alloc.c ggml-quants.c sgemm.cpp
|
ggml-cuda.cu ggml-cuda/*.cu ggml.c ggml-backend.c ggml-alloc.c ggml-quants.c sgemm.cpp
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user