Introducing Optimization Gradio UI#105
Merged
kaiming-cheng merged 5 commits intomainfrom Feb 26, 2026
Merged
Conversation
Jack-Khuu
approved these changes
Feb 25, 2026
Contributor
Jack-Khuu
left a comment
There was a problem hiding this comment.
Stamp to unblock
Can you share a video or screenshots
| # ------------------------ | ||
|
|
||
|
|
||
| def _call_llm( |
Contributor
There was a problem hiding this comment.
Can you check that something like this doesn't already exist?
Contributor
Author
There was a problem hiding this comment.
We can refactor this util in future prs. right now some util is in the worker.py which can be a bit confusing
| def _benchmark_initial_kernel( | ||
| self, initial_kernel: str, problem_file: Path | ||
| ) -> float: | ||
| """Benchmark the initial kernel before optimization begins. |
Contributor
There was a problem hiding this comment.
Do we benchmark for the generated kernels as they get iterated?
Seems peculiar that we need a new function
added 3 commits
February 25, 2026 20:11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/optimization_ui.py): Gradio interface for the kerneloptimization pipeline with live log streaming, per-worker log panels, and strategy
selection (greedy / beam search)
benchmark_pytorch_compile()to benchmark againsttorch.compile, and manager-level benchmarking of the initial kernel. Results tableshows Best Time, Initial Kernel, PyTorch Eager, PyTorch Compile, and Speedup vs Initial
updates live during optimization (reads program database on each poll); per-round
collapsible accordion in Best Kernel tab
prominent speedup emoji on new-best messages, default example pre-loaded on launch
Queue.close()/join_thread(),Process.close(), andkill()fallback inopt_manager.pyto prevent UI hangs afteroptimization; added generator timeout as safety net
/home/kaimingcheng/ka/KernelBenchpathin example
test_kernel.pyfiles withfrom problem import Model, get_inputs, get_init_inputsExample when starting an optimization jobs
Example when optimization is completed