Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RVV 1.0 integration testing on real hardware #1184

Open
wants to merge 32 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
7ad946b
Added Makefile and cross file for build
alitariq4589 May 19, 2024
486353c
Modified Makefile
alitariq4589 May 20, 2024
e46ed6a
Added cloud-v-pipeline file
alitariq4589 May 20, 2024
26177ae
Changed the cloning process
alitariq4589 May 20, 2024
d8e7efe
Changed cloning command
alitariq4589 May 20, 2024
330d9d4
Changed cloning command
alitariq4589 May 20, 2024
729f211
Added cleanup stage
alitariq4589 May 20, 2024
d6c3781
Removed clean stage
alitariq4589 May 20, 2024
870f91c
modified clone stage
alitariq4589 May 20, 2024
a21ffaa
Corrected pipeline file
alitariq4589 May 20, 2024
24c7d77
Added clean up step on k230
alitariq4589 May 20, 2024
e67062a
changed compress command
alitariq4589 May 20, 2024
71f2fdd
Added source file
alitariq4589 May 21, 2024
fd5e46e
Changed the stashed file content
alitariq4589 May 21, 2024
675add8
Changed the command for source
alitariq4589 May 22, 2024
6aec4f6
Corrected Makefile syntax
alitariq4589 May 22, 2024
855e858
Changed the clone branch to master
alitariq4589 May 22, 2024
be84a57
Added -march for vector
alitariq4589 May 22, 2024
0bf4816
Changed the clone stage
alitariq4589 May 22, 2024
3ead31b
Added error handling for meson command
alitariq4589 May 22, 2024
72f0b56
Reordered the files
alitariq4589 May 22, 2024
fb3cb9c
Added -mrvv-vector-bits=128 in cross file
alitariq4589 May 28, 2024
4c86e29
Added gcc version string
alitariq4589 May 28, 2024
2fd0a18
Added gcc version string
alitariq4589 May 28, 2024
49d5ac2
Changed the RV GNU toolchain version
alitariq4589 Jun 5, 2024
753d212
Removed the mrvv flag
alitariq4589 Jun 5, 2024
fa792a1
Added zvl flags
alitariq4589 Jun 5, 2024
351be2f
Added zvl flags
alitariq4589 Jun 5, 2024
08cff65
Changed -Ofast to -O3
alitariq4589 Jun 24, 2024
64a11fd
Removed the optimization flag
alitariq4589 Jun 25, 2024
9e68a0d
Corrected the scp command
alitariq4589 Jun 25, 2024
fa1e66e
Added Archive artifact stage
alitariq4589 Jun 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Makefile
mr-c marked this conversation as resolved.
Show resolved Hide resolved

# Define the directory to search for executables
DIR := build/test

# Define a shell command to find all executable files, excluding C/C++ files and directories
EXEC_FILES := $(shell find $(DIR) -type f -executable ! -name '*.c' ! -name '*.cpp' ! -name '*.h')

# Log file
LOG_FILE := test.mak.log

# Default target
all: run

# Target to run all executable files and log the output
run:
@echo "Running executables in $(DIR)..." > $(LOG_FILE)aaaa
count=0; \
pass_count=0; \
fail_count=0; \
for file in $(EXEC_FILES); do \
echo "Executing $$file" | tee -a $(LOG_FILE); \
$$file >> $(LOG_FILE) 2>&1; \
case "$$?" in \
0) echo "PASSED" | tee -a $(LOG_FILE); \
pass_count=$$((pass_count + 1)) ;; \
*) echo "FAILED" | tee -a $(LOG_FILE); \
fail_count=$$((fail_count + 1)) ;; \
esac; \
echo ""; \
echo "" >> $(LOG_FILE); \
count=$$((count + 1)); \
done; \
echo "Total executables run: $$count" | tee -a $(LOG_FILE); \
echo "Total passed: $$pass_count" | tee -a $(LOG_FILE); \
echo "Total failed: $$fail_count" | tee -a $(LOG_FILE)
echo "Complete log is saved in test.mak.log"

# Clean target (example, not strictly necessary for this task)
clean:
@echo "Nothing to clean"
49 changes: 49 additions & 0 deletions cloud-v-pipeline
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
node('J-TESTVM-1') {
mr-c marked this conversation as resolved.
Show resolved Hide resolved
stage('Clean Workspace') {
cleanWs()
}
stage('Clone') {
sh '''#!/bin/bash -v
git clone -b rvv1.0-integration https://github.com/alitariq4589/simde-cloud-v.git .
'''
}
stage('Run system_info') {
sh '''#!/bin/bash
cat /proc/cpuinfo
'''
}
stage('Run configure') {
sh '''#!/bin/bash -l
module load riscv64-gnu-glibc/12042024
meson setup build --cross-file=riscv64-cross.txt -Db_lundef=false
'''
}
stage('Run cross compile') {
sh '''#!/bin/bash -l
module load riscv64-gnu-glibc/12042024
meson compile -C build -v
echo "export SIMDE_PATH=$(pwd)" > testvm_pwd.sh
'''
stash includes: 'testvm_pwd.sh', name: 'testvm_pwd.sh'
}
}
node('J-K230-1') {
stage('Clean Workspace') {
cleanWs()
}
stage('Get Cross-compiled binaries') {
unstash 'testvm_pwd.sh'
withCredentials([sshUserPrivateKey(credentialsId: 'TESTVM_SSH_CREDENTIALS', keyFileVariable: 'SSH_KEY')]) {
sh '''#!/bin/bash -v
source testvm_pwd.sh
echo "$SIMDE_PATH"
ssh -i $SSH_KEY [email protected] -p 30013 "cd $SIMDE_PATH && tar cvf - ./*" | tar xvf - -C ./
'''
}
}
stage('Run test') {
sh'''#!/bin/bash
make
'''
}
}
11 changes: 11 additions & 0 deletions riscv64-cross.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[binaries]
mr-c marked this conversation as resolved.
Show resolved Hide resolved
c = 'riscv64-unknown-linux-gnu-gcc'
cpp = 'riscv64-unknown-linux-gnu-g++'
ar = 'riscv64-unknown-linux-gnu-ar'
strip = 'riscv64-unknown-linux-gnu-strip'

[host_machine]
system = 'linux'
cpu_family = 'riscv64'
cpu = 'riscv64'
endian = 'little'
Loading