-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MLIR/Frontend] C++ compiler driver improvements, ability to compile …
…textual IR (#216) **Context**: The process of lowering from MLIR to binary went through several subprocess calls. Each subprocess call would create a new process (either quantum-opt or mlir-hlo opt). Between each subprocess call, there was a need to dump the IR into a textual representation and parse it again in the next subprocess to an in-memory representation. This process can be inefficient and compilation times would increase proportionally to the size of the program. This design also had the disadvantage of increased binary size. Since quantum-opt and mlir-hlo-opt shared the common libraries from LLVM and MLIR which were linked statically, the size of the package was larger than needed. **Description of the Change:** - There is now a C++ compiler driver that avoids dumping and parsing the intermediate representation between stages. Reducing compilation time and package size. - The C++ driver compiles an MLIR module down to an object binary file. - General refactoring, separating out the extensions from the driver into separate pybind modules. - Addition of the ability to use `@qjit` on a string containing textual IR (MLIR at any level and LLVM IR) and get it to run from Python. - Enzyme module is updated to be compiled statically. **Benefits:** Improved compilation time Reduced package size. [sc-41430] [sc-41704] --------- Co-authored-by: Ali Asadi <[email protected]> Co-authored-by: Sergei Mironov <[email protected]> Co-authored-by: David Ittah <[email protected]> Co-authored-by: Erick <[email protected]> Co-authored-by: erick-xanadu <[email protected]>
- Loading branch information
1 parent
2c38488
commit 64be9d2
Showing
38 changed files
with
1,780 additions
and
956 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.