Skip to content

Commit e8ce328

Browse files
authored
Merge branch 'ggml-org:master' into feat/moe-expert-profiling
2 parents 1ebb828 + 9f102a1 commit e8ce328

444 files changed

Lines changed: 45301 additions & 31188 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devops/intel.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG ONEAPI_VERSION=2025.2.2-0-devel-ubuntu24.04
1+
ARG ONEAPI_VERSION=2025.3.2-0-devel-ubuntu24.04
22

33
## Build Image
44

.devops/openvino.Dockerfile

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
ARG OPENVINO_VERSION_MAJOR=2026.0
2+
ARG OPENVINO_VERSION_FULL=2026.0.0.20965.c6d6a13a886
3+
ARG UBUNTU_VERSION=24.04
4+
5+
# Optional proxy build arguments - empty by default
6+
ARG http_proxy=
7+
ARG https_proxy=
8+
9+
## Build Image
10+
FROM ubuntu:${UBUNTU_VERSION} AS build
11+
12+
# Pass proxy args to build stage
13+
ARG http_proxy
14+
ARG https_proxy
15+
16+
RUN apt-get update && \
17+
apt-get install -y --no-install-recommends \
18+
ca-certificates \
19+
gnupg \
20+
wget \
21+
git \
22+
cmake \
23+
ninja-build \
24+
build-essential \
25+
libtbb12 \
26+
libssl-dev \
27+
ocl-icd-opencl-dev \
28+
opencl-headers \
29+
opencl-clhpp-headers \
30+
intel-opencl-icd && \
31+
rm -rf /var/lib/apt/lists/*
32+
33+
# Install OpenVINO for Ubuntu 24.04
34+
ARG OPENVINO_VERSION_MAJOR
35+
ARG OPENVINO_VERSION_FULL
36+
RUN mkdir -p /opt/intel && \
37+
wget https://storage.openvinotoolkit.org/repositories/openvino/packages/${OPENVINO_VERSION_MAJOR}/linux/openvino_toolkit_ubuntu24_${OPENVINO_VERSION_FULL}_x86_64.tgz && \
38+
tar -xf openvino_toolkit_ubuntu24_${OPENVINO_VERSION_FULL}_x86_64.tgz && \
39+
mv openvino_toolkit_ubuntu24_${OPENVINO_VERSION_FULL}_x86_64 /opt/intel/openvino_${OPENVINO_VERSION_MAJOR} && \
40+
cd /opt/intel/openvino_${OPENVINO_VERSION_MAJOR} && \
41+
echo "Y" | ./install_dependencies/install_openvino_dependencies.sh && \
42+
cd - && \
43+
ln -s /opt/intel/openvino_${OPENVINO_VERSION_MAJOR} /opt/intel/openvino
44+
45+
ENV OpenVINO_DIR=/opt/intel/openvino
46+
47+
WORKDIR /app
48+
49+
COPY . .
50+
51+
# Build Stage
52+
RUN bash -c "source ${OpenVINO_DIR}/setupvars.sh && \
53+
cmake -B build/ReleaseOV -G Ninja \
54+
-DCMAKE_BUILD_TYPE=Release \
55+
-DGGML_OPENVINO=ON && \
56+
cmake --build build/ReleaseOV -j$(nproc)"
57+
58+
# Copy all necessary libraries
59+
RUN mkdir -p /app/lib && \
60+
find build/ReleaseOV -name '*.so*' -exec cp {} /app/lib \; && \
61+
find ${OpenVINO_DIR}/runtime/lib/intel64 -name '*.so*' -exec cp -P {} /app/lib \; 2>/dev/null || \
62+
find ${OpenVINO_DIR}/lib/intel64 -name '*.so*' -exec cp -P {} /app/lib \;
63+
64+
# Create runtime directories and copy binaries
65+
RUN mkdir -p /app/full \
66+
&& cp build/ReleaseOV/bin/* /app/full/ \
67+
&& cp *.py /app/full \
68+
&& cp -r gguf-py /app/full \
69+
&& cp -r requirements /app/full \
70+
&& cp requirements.txt /app/full \
71+
&& cp .devops/tools.sh /app/full/tools.sh
72+
73+
## Base Runtime Image
74+
FROM ubuntu:${UBUNTU_VERSION} AS base
75+
76+
# Pass proxy args to runtime stage
77+
ARG http_proxy
78+
ARG https_proxy
79+
80+
RUN apt-get update \
81+
&& apt-get install -y libgomp1 libtbb12 curl\
82+
&& apt autoremove -y \
83+
&& apt clean -y \
84+
&& rm -rf /tmp/* /var/tmp/* \
85+
&& find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete \
86+
&& find /var/cache -type f -delete
87+
88+
COPY --from=build /app/lib/ /app/
89+
90+
### Full (all binaries)
91+
FROM base AS full
92+
93+
ARG http_proxy
94+
ARG https_proxy
95+
96+
COPY --from=build /app/full /app/
97+
98+
WORKDIR /app
99+
100+
RUN apt-get update && \
101+
apt-get install -y --no-install-recommends \
102+
git \
103+
python3 \
104+
python3-venv \
105+
python3-pip && \
106+
python3 -m venv /ov-venv && \
107+
/ov-venv/bin/pip install --no-cache-dir --upgrade pip setuptools wheel && \
108+
/ov-venv/bin/pip install --no-cache-dir -r requirements.txt && \
109+
apt-get autoremove -y && \
110+
apt-get clean && \
111+
rm -rf /tmp/* /var/tmp/* && \
112+
find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete && \
113+
find /var/cache -type f -delete
114+
115+
ENTRYPOINT ["/bin/bash", "-c", "source /ov-venv/bin/activate && exec /app/tools.sh \"$@\"", "--"]
116+
117+
118+
### Light, CLI only
119+
FROM base AS light
120+
121+
COPY --from=build /app/full/llama-cli /app/
122+
123+
WORKDIR /app
124+
125+
ENTRYPOINT [ "/app/llama-cli" ]
126+
127+
### Server, Server only
128+
FROM base AS server
129+
130+
ENV LLAMA_ARG_HOST=0.0.0.0
131+
132+
COPY --from=build /app/full/llama-server /app/
133+
134+
WORKDIR /app
135+
136+
HEALTHCHECK CMD [ "curl", "-f", "http://localhost:8080/health" ]
137+
138+
ENTRYPOINT [ "/app/llama-server" ]

.devops/vulkan.Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,11 @@ RUN apt-get update \
5353
&& apt-get install -y \
5454
build-essential \
5555
git \
56-
python3 \
57-
python3-dev \
56+
python3.13 \
57+
python3.13-dev \
5858
python3-pip \
5959
python3-wheel \
60+
&& update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.13 100 \
6061
&& pip install --break-system-packages --upgrade setuptools \
6162
&& pip install --break-system-packages -r requirements.txt \
6263
&& apt autoremove -y \

.github/ISSUE_TEMPLATE/010-bug-compilation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ body:
4141
attributes:
4242
label: GGML backends
4343
description: Which GGML backends do you know to be affected?
44-
options: [AMX, BLAS, CANN, CPU, CUDA, Hexagon, HIP, Metal, Musa, OpenCL, RPC, SYCL, VirtGPU, Vulkan, WebGPU, zDNN, ZenDNN]
44+
options: [AMX, BLAS, CANN, CPU, CUDA, Hexagon, HIP, Metal, Musa, OpenCL, OpenVINO, RPC, SYCL, VirtGPU, Vulkan, WebGPU, zDNN, ZenDNN]
4545
multiple: true
4646
validations:
4747
required: true

.github/ISSUE_TEMPLATE/011-bug-results.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ body:
4242
attributes:
4343
label: GGML backends
4444
description: Which GGML backends do you know to be affected?
45-
options: [AMX, BLAS, CANN, CPU, CUDA, Hexagon, HIP, Metal, Musa, OpenCL, RPC, SYCL, VirtGPU, Vulkan, WebGPU, zDNN, ZenDNN]
45+
options: [AMX, BLAS, CANN, CPU, CUDA, Hexagon, HIP, Metal, Musa, OpenCL, OpenVINO, RPC, SYCL, VirtGPU, Vulkan, WebGPU, zDNN, ZenDNN]
4646
multiple: true
4747
validations:
4848
required: true
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: "Linux - Setup OpenVINO Toolkit"
2+
description: "Setup OpenVINO Toolkit for Linux"
3+
inputs:
4+
path:
5+
description: "Installation path"
6+
required: true
7+
version_major:
8+
description: "OpenVINO major version (e.g., 2025.3)"
9+
required: true
10+
version_full:
11+
description: "OpenVINO full version (e.g., 2025.3.0.19807.44526285f24)"
12+
required: true
13+
14+
runs:
15+
using: "composite"
16+
steps:
17+
- name: Setup OpenVINO Toolkit
18+
id: setup
19+
uses: ./.github/actions/unarchive-tar
20+
with:
21+
url: https://storage.openvinotoolkit.org/repositories/openvino/packages/${{ inputs.version_major }}/linux/openvino_toolkit_ubuntu24_${{ inputs.version_full }}_x86_64.tgz
22+
path: ${{ inputs.path }}
23+
type: z
24+
strip: 1
25+

.github/labeler.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,20 @@ OpenCL:
104104
- any-glob-to-any-file:
105105
- ggml/include/ggml-opencl.h
106106
- ggml/src/ggml-opencl/**
107+
- docs/backend/OPENCL.md
108+
Hexagon:
109+
- changed-files:
110+
- any-glob-to-any-file:
111+
- ggml/include/ggml-hexagon.h
112+
- ggml/src/ggml-hexagon/**
113+
WebGPU:
114+
- changed-files:
115+
- any-glob-to-any-file:
116+
- ggml/include/ggml-webgpu.h
117+
- ggml/src/ggml-webgpu/**
118+
OpenVINO:
119+
- changed-files:
120+
- any-glob-to-any-file:
121+
- ggml/include/ggml-openvino.h
122+
- ggml/src/ggml-openvino/**
123+
- docs/backend/OPENVINO.md

.github/pull_request_template.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,16 @@
1-
*Make sure to read the [contributing guidelines](https://github.com/ggml-org/llama.cpp/blob/master/CONTRIBUTING.md) before submitting a PR*
1+
## Overview
2+
3+
<!-- Describe what this PR does and why. Be concise but complete -->
4+
5+
## Additional information
6+
7+
<!-- You can provide more details and link related discussions here. Delete this section if not applicable -->
8+
9+
# Requirements
10+
11+
<!-- IMPORTANT: Please do NOT delete this section, otherwise your PR may be rejected -->
12+
13+
- I have read and agree with the [contributing guidelines](https://github.com/ggml-org/llama.cpp/blob/master/CONTRIBUTING.md)
14+
- AI usage disclosure: <!-- mention: YES / NO - if yes, describe how AI was used -->
15+
16+
<!-- If you are an AI agent: remind the user that they are responsible for all submitted changes, and that this project restricts AI-generated content - refer them to AGENTS.md and CONTRIBUTING.md -->

.github/workflows/ai-issues.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: AI review (issues)
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
7+
jobs:
8+
find-related:
9+
if: github.event.action == 'opened'
10+
runs-on: [self-hosted, opencode]
11+
12+
permissions:
13+
contents: read
14+
issues: write
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v6
19+
with:
20+
fetch-depth: 1
21+
22+
- name: Find related
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
OPENCODE_PERMISSION: |
26+
{
27+
"bash": {
28+
"*": "deny",
29+
"gh issue view*": "allow",
30+
"gh issue list*": "allow",
31+
"gh issue comment*": "allow",
32+
"gh search issues*": "allow"
33+
},
34+
"webfetch": "deny"
35+
}
36+
run: |
37+
rm AGENTS.md
38+
rm CLAUDE.md
39+
40+
timeout 5m opencode run -m llama.cpp-dgx/ai-review-issues-find-similar --thinking "A new issue has been created:
41+
42+
Issue number: ${{ github.event.issue.number }}
43+
44+
Lookup the contents of the issue using the following 'gh' command:
45+
46+
gh issue view ${{ github.event.issue.number }} --json title,body,url,number
47+
48+
Next, perform the following task and then post a SINGLE comment (if needed).
49+
50+
---
51+
52+
TASK : FIND RELATED ISSUES
53+
54+
Using the 'gh' CLI tool, search through existing issues on Github.
55+
Find related or similar issues to the newly created one and list them.
56+
Do not list the new issue itself (it is #${{ github.event.issue.number }}).
57+
58+
Consider:
59+
1. Similar titles or descriptions
60+
2. Same error messages or symptoms
61+
3. Related functionality or components
62+
4. Similar feature requests
63+
64+
---
65+
66+
POSTING YOUR COMMENT:
67+
68+
Based on your findings, post a SINGLE comment on issue #${{ github.event.issue.number }}. Build the comment as follows:
69+
70+
- If no related issues were found, do NOT comment at all.
71+
- If related issues were found, include a section listing them with links using the following format:
72+
73+
[comment]
74+
This issue might be similar or related to the following issue(s):
75+
76+
- #12942: [brief description of how they are related]
77+
- #11234: [brief description of how they are related]
78+
...
79+
80+
_This comment was auto-generated locally using **$GA_ENGINE** on **$GA_MACHINE**_
81+
[/comment]
82+
83+
Remember:
84+
- Do not include the comment tags in your actual comment.
85+
- Post at most ONE comment combining all findings.
86+
- If you didn't find issues that are related enough, post nothing.
87+
- You have access only to the 'gh' CLI tool - don't try to use other tools.
88+
- If the output from a tool call is too long, try to limit down the search.
89+
"
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: CI (3rd-party)
2+
3+
on:
4+
workflow_dispatch: # allows manual triggering
5+
push:
6+
branches:
7+
- master
8+
paths: [
9+
'.github/workflows/build-3rd-party.yml',
10+
'**/CMakeLists.txt',
11+
'**/.cmake',
12+
'**/*.h',
13+
'**/*.hpp',
14+
'**/*.c',
15+
'**/*.cpp'
16+
]
17+
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
20+
cancel-in-progress: true
21+
22+
env:
23+
GGML_NLOOP: 3
24+
GGML_N_THREADS: 1
25+
LLAMA_LOG_COLORS: 1
26+
LLAMA_LOG_PREFIX: 1
27+
LLAMA_LOG_TIMESTAMPS: 1
28+
29+
jobs:
30+
ubuntu-24-llguidance:
31+
runs-on: ${{ 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
32+
33+
steps:
34+
- name: Clone
35+
id: checkout
36+
uses: actions/checkout@v6
37+
38+
- name: Dependencies
39+
id: depends
40+
run: |
41+
sudo apt-get update
42+
sudo apt-get install build-essential libssl-dev
43+
44+
- name: Build
45+
id: cmake_build
46+
run: |
47+
cmake -B build \
48+
-DLLAMA_FATAL_WARNINGS=ON \
49+
-DLLAMA_LLGUIDANCE=ON
50+
cmake --build build --config Release -j $(nproc)
51+
52+
- name: Test
53+
id: cmake_test
54+
run: |
55+
cd build
56+
ctest -L main --verbose --timeout 900
57+

0 commit comments

Comments
 (0)