-
Notifications
You must be signed in to change notification settings - Fork 13
Add all_function_sizes and function_size EGraph methods
#338
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
Conversation
|
@actions-user changelog |
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.
Pull Request Overview
Adds functionality to inspect function sizes in the Python EGraph API by exposing the function-size egglog command. This includes methods to get the size of a specific function or all functions, and handles conversion between egglog function names and Python callable objects.
Key Changes
- Added
function_size()andall_function_sizes()methods to EGraph class for inspecting function table sizes - Implemented
create_callable()function to convert egglog function references back to Python callable objects - Added comprehensive test coverage for various callable types (functions, methods, constants, etc.)
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| python/egglog/egraph.py | Adds function size inspection methods and ExprCallable type alias |
| python/egglog/runtime.py | Implements create_callable utility and improves RuntimeClass/RuntimeFunction representations |
| python/egglog/egraph_state.py | Fixes constructor/function registration logic for builtin classes |
| python/tests/test_high_level.py | Adds comprehensive test coverage for function size inspection |
| docs/reference/egglog-translation.md | Documents the new function size inspection functionality |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
CodSpeed Instrumentation Performance ReportMerging #338 will not alter performanceComparing Summary
Footnotes |
Exposes
function-sizeegglog command in Python. Handles also turning egglog function back into Python functions if no function name is specified and all functions should be checked.