Remove unused function in relay module

We found that recently PRs are failing frequently because of time out. Looking the the status history(from Nov 12) the hypothesis is that we might have reached the point that our test timeout is not sufficient to reliably go through all tests. And recently we are also adding many more default functions to prelude, so the compilation time increases. Some actions we might need to take are:

  1. Write a pass to remove unused function in a relay module to reduce compilation time.
  2. Adjust timeout threshold of Jenkins tests.
  3. Improve test parallelism if possible.

As for #1, Iā€™m not sure of the effort of changing dead code elimination pass to support interprocedural analysis. A simpler approach is to write another pass(abstract interpretation style) just to analyze the call relationship and delete unused ones. @haichen @MarisaKirisame @zhiics @jroesch @tqchen please share your thoughts.

3 Likes

Just a somewhat tangential though - Should it really take 2 hours long? Is something wrong going on? Like - TVM_BIND_THREAD might be disabled, and we are doing everything on core 0, slowing down the tests. Or why not use pytest-parallel. Point is 2 hours seems very long.

Yeah we should also look into the amount of work of all the tests.

I think we should try both 1 and 3 to reduce the test time. If we find 1 hour is indeed too tight, we can then discuss whether to increase the timeout threshold.