You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add flexible configuration options to CMake for building/reusing tools #4662
We have a few components like iree_check_test that require some tools to exist, but they don't necessarily need to (or can't, depending on the build configuration) build those tools themselves.
We currently use -DIREE_HOST_BINARY_ROOT=$PWD/../build-host/install and CMAKE_CROSSCOMPILING together with iree_get_executable_path as the main way to control what gets build or reused where:
I ran into this when trying to create a job that builds the IREE benchmarks (essentially import and compile some TFLite models). Currently they're built as part of the android build, which really doesn't make any sense and is not something I want to duplicate in the migration to GitHub actions. It appears that there's no way to build them using prebuilt host tools. You have to do a full host build.
I ran into this when trying to create a job that builds the IREE benchmarks (essentially import and compile some TFLite models). Currently they're built as part of the android build, which really doesn't make any sense and is not something I want to duplicate in the migration to GitHub actions. It appears that there's no way to build them using prebuilt host tools. You have to do a full host build.
Can you elaborate which tools exactly where causing trouble and required a full host build?
I think the change in 5189399 was enough to enable this. I also audited our usage of CMAKE_CROSSCOMPILING and what we have today looks good (no unnecessary restrictions).
function(iree_get_executable_path OUTPUT_PATH_VAR EXECUTABLE)
- if (NOT CMAKE_CROSSCOMPILING OR TARGET "${EXECUTABLE}")+ if (NOT DEFINED IREE_HOST_BINARY_ROOT OR TARGET "${EXECUTABLE}")
we might want to rename or better document IREE_HOST_BINARY_ROOT to better convey "I want to use binary files / tools from this directory instead of building them from CMake targets" though.
I've also noticed that IREE_HOST_BINARY_ROOT actually has to point one directory above the root where IREE binaries are. It points to a directory containing a directory called "bin" that has the binaries. Basically it's an IREE install directory. I think we should probably name it based on that. Maybe IREE_TOOLS_INSTALL?
Activity
GMNGeoffrey commentedon Aug 8, 2022
I ran into this when trying to create a job that builds the IREE benchmarks (essentially import and compile some TFLite models). Currently they're built as part of the android build, which really doesn't make any sense and is not something I want to duplicate in the migration to GitHub actions. It appears that there's no way to build them using prebuilt host tools. You have to do a full host build.
marbre commentedon Aug 10, 2022
Can you elaborate which tools exactly where causing trouble and required a full host build?
ScottTodd commentedon Aug 24, 2022
I think the change in 5189399 was enough to enable this. I also audited our usage of
CMAKE_CROSSCOMPILINGand what we have today looks good (no unnecessary restrictions).we might want to rename or better document
IREE_HOST_BINARY_ROOTto better convey "I want to use binary files / tools from this directory instead of building them from CMake targets" though.I'll see if I can tweak
iree/.github/workflows/ci.yml
Lines 513 to 518 in d9e6eb7
GMNGeoffrey commentedon Aug 24, 2022
I've also noticed that
IREE_HOST_BINARY_ROOTactually has to point one directory above the root where IREE binaries are. It points to a directory containing a directory called "bin" that has the binaries. Basically it's an IREE install directory. I think we should probably name it based on that. MaybeIREE_TOOLS_INSTALL?Rework build_benchmarks to reuse already built host tools. (#10190)
Squashed commit of the following:
Flip checks from CMAKE_CROSSCOMPILING to IREE_HOST_BINARY_ROOT. (#11439)
Replace CMake `IREE_HOST_BINARY_ROOT` var with `IREE_HOST_BIN_DIR`. (#…