commit | 5feef4868aa2b4a088fa13c316b0e2a9f5924d01 | [log] [tgz] |
---|---|---|
author | bjacob <benoitjacob@google.com> | Thu Oct 21 16:53:58 2021 -0400 |
committer | GitHub <noreply@github.com> | Thu Oct 21 16:53:58 2021 -0400 |
tree | 8f7589374a62e6d34f399e0d984dd78fbf3919a8 | |
parent | a25c12cdeedce472f5550cfe285dd1dbe956ae2f [diff] |
end-to-end matmul tests (#7347) end-to-end matmul tests, meaning: we generate input matrices, perform linalg.matmul's, check that the results are correct. In an earlier attempt (PR #7154) the test was entirely generated code. That approach was abandoned because it potentially amounted to comparing the compiler's output with itself. The new approach here is to have a custom C test runner that has its own C reference implementation of matmul and uses it to compare the output of the generated code, which it drives by means of replay-trace. So now each test is not just a .mlir source, but a (.mlir, .yaml) pair where the yaml file is a trace, determining the runtime values of the inputs of the code being tested. Both .mlir and .yaml files are co-generated by a Python script. A new CMake function iree_trace_runner_test is added. It is a variant of iree_check_test, taking a custom trace runner and trace file, instead of iree_check_test's behavior of just running the module in iree-check-module. A new CMake function iree_generated_trace_runner_test is added to call the Python script to co-generate the .yaml and the .mlirsource and call iree_trace_runner_test on the resulting files. One aspect of PR #7154 is retained here: all the above-mentioned CMake functions are generalized also to allow running iree-opt (or an alternate tool) as a pre-processing step on the source .mlir file, before running iree-translate. That is because by default, new MLIR transformations are not necessarily known to iree-translate. In our case, that's the mmt4d-related transformations. The tests added in this PR share the prefix e2e_matmul (that can be used with ctest -R).
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.