Profile Guided Optimization (PGO) and Apache TVM

Hi!

Recently I checked Profile-Guided Optimization (PGO) improvements on multiple projects. The results are here.

Since PGO showed measurable improvements in compiler-like loads (CPython, Clang, Clangd, GCC, Rustc, etc.) I think it could be useful to check PGO on ApacheTVM as well because as far as I see, internally there is a lot of “similar” code compared to other compiler-like applications.

We need to perform PGO benchmarks on ApacheTVM. And if it shows improvements - add a note about possible improvements in ApacheTVM performance with PGO. Providing an easier way (e.g. a build option) to build scripts with PGO can be useful for the end-users too. Maybe testing Post-Link Optimization techniques (like LLVM BOLT from Facebook) would be interesting too but I recommend starting from the usual PGO.

It will be easier to perform PGO if there is any C++ wrapper around the API (because in this case, PGO is easier to integrate). If not - well, I think it could be quite easy to do. Another point of improvement - recompile 3rd parties with PGO as well.

2 Likes