[PR #3796] [CLOSED] feat: enable OLLAMA Arc GPU support with SYCL backend #11283

Closed
opened 2026-04-12 23:26:38 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/3796
Author: @gamunu
Created: 4/21/2024
Status: Closed

Base: mainHead: main


📝 Commits (10+)

  • 69f5efe Build llama.cpp with SYCL support
  • 5fee46d Add gpu_info_oneapi
  • 3a465a3 Add oneapi to gpu.go
  • a7b5c8e Update llama.cpp
  • 7451db1 Fix oneAPI linking by using icx compiler and updating rpath
  • 8b46455 Add oneAPI integrated GPU detection
  • 5670164 Update rocky linux gcc version (rocky linux 9 only has gcc 12+)
  • 0c5346e Add oneapi docker build
  • 301691c fix: docker build and refactor code
  • d836ffa Merge remote-tracking branch 'upstream/main'

📊 Changes

12 files changed (+627 additions, -18 deletions)

View changed files

📝 Dockerfile (+21 -1)
📝 gpu/gpu.go (+86 -3)
📝 gpu/gpu_info.h (+2 -1)
gpu/gpu_info_oneapi.c (+266 -0)
gpu/gpu_info_oneapi.h (+197 -0)
gpu/onapi_common.go (+21 -0)
📝 llm/generate/gen_common.sh (+0 -0)
📝 llm/generate/gen_linux.sh (+21 -0)
📝 scripts/build.sh (+0 -0)
📝 scripts/build_docker.sh (+12 -0)
📝 scripts/install.sh (+0 -0)
📝 scripts/rh_linux_deps.sh (+1 -13)

📄 Description

This is based on the original PR created by @felipeagc:main https://github.com/ollama/ollama/pull/2458.

It seems that the work on that pull request has come to a halt. I would like to work on this project in the next few days and accelerate the progress. I have tested the build with Ubuntu LTS and GPU Arc770.

I'm happy to progress the PR with the community feedback.

time=2024-04-21T17:39:51.870+05:30 level=INFO source=images.go:817 msg="total blobs: 0"
time=2024-04-21T17:39:51.870+05:30 level=INFO source=images.go:824 msg="total unused blobs removed: 0"
time=2024-04-21T17:39:51.874+05:30 level=INFO source=routes.go:1143 msg="Listening on 127.0.0.1:11434 (version 0.1.32-17-g91f1201-dirty)"
time=2024-04-21T17:39:51.874+05:30 level=INFO source=payload.go:28 msg="extracting embedded files" dir=/tmp/ollama2497595442/runners
time=2024-04-21T17:39:55.586+05:30 level=INFO source=payload.go:41 msg="Dynamic LLM libraries [cpu_avx cpu_avx2 cuda_v11 rocm_v60002 cpu]"
time=2024-04-21T17:39:55.586+05:30 level=INFO source=gpu.go:140 msg="Detecting GPU type"
time=2024-04-21T17:39:55.586+05:30 level=INFO source=gpu.go:320 msg="Searching for GPU management library libcudart.so*"
time=2024-04-21T17:39:55.588+05:30 level=INFO source=gpu.go:366 msg="Discovered GPU libraries: [/tmp/ollama2497595442/runners/cuda_v11/libcudart.so.11.0]"
time=2024-04-21T17:39:55.601+05:30 level=INFO source=gpu.go:395 msg="Unable to load cudart CUDA management library /tmp/ollama2497595442/runners/cuda_v11/libcudart.so.11.0: cudart init failure: 100"
time=2024-04-21T17:39:55.601+05:30 level=INFO source=gpu.go:320 msg="Searching for GPU management library libnvidia-ml.so"
time=2024-04-21T17:39:55.603+05:30 level=INFO source=gpu.go:366 msg="Discovered GPU libraries: [/usr/lib/x86_64-linux-gnu/libnvidia-ml.so.535.171.04]"
time=2024-04-21T17:39:55.608+05:30 level=INFO source=gpu.go:378 msg="Unable to load NVML management library /usr/lib/x86_64-linux-gnu/libnvidia-ml.so.535.171.04: nvml vram init failure: 9"
time=2024-04-21T17:39:55.608+05:30 level=INFO source=gpu.go:320 msg="Searching for GPU management library libze_intel_gpu.so"
time=2024-04-21T17:39:55.610+05:30 level=INFO source=gpu.go:366 msg="Discovered GPU libraries: [/usr/lib/x86_64-linux-gnu/libze_intel_gpu.so.1.3.28202.51]"
time=2024-04-21T17:39:55.662+05:30 level=INFO source=gpu.go:166 msg="Intel GPU detected"
time=2024-04-21T17:39:55.662+05:30 level=INFO source=cpu_common.go:11 msg="CPU has AVX2"

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/3796 **Author:** [@gamunu](https://github.com/gamunu) **Created:** 4/21/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (10+) - [`69f5efe`](https://github.com/ollama/ollama/commit/69f5efee0f62d59adfb5d838e0029fd62e48b060) Build llama.cpp with SYCL support - [`5fee46d`](https://github.com/ollama/ollama/commit/5fee46def09f6e459beab5a81781772d7dc03afd) Add gpu_info_oneapi - [`3a465a3`](https://github.com/ollama/ollama/commit/3a465a357c5ec8d229492f5752cfefc65b1984b3) Add oneapi to gpu.go - [`a7b5c8e`](https://github.com/ollama/ollama/commit/a7b5c8e6524100a84a3158534f53c557493a985b) Update llama.cpp - [`7451db1`](https://github.com/ollama/ollama/commit/7451db16579f9af00eb3386f536cc97c12749eee) Fix oneAPI linking by using icx compiler and updating rpath - [`8b46455`](https://github.com/ollama/ollama/commit/8b4645596f4e90411a38c23e023055192d46ad0f) Add oneAPI integrated GPU detection - [`5670164`](https://github.com/ollama/ollama/commit/567016448753a5b2b2b7d9f663ccc4c4e47318e8) Update rocky linux gcc version (rocky linux 9 only has gcc 12+) - [`0c5346e`](https://github.com/ollama/ollama/commit/0c5346e55731d8d9466d18766cb98169edbecab5) Add oneapi docker build - [`301691c`](https://github.com/ollama/ollama/commit/301691cd7d1530ed9c36e707bd6b5641c4ac65dd) fix: docker build and refactor code - [`d836ffa`](https://github.com/ollama/ollama/commit/d836ffa3a262ff2d6e9a2ce80d2080fc1cc58941) Merge remote-tracking branch 'upstream/main' ### 📊 Changes **12 files changed** (+627 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `Dockerfile` (+21 -1) 📝 `gpu/gpu.go` (+86 -3) 📝 `gpu/gpu_info.h` (+2 -1) ➕ `gpu/gpu_info_oneapi.c` (+266 -0) ➕ `gpu/gpu_info_oneapi.h` (+197 -0) ➕ `gpu/onapi_common.go` (+21 -0) 📝 `llm/generate/gen_common.sh` (+0 -0) 📝 `llm/generate/gen_linux.sh` (+21 -0) 📝 `scripts/build.sh` (+0 -0) 📝 `scripts/build_docker.sh` (+12 -0) 📝 `scripts/install.sh` (+0 -0) 📝 `scripts/rh_linux_deps.sh` (+1 -13) </details> ### 📄 Description This is based on the original PR created by @felipeagc:main https://github.com/ollama/ollama/pull/2458. It seems that the work on that pull request has come to a halt. I would like to work on this project in the next few days and accelerate the progress. I have tested the build with Ubuntu LTS and GPU Arc770. I'm happy to progress the PR with the community feedback. ```log time=2024-04-21T17:39:51.870+05:30 level=INFO source=images.go:817 msg="total blobs: 0" time=2024-04-21T17:39:51.870+05:30 level=INFO source=images.go:824 msg="total unused blobs removed: 0" time=2024-04-21T17:39:51.874+05:30 level=INFO source=routes.go:1143 msg="Listening on 127.0.0.1:11434 (version 0.1.32-17-g91f1201-dirty)" time=2024-04-21T17:39:51.874+05:30 level=INFO source=payload.go:28 msg="extracting embedded files" dir=/tmp/ollama2497595442/runners time=2024-04-21T17:39:55.586+05:30 level=INFO source=payload.go:41 msg="Dynamic LLM libraries [cpu_avx cpu_avx2 cuda_v11 rocm_v60002 cpu]" time=2024-04-21T17:39:55.586+05:30 level=INFO source=gpu.go:140 msg="Detecting GPU type" time=2024-04-21T17:39:55.586+05:30 level=INFO source=gpu.go:320 msg="Searching for GPU management library libcudart.so*" time=2024-04-21T17:39:55.588+05:30 level=INFO source=gpu.go:366 msg="Discovered GPU libraries: [/tmp/ollama2497595442/runners/cuda_v11/libcudart.so.11.0]" time=2024-04-21T17:39:55.601+05:30 level=INFO source=gpu.go:395 msg="Unable to load cudart CUDA management library /tmp/ollama2497595442/runners/cuda_v11/libcudart.so.11.0: cudart init failure: 100" time=2024-04-21T17:39:55.601+05:30 level=INFO source=gpu.go:320 msg="Searching for GPU management library libnvidia-ml.so" time=2024-04-21T17:39:55.603+05:30 level=INFO source=gpu.go:366 msg="Discovered GPU libraries: [/usr/lib/x86_64-linux-gnu/libnvidia-ml.so.535.171.04]" time=2024-04-21T17:39:55.608+05:30 level=INFO source=gpu.go:378 msg="Unable to load NVML management library /usr/lib/x86_64-linux-gnu/libnvidia-ml.so.535.171.04: nvml vram init failure: 9" time=2024-04-21T17:39:55.608+05:30 level=INFO source=gpu.go:320 msg="Searching for GPU management library libze_intel_gpu.so" time=2024-04-21T17:39:55.610+05:30 level=INFO source=gpu.go:366 msg="Discovered GPU libraries: [/usr/lib/x86_64-linux-gnu/libze_intel_gpu.so.1.3.28202.51]" time=2024-04-21T17:39:55.662+05:30 level=INFO source=gpu.go:166 msg="Intel GPU detected" time=2024-04-21T17:39:55.662+05:30 level=INFO source=cpu_common.go:11 msg="CPU has AVX2" ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-12 23:26:38 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#11283