commit | 750de593b6f7cfdb43c5fa67a00666dac8ace431 | [log] [tgz] |
---|---|---|
author | Stella Laurenzo <stellaraccident@gmail.com> | Mon Feb 14 11:57:35 2022 -0800 |
committer | GitHub <noreply@github.com> | Mon Feb 14 11:57:35 2022 -0800 |
tree | b2c069e0f1546deb2b377ba0955bf82dd49675a6 | |
parent | b959830d762b0614d42a0cf3d2a623410cb3247a [diff] |
Rewrite Python function argument packing in C++. (#8311) * Rewrite Python function argument packing in C++. * This is a first step towards implementing all hot path code in C++. * With the Python code, I didn't have great performance baselines, but I estimate it was taking ~80-100us to do argument packing for a 3 item call. This patch: * Average of 8us total for argument packing for this case. * Average of 1us per DeviceArray. * Both numbers are for invocations with static reflection data (which is also now layered for easier access to it can be added at runtime if desired to make things faster). The dynamic case does a bit more work. * Once more of this is ported to C++, we can eliminate a lot more overhead by intercepting the tp_call protocol directly (vs doing list/dict manipulation). * This also fixes a critical bug where the Python "DEVICE_VISIBLE" enumeration value was actually set to IREE_HAL_MEMORY_TYPE_HOST_VISIBLE. I believe the result was that all arguments were being set up in a non optimal way (but we were still getting a latency boost from the results). Attempting to make this fix had the effect of opening a bug farm of other issues setting up a buffer allocation, so I ended up adding a TODO and re-enabling HOST_VISIBLE. Will triage more once this lands, now that is is possible to actually disable HOST_VISIBLE. * Need to check performance in a real setting. My maching is pretty noisy. I am seeing lower e2e numbers than before. * Release gil around invoke and buffer copy
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.