diff --git a/.devops/cloud-v-pipeline b/.devops/cloud-v-pipeline index af8c0cea6155c..5627b01c7745b 100644 --- a/.devops/cloud-v-pipeline +++ b/.devops/cloud-v-pipeline @@ -1,7 +1,58 @@ -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 } + 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 + + set -x + + sudo apt update + sudo apt install -y cmake build-essential git curl libcurl4-openssl-dev + ''' + } stage('checkout repo'){ retry(5){ // Retry if the cloning fails due to some reason checkout scm // Clone the repo on Runner @@ -9,14 +60,33 @@ 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 + + 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" + + # 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 ''' } 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 + + 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 ''' } }