Add RISC-V benchmarks to bench2

This commit is contained in:
DYLAN BAUTISTA CASES 2024-12-09 10:47:01 +01:00 committed by Rodrigo Arias Mallo
parent a818bd14b6
commit eb1dc238b1
6 changed files with 96 additions and 35 deletions

View File

@ -5,7 +5,6 @@ build:lagarto-ox:
- nix
script:
- nix develop -L .#lagarto-ox --command fpga/run-remotely.sh fpgalogin1:ci
build:lagarto-ox-tarball:
stage: build
when: manual
@ -24,3 +23,9 @@ build:lagarto-ox-tarball:
- |
echo "Pinned: https://jungle.bsc.es/~gitlab-runner/nixos-riscv/$fn"
echo "Latest: https://jungle.bsc.es/~gitlab-runner/nixos-riscv/latest.tar.zst"
build:qemu-lagarto-ox:
stage: build
tags:
- nix
script:
- nix develop -L .#qemu-lagarto-ox --command ./boot.sh

View File

@ -26,3 +26,16 @@ To dump a ROM without the ELF header:
$ nix build .\#nixosConfigurations.lagarto-hun.config.system.build.kernel.configfile
$ nix build .\#nixosConfigurations.lagarto-hun.config.system.build.kernel
```
## Interactive build of rvb
```
hut% cd .../nixos-riscv
hur% nix develop .#nixosConfigurations.qemu-lagarto-ox.pkgs.rvb
hut$ mkdir /tmp/foo
hut$ cd /tmp/foo
hut$ genericBuild
...
error...
hut$ make ...
```

View File

@ -35,6 +35,8 @@ cd "$TMPDIR"
#QEMU_KERNEL_PARAMS="boot.debug1devices"
#QEMU_KERNEL_PARAMS="boot.trace boot.debug1"
QEMU_KERNEL_PARAMS=bench2
#QEMU_KERNEL_PARAMS=debug2
# Trap the CPU on compressed instructions?
#TRAP_COMPRESSED="-cpu rv64,c=false"

View File

@ -401,7 +401,13 @@
# };
#}));
blackscholesInput = final.fetchurl {
url = "https://gitlab.bsc.es/benchmarks/risc-v-benchmarks/-/wikis/uploads/fd1fa29bc83f24f246da304ecd8ca840/in_1024.input";
hash = "sha256-CCS4vMzIn0NxBASyFN57gnZDWWUaqykoTJS106sFLMo=";
};
bench2 = final.writeShellScript "bench2" ''
echo --------BENCHMARKING PHASE---------
# Performs minimal FS setup and runs the SPEC benchmark
mkdir /tmp /bin /root
mount -t tmpfs tmpfs /tmp
@ -410,8 +416,38 @@
ln -s $(which sh) /bin/sh
# Check CPU usage
vmstat 5 5
bash -x speclaunch
cat /tmp/spec/time.csv
#bash -x speclaunch
#cat /tmp/spec/time.csv
# hpc_benchmarks
set -x
axpy-autovect 800 1000
axpy-cblas 800 1000
axpy-omp-simd 800 1000
axpy-scalar 800 1000
gemm-autovect 256
gemm-omp-simd 256
gemm-scalar 256
somier-autovect 4 32
somier-omp-simd 4 32
somier-scalar 4 32
lulesh2.0 -s 4
jacobi2d_scalar_vanilla 16 2
# desktop_benchmarks
#blackscholes
#streamcluster
# micro_benchmarks (NO WORKING BENCHMARKS FOR NOW...)
blackscholes_scalar 1 ${final.blackscholesInput} /dev/null
streamcluster_scalar 3 10 16 16 16 10 none output.txt 1
# Give me a shell at the end
bash -l
'';

View File

@ -4,59 +4,60 @@ HPC_BENCHMARKS_DIRS=\
axpy \
jacobi-2d \
somier \
# Require submodules:
# fft \
gemm \
lulesh \
# hacckernels \
# fftv \
# spmv-ellpack \
# stream \
# Require submodules
# fftp \
# Require vehave:
# lulesh \
# Missing compare_array_double:
# gemm \
# Broken, not found:
# spmv
DESKTOP_BENCHMARKS_DIRS=\
blackscholes \
canneal \
particlefilter \
streamcluster \
swaptions
#pathfinder
# pathfinder \
# particlefilter \
# swaptions \
MICRO_BENCHMARKS_DIRS=
#BuffCopyUnit \
MICRO_BENCHMARKS_DIRS=\
#BuffCopyStrided \
#BuffCopyIndexed \
#FpuMicroKernel \
#InstrNopBalance \
#MemArithBalance \
#LatencyVrgather
#LatencyVrgather \
# BuffCopyUnit
.PHONY: default all clean $(HPC_BENCHMARKS_DIRS) $(MICRO_BENCHMARKS_DIRS)
all: base
default:
@cd common; make; cd ..
@$(foreach dir,$(HPC_BENCHMARKS_DIRS),${MAKE} -C hpc_benchmarks/$(dir);)
@$(foreach dir,$(DESKTOP_BENCHMARKS_DIRS),${MAKE} -C desktop_benchmarks/$(dir);)
@$(foreach dir,$(MICRO_BENCHMARKS_DIRS),${MAKE} -C micro_benchmarks/$(dir);)
cd common; make; cd ..
$(foreach dir,$(HPC_BENCHMARKS_DIRS),${MAKE} -C hpc_benchmarks/$(dir);)
$(foreach dir,$(DESKTOP_BENCHMARKS_DIRS),${MAKE} -C desktop_benchmarks/$(dir);)
$(foreach dir,$(MICRO_BENCHMARKS_DIRS),${MAKE} -C micro_benchmarks/$(dir);)
all-types:
@cd common; make all; cd ..
@$(foreach dir,$(HPC_BENCHMARKS_DIRS),${MAKE} -C hpc_benchmarks/$(dir) all ;)
@$(foreach dir,$(DESKTOP_BENCHMARKS_DIRS),${MAKE} -C desktop_benchmarks/$(dir) all ;)
@$(foreach dir,$(MICRO_BENCHMARKS_DIRS),${MAKE} -C micro_benchmarks/$(dir) all ;)
cd common; make all; cd ..
$(foreach dir,$(HPC_BENCHMARKS_DIRS),${MAKE} -C hpc_benchmarks/$(dir) all ;)
$(foreach dir,$(DESKTOP_BENCHMARKS_DIRS),${MAKE} -C desktop_benchmarks/$(dir) all ;)
$(foreach dir,$(MICRO_BENCHMARKS_DIRS),${MAKE} -C micro_benchmarks/$(dir) all ;)
base:
@cd common; make all; cd ..
@$(foreach dir,$(HPC_BENCHMARKS_DIRS),${MAKE} -C hpc_benchmarks/$(dir) base ;)
@$(foreach dir,$(DESKTOP_BENCHMARKS_DIRS),${MAKE} -C desktop_benchmarks/$(dir) base ;)
@$(foreach dir,$(MICRO_BENCHMARKS_DIRS),${MAKE} -C micro_benchmarks/$(dir) base ;)
cd common; make all; cd ..
$(foreach dir,$(HPC_BENCHMARKS_DIRS),${MAKE} -C hpc_benchmarks/$(dir) base ;)
$(foreach dir,$(DESKTOP_BENCHMARKS_DIRS),${MAKE} -C desktop_benchmarks/$(dir) base ;)
$(foreach dir,$(MICRO_BENCHMARKS_DIRS),${MAKE} -C micro_benchmarks/$(dir) base ;)
install:
@$(foreach dir,$(HPC_BENCHMARKS_DIRS),${MAKE} -C hpc_benchmarks/$(dir) install ;)
@$(foreach dir,$(DESKTOP_BENCHMARKS_DIRS),${MAKE} -C desktop_benchmarks/$(dir) install ;)
@$(foreach dir,$(MICRO_BENCHMARKS_DIRS),${MAKE} -C micro_benchmarks/$(dir) install ;)
$(foreach dir,$(HPC_BENCHMARKS_DIRS),${MAKE} -C hpc_benchmarks/$(dir) install ;)
$(foreach dir,$(DESKTOP_BENCHMARKS_DIRS),${MAKE} -C desktop_benchmarks/$(dir) install ;)
$(foreach dir,$(MICRO_BENCHMARKS_DIRS),${MAKE} -C micro_benchmarks/$(dir) install ;)
fftp:
${MAKE} -C third_party fftw
@ -71,9 +72,9 @@ spmv-ellpack:
INDEX64=1 EPI_EXT=07 PATH=${EPI_LLVM_HOME}/bin:${PATH} make
clean:
@cd common; make clean; cd ..
@$(foreach dir,$(HPC_BENCHMARKS_DIRS),${MAKE} -C hpc_benchmarks/$(dir) clean ;)
@$(foreach dir,$(DESKTOP_BENCHMARKS_DIRS),${MAKE} -C desktop_benchmarks/$(dir) clean ;)
@$(foreach dir,$(MICRO_BENCHMARKS_DIRS),${MAKE} -C micro_benchmarks/$(dir) clean ;)
@rm -rf hpc_benchmarks/spmv-ellpack/spmv/build
cd common; make clean; cd ..
$(foreach dir,$(HPC_BENCHMARKS_DIRS),${MAKE} -C hpc_benchmarks/$(dir) clean ;)
$(foreach dir,$(DESKTOP_BENCHMARKS_DIRS),${MAKE} -C desktop_benchmarks/$(dir) clean ;)
$(foreach dir,$(MICRO_BENCHMARKS_DIRS),${MAKE} -C micro_benchmarks/$(dir) clean ;)
rm -rf hpc_benchmarks/spmv-ellpack/spmv/build

View File

@ -2,8 +2,11 @@
stdenv
, blis
, gitBranch ? "nix-fixes"
#, gitURL ? "git@gitlab-internal.bsc.es:dbautist/risc-v-benchmarks.git"
#, gitCommit ? "bfa96504976dc48f6781c2cafb1e07f8d9eb7476"
, gitURL ? "git@gitlab-internal.bsc.es:rarias/risc-v-benchmarks.git"
, gitCommit ? "da202d6f818421b72e06c39b5417ad2f8f6ca23c"
}:
stdenv.mkDerivation rec {
@ -11,6 +14,7 @@ stdenv.mkDerivation rec {
version = "${src.shortRev}";
src = builtins.fetchGit {
#url = "/home/Computational/dbautist/nixos_riscv_master/nix-fixes-rvb/risc-v-benchmarks"; #change pwd to the local file
url = gitURL;
ref = gitBranch;
rev = gitCommit;