-
Notifications
You must be signed in to change notification settings - Fork 40
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
Structural refactor of the compilation_pipelines module #529
Conversation
A newly created `tracing` sub-module (technically sub-package) will over time contain all functionality pertaining to program capture from Python. In this commit, the utils/contexts.py module is moved over without code changes.
To reduce the size of classes, certain functions, especially static methods, are factored out into a reusable module. The module is part of the new tracing sub-module in Catalyst.
To reduce class bloat and organize all debug functionality into a single interface, some functions are moved to the existing debug module.
Hello. You may have forgotten to update the changelog!
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #529 +/- ##
==========================================
- Coverage 99.55% 99.52% -0.04%
==========================================
Files 43 45 +2
Lines 7866 7941 +75
Branches 537 537
==========================================
+ Hits 7831 7903 +72
- Misses 18 20 +2
- Partials 17 18 +1 ☔ View full report in Codecov by Sentry. |
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 great! 🥳
Co-authored-by: erick-xanadu <110487834+erick-xanadu@users.noreply.github.com>
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.
Very clean, great separation of modules 💯
de6fe29
to
2ce0add
Compare
This is part 2 of a refactor started in #529. The QJIT class is reworked into 5 distinct compilation stages: - pre-compilation (like autograph) - capture (jaxpr generation) - ir-generation (mlir generation) - compilation (llvm and binary code generation - cannot be split up since this happens in the compiler driver) - execution The class is also streamlined by using a new compilation cache to handle previously compiled functions and signature lookups. One point of contention might be the results produced by the split of the `trace_to_mlir` function, which have been simplified and need to be double checked against #520. EDIT: c71c322 should address this concern [sc-57014] closes #268 closes #520
This is part 1 of a QJIT refactor which reorganizes some of the classes and methods in the `compilation_pipelines.py` module. The second part will refactor the `QJIT` class itself. Benefits: - a new `tracing` sub-module is created that will over time contain all functionality pertaining to program capture from Python - reusable functions are grouped together by their purpose, such as signature handling and debugging - classes and modules are slimmed down and more focused - improved docstrings Linting is not done yet, and I will also add changelog. [sc-57014] --------- Co-authored-by: erick-xanadu <110487834+erick-xanadu@users.noreply.github.com>
This is part 2 of a refactor started in #529. The QJIT class is reworked into 5 distinct compilation stages: - pre-compilation (like autograph) - capture (jaxpr generation) - ir-generation (mlir generation) - compilation (llvm and binary code generation - cannot be split up since this happens in the compiler driver) - execution The class is also streamlined by using a new compilation cache to handle previously compiled functions and signature lookups. One point of contention might be the results produced by the split of the `trace_to_mlir` function, which have been simplified and need to be double checked against #520. EDIT: c71c322 should address this concern [sc-57014] closes #268 closes #520
This is part 1 of a QJIT refactor which reorganizes some of the classes and methods in the
compilation_pipelines.py
module. The second part will refactor theQJIT
class itself.Benefits:
tracing
sub-module is created that will over time contain all functionality pertaining to program capture fromPython
Linting is not done yet, and I will also add changelog.
[sc-57014]