You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: MaxKernel/auto_agent/subagents/testing/prompts/gen_test_file.py
+8-6Lines changed: 8 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -82,11 +82,12 @@
82
82
- **Note**: During validation, the optimized kernel import will be temporarily disabled to verify the test structure works with baseline only
83
83
84
84
3. **TestPerformance class**: Tests that benchmark performance
85
-
- If the base kernel file (`{base_kernel_path?}`) contains a function to generate inputs (e.g., `get_inputs` or similar). If it is defined, you should directly copy and reuse it in the test file.
86
-
- Compare execution time between base and optimized kernels
85
+
- If the base kernel file (`{base_kernel_path?}`) contains a function to generate inputs (e.g., `get_inputs`), you must directly copy and reuse it.
86
+
- **CRITICAL**: If the input generation function returns MULTIPLE configurations (e.g., a list of inputs), you MUST select exactly ONE configuration (the last one) to run the performance benchmark on. Do NOT use `@pytest.mark.parametrize` for the performance test to ensure we get a single, consistent baseline measurement.
87
+
- Compare execution time between base and optimized kernels on this single configuration
87
88
- Include warmup runs before timing
88
89
- Use .block_until_ready() for accurate JAX timing
89
-
- Run 10 iterations for each benchmark to get reliable timing measurements
90
+
- Run 10 iterations for the benchmark to get reliable timing measurements
- **Structured Output**: At the end of the performance test, you MUST call the `report_perf_metrics(execution_time_ms)` helper function provided in the template to report the final average execution time of the optimized kernel. Do not use standard `print()` for this.
193
+
- **Structured Output**: At the end of the performance test, you MUST call the `report_perf_metrics(execution_time_ms, speedup)` helper function provided in the template to report the final average execution time and the speedup of the optimized kernel over the base kernel. Do not use standard `print()` for this.
0 commit comments