Replies: 3 comments 7 replies
-
Hi, thanks for including all of those details! The IREE project contains both a compiler and a set of runtime libraries. The compiler depends on LLVM and a few other large/complex tools, while the runtime libraries use minimal dependencies. We typically expect that developers will run the compiler on a "host" platform like Linux/Windows/macOS after either building it from source or using one of our binary distributions (e.g. install from Python's pip). After compiling programs ahead of time, we expect that developers will run those compiled programs on a "target" platform like Linux/Windows/macOS/Android/iOS/an embedded device/the web/etc. The Android docs you linked (https://iree-org.github.io/iree/building-from-source/android/) show how that works in practice for one target platform, configuring CMake for the target build with Now, for the specific errors with Lines 622 to 628 in 663b1a7 iree/build_tools/embed_data/CMakeLists.txt Lines 7 to 9 in 663b1a7 If you're committed to building the compiler for iOS and not just macOS, you can try removing those |
Beta Was this translation helpful? Give feedback.
-
Thank you, @ScottTodd ! I set "IREE BUILD COMPILER=OFF" to the following.
There are still errors as shown in the second version of the gist at https://gist.github.com/wangkuiyi/0b37a810e377ab5d182548c7ed7867a9. But now they seem to be about macOS builds. I deduplicated the errors
A little bit more context.
All of these errors are caused by the call to the |
Beta Was this translation helpful? Give feedback.
-
@wangkuiyi: @ScottTodd did a great job to explain how the compilation flow should work in general. Echoing his point that normally we don't need to cross-compile and run the compilers on the target device (iOS here); they are meant to be invoked on the host device (macOS) to compile the source model into deployable formats (IREE vmfb files) that contains both the host scheduling logic and device native kernels (dylib for CPU, SPIR-V for Vulkan, etc.). I tried out iOS cross compilation on my side; there are a few small issues to be fixed to make it work actually, which I sent out separate pull requests for them. With them, the following should work:
Though I don't have an iPhone at my side so cannot verify it works properly. Also those binaries built are meant to be invoked from command-line as they are developer tools effectively. Proper mobile apps should be linking/calling into IREE libraries directly. |
Beta Was this translation helpful? Give feedback.
-
I wish I could help make IREE work on iOS. So, I learned how to build IREE for the host and Android from the tutorial. @antiagainst told me that the IREE Vulcan backend could be a good example for Metal. Now, I think the first thing I should do is build IREE for iOS before adding new features like the Metal backend. I hope that IREE's CPU backend will help me with the first demo.
So, I tried to find a CMake command line for iOS comparable to the Android one. I took options for CMake from the following places.
Unfortunately the following command shows two error messages over and over again.
The stdout and stderr combined output is at https://gist.github.com/wangkuiyi/0b37a810e377ab5d182548c7ed7867a9.
Greping shows that all errors came out from two places.
More context about these two errors.
I don't know enough about CMake to understand the above errors. Can anyone help?
Beta Was this translation helpful? Give feedback.
All reactions