Skip to content

Commit

Permalink
Update tests-rocm-windows.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
YellowRoseCx authored Nov 5, 2023
1 parent 10dc997 commit 27cb2eb
Showing 1 changed file with 45 additions and 8 deletions.
53 changes: 45 additions & 8 deletions .github/workflows/tests-rocm-windows.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: Test build Koboldcpp-ROCm Windows
name: Test Build Koboldcpp-ROCm Windows

on:
workflow_dispatch:
inputs:
version:
description: 'Version tag of koboldcpp-rocm to test: v1.43.2-ROCm'
description: 'Version tag of koboldcpp-rocm to test: v1.48.1.yr0-ROCm'
default: latest
required: false
type: string
workflow_call:
inputs:
version:
description: 'Version tag of koboldcpp-rocm to test: v1.43.2-ROCm'
description: 'Version tag of koboldcpp-rocm to test: v1.48.1.yr0-ROCm'
default: latest
required: false
type: string
Expand All @@ -21,7 +21,7 @@ permissions:

jobs:
build_libs:
name: test ROCm Lib
name: Test Build ROCm Lib
runs-on: windows-latest
defaults:
run:
Expand Down Expand Up @@ -54,14 +54,51 @@ jobs:
- name: Install PyInstaller
run: pip install pyinstaller psutil

- name: Test Build Lib
run: |
$env:CC = 'C:\Program Files\AMD\ROCm\5.5\bin\clang.exe'
$env:CXX = 'C:\Program Files\AMD\ROCm\5.5\bin\clang++.exe'
$env:CMAKE_PREFIX_PATH = 'C:\Program Files\AMD\ROCm\5.5'
$env:VERBOSE = '1'
Set-Location 'D:\a\koboldcpp-rocm\koboldcpp-rocm'
mkdir 'build'
Set-Location 'D:\a\koboldcpp-rocm\koboldcpp-rocm\build'
Get-Location
cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DLLAMA_HIPBLAS=ON -DCMAKE_C_COMPILER="C:/Program Files/AMD/ROCm/5.5/bin/clang.exe" -DCMAKE_CXX_COMPILER="C:/Program Files/AMD/ROCm/5.5/bin/clang++.exe" -DAMDGPU_TARGETS="gfx803;gfx900;gfx906;gfx908;gfx90a;gfx1010;gfx1030;gfx1031;gfx1032;gfx1100;gfx1101;gfx1102"
cmake --build . -j2
- name: Copy ROCm DLLs and Run PyInstaller
run: |
Set-Location 'D:\a\koboldcpp-rocm\koboldcpp-rocm'
Get-Location
copy "C:\Program Files\AMD\ROCm\5.5\bin\hipblas.dll" .\
copy "C:\Program Files\AMD\ROCm\5.5\bin\rocblas.dll" .\
robocopy "C:\Program Files\AMD\ROCm\5.5\bin\rocblas" .\rocblas /MIR
curl -LO https://github.com/YellowRoseCx/koboldcpp-rocm/releases/download/v1.43.2-ROCm/gfx103132rocblasfiles.7z
7z x gfx103132rocblasfiles.7z
Set-Location 'D:\a\koboldcpp-rocm\koboldcpp-rocm\rocblas\library'
ls
pip install customtkinter
PyInstaller --noconfirm --onefile --collect-all customtkinter --clean --console --icon ".\niko.ico" --add-data "./klite.embd;." --add-data "D:\a\koboldcpp-rocm\koboldcpp-rocm\build\bin\koboldcpp_hipblas.dll;." --add-data "./hipblas.dll;." --add-data "./rocblas.dll;." --add-data "./rwkv_vocab.embd;." --add-data "./rwkv_world_vocab.embd;." --add-data "./rocblas;." --add-data "C:/Windows/System32/msvcp140.dll;." --add-data "C:/Windows/System32/vcruntime140_1.dll;." "./koboldcpp.py" -n "koboldcpp_rocm_only.exe"
# curl -LO https://github.com/YellowRoseCx/koboldcpp-rocm/releases/download/v1.43.2-ROCm/gfx103132rocblasfiles.7z
# 7z x gfx103132rocblasfiles.7z

- uses: actions/upload-artifact@v3
with:
name: koboldcpp_hipblas-${{ inputs.version }}
path: D:\a\koboldcpp-rocm\koboldcpp-rocm\build\bin\koboldcpp_hipblas.dll

- uses: actions/upload-artifact@v3
with:
name: koboldcpp_rocm_only-${{ inputs.version }}
path: D:\a\koboldcpp-rocm\koboldcpp-rocm\dist\koboldcpp_rocm_only.exe

# - name: Upload files to a GitHub release
# id: upload-release
# uses: svenstaro/[email protected]
# continue-on-error: true
# with:
# file: D:\a\koboldcpp-rocm\koboldcpp-rocm\dist\koboldcpp_rocm_only.exe
# release_name: KoboldCPP-${{ inputs.version }}
# tag: ${{ inputs.version }}
# file_glob: false
# make_latest: true
# overwrite: false

# Copy-Item 'D:\a\koboldcpp-rocm\koboldcpp-rocm\build\bin\koboldcpp_hipblas.dll' '..\..\build'

0 comments on commit 27cb2eb

Please sign in to comment.