Repository navigation
Move llvm-external-projects/iree-compiler-api -> iree/compiler/API. - #8911
Merged
Merged
Conversation
Non-functional changes:
* Relayers the build so that we can simply delegate to the LLVM macros for C/Python API building.
* Various escalation of include hack battle.
* Brings the compile_sample_module.py test from a sample which did not run to a real test.
* Reworks tests to be based on IREE macros (as possible). No more magic.
* Retired the old build/install locations for this piece: PYTHONPATH=${iree_build}/bindings/python gets everything now.
Functional changes:
* Since this is "in-tree" now, includes are laid out per the rest of the project. So:
* `#include <iree-compiler-c/Compiler.h>` -> `#include <iree/compiler/Api/Compiler.h>
* Adds `iree.compiler.transforms.ireec.register_all_dialects(context)`, needed to make the `compile_sample_module.py` test work (Fixes iree-org#8604).
* iree/compiler/setup.py should now work from both the source and build dir. If using from the latter, it will use in-situ artifacts (will not rebuild).
In a subsequent change, I will do a similar refactoring for the Python runtime API and update user docs. For now the iree/compiler/README.md has instructions for building/installing a Python package from source (we've never had documentation for this, so something > nothing and we can move it around later).
For integration into internal Google, this shouldn't require more than some path changes from `llvm-external-projects/iree-compiler-api` -> `iree/compiler/Api` in BUILD files.
Fixes iree-org#8597
Progress on iree-org#6958
Progress on iree-org#3817
stellaraccident
requested review from
GMNGeoffrey,
ScottTodd and
benvanik
as code owners
April 18, 2022 02:06
Collaborator
Author
|
@powderluv This should make some things easier for you wrt Python building. Now you can use |
Collaborator
|
Can this please be API to match our existing style in the compiler? |
Collaborator
Author
Yeah, np. I never remember how we capitalize acronyms... thought I got it right... |
Collaborator
Author
|
PTAL |
jpienaar
reviewed
Apr 18, 2022
jpienaar
left a comment
Member
There was a problem hiding this comment.
Partial scan/haven't gotten to last couple of files here yet but wanted to send interim feedback to pipeline it.
benvanik
approved these changes
Apr 18, 2022
ScottTodd
added a commit
that referenced
this pull request
Jun 6, 2022
This list of CMake options was moved into their own file in #8423, for inclusion in `llvm-external-projects/iree-compiler-api/CMakeLists.txt`, which used an "out of tree" build setup. The `llvm-external-projects/iree-compiler-api/` directory was then moved back "in tree" to `iree/compiler/API` in #8911. We can now move the options back into the root file, where they will be easier to read alongside other high level project options.
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.
Non-functional changes:
Functional changes:
#include <iree-compiler-c/Compiler.h>->#include <iree/compiler/Api/Compiler.h>iree.compiler.transforms.ireec.register_all_dialects(context), needed to make thecompile_sample_module.pytest work (Fixes IREE Python API does not register LLVMIR translations #8604).In a subsequent change, I will do a similar refactoring for the Python runtime API and update user docs. For now the iree/compiler/README.md has instructions for building/installing a Python package from source (we've never had documentation for this, so something > nothing and we can move it around later).
This also opens a path for us to test packaging as part of presubmit, without doing another build. Likewise, we can now generate installable Python binary artifacts and use them in subsequent build/test steps (without another build).
For integration into internal Google, this shouldn't require more than some path changes from
llvm-external-projects/iree-compiler-api-> `iree/compiler/API in BUILD files.Fixes #8597
Progress on #6958
Progress on #3817