| 796 | |
| 797 | |
| 798 | def build_parser() -> argparse.ArgumentParser: |
| 799 | parser = argparse.ArgumentParser( |
| 800 | prog="orchestrate", |
| 801 | description="AutoKernel Multi-Kernel Orchestrator", |
| 802 | ) |
| 803 | sub = parser.add_subparsers(dest="command", required=True) |
| 804 | |
| 805 | sub.add_parser("status", help="Show current optimization state") |
| 806 | sub.add_parser("next", help="Determine which kernel to optimize next") |
| 807 | |
| 808 | rec = sub.add_parser("record", help="Record an experiment result") |
| 809 | rec.add_argument("kernel_file", help="Kernel file path (e.g. workspace/kernel_matmul_1.py)") |
| 810 | rec.add_argument("throughput_tflops", type=float, help="Throughput in TFLOPS") |
| 811 | rec.add_argument("status", help="Experiment status: kept | revert | failed | crash | timeout") |
| 812 | rec.add_argument("description", help="Brief description of the experiment") |
| 813 | |
| 814 | sub.add_parser("report", help="Generate aggregate optimization report") |
| 815 | sub.add_parser("plan", help="Show optimization plan with Amdahl's law analysis") |
| 816 | |
| 817 | return parser |
| 818 | |
| 819 | |
| 820 | def main() -> None: |