summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli Tariq <ali.tariq@10xengineers.ai>2023-09-15 13:06:56 +0500
committerGitHub <noreply@github.com>2023-09-15 11:06:56 +0300
commitc2ab6fe661af9834ca6dd75f14e2439938cc22ac (patch)
tree137d806b8f6a1cbaa7612effd705f19fda543a15
parent2d770505a89a99ce78a5950cf14fc06d3176ffa4 (diff)
ci : Cloud-V for RISC-V builds (#3160)
* Added Cloud-V File * Replaced Makefile with original one --------- Co-authored-by: moiz.hussain <moiz.hussain@10xengineers.ai>
-rw-r--r--.devops/cloud-v-pipeline22
1 files changed, 22 insertions, 0 deletions
diff --git a/.devops/cloud-v-pipeline b/.devops/cloud-v-pipeline
new file mode 100644
index 00000000..f3a4944f
--- /dev/null
+++ b/.devops/cloud-v-pipeline
@@ -0,0 +1,22 @@
+node('x86_runner1'){ // Running on x86 runner containing latest vector qemu, latest vector gcc and all the necessary libraries
+ stage('Cleanup'){
+ cleanWs() // Cleaning previous CI build in workspace
+ }
+ stage('checkout repo'){
+ retry(5){ // Retry if the cloning fails due to some reason
+ checkout scm // Clone the repo on Runner
+ }
+ }
+ stage('Compiling llama.cpp'){
+ sh'''#!/bin/bash
+ make RISCV=1 RISCV_CROSS_COMPILE=1 # Compiling llama for RISC-V
+ '''
+ }
+ stage('Running llama.cpp'){
+ sh'''#!/bin/bash
+ module load gnu-bin2/0.1 # loading latest versions of vector qemu and vector gcc
+ 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
+ cat llama_log.txt # Printing results
+ '''
+ }
+}