commit | 11388b8f54620c1f960aa9eb7a8d573e3b6d1335 | [log] [tgz] |
---|---|---|
author | Lei Zhang <antiagainst@google.com> | Wed Jun 14 00:41:18 2023 -0400 |
committer | GitHub <noreply@github.com> | Wed Jun 14 00:41:18 2023 -0400 |
tree | dfa9f19a0be3eb048efc79380b424595ace6ef4f | |
parent | bed276374644b04750d7dbb4f556c8f7756102cf [diff] | |
parent | 028acfb596c6b3b1d10764d3d4552911a67fca45 [diff] |
[metal] Implement a Metal HAL driver (#12713) This pull request resurrects the previously removed Metal HAL driver due to HAL revamping. It now implements the HAL driver using Objective-C, instead of Objective-C++ like previously. We also explicitly track resource lifetimes and manage dependencies, following IREE explicitness. Right now the following features are implemented: - HAL driver: device emulation, and some feature printing - HAL device: resource creation, kernel launches, and sync - HAL allocation: simple allocator without any caching or sub allocation (we expect common layer for those later) - HAL command buffer: one-shot command buffer, both direct and indirect dispatches - HAL executables: both compile to MSL and `.metallib` - HAL executable caches: just simple no op cache for now - HAL builtin executables: for filling/copying buffers - HAL semaphore: real async queue execute, but not stream-ordered allocation yet The implementation right now assumes Metal3 devices. It passes all existing CTS tests, end-to-end StableHLO and TOSA op and model tests in tree for Apple M1 MacBook. Fixes https://github.com/openxla/iree/issues/4370
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.