`iree_c_embed_data` improvements (#13814)
* Reconcile CMake with Bazel by dropping the CMake-specific
`GENERATED_SRCS` argument and instead just putting everything in `SRCS`,
like in Bazel.
* To bridge that difference, `bazel_to_cmake_converter.py` was facing
the impossible task of choosing, for each `srcs` entry, whether to put
it in `SRCS` or `GENERATED_SRCS`. It was simply deciding that based on
whether the leading character was a `:`, offering a way to distinguish
generated files in the case where they were generated within the current
package. But that didn't generalize to generated files from other
packages.
* In `SRCS` support various syntaxes for files in the source or in the
build directory (generated files) and automatically do the right thing
to match Bazel. In particular, make it simple to reference generated
files in a subdirectory.
* Concretely, to address #13804, ukernel bitcode will need to reference
generated bitcode in architecture-specific subdirectories.
* In `generate_embed_data_main.cc`, generate clear errors on failure to
open an input/output file (would've saved some head scratching).
For some reason, this exposed an issue in `hal/cts`. The filenames were
missing a `"${TARGET_BACKEND}_"` prefix and somehow that was still
working; now with my changes that wasn't working anymore. Fixed by
adding the missing prefixes.
(This commit is one of a chain in completing
https://github.com/openxla/iree/issues/13804).IREE (Intermediate Representation Execution Environment, pronounced as “eerie”) is an MLIR-based end-to-end compiler and runtime that lowers Machine Learning (ML) models to a unified IR that scales up to meet the needs of the datacenter and down to satisfy the constraints and special considerations of mobile and edge deployments.
See our website for project details, user guides, and instructions on building from source.
IREE is still in its early phase. We have settled down on the overarching infrastructure and are actively improving various software components as well as project logistics. It is still quite far from ready for everyday use and is made available without any support at the moment. With that said, we welcome any kind of feedback on any communication channels!
See our website for more information.
IREE is licensed under the terms of the Apache 2.0 License with LLVM Exceptions. See LICENSE for more information.