circt
circt copied to clipboard
[StandardToHandshake] Create better unit tests and remove regression tests
Currently, StandardToHandshake defines some ~30 test cases which are arbitrary functions/kernels (https://github.com/llvm/circt/tree/main/test/Conversion/StandardToHandshake).
These tests are large, hard to maintain, and strictly serve as regression tests. These tests should be removed in favor of defining targeted tests that are intentional in what is actually being tested - that is, proper unit tests.
I would suggest that we try to split the tests into the following categories:
- Operation tests: Contain only a few operations and no branching.
- Structural tests: Contains potentially complex CFGs, but almost no operations. Similar to the feed_forward tests. These can be tested with and without task pipelining.
- Other conversion option: source constants
The complex kernels should be executed as integration tests instead, where we do not care about the exact structure, but the results. While debugging such tests is hard, it's not simpler when debugging these large regression tests.
Furthermore, we should move all tests for handshake specific passes into the dialect repository, e.g., buffer insertions.
I might look into this a bit, as we require tests/benchmarks for the task pipelining evaluation.