Alexander Rødseth pushed to branch main at Arch Linux / Packaging / Packages / ollama-rocm
Commits: 640c2381 by Alexander F. Rødseth at 2024-11-06T20:28:35+01:00 ROCm fixes - - - - - 1 changed file: - PKGBUILD Changes: ===================================== PKGBUILD ===================================== @@ -2,10 +2,11 @@ # Contributor: Steven Allen <[email protected]> # Contributor: Matt Harrison <[email protected]> # Contributor: Kainoa Kanter <[email protected]> +# Contributor: Wilken Gottwalt <[email protected]> pkgname=ollama-rocm -pkgver=0.3.12 -pkgrel=5 +pkgver=0.3.14 +pkgrel=1 pkgdesc='Create, run and share large language models (LLMs) with ROCm' arch=(x86_64) url='https://github.com/ollama/ollama' @@ -44,21 +45,22 @@ prepare() { } build() { - export CFLAGS+=' -w' - export CXXFLAGS+=' -w' - export LDFLAGS+=' -L/opt/cuda/targets/x86_64-linux/lib/stubs/' + export CC=/opt/rocm/llvm/bin/clang + export CFLAGS+=' -fcf-protection=none -w' export CGO_CFLAGS="$CFLAGS" CGO_CPPFLAGS="$CPPFLAGS" CGO_CXXFLAGS="$CXXFLAGS" CGO_LDFLAGS="$LDFLAGS" + export CMAKE_DEFS='-DBUILD_SHARED_LIBS=off -DCMAKE_BUILD_TYPE=MinSizeRel' + export CXX=/opt/rocm/llvm/bin/clang++ + export CXXFLAGS+=' -fcf-protection=none -w' + export LDFLAGS+=' -L/opt/cuda/targets/x86_64-linux/lib/stubs/' + export MDGPU_TARGETS="gfx1030,gfx1100" + export OLLAMA_CPU_TARGET="cpu_avx2" + export OLLAMA_CUSTOM_CPU_DEFS='-DGGML_LTO=on' + export OLLAMA_SKIP_CUDA_GENERATE=on + export OLLAMA_SKIP_ONEAPI_GENERATE=on + export ROCM_PATH=/opt/rocm local goflags='-buildmode=pie -trimpath -mod=readonly -modcacherw' local ldflags="-linkmode=external -buildid= -X github.com/ollama/ollama/version.Version=$pkgver -X github.com/ollama/ollama/server.mode=release" - cd ollama - export CUDA_LIB_DIR=/disabled - export ROCM_PATH=/opt/rocm - export CC=/opt/rocm/llvm/bin/clang - export CXX=/opt/rocm/llvm/bin/clang++ - export CFLAGS+=' -fcf-protection=none' - export CXXFLAGS+=' -fcf-protection=none' - export OLLAMA_CUSTOM_CPU_DEFS='-DLLAMA_AVX=on -DLLAMA_AVX2=on -DAMDGPU_TARGETS=gfx1030 -DLLAMA_F16C=on -DLLAMA_FMA=on -DLLAMA_LTO=on -DLLAMA_HIPBLAS=1 -DCMAKE_BUILD_TYPE=Release' go generate ./... go build $goflags -ldflags="$ldflags" -tags rocm } View it on GitLab: https://gitlab.archlinux.org/archlinux/packaging/packages/ollama-rocm/-/commit/640c23815e3c720645e6b73d41cf935c5d668380 -- View it on GitLab: https://gitlab.archlinux.org/archlinux/packaging/packages/ollama-rocm/-/commit/640c23815e3c720645e6b73d41cf935c5d668380 You're receiving this email because of your account on gitlab.archlinux.org.
