commit | 65690a1e175f9e81e815042775ec4628dbc7f548 | [log] [tgz] |
---|---|---|
author | Stella Laurenzo <stellaraccident@gmail.com> | Mon Jan 31 12:43:00 2022 -0800 |
committer | GitHub <noreply@github.com> | Mon Jan 31 12:43:00 2022 -0800 |
tree | 39d91b278f94bb4613002a0fbc3a907c79a3cbbc | |
parent | caedcd7a8fd37750e1302cb872edefec655e8303 [diff] |
Expose HAL low levels to Python and factor out a DeviceArray. (#8206) * Expose the HAL Allocator and Buffer directly in the Python API. * Supports explicit management of device memory and transfers. * Reworks function dispatch to be based on this. * Allows raw BufferViews to be passed into functions (vs an array) for expert control if needed. * Exposes allocator statistics to python. * Add a real DeviceArray class, implementing the numpy array and ufunc protocols. * Rewire the VM layer to always work on BufferView and the Python layer to coerce in/out of DeviceArray. * This eliminates the implicit map to host memory that was happening on function return. Instead this will be done only if accesses are done to the DeviceArray that need it on the host. * Generalize array input handling: DeviceArrays are not transferred back to the host to be passed to the next function and other framework __array__ implementations are coerced. * Add iree.runtime.asdevicearray (casing matches numpy) as a quick shortcut for getting a device array when you aren't *that* concerned about the details. * Support deepcopy/pickle (the TF tests use this). * Implement DeviceArray.astype (needed for two tflite tests).
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.