Skip to content

Commit

Permalink
attempt building with Clang v17.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
YellowRoseCx committed Apr 26, 2024
1 parent 95f6e48 commit 628b56f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
37 changes: 18 additions & 19 deletions .github/workflows/tests-rocm-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ on:
workflow_dispatch:
inputs:
version:
description: 'Version tag of develop-koboldcpp-rocm to build: v1.62.2.yr0-ROCm-dev'
default: v1.62.2.yr0-ROCm-dev
description: 'Version tag of koboldcpp-rocm to build: v1.62.2.yr0-ROCm-dev'
default: v1.63.yr1-ROCm
required: false
type: string
workflow_call:
inputs:
version:
description: 'Version tag of develop-koboldcpp-rocm to build: v1.62.2.yr0-ROCm-dev'
default: v1.62.2.yr0-ROCm-dev
description: 'Version tag of koboldcpp-rocm to build: v1.62.2.yr0-ROCm-dev'
default: v1.63.yr1-ROCm
required: false
type: string

Expand All @@ -22,7 +22,7 @@ permissions:
jobs:
build_libs:
name: Build ROCm Lib
runs-on: windows-2019
runs-on: windows-latest
defaults:
run:
shell: pwsh
Expand All @@ -34,8 +34,8 @@ jobs:
ref: develop
submodules: 'recursive'

- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
# - name: Setup cmake
# uses: jwlawson/actions-setup-cmake@v2

- name: Setup MSYS2
uses: msys2/setup-msys2@v2
Expand All @@ -44,7 +44,6 @@ jobs:
install: >-
base-devel
mingw-w64-x86_64-toolchain
- name: Install ROCm SDK
run: |
curl -LO https://download.amd.com/developer/eula/rocm-hub/AMD-Software-PRO-Edition-23.Q4-Win10-Win11-For-HIP.exe
Expand All @@ -62,11 +61,11 @@ jobs:
run: |
python -m pip install cmake ninja
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v2
with:
version: "18.1.4"
force-url: "https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.4/LLVM-18.1.4-win64.exe"
# - name: Install LLVM and Clang
# uses: KyleMayes/install-llvm-action@v2
# with:
# version: "18.1.4"
# force-url: "https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.4/LLVM-18.1.4-win64.exe"

- name: Install PyInstaller
run: pip install pyinstaller==6.4.0 psutil
Expand All @@ -81,8 +80,8 @@ jobs:
Get-Location
cmake --version
clang --version
cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DLLAMA_HIPBLAS=ON -DHIP_PLATFORM=amd -DCMAKE_C_COMPILER="C:/Program Files/LLVM/bin/clang.exe" -DCMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang++.exe" -DAMDGPU_TARGETS="gfx803;gfx900;gfx906;gfx908;gfx90a;gfx1010;gfx1030;gfx1031;gfx1032;gfx1100;gfx1101;gfx1102"
cmake --build . --config Release -j ${env:NUMBER_OF_PROCESSORS}
cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLLAMA_HIPBLAS=ON -DHIP_PLATFORM=amd -DCMAKE_C_COMPILER="C:\Program Files\AMD\ROCm\5.7\bin\clang.exe" -DCMAKE_CXX_COMPILER="C:\Program Files\AMD\ROCm\5.7\bin\clang++.exe" -DAMDGPU_TARGETS="gfx803;gfx900;gfx906;gfx908;gfx90a;gfx1010;gfx1030;gfx1031;gfx1032;gfx1100;gfx1101;gfx1102"
cmake --build . --config RelWithDebInfo -j ${env:NUMBER_OF_PROCESSORS}
# $env:CC = 'C:\Program Files\AMD\ROCm\5.7\bin\clang.exe'
# $env:CXX = 'C:\Program Files\AMD\ROCm\5.7\bin\clang++.exe'
# cmake .. -DLLAMA_HIPBLAS=ON -DCMAKE_SYSTEM_VERSION="10.0.19041.0" -DCMAKE_C_COMPILER="C:/Program Files/AMD/ROCm/5.7/bin/clang.exe" -DCMAKE_CXX_COMPILER="C:/Program Files/AMD/ROCm/5.7/bin/clang++.exe" -DAMDGPU_TARGETS="gfx803;gfx900;gfx906;gfx908;gfx90a;gfx1010;gfx1030;gfx1031;gfx1032;gfx1100;gfx1101;gfx1102"
Expand Down Expand Up @@ -116,24 +115,24 @@ jobs:
copy "koboldcpp_rocm_files.zip" D:\a\koboldcpp-rocm\koboldcpp-rocm\dist
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4.1.6
with:
name: koboldcpp_hipblas-${{ inputs.version }}
path: D:\a\koboldcpp-rocm\koboldcpp-rocm\build\bin\koboldcpp_hipblas.dll

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

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4.1.6
with:
name: koboldcpp_rocm_zip-${{ inputs.version }}
path: D:\a\koboldcpp-rocm\koboldcpp-rocm\dist\koboldcpp_rocm_files.zip

- name: Upload files to a GitHub release
id: upload-release
uses: svenstaro/upload-release-action@2.6.1
uses: svenstaro/upload-release-action@2.9.0
continue-on-error: true
with:
file_glob: true
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ project("llama.cpp" C CXX)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS 1)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Release")
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Build type" FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "RelWithDebInfo")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(LLAMA_STANDALONE ON)
set(BUILD_SHARED_LIBS_DEFAULT ON)
Expand Down

0 comments on commit 628b56f

Please sign in to comment.