Skip to content

Commit 58b1b12

Browse files
committed
cont : add ROCM workflow
1 parent 91f690a commit 58b1b12

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1397,6 +1397,20 @@ jobs:
13971397
vulkaninfo
13981398
GG_BUILD_VULKAN=1 bash ./ci/run.sh ~/results/llama.cpp /mnt/llama.cpp
13991399
1400+
ggml-ci-x64-amd-v710-rocm:
1401+
runs-on: [self-hosted, Linux, X64, AMD, V710]
1402+
1403+
steps:
1404+
- name: Clone
1405+
id: checkout
1406+
uses: actions/checkout@v4
1407+
1408+
- name: Test
1409+
id: ggml-ci
1410+
run: |
1411+
vulkaninfo
1412+
GG_BUILD_ROCM=1 GG_BUILD_AMDGPU_TARGETS="gfx1101" bash ./ci/run.sh ~/results/llama.cpp /mnt/llama.cpp
1413+
14001414
ggml-ci-mac-metal:
14011415
runs-on: [self-hosted, macOS, ARM64]
14021416

ci/run.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,16 @@ if [ ! -z ${GG_BUILD_CUDA} ]; then
6565
fi
6666
fi
6767

68+
if [ ! -z ${GG_BUILD_ROCM} ]; then
69+
CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_HIP=ON"
70+
if [ -z ${GG_BUILD_AMDGPU_TARGETS} ]; then
71+
echo "Missing GG_BUILD_AMDGPU_TARGETS, please set it to your GPU architecture (e.g. gfx90a, gfx1100, etc.)"
72+
exit 1
73+
fi
74+
75+
CMAKE_EXTRA="${CMAKE_EXTRA} -DAMDGPU_TARGETS=${GG_BUILD_AMDGPU_TARGETS}"
76+
fi
77+
6878
if [ ! -z ${GG_BUILD_SYCL} ]; then
6979
if [ -z ${ONEAPI_ROOT} ]; then
7080
echo "Not detected ONEAPI_ROOT, please install oneAPI base toolkit and enable it by:"
@@ -883,7 +893,7 @@ if [ -z ${GG_BUILD_LOW_PERF} ]; then
883893
fi
884894

885895
if [ -z ${GG_BUILD_VRAM_GB} ] || [ ${GG_BUILD_VRAM_GB} -ge 8 ]; then
886-
if [ -z ${GG_BUILD_CUDA} ] && [ -z ${GG_BUILD_VULKAN} ]; then
896+
if [ -z ${GG_BUILD_CUDA} ] && [ -z ${GG_BUILD_VULKAN} ] && [ -z ${GG_BUILD_ROCM} ] && [ -z ${GG_BUILD_METAL} ]; then
887897
test $ret -eq 0 && gg_run pythia_1_4b
888898
else
889899
test $ret -eq 0 && gg_run pythia_2_8b

0 commit comments

Comments
 (0)