commit | 91b3ed5274f81a9fd414e3abd0c57a77074c420b | [log] [tgz] |
---|---|---|
author | Quinn Dawkins <quinn.dawkins@gmail.com> | Tue Jan 30 15:24:12 2024 -0800 |
committer | GitHub <noreply@github.com> | Tue Jan 30 18:24:12 2024 -0500 |
tree | 6f6ae5f064a683a9f13204f9561039b9b45067a6 | |
parent | a8c1e17c4179586d42753e71fc6c464f4cf11d86 [diff] |
Add samples for custom kernel match+replace scripts (#16150) Custom match and replace scripts is a workflow for injecting custom dispatches into a module without the need for any surrounding compiler infrastructure for building the dispatches. Custom kernels are paired with an externally authored script that matches a subgraph and replaces the subgraph with a call to the kernel, all delivered from independently valid IR. The examples here use the transform dialect to do this by adding a plugin point during preprocessing that will run the user provided specification. The flow demonstrated here requires authoring two functions per kernel alongside some additional boilerplate. 1. A `func.func @my_kernel(...)` that takes (typically tensor) arguments and includes the call to the custom dispatch inline. This can use any of the other custom dispatch approaches. 2. A `transform.named_sequence @my_matcher` that describes the compatible subgraph to match.
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.