mirror of
https://github.com/vortexgpgpu/vortex.git
synced 2025-04-23 21:39:10 -04:00
CI workflow optimization
This commit is contained in:
parent
b3a4d58825
commit
c5c4ccdd95
4 changed files with 40 additions and 56 deletions
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
|
@ -102,7 +102,8 @@ jobs:
|
|||
cd build${{ matrix.xlen }}
|
||||
../configure --tooldir=$TOOLDIR --xlen=${{ matrix.xlen }}
|
||||
source ci/toolchain_env.sh
|
||||
make build -s > /dev/null
|
||||
make software -s > /dev/null
|
||||
make tests -s > /dev/null
|
||||
|
||||
- name: Upload Build Artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
|
|
10
Makefile.in
10
Makefile.in
|
@ -1,5 +1,7 @@
|
|||
include config.mk
|
||||
|
||||
.PHONY: build software tests
|
||||
|
||||
all:
|
||||
$(MAKE) -C $(VORTEX_HOME)/third_party
|
||||
$(MAKE) -C hw
|
||||
|
@ -15,6 +17,14 @@ build:
|
|||
$(MAKE) -C runtime
|
||||
$(MAKE) -C tests
|
||||
|
||||
software:
|
||||
$(MAKE) -C hw
|
||||
$(MAKE) -C kernel
|
||||
$(MAKE) -C runtime/stub
|
||||
|
||||
tests:
|
||||
$(MAKE) -C tests
|
||||
|
||||
clean:
|
||||
$(MAKE) -C hw clean
|
||||
$(MAKE) -C sim clean
|
||||
|
|
|
@ -23,37 +23,6 @@ XLEN=${XLEN:=@XLEN@}
|
|||
|
||||
echo "Vortex Regression Test: XLEN=$XLEN"
|
||||
|
||||
split_file() {
|
||||
if [[ $# -ne 2 ]]; then
|
||||
echo "Usage: $0 <filename> <start_with>"
|
||||
return 1
|
||||
fi
|
||||
input_file="$1"
|
||||
start_with="$2"
|
||||
if [[ ! -r "$input_file" ]]; then
|
||||
echo "Error: File '$input_file' is not readable or does not exist."
|
||||
return 1
|
||||
fi
|
||||
count=0
|
||||
output_file=""
|
||||
while IFS= read -r line; do
|
||||
if [[ $line == $start_with* ]]; then
|
||||
count=$((count + 1))
|
||||
output_file="$input_file.part$count"
|
||||
> "$output_file" # ensure empty
|
||||
fi
|
||||
if [[ -n "$output_file" ]]; then
|
||||
echo "$line" >> "$output_file"
|
||||
fi
|
||||
done < "$input_file"
|
||||
|
||||
if [[ $count -eq 0 ]]; then
|
||||
echo "No lines starting with '$start_with' were found in '$input_file'."
|
||||
fi
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
|
||||
unittest()
|
||||
{
|
||||
make -C tests/unittest run
|
||||
|
@ -64,6 +33,9 @@ isa()
|
|||
{
|
||||
echo "begin isa tests..."
|
||||
|
||||
make -C sim/simx
|
||||
make -C sim/rtlsim
|
||||
|
||||
make -C tests/riscv/isa run-simx
|
||||
make -C tests/riscv/isa run-rtlsim
|
||||
|
||||
|
@ -94,8 +66,8 @@ isa()
|
|||
make -C tests/riscv/isa run-rtlsim-64fx
|
||||
fi
|
||||
|
||||
# restore default prebuilt configuration
|
||||
make -C sim/rtlsim clean && make -C sim/rtlsim > /dev/null
|
||||
# clean build
|
||||
make -C sim/rtlsim clean
|
||||
|
||||
echo "isa tests done!"
|
||||
}
|
||||
|
@ -104,6 +76,9 @@ kernel()
|
|||
{
|
||||
echo "begin kernel tests..."
|
||||
|
||||
make -C sim/simx
|
||||
make -C sim/rtlsim
|
||||
|
||||
make -C tests/kernel run-simx
|
||||
make -C tests/kernel run-rtlsim
|
||||
|
||||
|
@ -114,6 +89,9 @@ regression()
|
|||
{
|
||||
echo "begin regression tests..."
|
||||
|
||||
make -C runtime/simx
|
||||
make -C runtime/rtlsim
|
||||
|
||||
make -C tests/regression run-simx
|
||||
make -C tests/regression run-rtlsim
|
||||
|
||||
|
@ -132,6 +110,9 @@ opencl()
|
|||
{
|
||||
echo "begin opencl tests..."
|
||||
|
||||
make -C runtime/simx
|
||||
make -C runtime/rtlsim
|
||||
|
||||
make -C tests/opencl run-simx
|
||||
make -C tests/opencl run-rtlsim
|
||||
|
||||
|
@ -148,29 +129,20 @@ test_csv_trace()
|
|||
make -C sim/rtlsim clean && DEBUG=3 CONFIGS="-DGPR_RESET" make -C sim/rtlsim > /dev/null
|
||||
make -C tests/riscv/isa run-simx-32im > run_simx.log
|
||||
make -C tests/riscv/isa run-rtlsim-32im > run_rtlsim.log
|
||||
split_file run_simx.log "Running "
|
||||
split_file run_rtlsim.log "Running "
|
||||
for file in ./run_simx.log.part*; do
|
||||
if [[ -f "$file" ]]; then
|
||||
file2="${file//simx/rtlsim}"
|
||||
if [[ -f "$file2" ]]; then
|
||||
./ci/trace_csv.py -tsimx $file -otrace_simx.csv
|
||||
./ci/trace_csv.py -trtlsim $file2 -otrace_rtlsim.csv
|
||||
diff trace_rtlsim.csv trace_simx.csv
|
||||
else
|
||||
echo "File $file2 not found."
|
||||
fi
|
||||
fi
|
||||
done
|
||||
# restore default prebuilt configuration
|
||||
make -C sim/simx clean && make -C sim/simx > /dev/null
|
||||
make -C sim/rtlsim clean && make -C sim/rtlsim > /dev/null
|
||||
./ci/trace_csv.py -tsimx run_simx.log -otrace_simx.csv
|
||||
./ci/trace_csv.py -trtlsim run_rtlsim.log -otrace_rtlsim.csv
|
||||
diff trace_rtlsim.csv trace_simx.csv
|
||||
# clean build
|
||||
make -C sim/simx clean
|
||||
make -C sim/rtlsim clean
|
||||
}
|
||||
|
||||
debug()
|
||||
{
|
||||
echo "begin debugging tests..."
|
||||
|
||||
test_csv_trace
|
||||
|
||||
./ci/blackbox.sh --driver=opae --cores=2 --clusters=2 --l2cache --debug=1 --perf=1 --app=demo --args="-n1"
|
||||
./ci/blackbox.sh --driver=simx --cores=2 --clusters=2 --l2cache --debug=1 --perf=1 --app=demo --args="-n1"
|
||||
./ci/blackbox.sh --driver=opae --cores=1 --scope --app=demo --args="-n1"
|
||||
|
@ -250,11 +222,12 @@ config2()
|
|||
STARTUP_ADDR=0x40000000 make -C tests/regression/dogfood
|
||||
./ci/blackbox.sh --driver=simx --app=dogfood
|
||||
./ci/blackbox.sh --driver=rtlsim --app=dogfood
|
||||
make -C tests/regression/dogfood clean-kernel
|
||||
|
||||
# disabling M & F extensions
|
||||
make -C sim/rtlsim clean && CONFIGS="-DEXT_M_DISABLE -DEXT_F_DISABLE" make -C sim/rtlsim > /dev/null
|
||||
make -C tests/riscv/isa run-rtlsim-32i
|
||||
make -C sim/rtlsim clean && make -C sim/rtlsim > /dev/null
|
||||
make -C sim/rtlsim clean
|
||||
|
||||
# disabling ZICOND extension
|
||||
CONFIGS="-DEXT_ZICOND_DISABLE" ./ci/blackbox.sh --driver=rtlsim --app=demo
|
||||
|
|
|
@ -539,7 +539,7 @@ private:
|
|||
continue;
|
||||
MemRsp core_rsp{info.req_tag, pipeline_req.cid, pipeline_req.uuid};
|
||||
simobject_->CoreRspPorts.at(info.req_id).push(core_rsp, config_.latency);
|
||||
DT(3, simobject_->name() << "-core-" << core_rsp);
|
||||
DT(3, simobject_->name() << "-replay-" << core_rsp);
|
||||
}
|
||||
}
|
||||
} break;
|
||||
|
@ -583,7 +583,7 @@ private:
|
|||
mem_req.cid = pipeline_req.cid;
|
||||
mem_req.uuid = pipeline_req.uuid;
|
||||
mem_req_ports_.at(bank_id).push(mem_req, 1);
|
||||
DT(3, simobject_->name() << "-dram-" << mem_req);
|
||||
DT(3, simobject_->name() << "-writethrough-" << mem_req);
|
||||
} else {
|
||||
// mark line as dirty
|
||||
hit_line.dirty = true;
|
||||
|
@ -615,7 +615,7 @@ private:
|
|||
mem_req.write = true;
|
||||
mem_req.cid = pipeline_req.cid;
|
||||
mem_req_ports_.at(bank_id).push(mem_req, 1);
|
||||
DT(3, simobject_->name() << "-dram-" << mem_req);
|
||||
DT(3, simobject_->name() << "-writeback-" << mem_req);
|
||||
++perf_stats_.evictions;
|
||||
}
|
||||
}
|
||||
|
@ -629,7 +629,7 @@ private:
|
|||
mem_req.cid = pipeline_req.cid;
|
||||
mem_req.uuid = pipeline_req.uuid;
|
||||
mem_req_ports_.at(bank_id).push(mem_req, 1);
|
||||
DT(3, simobject_->name() << "-dram-" << mem_req);
|
||||
DT(3, simobject_->name() << "-writethrough-" << mem_req);
|
||||
}
|
||||
// send core response
|
||||
if (config_.write_reponse) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue