circt icon indicating copy to clipboard operation
circt copied to clipboard

[StandardToHandshake] Create better unit tests and remove regression tests

Open mortbopet opened this issue 3 years ago • 1 comments

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.

mortbopet avatar Aug 05 '22 07:08 mortbopet

I would suggest that we try to split the tests into the following categories:

  1. Operation tests: Contain only a few operations and no branching.
  2. 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.
  3. 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.

Dinistro avatar Aug 19 '22 07:08 Dinistro