commit | b6c7c62d15bffe4d218bab1df707799251835c22 | [log] [tgz] |
---|---|---|
author | bjacob <benoitjacob@google.com> | Fri Oct 13 18:36:21 2023 -0400 |
committer | GitHub <noreply@github.com> | Fri Oct 13 18:36:21 2023 -0400 |
tree | 3e6e9f66522b7df7c118975fedaf6b2be8a7735c | |
parent | c397258f87007840b8b66e66789400a9daef1c68 [diff] |
Limit the latency of e2e matmul tests (#15180) Now that I have an AMD workstation, I'm running e2e matmul tests with Vulkan for the first time, and I'm horrified how slow it is. Test latencies ~ 1 minute. Profiling, found that that's due to the slow reference matmul code that this is comparing against. And it's got nothing to do with GPU, it's just that the GPU e2e matmul tests are the only ones exercising really large sizes. It's roughly equally slow on all element types. There isn't a perfect solution to that problem. Tests need to compare against some reference. Golden test data is a pain to maintain. "Reference" implementations that are actually optimized are a combination of less reliable and more maintenance. And so on. I do believe though that test latency is very important as it affects everyone's productivity. This PR adds a command-line flag to the e2e matmul test runner: ```c IREE_FLAG( int32_t, max_elements_to_check, 10000, "Maximum number of matrix elements to check for each matmul. For larger " "matrices, only every n-th element will be checked for some n chosed to " "stay just under that threshold and to avoid being a divisor of the inner " "dimension size to avoid special patterns. As the check uses a slow " "reference implementation, this is a trade-off between test latency and " "coverage. The value 0 means check all elements."); ``` Timing this test command: ``` ctest -R e2e_matmul_.*_vulkan -j32 ``` Before: total latency 48 seconds, `266.22 sec*proc`. After: total latency 3.7 seconds, `20.43 sec*proc`. => 13x latency shrink
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.