<div dir="ltr">yes it really depends on the point of 'diminishing' returns that is determined. Some may think 6% to 10% performance improvement with 2x coverage is not worth it (or not having perceivable impact on users), but others may think an additional 0.5% is worth the effort even with 5x more training due to power or cpu savings :). This depends on the type of apps and the scale of the deployment of the optimized product.<div><br></div><div>David</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 8, 2021 at 11:58 AM Fāng-ruì Sòng via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, Oct 8, 2021 at 11:49 AM Chris Bieneman via cfe-dev<br>
<<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br>
><br>
> This also came up during the LLVM Distributor's conference talk on PGO (<a href="https://github.com/ClangBuiltLinux/llvm-distributors-conf-2021/issues/4" rel="noreferrer" target="_blank">https://github.com/ClangBuiltLinux/llvm-distributors-conf-2021/issues/4</a>).<br>
><br>
> Honestly I'm not actually convinced there's that much difference between carefully selected and curated collections of PGO data, and building a few "Hello World" type simple programs.<br>
><br>
> When I was working on Clang at Apple much of our instrumentation showed that process launch time was the most consistent place that we could optimize performance to get significant wins that were pretty universal.<br>
><br>
> When I added the in-tree multi-stage PGO that used LIT to run instrumented compiles, I found that just the one C++ hello-world program had something crazy like a 6% performance improvement. I'd love to see us add a few more source files into that system so that we could tune it a bit, but I never had the time.<br>
><br>
> -Chris<br>
<br>
Yes, the initial enablement (even with a hello-world program) can give<br>
decent speed up.<br>
After that, training llvm-project itself, or other dedicated<br>
applications has little marginal benefit.<br>
So I'd just pick one medium-sized C and one C++ applications for training data.<br>
If distributors thinks adding more training data is easy, adding up to<br>
10 applications still looks goo to me.<br>
100 or 1000 are definitely too much and don't worth the hassle :)<br>
<br>
> On Oct 8, 2021, at 1:39 PM, Shoaib Meenai <<a href="mailto:smeenai@fb.com" target="_blank">smeenai@fb.com</a>> wrote:<br>
><br>
> (now actually CCing him correctly)<br>
><br>
> On 10/8/21, 11:08 AM, "cfe-dev on behalf of Shoaib Meenai via cfe-dev" <<a href="mailto:cfe-dev-bounces@lists.llvm.org" target="_blank">cfe-dev-bounces@lists.llvm.org</a> on behalf of <a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br>
><br>
> CCing Chris; I remember discussing something like this with him at a developer meeting, but I don't remember his recommendation from the time :)<br>
><br>
> On 10/7/21, 1:10 PM, "cfe-dev on behalf of Tom Stellard via cfe-dev" <<a href="mailto:cfe-dev-bounces@lists.llvm.org" target="_blank">cfe-dev-bounces@lists.llvm.org</a> on behalf of <a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br>
><br>
> Hi,<br>
><br>
> I'm trying to generate profile data for clang by building the some of the packages<br>
> we ship in Fedora Linux. I'm trying to decide how many packages to build, is<br>
> there much advantage to building 1000 vs something substantially less, like 100?<br>
><br>
> -Tom<br>
><br>
> _______________________________________________<br>
> cfe-dev mailing list<br>
> <a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
><br>
> _______________________________________________<br>
> cfe-dev mailing list<br>
> <a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
><br>
><br>
> _______________________________________________<br>
> cfe-dev mailing list<br>
> <a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
<br>
<br>
<br>
-- <br>
宋方睿<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div>