From c24dc3ae2f61cf32b6198435dd6e24b7c0fd0cee Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Sun, 29 Jun 2025 13:41:40 +0500 Subject: [PATCH 01/13] Changed the CI file to hw --- .devops/cloud-v-pipeline | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.devops/cloud-v-pipeline b/.devops/cloud-v-pipeline index af8c0cea6155c..8136dfe5dd8a3 100644 --- a/.devops/cloud-v-pipeline +++ b/.devops/cloud-v-pipeline @@ -1,4 +1,4 @@ -node('x86_runner1'){ // Running on x86 runner containing latest vector qemu, latest vector gcc and all the necessary libraries +node('jupiter-16G-1'){ // 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 } @@ -9,14 +9,13 @@ node('x86_runner1'){ // Running on x86 runner containing latest vecto } stage('Compiling llama.cpp'){ sh'''#!/bin/bash - make RISCV=1 RISCV_CROSS_COMPILE=1 # Compiling llama for RISC-V + cmake -B build + cmake --build build --config Release -j8 --target llama-cli llama-quantize ''' } 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 ./llama-cli -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 + ./build/bin/llama-cli -m {GGUF_WEIGHT} -p "Hi, how are you?" -n 20 ''' } } From c465ebe4f3e9a0cea12622e8f8011a4e01d07e84 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Sun, 29 Jun 2025 13:56:01 +0500 Subject: [PATCH 02/13] Changed the CI file to hw --- .devops/cloud-v-pipeline | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.devops/cloud-v-pipeline b/.devops/cloud-v-pipeline index 8136dfe5dd8a3..bf6456cbd725c 100644 --- a/.devops/cloud-v-pipeline +++ b/.devops/cloud-v-pipeline @@ -2,6 +2,14 @@ node('jupiter-16G-1'){ // Running on x86 runner containing latest vec stage('Cleanup'){ cleanWs() // Cleaning previous CI build in workspace } + stage('Install dependencies'){ + sh''' + #!/bin/bash + sudo apt-get update + sudo apt-get install -y cmake build-essential git curl + git clone + ''' + } stage('checkout repo'){ retry(5){ // Retry if the cloning fails due to some reason checkout scm // Clone the repo on Runner From b5997461d47431b7e80916df78e053ae00b178a2 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Sun, 29 Jun 2025 13:56:49 +0500 Subject: [PATCH 03/13] Added to sudoers for apt --- .devops/cloud-v-pipeline | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.devops/cloud-v-pipeline b/.devops/cloud-v-pipeline index bf6456cbd725c..24cded66396aa 100644 --- a/.devops/cloud-v-pipeline +++ b/.devops/cloud-v-pipeline @@ -5,8 +5,8 @@ node('jupiter-16G-1'){ // Running on x86 runner containing latest vec stage('Install dependencies'){ sh''' #!/bin/bash - sudo apt-get update - sudo apt-get install -y cmake build-essential git curl + sudo apt update + sudo apt install -y cmake build-essential git curl git clone ''' } From 9342a376b9504ceafa3533d93b2fe8ea7cd71fd3 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Sun, 29 Jun 2025 14:02:38 +0500 Subject: [PATCH 04/13] Removed the clone command and used checkout --- .devops/cloud-v-pipeline | 1 - 1 file changed, 1 deletion(-) diff --git a/.devops/cloud-v-pipeline b/.devops/cloud-v-pipeline index 24cded66396aa..7b591593f1843 100644 --- a/.devops/cloud-v-pipeline +++ b/.devops/cloud-v-pipeline @@ -7,7 +7,6 @@ node('jupiter-16G-1'){ // Running on x86 runner containing latest vec #!/bin/bash sudo apt update sudo apt install -y cmake build-essential git curl - git clone ''' } stage('checkout repo'){ From bb1981819fddcbc9b4fc345cb0f79a3fddae10bf Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Sun, 29 Jun 2025 14:06:16 +0500 Subject: [PATCH 05/13] Added libcurl --- .devops/cloud-v-pipeline | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devops/cloud-v-pipeline b/.devops/cloud-v-pipeline index 7b591593f1843..5db89cabe3034 100644 --- a/.devops/cloud-v-pipeline +++ b/.devops/cloud-v-pipeline @@ -6,7 +6,7 @@ node('jupiter-16G-1'){ // Running on x86 runner containing latest vec sh''' #!/bin/bash sudo apt update - sudo apt install -y cmake build-essential git curl + sudo apt install -y cmake build-essential git curl libcurl4-openssl-dev ''' } stage('checkout repo'){ From b4024268fad132a915082fb913b7fa041c6e7ef1 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Sun, 29 Jun 2025 15:04:42 +0500 Subject: [PATCH 06/13] Added gcc-14 --- .devops/cloud-v-pipeline | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.devops/cloud-v-pipeline b/.devops/cloud-v-pipeline index 5db89cabe3034..1907e4a4cfc9c 100644 --- a/.devops/cloud-v-pipeline +++ b/.devops/cloud-v-pipeline @@ -5,6 +5,9 @@ node('jupiter-16G-1'){ // Running on x86 runner containing latest vec stage('Install dependencies'){ sh''' #!/bin/bash + + set -x + sudo apt update sudo apt install -y cmake build-essential git curl libcurl4-openssl-dev ''' @@ -16,13 +19,22 @@ node('jupiter-16G-1'){ // Running on x86 runner containing latest vec } stage('Compiling llama.cpp'){ sh'''#!/bin/bash + + set -x + + alias gcc='/usr/bin/gcc-14' # Workaround for RVV error + alias g++='/usr/bin/g++-14' # Workaround for RVV error + cmake -B build cmake --build build --config Release -j8 --target llama-cli llama-quantize ''' } stage('Running llama.cpp'){ sh'''#!/bin/bash - ./build/bin/llama-cli -m {GGUF_WEIGHT} -p "Hi, how are you?" -n 20 + + set -x + + ./build/bin/llama-cli -m {GGUF_WEIGHT} -p "Hi, how are you?" -n 10 ''' } } From e608c004e04da7938801175cf3dbea6620ef4702 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Sun, 29 Jun 2025 15:07:22 +0500 Subject: [PATCH 07/13] Checking gcc --version --- .devops/cloud-v-pipeline | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.devops/cloud-v-pipeline b/.devops/cloud-v-pipeline index 1907e4a4cfc9c..6e9d37d19f089 100644 --- a/.devops/cloud-v-pipeline +++ b/.devops/cloud-v-pipeline @@ -25,6 +25,9 @@ node('jupiter-16G-1'){ // Running on x86 runner containing latest vec alias gcc='/usr/bin/gcc-14' # Workaround for RVV error alias g++='/usr/bin/g++-14' # Workaround for RVV error + gcc --version + g++ --version + cmake -B build cmake --build build --config Release -j8 --target llama-cli llama-quantize ''' From 585720414ae7e41f0796b731ce76036c3abc488d Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Sun, 29 Jun 2025 15:13:13 +0500 Subject: [PATCH 08/13] added gcc-14 symlink --- .devops/cloud-v-pipeline | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.devops/cloud-v-pipeline b/.devops/cloud-v-pipeline index 6e9d37d19f089..2048545d8c919 100644 --- a/.devops/cloud-v-pipeline +++ b/.devops/cloud-v-pipeline @@ -22,12 +22,18 @@ node('jupiter-16G-1'){ // Running on x86 runner containing latest vec set -x - alias gcc='/usr/bin/gcc-14' # Workaround for RVV error - alias g++='/usr/bin/g++-14' # Workaround for RVV error + mkdir -p .compiler_override + + # Create symlinks in this temp directory + ln -sf /usr/bin/gcc-14 .compiler_override/gcc + ln -sf /usr/bin/g++-14 .compiler_override/g++ + + # Prepend the temp directory to PATH for this script's execution + export PATH="$PWD/.compiler_override:$PATH" gcc --version g++ --version - + cmake -B build cmake --build build --config Release -j8 --target llama-cli llama-quantize ''' From 48fc7c566e4a06f3caf0485828443f0097eeb047 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Sun, 29 Jun 2025 15:22:59 +0500 Subject: [PATCH 09/13] added CC and C++ variables --- .devops/cloud-v-pipeline | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.devops/cloud-v-pipeline b/.devops/cloud-v-pipeline index 2048545d8c919..b6e977a3d8b5a 100644 --- a/.devops/cloud-v-pipeline +++ b/.devops/cloud-v-pipeline @@ -28,6 +28,9 @@ node('jupiter-16G-1'){ // Running on x86 runner containing latest vec ln -sf /usr/bin/gcc-14 .compiler_override/gcc ln -sf /usr/bin/g++-14 .compiler_override/g++ + export CC="/usr/bin/gcc-14" + export CXX="/usr/bin/g++-14" + # Prepend the temp directory to PATH for this script's execution export PATH="$PWD/.compiler_override:$PATH" From d8c92413903d74313cf2a64496c884fc6bcc3865 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Sun, 29 Jun 2025 16:34:38 +0500 Subject: [PATCH 10/13] Added the gguf weight --- .devops/cloud-v-pipeline | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devops/cloud-v-pipeline b/.devops/cloud-v-pipeline index b6e977a3d8b5a..942fed94278e6 100644 --- a/.devops/cloud-v-pipeline +++ b/.devops/cloud-v-pipeline @@ -45,7 +45,7 @@ node('jupiter-16G-1'){ // Running on x86 runner containing latest vec sh'''#!/bin/bash set -x - + GGUF_WEIGHT="/home/jenkins_user/DeepSeek-R1-Distill-Qwen-1.5B-Q4_K_M.gguf" # Path to the GGUF model file ./build/bin/llama-cli -m {GGUF_WEIGHT} -p "Hi, how are you?" -n 10 ''' } From fd500f77d633b8bb3d2a8e3b5666b8402228ded5 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Sun, 29 Jun 2025 16:49:37 +0500 Subject: [PATCH 11/13] Changed the weights path --- .devops/cloud-v-pipeline | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.devops/cloud-v-pipeline b/.devops/cloud-v-pipeline index 942fed94278e6..bbb9a0250715e 100644 --- a/.devops/cloud-v-pipeline +++ b/.devops/cloud-v-pipeline @@ -45,8 +45,7 @@ node('jupiter-16G-1'){ // Running on x86 runner containing latest vec sh'''#!/bin/bash set -x - GGUF_WEIGHT="/home/jenkins_user/DeepSeek-R1-Distill-Qwen-1.5B-Q4_K_M.gguf" # Path to the GGUF model file - ./build/bin/llama-cli -m {GGUF_WEIGHT} -p "Hi, how are you?" -n 10 + ./build/bin/llama-cli -m /home/jenkins_user/DeepSeek-R1-Distill-Qwen-1.5B-Q4_K_M.gguf -p "Hi, how are you?" -n 10 ''' } } From 95f4d8eb509580c5389465916abb5a04c99b098c Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Sun, 29 Jun 2025 17:35:55 +0500 Subject: [PATCH 12/13] Added system specification --- .devops/cloud-v-pipeline | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/.devops/cloud-v-pipeline b/.devops/cloud-v-pipeline index bbb9a0250715e..ac1bc03a8e7c4 100644 --- a/.devops/cloud-v-pipeline +++ b/.devops/cloud-v-pipeline @@ -2,6 +2,47 @@ node('jupiter-16G-1'){ // Running on x86 runner containing latest vec stage('Cleanup'){ cleanWs() // Cleaning previous CI build in workspace } + stage('Run system_info') { + sh '''#!/bin/bash + echo '=============================================================' + echo ' CPU INFO START ' + echo '=============================================================' + cat /proc/cpuinfo + echo '=============================================================' + echo ' CPU INFO END ' + echo '=============================================================' + + echo '=============================================================' + echo ' Kernel Info Start ' + echo '=============================================================' + uname -a + echo '=============================================================' + echo ' Kernel Info End ' + echo '=============================================================' + echo '=============================================================' + echo ' Glibc Version Start ' + echo '=============================================================' + ldd --version + echo '=============================================================' + echo ' Glibc Version End ' + echo '=============================================================' + echo '=============================================================' + echo ' OS Info Start ' + echo '=============================================================' + cat /etc/os-release + echo '=============================================================' + echo ' OS Info End ' + echo '=============================================================' + + echo '=============================================================' + echo ' GCC Version ' + echo '=============================================================' + gcc --version + echo '=============================================================' + echo ' GCC Version End ' + echo '=============================================================' + ''' + } stage('Install dependencies'){ sh''' #!/bin/bash From fc453a04d95033c861c222c64aa547406caac67c Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Sun, 29 Jun 2025 18:06:10 +0500 Subject: [PATCH 13/13] Removed white spaces --- .devops/cloud-v-pipeline | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.devops/cloud-v-pipeline b/.devops/cloud-v-pipeline index ac1bc03a8e7c4..5627b01c7745b 100644 --- a/.devops/cloud-v-pipeline +++ b/.devops/cloud-v-pipeline @@ -60,15 +60,15 @@ node('jupiter-16G-1'){ // Running on x86 runner containing latest vec } stage('Compiling llama.cpp'){ sh'''#!/bin/bash - + set -x mkdir -p .compiler_override - + # Create symlinks in this temp directory ln -sf /usr/bin/gcc-14 .compiler_override/gcc ln -sf /usr/bin/g++-14 .compiler_override/g++ - + export CC="/usr/bin/gcc-14" export CXX="/usr/bin/g++-14" @@ -84,7 +84,7 @@ node('jupiter-16G-1'){ // Running on x86 runner containing latest vec } stage('Running llama.cpp'){ sh'''#!/bin/bash - + set -x ./build/bin/llama-cli -m /home/jenkins_user/DeepSeek-R1-Distill-Qwen-1.5B-Q4_K_M.gguf -p "Hi, how are you?" -n 10 '''