Skip to content

Commit c2ab6fe

Browse files
alitariq4589mmhus
andauthored
ci : Cloud-V for RISC-V builds (ggml-org#3160)
* Added Cloud-V File * Replaced Makefile with original one --------- Co-authored-by: moiz.hussain <[email protected]>
1 parent 2d77050 commit c2ab6fe

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.devops/cloud-v-pipeline

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
node('x86_runner1'){ // Running on x86 runner containing latest vector qemu, latest vector gcc and all the necessary libraries
2+
stage('Cleanup'){
3+
cleanWs() // Cleaning previous CI build in workspace
4+
}
5+
stage('checkout repo'){
6+
retry(5){ // Retry if the cloning fails due to some reason
7+
checkout scm // Clone the repo on Runner
8+
}
9+
}
10+
stage('Compiling llama.cpp'){
11+
sh'''#!/bin/bash
12+
make RISCV=1 RISCV_CROSS_COMPILE=1 # Compiling llama for RISC-V
13+
'''
14+
}
15+
stage('Running llama.cpp'){
16+
sh'''#!/bin/bash
17+
module load gnu-bin2/0.1 # loading latest versions of vector qemu and vector gcc
18+
qemu-riscv64 -L /softwares/gnu-bin2/sysroot -cpu rv64,v=true,vlen=256,elen=64,vext_spec=v1.0 ./main -m /home/alitariq/codellama-7b.Q4_K_M.gguf -p "Anything" -n 9 > llama_log.txt # Running llama.cpp on vector qemu-riscv64
19+
cat llama_log.txt # Printing results
20+
'''
21+
}
22+
}

0 commit comments

Comments
 (0)