-
Notifications
You must be signed in to change notification settings - Fork 28
[Optimization 7/n] Add Knowledge Database to Kernel optimization #85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
b9cb0d7 to
84708fd
Compare
Jack-Khuu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, is it hard to add the integration code using the RAG into this PR too?
Remember to cite for the code_samples/docs
- Drop
[Optimization 7/n]from the title just to avoid confusion
| self.opt_children.remove(child) | ||
|
|
||
| def add_parents(self, parent_nodes): | ||
| """Adds a child node to the current node.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment on this is the same as add_children
Let's also add type hints to the args
| """Adds a child node to the current node.""" | ||
| self.opt_parents.extend(parent_nodes) | ||
|
|
||
| def remove_parents(self, parent_nodes): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this for any reason?
| level_1_opts = [optnode_latency, optnode_memory, optnode_utilization] | ||
| self.root.add_children(level_1_opts) | ||
| optnode_latency.add_parents([self.root]) | ||
| optnode_memory.add_parents([self.root]) | ||
| optnode_utilization.add_parents([self.root]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: For legibility can we add a helper like add_relation or something that updates the child+parent symmetrically
It's easy to parse here, but level3 is a harder to parse
This PR Introduces a hierarchical optimization database that stores GPU kernel optimization techniques and code examples for the RAG-based optimization.
Key components:
Optimization techniques covered:
This database enables the agent to retrieve relevant optimization strategies and reference implementations based on diagnosed performance bottlenecks.