Skip to content

Commit cb0de6a

Browse files
committed
Fix redundant NPU validation reruns
1 parent 6423dd9 commit cb0de6a

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

test/npu_validation/scripts/run_remote_npu_validation.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,9 @@ while IFS= read -r -d '' cpp; do
278278
fi
279279
python3 ./golden.py
280280
LD_LIBRARY_PATH="${LD_LIBRARY_PATH_NPU}" ./build/${testcase}
281-
copy_outputs_as_golden
282-
python3 ./golden.py
283-
LD_LIBRARY_PATH="${LD_LIBRARY_PATH_NPU}" ./build/${testcase}
281+
if [[ "${CUSTOM_GOLDEN}" == "1" ]]; then
282+
log "Using custom golden for ${testcase}"
283+
fi
284284
COMPARE_STRICT=1 python3 ./compare.py
285285
;;
286286
skip)

test/npu_validation/templates/run_sh_template.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ BUILD_DIR="${BUILD_DIR:-build}"
99
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
1010

1111
cd "${ROOT_DIR}"
12-
python3 "${ROOT_DIR}/golden.py"
1312

1413
# Best-effort resolve PTO_ISA_ROOT for generated CMakeLists.txt.
1514
if [[ -z "${PTO_ISA_ROOT:-}" ]]; then
@@ -104,6 +103,7 @@ copy_outputs_as_golden() {
104103

105104
case "${GOLDEN_MODE}" in
106105
sim)
106+
python3 "${ROOT_DIR}/golden.py"
107107
LD_LIBRARY_PATH="${LD_LIBRARY_PATH_SIM}" "${ROOT_DIR}/${BUILD_DIR}/@EXECUTABLE@_sim"
108108
copy_outputs_as_golden
109109
if [[ "${RUN_MODE}" == "npu" ]]; then
@@ -118,9 +118,6 @@ case "${GOLDEN_MODE}" in
118118
fi
119119
python3 "${ROOT_DIR}/golden.py"
120120
LD_LIBRARY_PATH="${LD_LIBRARY_PATH_NPU}" "${ROOT_DIR}/${BUILD_DIR}/@EXECUTABLE@"
121-
copy_outputs_as_golden
122-
python3 "${ROOT_DIR}/golden.py"
123-
LD_LIBRARY_PATH="${LD_LIBRARY_PATH_NPU}" "${ROOT_DIR}/${BUILD_DIR}/@EXECUTABLE@"
124121
COMPARE_STRICT=1 python3 "${ROOT_DIR}/compare.py"
125122
;;
126123
skip)

0 commit comments

Comments
 (0)