As we start to build multiple modules, it is useful to start modularizing the unit-tests with a goal of reducing some of the actual integration tests. Previously quite a few tests are written in a way that directly invokes end to end compilation, we also have tests that are coupled with legacy te pipeline. There are several issues, some of the tests running slow, and when regression happens it is harder to find out why since the tests are not unit tests in nature.
While sometimes some related tests are necessary and we would like to keep some legacy tests for a bit. It is important to move to a more unit-testing regime for new tests, and explicitly mark(group) tests that involves end to end execution (and slower). Having tests in different folder also helps us think more carefully about module boundaries. Of course we still want to be pragmatic and not too pedantic. For example, we still love the python first infra that helps us productively write tests, and some level of coupling is useful for us to productively write tests. To keep things simple, I would like us to try get things moving starting with one module (TensorIR). Here is how we can incrementally do that for TensorIR (and use this as an example). - Start with a new folder `tests/python/tir` - Put new TensorIR unit-tests into this folder - Migrate some test cases from existing ones into this folder, with the following goals - Always use TVMScript/IRBuilder before/after to unit test each pass - Avoid calling the build pipeline - For those that involves build e2e pipeline - OK to include some for target specific generation, in this case, start from (scheduled) TVMScript - Ensure such generation are fast (<1min) - Have an explicit naming pattern `test_e2e_xxx` - Move slow tests into a separate folder `tests/python/slow/tir` Everything should work as it is. Of course we can still leave some legacy tests in the old place and once we done modularizing, we also would have a clear picture of things --- [Visit Topic](https://discuss.tvm.apache.org/t/modularize-and-modernize-tensorir-tests/15237/1) to respond. You are receiving this because you enabled mailing list mode. To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/90a778d0a619331911265e4b7f2e3dfdba6533e28e4efc179690848094733659).