Skip to content

Commit 9a78a0c

Browse files
authored
Bump PD to use regular instance runners (#2)
* ci: Use same PD_COMMIT as in Makefile * Makefile: Bump PD_COMMIT * gitlab-ci: Reduce VCS tests due to limited licenses * ci: Reuse simulation check logic
1 parent bfab993 commit 9a78a0c

3 files changed

Lines changed: 25 additions & 27 deletions

File tree

.gitlab-ci.yml

Lines changed: 12 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -106,53 +106,40 @@ sim-vsim:
106106
- .init-env
107107
- .sw-tests
108108
variables:
109-
LOG_FILE: target/sim/vsim/transcript
109+
LOG_FILE: transcript
110110
needs:
111111
- chs-sw
112112
- sn-sw
113113
- vsim-compile
114114
script:
115-
# Run the simulation
116115
- make vsim-run-batch-verify
117-
# Check either success or failure for non-zero exit codes
118-
- 'if [ -z "${NZ_EXIT_CODE}" ]; then grep "] SUCCESS" transcript || (exit 1); else grep "] FAILED: return code ${NZ_EXIT_CODE}" transcript || (exit 1); fi'
119-
# Check for UART output
120-
- 'if [ ! -z "${USTR}" ]; then (grep " \[UART\] ${USTR}" transcript); fi'
121-
# Check for any fatal errors
122-
- 'if grep "Fatal:" transcript; then exit 1; fi'
123-
# Check for any non-fatal errors. One and only one error is expected with a non-zero exit code.
124-
# Ignore all errors when using a separate verification script.
125-
- 'if [ -z "${VERIFY_PY}" ]; then if [ ! -z "${NZ_EXIT_CODE}" ]; then count=$(grep -c "Error:" transcript); if [ "$count" -ne 1 ]; then exit 1; fi; else if grep -q "Error:" transcript; then exit 1; fi; fi; fi'
116+
- !reference [.check-simulation, script]
126117
artifacts:
127118
paths:
128-
- transcript
119+
- ${LOG_FILE}
129120

130121
sim-vcs:
131122
stage: run
132123
extends:
133124
- .cache-deps
134125
- .init-env
135-
- .sw-tests
136126
variables:
137-
LOG_FILE: target/sim/vcs/build/vcs.log
127+
LOG_FILE: transcript
128+
CHS_BINARY: sw/cheshire/tests/simple_offload.spm.elf
129+
SN_BINARY: sw/snitch/apps/mha/build/mha.elf
130+
VERIFY_PY: .deps/snitch_cluster/sw/kernels/dnn/mha/scripts/verify.py
131+
PRELMODE: 3
138132
needs:
139133
- chs-sw
140134
- sn-sw
141135
- vcs-compile
142136
script:
143-
# Run the simulation
144-
- make vcs-run-batch-verify 2>&1 | tee target/sim/vcs/build/vcs.log
145-
# Check either success or failure for non-zero exit codes
146-
- 'if [ -z "${NZ_EXIT_CODE}" ]; then grep "] SUCCESS" target/sim/vcs/build/vcs.log || (exit 1); else grep "] FAILED: return code ${NZ_EXIT_CODE}" target/sim/vcs/build/vcs.log || (exit 1); fi'
147-
# Check for UART output
148-
- 'if [ ! -z "${USTR}" ]; then (grep "\[UART\] ${USTR}" target/sim/vcs/build/vcs.log); fi'
149-
# Check for any fatal errors
150-
- 'if grep "Fatal:" target/sim/vcs/build/vcs.log; then exit 1; fi'
151-
# Check for any non-fatal errors
152-
- 'if [ -z "${VERIFY_PY}" ]; then if [ ! -z "${NZ_EXIT_CODE}" ]; then count=$(grep -c "Error:" target/sim/vcs/build/vcs.log); if [ "$count" -ne 1 ]; then exit 1; fi; else if grep -q "Error:" target/sim/vcs/build/vcs.log; then exit 1; fi; fi; fi'
137+
# Run the VCS simulation and capture the console output into a log file
138+
- make vcs-run-batch-verify 2>&1 | tee ${LOG_FILE}
139+
- !reference [.check-simulation, script]
153140
artifacts:
154141
paths:
155-
- target/sim/vcs/build/vcs.log
142+
- ${LOG_FILE}
156143

157144
#####################
158145
# Run Experiments #

.gitlab/common.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
variables:
66
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
7-
PD_COMMIT: "9dc9435b5f6be06ea7dd52bcc0760a2c49f8e649"
87

98
# Check the cache for bender and python dependencies
109
.cache-deps:
@@ -70,3 +69,15 @@ variables:
7069
paths:
7170
- sw/cheshire/tests/*.elf
7271
expire_in: 1 day
72+
73+
.check-simulation:
74+
script:
75+
# Check either success or failure for non-zero exit codes
76+
- 'if [ -z "${NZ_EXIT_CODE}" ]; then grep "] SUCCESS" "${LOG_FILE}" || (exit 1); else grep "] FAILED: return code ${NZ_EXIT_CODE}" "${LOG_FILE}" || (exit 1); fi'
77+
# Check for UART output
78+
- 'if [ ! -z "${USTR}" ]; then (grep " \[UART\] ${USTR}" "${LOG_FILE}"); fi'
79+
# Check for any fatal errors
80+
- 'if grep "Fatal:" "${LOG_FILE}"; then exit 1; fi'
81+
# Check for any non-fatal errors. One and only one error is expected with a non-zero exit code.
82+
# Ignore all errors when using a separate verification script.
83+
- 'if [ -z "${VERIFY_PY}" ]; then if [ ! -z "${NZ_EXIT_CODE}" ]; then count=$(grep -c "Error:" "${LOG_FILE}"); if [ "$count" -ne 1 ]; then exit 1; fi; else if grep -q "Error:" "${LOG_FILE}"; then exit 1; fi; fi; fi'

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ floo-clean: gw-addrmap-clean
152152
###################
153153

154154
PD_REMOTE ?= git@iis-git.ee.ethz.ch:gwaihir/gwaihir-pd.git
155-
PD_COMMIT ?= main
155+
PD_COMMIT ?= 524d18b0f119507e24af0be3bee7cd0475824ede
156156
PD_DIR = $(GW_ROOT)/pd
157157
.PHONY: init-pd clean-pd
158158

0 commit comments

Comments
 (0)