From 4d3f2afaa6d044883cbdcd21903104d0239181b1 Mon Sep 17 00:00:00 2001 From: ycmath Date: Wed, 26 Aug 2026 14:25:23 +0900 Subject: [PATCH] Fix non-memcpy benchmark path saving raw timestamps instead of cycle counts The non-memcpy benchmark path called copy_back_benchmark_data, which returns a (cycle_start, cycle_stop) tuple of absolute timestamps, and bound it to cycle_counts. As a result perf_cycles.npy stored the two stacked timestamp arrays rather than elapsed cycles, and the printed "Cycle count" was computed from absolute timestamps. Call copy_back_benchmark_cycles, which returns the stop-start difference, matching the memcpy path. Co-Authored-By: Claude Fable 5 --- spada/runtime/runtime.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spada/runtime/runtime.py b/spada/runtime/runtime.py index 9ef3adc6..394c8a66 100644 --- a/spada/runtime/runtime.py +++ b/spada/runtime/runtime.py @@ -389,7 +389,7 @@ def __call__(self, *args, **kwargs) -> Dict[str, np.ndarray]: print("Copy-back complete.", flush=True) if self.benchmark and not self.metadata.memcpy_mode: - cycle_counts = copy_back_benchmark_data(self.runtime, self.metadata) + cycle_counts = copy_back_benchmark_cycles(self.runtime, self.metadata) np.save(self.output_dir / "perf_cycles.npy", cycle_counts) print_cycle_counts("Cycle count", cycle_counts)