[PATCH] D147812: [InstrProf] Use BalancedPartitioning to order temporal profiling trace data

Sergey Pupyrev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 14 12:12:30 PDT 2023


spupyrev added a comment.

>>> The cost metric is entropy like. Have you tried other metrics such as gini impurity?

For context, we're using (a variant of) the same reordering optimization across several applications internally for several years now. We did extensively test and engineer the implementation, and I am so happy to see it finally open sourced! There are a couple of research papers describing the technique with details and evaluation, e.g., (1) <https://dl.acm.org/doi/abs/10.1145/2939672.2939862> or (2) <https://arxiv.org/abs/2211.09285>, including the evaluation of various objectives.

We did try several alternatives for the objective and the log-gap (the "entropy") seems to be the best choice across the majority of use cases, including the start-up function layout. For the dataset I have at hand, the Gini impurity behaves slightly worse than the current log-gap one. I'd like also to clarify that we're speaking about second order effects here. That is, the difference between "no-reordered layout" vs "log-gap reordered one" is an order (or two) of magnitude larger than the difference between "log-gap" and "gini".


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147812/new/

https://reviews.llvm.org/D147812



More information about the llvm-commits mailing list