Skip to content

Commit ab02bb1

Browse files
committed
Merge branch 'master' into quantize
2 parents a369469 + 7f76692 commit ab02bb1

File tree

403 files changed

+39679
-22014
lines changed

Some content is hidden

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

403 files changed

+39679
-22014
lines changed

.clang-format

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ AllowShortIfStatementsOnASingleLine: Never
2222
AllowShortLambdasOnASingleLine: Inline
2323
AllowShortLoopsOnASingleLine: false
2424
AlwaysBreakBeforeMultilineStrings: true
25+
# Treat CUDA keywords/attributes as "attribute macros" and avoid breaking lines inside them
26+
AttributeMacros:
27+
- __host__
28+
- __device__
29+
- __global__
30+
- __forceinline__
31+
- __launch_bounds__
2532
BinPackArguments: true
2633
BinPackParameters: false # OnePerLine
2734
BitFieldColonSpacing: Both

.devops/rocm.Dockerfile

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,11 @@ FROM ${BASE_ROCM_DEV_CONTAINER} AS build
1717
# gfx906 is deprecated
1818
#check https://rocm.docs.amd.com/projects/install-on-linux/en/docs-6.4.1/reference/system-requirements.html
1919

20-
ARG ROCM_DOCKER_ARCH='gfx803,gfx900,gfx906,gfx908,gfx90a,gfx942,gfx1010,gfx1030,gfx1032,gfx1100,gfx1101,gfx1102,gfx1200,gfx1201'
21-
#ARG ROCM_DOCKER_ARCH=gfx1100
20+
ARG ROCM_DOCKER_ARCH='gfx803;gfx900;gfx906;gfx908;gfx90a;gfx942;gfx1010;gfx1030;gfx1032;gfx1100;gfx1101;gfx1102;gfx1200;gfx1201;gfx1151'
21+
#ARG ROCM_DOCKER_ARCH='gfx1151'
2222

23-
# Set ROCm architectured
23+
# Set ROCm architectures
2424
ENV AMDGPU_TARGETS=${ROCM_DOCKER_ARCH}
25-
# Enable ROCm
26-
# ENV CC=/opt/rocm/llvm/bin/clang
27-
# ENV CXX=/opt/rocm/llvm/bin/clang++
2825

2926
RUN apt-get update \
3027
&& apt-get install -y \
@@ -39,8 +36,16 @@ WORKDIR /app
3936

4037
COPY . .
4138

39+
RUN git clone https://github.com/rocm/rocwmma --branch develop --depth 1
40+
4241
RUN HIPCXX="$(hipconfig -l)/clang" HIP_PATH="$(hipconfig -R)" \
43-
cmake -S . -B build -DGGML_HIP=ON -DAMDGPU_TARGETS=$ROCM_DOCKER_ARCH -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DCMAKE_BUILD_TYPE=Release -DLLAMA_BUILD_TESTS=OFF \
42+
cmake -S . -B build \
43+
-DGGML_HIP=ON \
44+
-DGGML_HIP_ROCWMMA_FATTN=ON \
45+
-DCMAKE_HIP_FLAGS="-I$(pwd)/rocwmma/library/include/" \
46+
-DAMDGPU_TARGETS="$ROCM_DOCKER_ARCH" \
47+
-DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON \
48+
-DCMAKE_BUILD_TYPE=Release -DLLAMA_BUILD_TESTS=OFF \
4449
&& cmake --build build --config Release -j$(nproc)
4550

4651
RUN mkdir -p /app/lib \

.editorconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,11 @@ insert_final_newline = unset
5252
[vendor/miniaudio/miniaudio.h]
5353
trim_trailing_whitespace = unset
5454
insert_final_newline = unset
55+
56+
[tools/server/webui/**]
57+
indent_style = unset
58+
indent_size = unset
59+
end_of_line = unset
60+
charset = unset
61+
trim_trailing_whitespace = unset
62+
insert_final_newline = unset

.github/workflows/build.yml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ env:
5656

5757
jobs:
5858
macOS-latest-cmake-arm64:
59-
runs-on: macos-14
59+
runs-on: macos-latest
6060

6161
steps:
6262
- name: Clone
@@ -138,7 +138,7 @@ jobs:
138138
ctest -L main --verbose --timeout 900
139139
140140
macOS-latest-cmake-arm64-webgpu:
141-
runs-on: macos-14
141+
runs-on: macos-latest
142142

143143
steps:
144144
- name: Clone
@@ -711,6 +711,7 @@ jobs:
711711
712712
macOS-latest-swift:
713713
runs-on: macos-latest
714+
needs: ios-xcode-build
714715

715716
strategy:
716717
matrix:
@@ -727,6 +728,12 @@ jobs:
727728
key: macOS-latest-swift
728729
evict-old-files: 1d
729730

731+
- name: Download xcframework artifact
732+
uses: actions/download-artifact@v4
733+
with:
734+
name: llama-xcframework
735+
path: build-apple/llama.xcframework/
736+
730737
- name: Dependencies
731738
id: depends
732739
continue-on-error: true
@@ -748,11 +755,6 @@ jobs:
748755
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
749756
cmake --build build --config Release -j $(sysctl -n hw.logicalcpu)
750757
751-
- name: xcodebuild for swift package
752-
id: xcodebuild
753-
run: |
754-
./build-xcframework.sh
755-
756758
windows-msys2:
757759
runs-on: windows-2025
758760

@@ -1170,8 +1172,17 @@ jobs:
11701172
run: |
11711173
./build-xcframework.sh
11721174
1175+
- name: Upload xcframework artifact
1176+
uses: actions/upload-artifact@v4
1177+
with:
1178+
name: llama-xcframework
1179+
path: build-apple/llama.xcframework/
1180+
retention-days: 1
1181+
11731182
- name: Build Xcode project
1174-
run: xcodebuild -project examples/llama.swiftui/llama.swiftui.xcodeproj -scheme llama.swiftui -sdk iphoneos CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= -destination 'generic/platform=iOS' FRAMEWORK_FOLDER_PATH=./build-ios build
1183+
run: |
1184+
xcodebuild -downloadPlatform iOS
1185+
xcodebuild -project examples/llama.swiftui/llama.swiftui.xcodeproj -scheme llama.swiftui -sdk iphoneos CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= -destination 'generic/platform=iOS' FRAMEWORK_FOLDER_PATH=./build-ios build
11751186
11761187
android-build:
11771188
runs-on: ubuntu-latest

.github/workflows/release.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -530,15 +530,13 @@ jobs:
530530
runs-on: windows-2022
531531

532532
env:
533-
# The ROCm version must correspond to the version used in the HIP SDK.
534-
ROCM_VERSION: "6.4.2"
535533
HIPSDK_INSTALLER_VERSION: "25.Q3"
536534

537535
strategy:
538536
matrix:
539537
include:
540538
- name: "radeon"
541-
gpu_targets: "gfx1200;gfx1201;gfx1100;gfx1101;gfx1102;gfx1030;gfx1031;gfx1032"
539+
gpu_targets: "gfx1151;gfx1200;gfx1201;gfx1100;gfx1101;gfx1102;gfx1030;gfx1031;gfx1032"
542540

543541
steps:
544542
- name: Clone
@@ -548,7 +546,7 @@ jobs:
548546
- name: Clone rocWMMA repository
549547
id: clone_rocwmma
550548
run: |
551-
git clone https://github.com/rocm/rocwmma --branch rocm-${{ env.ROCM_VERSION }} --depth 1
549+
git clone https://github.com/rocm/rocwmma --branch develop --depth 1
552550
553551
- name: Cache ROCm Installation
554552
id: cache-rocm

0 commit comments

Comments
 (0)