commit | c2a3245ab55d9bd223105a52b3f13d39ab1f8b19 | [log] [tgz] |
---|---|---|
author | Scott Todd <scott.todd0@gmail.com> | Fri Mar 08 09:03:20 2024 -0800 |
committer | GitHub <noreply@github.com> | Fri Mar 08 09:03:20 2024 -0800 |
tree | 5ebcc738b58236991ddd547dde70103c4dbd130c | |
parent | b5af9963ff9ba8dcf872434a3a7b8c9bb999db0e [diff] |
Convert LLVMCPU compiler target to a plugin. (#16704) Fixes https://github.com/openxla/iree/issues/15468 🥳 * All compiler targets are now written as plugins * No more `iree::compiler::Tools::init_targets` target / `compiler/src/iree/compiler/Tools/init_targets.cc` file * `compiler/src/iree/compiler/Dialect/HAL/Target` now only contains generic/shared code This was _mostly_ mechanical, but I had to pay special attention to how CLI flags were set up. The other compiler targets had (nearly) 1:1 mappings between CLI flags and what the target consumed, but LLVMCPU has complex logic in `LLVMTarget::create()` (asking LLVM about CPU features, constructing target triples, etc.). To bridge that gap, I introduced a new `LLVMCPUTargetCLOptions` struct with the raw flag values that is converted into the regular `LLVMTargetOptions` struct fit for consumption throughout the rest of the plugin. I also needed to move the `LLVM_INITIALIZE_*` code around to keep `--iree-llvmcpu-list-targets` working with the change in initialization order. Might be able to move that back around once this settles.
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.