[Fix][Build System] Include necessary header files in archive distrubution#24596
[Fix][Build System] Include necessary header files in archive distrubution#24596Minterl wants to merge 6 commits into
Conversation
799ba8d to
97bad23
Compare
Thanks! I personally am not aware of any, but I'll still leave the review to @AGindinson. Could you fix the linter error and check if the release archive now includes the headers though? |
AGindinson
left a comment
There was a problem hiding this comment.
Thank you for the fix! This looks good to me, bar the alphabetic ordering errors as mentioned by @egebeysel. I would suggest we get one more review.
|
Hi :) thank you for the fix. Unfortunately the change for the build files in IREE runtime base are not sufficient. With a dummy project of the form: CMakeLists.txt cmake_minimum_required(VERSION 3.21)
project(iree_dist_repro C)
set(IREE_DIST "" CACHE PATH "Path to extracted IREE distribution")
add_executable(repro main.c)
target_include_directories(repro PRIVATE
"${IREE_DIST}/include"
)
target_link_directories(repro PRIVATE
"${IREE_DIST}/lib"
)
target_link_libraries(repro PRIVATE
iree_runtime_unified
)main.c #define IREE_ALLOCATOR_SYSTEM_CTL iree_allocator_libc_ctl
#include "iree/runtime/api.h"
int main(void) {
iree_allocator_t allocator = iree_allocator_system();
(void)allocator;
return 0;
}I still get errors during compilation on missing includes: To fix this I think you also need to update:
|
Those files are generated by the |
Signed-off-by: Mike Interlandi <43190101+Minterl@users.noreply.github.com>
Signed-off-by: Mike Interlandi <43190101+Minterl@users.noreply.github.com>
Signed-off-by: Mike Interlandi <43190101+Minterl@users.noreply.github.com>
Signed-off-by: Mike Interlandi <43190101+Minterl@users.noreply.github.com>
Signed-off-by: Mike Interlandi <43190101+Minterl@users.noreply.github.com>
Signed-off-by: Mike Interlandi <43190101+Minterl@users.noreply.github.com>
As an uninformed external observer, this seems counterintuitive given the binary distributions are about two clicks away from the IREE homepage (see https://iree.dev/building-from-source/). The compiler features a complete set of headers in the tarball, and without the context I am missing, I cannot see why the runtime should not. I wanted to embed the IREE runtime, and the documentation lead me to believe that the distributions were the primary means of doing so (again, I may be missing something). |
|
The recommended way to use the runtime has been via the full source, not a binary distribution, see for example:
This was all set up several years ago though, so if current project contributors want something different I think other choices could be made today. The archive distributions in particular have gone through very few design iterations and I'm not aware of too many users of them. |
|
My use case highly favors the binary distribution, since it would mean Obviously, development velocity in unsupported language bindings doesn't need to be a priority in decision making, but supporting binary distributions beyond their current state does make integrating IREE into external projects significantly easier. |
|
What are you looking for with "embedding the runtime"? IREE does not provide runtime binaries (e.g. ^ There were experiments with https://github.com/iree-org/iree-experimental/tree/main/runtime-library, which may be useful |
|
@ScottTodd, thanks a lot for the explanation on the current state and all the links, it's very helpful! I think we all agree that the runtime distribution should either be usable or get dropped altogether to avoid confusion. Given that there's clear user interest (#21571, #24590), supporting at least some of binary distribution use-cases seems like a much better direction to me. This would enable quicker experimental adoption of IREE RT in user projects, albeit with suboptimal performance, so that one can assess the functionality before deciding to build from source. This PR is a good first step in that direction because of the aforementioned issues. I personally don't see a way around making However which way we improve the header situation, there's more items to handle before we claim maintained support of the dist flow – in my opinion, we'd need to add appropriate integration tests, test out if we can leverage more LTO when |
Manewing
left a comment
There was a problem hiding this comment.
Verified this works now with the above mentioned CMake setup
closes #24590
Some header files were listed as sources and vice versa.
I took the liberty of rearranging more than just the one allocator.h, so if there's some context I should have been aware of I'd be happy to revert whatever necessary.