@@ -467,6 +467,7 @@ jobs:
467
467
run : |
468
468
cmake -B build -S . \
469
469
-DCMAKE_HIP_COMPILER="$(hipconfig -l)/clang" \
470
+ -DGGML_HIP_ROCWMMA_FATTN=ON \
470
471
-DGGML_HIP=ON
471
472
cmake --build build --config Release -j $(nproc)
472
473
@@ -476,6 +477,7 @@ jobs:
476
477
cmake -B build2 -S . \
477
478
-DCMAKE_C_COMPILER=hipcc \
478
479
-DCMAKE_CXX_COMPILER=hipcc \
480
+ -DGGML_HIP_ROCWMMA_FATTN=ON \
479
481
-DGGML_HIP=ON
480
482
cmake --build build2 --config Release -j $(nproc)
481
483
@@ -710,12 +712,11 @@ jobs:
710
712
-DLLAMA_BUILD_SERVER=OFF \
711
713
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
712
714
cmake --build build --config Release -j $(sysctl -n hw.logicalcpu)
713
- sudo cmake --install build --config Release
714
715
715
716
- name : xcodebuild for swift package
716
717
id : xcodebuild
717
718
run : |
718
- xcodebuild -scheme llama-Package -destination "${{ matrix.destination }}"
719
+ ./build-xcframework.sh
719
720
720
721
windows-msys2 :
721
722
runs-on : windows-latest
@@ -773,7 +774,7 @@ jobs:
773
774
env :
774
775
OPENBLAS_VERSION : 0.3.23
775
776
SDE_VERSION : 9.33.0-2024-01-07
776
- VULKAN_VERSION : 1.3.261 .1
777
+ VULKAN_VERSION : 1.4.304 .1
777
778
778
779
strategy :
779
780
matrix :
@@ -1203,6 +1204,11 @@ jobs:
1203
1204
id : checkout
1204
1205
uses : actions/checkout@v4
1205
1206
1207
+ - name : Clone rocWMMA repository
1208
+ id : clone_rocwmma
1209
+ run : |
1210
+ git clone https://github.com/rocm/rocwmma --branch rocm-6.2.4 --depth 1
1211
+
1206
1212
- name : Install
1207
1213
id : depends
1208
1214
run : |
@@ -1232,8 +1238,10 @@ jobs:
1232
1238
cmake -G "Unix Makefiles" -B build -S . `
1233
1239
-DCMAKE_C_COMPILER="${env:HIP_PATH}\bin\clang.exe" `
1234
1240
-DCMAKE_CXX_COMPILER="${env:HIP_PATH}\bin\clang++.exe" `
1241
+ -DCMAKE_CXX_FLAGS="-I$($PWD.Path.Replace('\', '/'))/rocwmma/library/include/" `
1235
1242
-DCMAKE_BUILD_TYPE=Release `
1236
1243
-DGGML_HIP=ON `
1244
+ -DGGML_HIP_ROCWMMA_FATTN=ON `
1237
1245
-DGGML_RPC=ON
1238
1246
cmake --build build -j ${env:NUMBER_OF_PROCESSORS}
1239
1247
@@ -1252,6 +1260,11 @@ jobs:
1252
1260
with :
1253
1261
fetch-depth : 0
1254
1262
1263
+ - name : Clone rocWMMA repository
1264
+ id : clone_rocwmma
1265
+ run : |
1266
+ git clone https://github.com/rocm/rocwmma --branch rocm-6.2.4 --depth 1
1267
+
1255
1268
- name : ccache
1256
1269
uses :
hendrikmuhs/[email protected]
1257
1270
with :
@@ -1281,8 +1294,10 @@ jobs:
1281
1294
cmake -G "Unix Makefiles" -B build -S . `
1282
1295
-DCMAKE_C_COMPILER="${env:HIP_PATH}\bin\clang.exe" `
1283
1296
-DCMAKE_CXX_COMPILER="${env:HIP_PATH}\bin\clang++.exe" `
1297
+ -DCMAKE_CXX_FLAGS="-I$($PWD.Path.Replace('\', '/'))/rocwmma/library/include/" `
1284
1298
-DCMAKE_BUILD_TYPE=Release `
1285
1299
-DAMDGPU_TARGETS=${{ matrix.gpu_target }} `
1300
+ -DGGML_HIP_ROCWMMA_FATTN=ON `
1286
1301
-DGGML_HIP=ON `
1287
1302
-DGGML_RPC=ON
1288
1303
cmake --build build -j ${env:NUMBER_OF_PROCESSORS}
@@ -1321,6 +1336,8 @@ jobs:
1321
1336
steps :
1322
1337
- name : Checkout code
1323
1338
uses : actions/checkout@v4
1339
+ with :
1340
+ fetch-depth : 0
1324
1341
1325
1342
- name : Build
1326
1343
id : cmake_build
@@ -1336,15 +1353,40 @@ jobs:
1336
1353
-DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 \
1337
1354
-DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM=ggml
1338
1355
cmake --build build --config Release -j $(sysctl -n hw.logicalcpu) -- CODE_SIGNING_ALLOWED=NO
1339
- sudo cmake --install build --config Release
1340
1356
1341
1357
- name : xcodebuild for swift package
1342
1358
id : xcodebuild
1343
1359
run : |
1344
- xcodebuild -scheme llama-Package -destination 'generic/platform=iOS'
1360
+ ./build-xcframework.sh
1345
1361
1346
1362
- name : Build Xcode project
1347
- 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' build
1363
+ 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
1364
+
1365
+ - name : Determine tag name
1366
+ id : tag
1367
+ shell : bash
1368
+ run : |
1369
+ BUILD_NUMBER="$(git rev-list --count HEAD)"
1370
+ SHORT_HASH="$(git rev-parse --short=7 HEAD)"
1371
+ if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
1372
+ echo "name=b${BUILD_NUMBER}" >> $GITHUB_OUTPUT
1373
+ else
1374
+ SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
1375
+ echo "name=${SAFE_NAME}-b${BUILD_NUMBER}-${SHORT_HASH}" >> $GITHUB_OUTPUT
1376
+ fi
1377
+
1378
+ - name : Pack artifacts
1379
+ id : pack_artifacts
1380
+ if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
1381
+ run : |
1382
+ zip --symlinks -r llama-${{ steps.tag.outputs.name }}-xcframework.zip build-apple/llama.xcframework
1383
+
1384
+ - name : Upload artifacts
1385
+ if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
1386
+ uses : actions/upload-artifact@v4
1387
+ with :
1388
+ path : llama-${{ steps.tag.outputs.name }}-xcframework.zip
1389
+ name : llama-${{ steps.tag.outputs.name }}-xcframework
1348
1390
1349
1391
android-build :
1350
1392
runs-on : ubuntu-latest
0 commit comments