@@ -966,9 +966,31 @@ jobs:
966966          path : llama-${{ steps.tag.outputs.name }}-bin-win-sycl-x64.zip 
967967          name : llama-bin-win-sycl-x64.zip 
968968
969+   windows-latest-cmake-hip-calculate-target :
970+     runs-on : windows-latest 
971+     outputs :
972+       gpu_targets : ${{ steps.set_gpu_targets.outputs.gpu_targets }} 
973+ 
974+     steps :
975+       - name : Set GPU targets 
976+         id : set_gpu_targets 
977+         if : ${{ github.event.inputs.create_release != 'true' }} 
978+         run : | 
979+           echo 'gpu_target=["gfx1100", "gfx1101", "gfx1030"]' >> "$GITHUB_OUTPUT" 
980+ 
981+        - name : Set GPU targets 
982+         id : set_gpu_targets 
983+         if : ${{ github.event.inputs.create_release == 'true' }} 
984+         run : | 
985+           echo 'gpu_target=["gfx1100"]' >> "$GITHUB_OUTPUT" 
986+ 
969987   windows-latest-cmake-hip :
970988    runs-on : windows-latest 
971989
990+     strategy :
991+       matrix :
992+         gpu_target : ${{ fromJSON(needs.hip_gpu_target_calculate.outputs.gpu_targets) }} 
993+ 
972994    steps :
973995      - name : Clone 
974996        id : checkout 
@@ -994,8 +1016,38 @@ jobs:
9941016        run : | 
9951017          $env:HIP_PATH=$(Resolve-Path 'C:\Program Files\AMD\ROCm\*\bin\clang.exe' | split-path | split-path) 
9961018          $env:CMAKE_PREFIX_PATH="${env:HIP_PATH}" 
997-           cmake -G "Unix Makefiles" -B build -S . -DCMAKE_C_COMPILER="${env:HIP_PATH}\bin\clang.exe" -DCMAKE_CXX_COMPILER="${env:HIP_PATH}\bin\clang++.exe" -DGGML_HIPBLAS=ON 
998-           cmake --build build --config Release 
1019+           cmake -G "Unix Makefiles" -B build -S . -DCMAKE_C_COMPILER="${env:HIP_PATH}\bin\clang.exe" -DCMAKE_CXX_COMPILER="${env:HIP_PATH}\bin\clang++.exe" -DGGML_HIPBLAS=ON -DCMAKE_BUILD_TYPE=Release -DGPU_TARGETS=${{ matrix.gpu_target }} -DGGML_RPC=ON 
1020+           cmake --build build -j ${env:NUMBER_OF_PROCESSORS} 
1021+           md "build\bin\rocblas\library\" 
1022+           cp "${env:HIP_PATH}\bin\hipblas.dll" "build\bin\" 
1023+           cp "${env:HIP_PATH}\bin\rocblas.dll" "build\bin\" 
1024+           cp "${env:HIP_PATH}\bin\rocblas\library\*" "build\bin\rocblas\library\" 
1025+ 
1026+        - name : Determine tag name 
1027+         id : tag 
1028+         shell : bash 
1029+         run : | 
1030+           BUILD_NUMBER="$(git rev-list --count HEAD)" 
1031+           SHORT_HASH="$(git rev-parse --short=7 HEAD)" 
1032+           if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then 
1033+             echo "name=b${BUILD_NUMBER}" >> $GITHUB_OUTPUT 
1034+           else 
1035+             SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-') 
1036+             echo "name=${SAFE_NAME}-b${BUILD_NUMBER}-${SHORT_HASH}" >> $GITHUB_OUTPUT 
1037+           fi 
1038+ 
1039+        - name : Pack artifacts 
1040+         id : pack_artifacts 
1041+         if : ${{ github.event.inputs.create_release == 'true' }} 
1042+         run : | 
1043+           7z a llama-${{ steps.tag.outputs.name }}-bin-win-hip-x64-${{ matrix.gpu_target }}.zip .\build\bin\* 
1044+ 
1045+        - name : Upload artifacts 
1046+         if : ${{ github.event.inputs.create_release == 'true' }} 
1047+         uses : actions/upload-artifact@v4 
1048+         with :
1049+           path : llama-${{ steps.tag.outputs.name }}-bin-win-hip-x64-${{ matrix.gpu_target }}.zip 
1050+           name : llama-bin-win-hip-x64-${{ matrix.gpu_target }}.zip 
9991051
10001052  ios-xcode-build :
10011053    runs-on : macos-latest 
@@ -1060,6 +1112,7 @@ jobs:
10601112      - macOS-latest-cmake 
10611113      - windows-latest-cmake 
10621114      - windows-latest-cmake-cuda 
1115+       - windows-latest-cmake-hip 
10631116      - macOS-latest-cmake-arm64 
10641117      - macOS-latest-cmake-x64 
10651118
0 commit comments