-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import matmul/conv/attention tests from iree/tests/e2e/ #2
Labels
enhancement
New feature or request
Comments
Can also draw on code from https://github.com/nod-ai/rocm-gemm-benchmark/. That has test case generators and checked in .mlir files. |
Current plan (cc @erman-gurses ):
|
This was referenced Aug 16, 2024
ScottTodd
added a commit
that referenced
this issue
Aug 20, 2024
Progress on #2. This begins to port the tests from https://github.com/iree-org/iree/tree/main/tests/e2e/matmul. The changes here aim to be minimal, but a lot of cleanup is needed to make this sustainable. * A new CMake project named `iree-test-suites-matmul` is added. We could share this with other test suites that need CMake, or let each test suite create its own. I don't want to overgeneralize yet while so much is still up in the air. * The CMake project depends on the IREE runtime libraries and header files to build a `iree-e2e-matmul-test` binary. This binary handles preparing inputs, running a compiled program, and comparing outputs against a reference implementation. That may be split into multiple libraries or parts of it may move into Python or another test harness. TBD. * The CMake project then defines some test cases using `iree_generated_e2e_runner_test`. This may be split into an offline generation step and a test runner other than ctest. TBD. TODO: - [x] Fix namespace/symbol collisions in `test_utils.h` (fork further) and include it correctly - [x] Fix namespace/symbol collisions in `iree_e2e_generated_runner_test.cmake` (fork further) - [ ] Add a GitHub Actions workflow running the tests - [x] Structure the CMake project such that it can be used from iree-org/iree in place of the current tests - [ ] Fork or remove dependencies on the upstream CMake helpers used by `matmul/iree_e2e_generated_runner_test.cmake`? - [x] Allow pointing at a local IREE, like https://github.com/ScottTodd/iree/tree/infra-e2e-test-suites which deletes the in-tree tests and supporting infra
This was referenced Aug 20, 2024
Finding lots to clean up while refactoring the matmul tests. Debating starting fresh or cleaning up in-place. Notes/ideas:
|
ScottTodd
added a commit
that referenced
this issue
Aug 23, 2024
Progress on #2 (This is not yet running on CI anywhere, still refactoring the test suite before passing it back into developer hands) This was leaking compiler implementation details into test cases. The compiler should be selecting a pipeline on its own based on the target device(s). If a developer wants to try a different pipeline, they can make a code change, introduce a dedicated flag (global/hacky), or use a transform dialect script. I think this drops some of the rocm test suites, which were only added using explicit compilation_info settings. Leaving adding that back to a follow-up / further refactoring. Editing the 2000 line `CMakeLists.txt` file (generated from a 700 line `BUILD.bazel` file) is error-prone especially with how this file has grown over the years. _If_ we stick to CMake/CTest, it probably makes sense to start the file over from scratch.
ScottTodd
added a commit
that referenced
this issue
Sep 4, 2024
Progress on #2. * Renamed top level `matmul/` folder to `linalg_ops/`. We can put `convolution` (linalg) and `attention` (linalg_ext) tests under here too. Maybe other named ops or generics too. * Rebased on the latest IREE code, including flag renames (though we should drop usage of some flags and prefer to test the main user-facing options) * Added a workflow that goes through the instructions in `linalg_ops/README.md` and configured both workflows to run on `push` events in addition to the current triggers.
This was referenced Sep 4, 2024
ScottTodd
added a commit
that referenced
this issue
Oct 15, 2024
Progress on #2. See also the long [Discord thread here](https://discord.com/channels/689900678990135345/1270451599231156266). ## Summaries of changes ### Further decoupled test suites from the core CMake project * Forked `iree_native_test.cmake` to `iree_test_suites_native_test.cmake` * Dropped support (temporarily?) for testing on Android, RISC-V, and ARM with SME * Forked `iree_e2e_generated_runner_test.cmake` to `iree_test_suites_runner_test.cmake` * Dropped support (temporarily?) for filtering within the build system which tests are defined and compile .vmfb files * Now we can set `-DIREE_BUILD_TESTS=OFF` and avoid pulling in IREE's other tests * Added a new hand-authored `linalg_ops/matmul/CMakeLists.txt` that runs tests on each backend using default flags ### Simplified the test generator * Dropped unused functions * Folded GPU-specific shapes into generic "small" and "large" shape test suites ### Ran the `generate_e2e_matmul_tests.py` script offline and checked in the generated files * Currently 56 files totaling 1.90MB on disk (~27000 lines of code according to GitHub) * Now we can inspect the test cases without needing to run the generator locally, and I fixed a few formatting issues * I think this makes test suite management easier, and having the generated files in this test suites repository doesn't cost the main repository much (just extra `git checkout` time), but I could see a case for more tightly coupling the generator with the test runner ## What is left to do? * I want to iterate some more on the `linalg_ops/matmul/CMakeLists.txt` file or move to a different test runner somehow. I mainly want to support XFAIL in some way for both compiling and running. * We should add back tests using CPU features like AVX512, GPU features like Vulkan float16 extensions, and other non-default flags somehow. Either infer what the compiler can from the host / target, or add test suites explicitly.
This was referenced Oct 17, 2024
ScottTodd
added a commit
to iree-org/iree
that referenced
this issue
Oct 23, 2024
erman-gurses
added a commit
that referenced
this issue
Oct 30, 2024
Progress on #2. This PR refactors, adds, and migrates conv2d e2e tests from the PRs here: iree-org/iree#16849 and iree-org/iree#18125 --------- Signed-off-by: erman-gurses <[email protected]>
Eliasj42
pushed a commit
to iree-org/iree
that referenced
this issue
Oct 31, 2024
…8819) Progress on iree-org/iree-test-suites#2 and iree-org/iree-test-suites#6 . Signed-off-by: Elias Joseph <[email protected]>
Merged
erman-gurses
added a commit
that referenced
this issue
Nov 16, 2024
Progress on this #2 This PR refactors, adds, and migrates Attention e2e tests from the PR here: iree-org/iree#18320 --------- Signed-off-by: erman-gurses <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Could start with what already exists, including the C++ binaries files and CMake build system:
Or... run the generator scripts and jump straight to a prototype replacement test runner (pytest? other cmake functions?)
The test generators seem to be using mostly upstream dialects (e.g.
linalg.conv_2d_nchw_fchw
). The build system usage does some fancy things with flags though... should watch out for layering in there. For example:See this related thread on Discord: https://discord.com/channels/689900678990135345/1270451599231156266
The text was updated successfully, but these errors were encountered: