mirror of
https://github.com/SikongJueluo/Mini-Nav.git
synced 2026-07-12 20:15:31 +08:00
feat(benchmarks): add noise injection experiment support to CAM retrieval benchmark
- Remove hard assertion blocking WRITE_NOISE_EN=1 in retrieval benchmark tests - Add conditional exact_match assertion: enforces 100% when noise=off, skips when noise=on - New script run_retrieval_noise_sweep.py: sweeps noise 0–100% (step 10%) and produces markdown summary - Add just recipes: cam-benchmark-retrieval-sweep, cam-benchmark-sweep-cifar10, cam-benchmark-sweep-cifar100 - Add rsync-based remote sync commands for outputs and docs
This commit is contained in:
@@ -288,8 +288,6 @@ async def cam_retrieval_benchmark(dut):
|
||||
write_noise_rate_den = int(get_param(dut, "WRITE_NOISE_RATE_DEN", 100) or 100)
|
||||
mode = mode_from_params(write_noise_en)
|
||||
|
||||
if write_noise_en:
|
||||
raise AssertionError("First retrieval benchmark version only supports WRITE_NOISE_EN=0")
|
||||
if num_rows % lanes != 0:
|
||||
raise AssertionError("Retrieval benchmark requires NUM_ROWS divisible by LANES")
|
||||
|
||||
@@ -355,4 +353,13 @@ async def cam_retrieval_benchmark(dut):
|
||||
str(out_dir.relative_to(_project_root())),
|
||||
)
|
||||
|
||||
assert result["metrics"]["5"]["exact_match_rate"] == 1.0
|
||||
if write_noise_en == 0:
|
||||
assert result["metrics"]["5"]["exact_match_rate"] == 1.0, (
|
||||
f"Expected perfect exact match with no noise, got "
|
||||
f"{result['metrics']['5']['exact_match_rate']}"
|
||||
)
|
||||
else:
|
||||
dut._log.info(
|
||||
"Noise enabled (WRITE_NOISE_RATE=%d/%d) — exact_match assertion skipped",
|
||||
write_noise_rate_num, write_noise_rate_den,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user