added a verify command to our makefile. so for future variants we can just use...
This commit is contained in:
committed by
salijagic
parent
a32ba254de
commit
7870e77611
@@ -79,7 +79,13 @@ CXXFLAGS += -DRANDOM_SEED=$(RANDOM_SEED)
|
|||||||
BENCH_SIZES ?= 50 100 200 500 1000 2000 5000 10000
|
BENCH_SIZES ?= 50 100 200 500 1000 2000 5000 10000
|
||||||
BENCH_ITER ?= 1000
|
BENCH_ITER ?= 1000
|
||||||
|
|
||||||
.PHONY: all main run bench run-bench bench-suite video sizes asm test clean clean-all
|
# Verification parameters
|
||||||
|
REFERENCE_CSV ?= reference/baseline_n60_i4000.csv
|
||||||
|
REFERENCE_N_P ?= 60
|
||||||
|
REFERENCE_N_ITER ?= 4000
|
||||||
|
VERIFY_CSV := verify_$(VARIANT).csv
|
||||||
|
|
||||||
|
.PHONY: all main run bench run-bench bench-suite video sizes asm test clean clean-all verify
|
||||||
|
|
||||||
all: main
|
all: main
|
||||||
|
|
||||||
@@ -91,6 +97,18 @@ main: clean
|
|||||||
run: main
|
run: main
|
||||||
./$(TARGET) $(N_P) $(N_ITER) $(CSV)
|
./$(TARGET) $(N_P) $(N_ITER) $(CSV)
|
||||||
|
|
||||||
|
# make verify # sanity check (baseline vs reference)
|
||||||
|
# make verify VARIANT=v1_cutoff # check a specific variant
|
||||||
|
verify: main
|
||||||
|
./$(TARGET) $(REFERENCE_N_P) $(REFERENCE_N_ITER) $(VERIFY_CSV)
|
||||||
|
@if cmp -s $(REFERENCE_CSV) $(VERIFY_CSV); then \
|
||||||
|
echo "PASS: variant '$(VARIANT)' matches $(REFERENCE_CSV) bit-exact"; \
|
||||||
|
rm -f $(VERIFY_CSV); \
|
||||||
|
else \
|
||||||
|
echo "FAIL: variant '$(VARIANT)' differs from $(REFERENCE_CSV) (kept $(VERIFY_CSV) for inspection)"; \
|
||||||
|
exit 1; \
|
||||||
|
fi
|
||||||
|
|
||||||
# make bench : compile the main executable with benchmarking enabled.
|
# make bench : compile the main executable with benchmarking enabled.
|
||||||
bench: CXXFLAGS += -DBENCHMARK=1
|
bench: CXXFLAGS += -DBENCHMARK=1
|
||||||
bench: clean
|
bench: clean
|
||||||
|
|||||||
Reference in New Issue
Block a user