Summary: | app-misc/ollama-9999::guru failing with amd use flag enabled | ||
---|---|---|---|
Product: | GURU | Reporter: | Raj Barath <rajbarath> |
Component: | Package issues | Assignee: | Paul Zander <negril.nx+gentoo> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | amd64, gentoobugs, iacrveuf, ignamartinoli, rajbarath, strider1551, vmmmtuvf |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 946268 | ||
Bug Blocks: | |||
Attachments: | full emerge messages |
Description
Raj Barath
2025-01-20 00:33:23 UTC
Created attachment 917115 [details]
full emerge messages
Full emerge output
I am having the same exact problem since various kernel versions Seems that go generate isn't needed. There is just a makefile.
Also if you are using the ebuild there is a missing dependency on sci-libs/hipBLAS. You probably want to unmask a whole lot of version 6.3 stuff to pull in the following:
>=dev-util/Tensile-6.3
>=dev-libs/roct-thunk-interface-6.3
>=sci-libs/rocPRIM-6.3
>=sci-libs/rocSPARSE-6.3
>=sci-libs/hipBLAS-common-6.3
>=sci-libs/rocSOLVER-6.3
>=sci-libs/hipBLAS-6.3
>=sci-libs/rocBLAS-6.3
>=dev-libs/roct-thunk-interface-6.3
>=dev-libs/rocr-runtime-6.3
>=dev-libs/rocm-comgr-6.3
>=dev-libs/rocm-device-libs-6.3
>=dev-libs/rocm-opencl-runtime-6.3
>=dev-util/rocm-smi-6.3
>=dev-util/hipcc-6.3
>=dev-util/hip-6.3
>=dev-util/rocminfo-6.3
Also don't forget that the hip will be looking for your GPU in AMDGPU_TARGETS="gfx... [gfx...]" in the make.conf
I just checked. And it actually fails regardless of which USE flag I use. Is it expected and related to this issue? (If not, the title should be changed) (In reply to ignamartinoli from comment #4) > I just checked. And it actually fails regardless of which USE flag I use. > > Is it expected and related to this issue? > (If not, the title should be changed) It is not going to work because sometime ago the build changed to just using make. github.com/ollama/ollama/blob/main/docs/development.md so you need to change the ebuild to something for amd, which will need all the ROCm dependencies because it uses hipcc. All the rocm ebuilds need to filter the CFLAGS and LDFLAGS as these wont build with anything other than -O2 -pipe, as they check the CPU arch for specific flags at runtime. You then need to compile the code with the HIPCC and CPU flags (if you have an avx512 flag, which there isn't one yet, but would like to enable it, I included it below. The HIP_ARCHES should come from the make.conf, and need a semicolon. src_compile() { VERSION=$( git describe --tags --first-parent --abbrev=7 --long --dirty --always \ | sed -e "s/^v//g" assert ) export GOFLAGS="'-ldflags=-w -s \"-X=github.com/ollama/ollama/version.Version=${VERSION}\"'" HIP_ARCHS='gfx1101;gfx1102' make CUSTOM_CPU_FLAGS=avx,avx2,avx512,avx512vbmi,avx512vnni,avx512bf16 } in summary, the build needs to support CPU flags and HIP_ARCHES from make.conf. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ee54de8ccc9acd462f837185e28ec624553d2a95 commit ee54de8ccc9acd462f837185e28ec624553d2a95 Author: Paul Zander <negril.nx+gentoo@gmail.com> AuthorDate: 2025-02-08 19:30:07 +0000 Commit: Paul Zander <negril.nx+gentoo@gmail.com> CommitDate: 2025-02-08 21:42:29 +0000 app-misc/ollama: update 9999 Closes: https://bugs.gentoo.org/948424 Closes: https://bugs.gentoo.org/935842 Closes: https://bugs.gentoo.org/920301 Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com> .../ollama/files/ollama-9999-include-cstdint.patch | 21 ++ app-misc/ollama/metadata.xml | 1 + app-misc/ollama/ollama-9999.ebuild | 293 ++++++++++++++++----- 3 files changed, 254 insertions(+), 61 deletions(-) Additionally, it has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=0e23d436589a5ed76dd10ff0e35964f691b809c7 commit 0e23d436589a5ed76dd10ff0e35964f691b809c7 Author: Paul Zander <negril.nx+gentoo@gmail.com> AuthorDate: 2025-02-08 19:29:18 +0000 Commit: Paul Zander <negril.nx+gentoo@gmail.com> CommitDate: 2025-02-08 21:42:29 +0000 app-misc/ollama: update to 0.5.7-r1 Bug: https://bugs.gentoo.org/948424 Bug: https://bugs.gentoo.org/935842 Closes: https://bugs.gentoo.org/920301 Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com> .../files/ollama-0.5.7-include-cstdint.patch | 24 +++ app-misc/ollama/files/{ollama => ollama.init} | 2 + app-misc/ollama/metadata.xml | 1 + app-misc/ollama/ollama-0.5.7-r1.ebuild | 176 +++++++++++++++++++++ app-misc/ollama/ollama-0.5.7.ebuild | 115 -------------- 5 files changed, 203 insertions(+), 115 deletions(-) |