Print greppable summary for agent log parsing.
(
correctness_status: str, speedup: float,
uid: str, name: str, data: Dict[str, Any],
)
| 673 | |
| 674 | |
| 675 | def _print_summary( |
| 676 | correctness_status: str, speedup: float, |
| 677 | uid: str, name: str, data: Dict[str, Any], |
| 678 | ) -> None: |
| 679 | """Print greppable summary for agent log parsing.""" |
| 680 | print() |
| 681 | print("=" * 65) |
| 682 | print("SUMMARY") |
| 683 | print("=" * 65) |
| 684 | print(f"problem: {uid}") |
| 685 | print(f"name: {name}") |
| 686 | print(f"correctness: {correctness_status}") |
| 687 | print(f"speedup: {speedup:.3f}x") |
| 688 | print(f"kernel_time_ms: {data.get('kernel_time_ms', 0):.4f}") |
| 689 | print(f"reference_time_ms: {data.get('reference_time_ms', 0):.4f}") |
| 690 | print(f"stability: {data.get('stability', 'SKIP')}") |
| 691 | print(f"determinism: {data.get('determinism', 'SKIP')}") |
| 692 | print(f"peak_vram_mb: {data.get('peak_mb', 0):.1f}") |
| 693 | print(f"worst_max_abs_error: {data.get('worst_max_abs_error', 0):.6e}") |
| 694 | for threshold in [1.0, 1.1, 1.25, 1.5, 2.0, 3.0, 5.0]: |
| 695 | passes = correctness_status == "PASS" and speedup >= threshold |
| 696 | print(f"fast_{threshold}: {'PASS' if passes else 'FAIL'}") |
| 697 | print("=" * 65) |
| 698 | |
| 699 | |
| 700 | def _save_results(uid, correctness, stability, determinism, perf, vram, meta): |