TL;DR; When either of LLVM_BUILD_BENCHMARKS or LIBCXX_INCLUDE_BENCHMARKS are enabled, as well as for llvm-test-suite, a dependency to abseil would either be auto-downloaded by the build system, or need to be user-specifiable, or provided in the source tree.
On Thu, Sep 30, 2021 at 10:08 AM Mircea Trofin via llvm-dev <llvm...@lists.llvm.org> wrote:TL;DR; When either of LLVM_BUILD_BENCHMARKS or LIBCXX_INCLUDE_BENCHMARKS are enabled, as well as for llvm-test-suite, a dependency to abseil would either be auto-downloaded by the build system, or need to be user-specifiable, or provided in the source tree.Could you please elaborate on which of these approaches will be used for LLVM? How will this affect regular LLVM developers?
----This is truly unrelated, but I have a lot of feelings about this, and I will use this opportunity to inappropriately complain that the benchmarks library has been spamming me with cmake warnings about std::regex for years: https://bugs.llvm.org/show_bug.cgi?id=38874 The CMake step really ought to be warning-clean.
On Tue, Oct 5, 2021 at 8:57 PM Reid Kleckner <r...@google.com> wrote:On Thu, Sep 30, 2021 at 10:08 AM Mircea Trofin via llvm-dev <llvm...@lists.llvm.org> wrote:TL;DR; When either of LLVM_BUILD_BENCHMARKS or LIBCXX_INCLUDE_BENCHMARKS are enabled, as well as for llvm-test-suite, a dependency to abseil would either be auto-downloaded by the build system, or need to be user-specifiable, or provided in the source tree.Could you please elaborate on which of these approaches will be used for LLVM? How will this affect regular LLVM developers?Assuming regular LLVM developers means developers that don't enable LLVM_BUILD_BENCHMARKS, nor LIBCXX_INCLUDE_BENCHMARKS, then they are not affected.The current PR in "benchmarks" upstream is set up so that it will either download the abseil dependency at build time, or, if the location of abseil is specified via a cmake flag, then it uses that one (which covers the last 2 options). I don't know if the first option is acceptable by those that enable LLVM_BUILD_BENCHMARKS / LIBCXX_INCLUDE_BENCHMARKS, and this is something I'm hoping to discover with this thread. If it is acceptable, it's a transparent option, so it won't directly impact those users either.
----This is truly unrelated, but I have a lot of feelings about this, and I will use this opportunity to inappropriately complain that the benchmarks library has been spamming me with cmake warnings about std::regex for years: https://bugs.llvm.org/show_bug.cgi?id=38874 The CMake step really ought to be warning-clean.Ack. Added an issue on the project side: https://github.com/google/benchmark/issues/1236 (maybe it has better visibility)
_______________________________________________
LLVM Developers mailing list
llvm...@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
On Tue, Oct 5, 2021 at 9:26 PM Mircea Trofin via llvm-dev <llvm...@lists.llvm.org> wrote:On Tue, Oct 5, 2021 at 8:57 PM Reid Kleckner <r...@google.com> wrote:On Thu, Sep 30, 2021 at 10:08 AM Mircea Trofin via llvm-dev <llvm...@lists.llvm.org> wrote:TL;DR; When either of LLVM_BUILD_BENCHMARKS or LIBCXX_INCLUDE_BENCHMARKS are enabled, as well as for llvm-test-suite, a dependency to abseil would either be auto-downloaded by the build system, or need to be user-specifiable, or provided in the source tree.Could you please elaborate on which of these approaches will be used for LLVM? How will this affect regular LLVM developers?Assuming regular LLVM developers means developers that don't enable LLVM_BUILD_BENCHMARKS, nor LIBCXX_INCLUDE_BENCHMARKS, then they are not affected.The current PR in "benchmarks" upstream is set up so that it will either download the abseil dependency at build time, or, if the location of abseil is specified via a cmake flag, then it uses that one (which covers the last 2 options). I don't know if the first option is acceptable by those that enable LLVM_BUILD_BENCHMARKS / LIBCXX_INCLUDE_BENCHMARKS, and this is something I'm hoping to discover with this thread. If it is acceptable, it's a transparent option, so it won't directly impact those users either.What should we expect in terms of ability to benchmark LLVM on various platforms / OSes? It seems like we will tie ourselves to Abseil, and I don't know anything about how their compatibility matrix compares to LLVM one? (and if it will continue being true in the foreseeable future?)
On Thu, Oct 7, 2021 at 4:06 PM Mircea Trofin <mtr...@google.com> wrote:On Tue, Oct 5, 2021 at 9:37 PM Mehdi AMINI <joke...@gmail.com> wrote:On Tue, Oct 5, 2021 at 9:26 PM Mircea Trofin via llvm-dev <llvm...@lists.llvm.org> wrote:On Tue, Oct 5, 2021 at 8:57 PM Reid Kleckner <r...@google.com> wrote:On Thu, Sep 30, 2021 at 10:08 AM Mircea Trofin via llvm-dev <llvm...@lists.llvm.org> wrote:TL;DR; When either of LLVM_BUILD_BENCHMARKS or LIBCXX_INCLUDE_BENCHMARKS are enabled, as well as for llvm-test-suite, a dependency to abseil would either be auto-downloaded by the build system, or need to be user-specifiable, or provided in the source tree.Could you please elaborate on which of these approaches will be used for LLVM? How will this affect regular LLVM developers?Assuming regular LLVM developers means developers that don't enable LLVM_BUILD_BENCHMARKS, nor LIBCXX_INCLUDE_BENCHMARKS, then they are not affected.The current PR in "benchmarks" upstream is set up so that it will either download the abseil dependency at build time, or, if the location of abseil is specified via a cmake flag, then it uses that one (which covers the last 2 options). I don't know if the first option is acceptable by those that enable LLVM_BUILD_BENCHMARKS / LIBCXX_INCLUDE_BENCHMARKS, and this is something I'm hoping to discover with this thread. If it is acceptable, it's a transparent option, so it won't directly impact those users either.What should we expect in terms of ability to benchmark LLVM on various platforms / OSes? It seems like we will tie ourselves to Abseil, and I don't know anything about how their compatibility matrix compares to LLVM one? (and if it will continue being true in the foreseeable future?)The goal isn't for benchmark to change its dependency matrix due to the new dependency ( +dominic hamon , please correct me). So from the perspective of LLVM, this doesn't change anything. Granted, there is now a strictly higher probability for breaking changes, if abseil decides to change its support matrix and break benchmark, and thus affect the latter's LLVM users.
We're reducing our dependency matrix (dropping support for older compilers/OSs) as part of the adoption of abseil. This may impact llvm if there was an expectation to continue to benchmark against those older compilers/OSs.
https://google.github.io/benchmark/dependencies.html is the current policy but with abseil that "best effort" support will no longer be viable.
Abseil has some requirements that may not perfectly match those of the impacted projects. For example, abseil stopped supporting Ubuntu 14.04 before its TLS.
Gentle reminder - I'd plan on moving forward with the abseil dependency by the EOW, unless there's pushback.
On Tue, Oct 5, 2021 at 9:37 PM Mehdi AMINI <joke...@gmail.com> wrote:On Tue, Oct 5, 2021 at 9:26 PM Mircea Trofin via llvm-dev <llvm...@lists.llvm.org> wrote:On Tue, Oct 5, 2021 at 8:57 PM Reid Kleckner <r...@google.com> wrote:On Thu, Sep 30, 2021 at 10:08 AM Mircea Trofin via llvm-dev <llvm...@lists.llvm.org> wrote:TL;DR; When either of LLVM_BUILD_BENCHMARKS or LIBCXX_INCLUDE_BENCHMARKS are enabled, as well as for llvm-test-suite, a dependency to abseil would either be auto-downloaded by the build system, or need to be user-specifiable, or provided in the source tree.Could you please elaborate on which of these approaches will be used for LLVM? How will this affect regular LLVM developers?Assuming regular LLVM developers means developers that don't enable LLVM_BUILD_BENCHMARKS, nor LIBCXX_INCLUDE_BENCHMARKS, then they are not affected.The current PR in "benchmarks" upstream is set up so that it will either download the abseil dependency at build time, or, if the location of abseil is specified via a cmake flag, then it uses that one (which covers the last 2 options). I don't know if the first option is acceptable by those that enable LLVM_BUILD_BENCHMARKS / LIBCXX_INCLUDE_BENCHMARKS, and this is something I'm hoping to discover with this thread. If it is acceptable, it's a transparent option, so it won't directly impact those users either.What should we expect in terms of ability to benchmark LLVM on various platforms / OSes? It seems like we will tie ourselves to Abseil, and I don't know anything about how their compatibility matrix compares to LLVM one? (and if it will continue being true in the foreseeable future?)The goal isn't for benchmark to change its dependency matrix due to the new dependency ( +dominic hamon , please correct me). So from the perspective of LLVM, this doesn't change anything. Granted, there is now a strictly higher probability for breaking changes, if abseil decides to change its support matrix and break benchmark, and thus affect the latter's LLVM users.
On Thu, Oct 7, 2021 at 8:10 AM dominic hamon <dom...@google.com> wrote:On Thu, Oct 7, 2021 at 4:06 PM Mircea Trofin <mtr...@google.com> wrote:On Tue, Oct 5, 2021 at 9:37 PM Mehdi AMINI <joke...@gmail.com> wrote:On Tue, Oct 5, 2021 at 9:26 PM Mircea Trofin via llvm-dev <llvm...@lists.llvm.org> wrote:On Tue, Oct 5, 2021 at 8:57 PM Reid Kleckner <r...@google.com> wrote:On Thu, Sep 30, 2021 at 10:08 AM Mircea Trofin via llvm-dev <llvm...@lists.llvm.org> wrote:TL;DR; When either of LLVM_BUILD_BENCHMARKS or LIBCXX_INCLUDE_BENCHMARKS are enabled, as well as for llvm-test-suite, a dependency to abseil would either be auto-downloaded by the build system, or need to be user-specifiable, or provided in the source tree.Could you please elaborate on which of these approaches will be used for LLVM? How will this affect regular LLVM developers?Assuming regular LLVM developers means developers that don't enable LLVM_BUILD_BENCHMARKS, nor LIBCXX_INCLUDE_BENCHMARKS, then they are not affected.The current PR in "benchmarks" upstream is set up so that it will either download the abseil dependency at build time, or, if the location of abseil is specified via a cmake flag, then it uses that one (which covers the last 2 options). I don't know if the first option is acceptable by those that enable LLVM_BUILD_BENCHMARKS / LIBCXX_INCLUDE_BENCHMARKS, and this is something I'm hoping to discover with this thread. If it is acceptable, it's a transparent option, so it won't directly impact those users either.What should we expect in terms of ability to benchmark LLVM on various platforms / OSes? It seems like we will tie ourselves to Abseil, and I don't know anything about how their compatibility matrix compares to LLVM one? (and if it will continue being true in the foreseeable future?)The goal isn't for benchmark to change its dependency matrix due to the new dependency ( +dominic hamon , please correct me). So from the perspective of LLVM, this doesn't change anything. Granted, there is now a strictly higher probability for breaking changes, if abseil decides to change its support matrix and break benchmark, and thus affect the latter's LLVM users.We're reducing our dependency matrix (dropping support for older compilers/OSs) as part of the adoption of abseil. This may impact llvm if there was an expectation to continue to benchmark against those older compilers/OSs.Isn't that support drop part of usual business, though (i.e. drop after TLS)?
What would be the preferred duration?
On Thu, 7 Oct 2021 at 16:46, Mircea Trofin <mtr...@google.com> wrote:What would be the preferred duration?It's not at all about duration, it's about making sure the right people have looked at the proposal and agreed with the plan.Unless people that actually build and run benchmarks have agreed with your proposal, you should not merge a clear breaking change.
Of course, you can always merge, and break people's stuff, and revert, and then discuss, but I'd strongly encourage you not to do that, as it isn't nice to other people.You should ask around, who are the people who build benchmarks. Check with the target owners, buildbot owners, past threads on benchmarking, and make sure they're all included in the discussion.
It's really easy to miss an email like this and it's just out of luck that I didn't.
Unless people that actually build and run benchmarks have agreed with your proposal, you should not merge a clear breaking change.One of the goals of this thread was identifying who those folks may be.
It's really easy to miss an email like this and it's just out of luck that I didn't.Is there a more appropriate channel of communication where owners could be identified?
On Thu, 7 Oct 2021 at 17:01, Mircea Trofin <mtr...@google.com> wrote:Unless people that actually build and run benchmarks have agreed with your proposal, you should not merge a clear breaking change.One of the goals of this thread was identifying who those folks may be.And yet, you propose to follow through if no one objected. Which is never a good idea for breaking changes.
It's really easy to miss an email like this and it's just out of luck that I didn't.Is there a more appropriate channel of communication where owners could be identified?No, this is the right place.But you either wait for people to find this thread (however long it takes), or you actively search for them (as I outlined before) and include them in the conversation, for example, CC'ing them in the thread.
On Thu, 30 Sept 2021 at 18:08, Mircea Trofin via llvm-dev <llvm...@lists.llvm.org> wrote:Abseil has some requirements that may not perfectly match those of the impacted projects. For example, abseil stopped supporting Ubuntu 14.04 before its TLS.The list of supported platforms is *definitely* too small for LLVM users. Half of their support is "best effort", which really isn't going to cut it once we forcefully depend on it.We definitely run benchmarks on X86_64, Arm32/64, MIPS, PowerPC (Linux, Mac and Windows on a mix of those), and there are probably people running on SystemZ, RISCV and other less known architectures.
Does this mean it would no longer be possible to build the test-suite
on any architecture besides x86_64, aarch64, and arm?
-Tom
> Naturally, projects snap to whichever version of benchmark they want to; but this new dependency would add an extra consideration when considering updating the version of benchmarks; and the need to handle the extra dependency (either by being OK with it being auto-downloaded, or via the other means described above)
>
> Are there any other issues that we're missing? Would anyone be hindered by this adoption of abseil in google/benchmarks?
>
> Thanks,
> Mircea.
>
>
And yet, you propose to follow through if no one objected. Which is never a good idea for breaking changes.To be clear, the fact they are breaking changes is what we're trying to determine. It was my intention to spur attention to the thread (given the silence), and providing a timeline can help.
Yup, but they need to be identified first (i.e. a bit of a catch 22 if no one replies)
On 9/30/21 10:07 AM, Mircea Trofin via llvm-dev wrote:
> TL;DR; When either of LLVM_BUILD_BENCHMARKS or LIBCXX_INCLUDE_BENCHMARKS are enabled, as well as for llvm-test-suite, a dependency to abseil would either be auto-downloaded by the build system, or need to be user-specifiable, or provided in the source tree.
>
> Details
>
> There are (afaik) 3 copies of the google/benchmark <https://github.com/google/benchmark> project in the llvm tree: in llvm-test-suite, in llvm/utils, and in libcxx/utils/.
>
> The benchmark code uses some functionality otherwise offered by abseil <https://abseil.io/>. Over time, this is inconvenient: continued need for duplication for some features; integration issues in projects using abseil due to macro conflicts; and overall bit rot / maintenance overhead.
>
> We want <https://github.com/google/benchmark/pull/1183> to add a dependency to abseil to the benchmarks project.
>
> Abseil has some requirements <https://abseil.io/docs/cpp/platforms/platforms#:~:text=Abseil%20requires%20a%20code%20base,14%20through%20C%2B%2B20).> that may not perfectly match those of the impacted projects. For example, abseil stopped supporting Ubuntu 14.04 before its TLS.
>
Does this mean it would no longer be possible to build the test-suite
on any architecture besides x86_64, aarch64, and arm?
Ok, where in the test-suite is this code?
-Tom
>
>
> -Tom
>
> > Naturally, projects snap to whichever version of benchmark they want to; but this new dependency would add an extra consideration when considering updating the version of benchmarks; and the need to handle the extra dependency (either by being OK with it being auto-downloaded, or via the other means described above)
> >
> > Are there any other issues that we're missing? Would anyone be hindered by this adoption of abseil in google/benchmarks?
> >
> > Thanks,
> > Mircea.
> >
> >
> > _______________________________________________
> > LLVM Developers mailing list
> > llvm...@lists.llvm.org <mailto:llvm...@lists.llvm.org>
> > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev <https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev>
Making sure we're talking about the same thing: this is strictly about benchmarks that require flipping LLVM_BUILD_BENCHMARKS or LIBCXX_INCLUDE_BENCHMARKS; and it's about exploring how those specific benchmarks relate to the 'benchmark' project which we currently have as a source copy in the llvm tree (i.e. we're sometimes manually cherry-picking changes over, but we're not updating it through any automated means)
I looked under llvm-zorg, and can't find any bot configuration that flips those flags in the first place, so perhaps these specific benchmarks are run elsewhere (or my search was naive - I just grep-ed for '_BENCHMARKS' - and only got one entry turning off TEST_SUITE_RUN_BENCHMARKS, which appears to be unrelated)?
From the OS x CPU matrix above, it seems the main gap is in the CPU column - since abseil supports Linux, MacOS, and Windows, but doesn't appear to specifically support mips, powerpc, systemz, or riscv. So if anyone runs these kinds of benchmarks (i.e. the ones that require flipping those cmake flags) on those CPUs, *and* we wanted, in llvm, to periodically auto-update the source copy of 'benchmark' project, only then we would have a breaking change.
- I think the main one is: was there ever any intent to automatically update the 2 copies of 'benchmarks' in the llvm tree? what about the one in llvm-test-suite?
- the second is getting a better understanding of where folks build and run those specific benchmarks (it'd help the upstream 'benchmark' project with data points).
Renato, would you mind detailing your scenario (i.e. which of those 2 types of benchmarks, on which OSxCPU)
On 10/7/21 9:49 AM, Mircea Trofin wrote:
>
>
> On Thu, Oct 7, 2021 at 9:47 AM Tom Stellard <tste...@redhat.com <mailto:tste...@redhat.com>> wrote:
>
> On 9/30/21 10:07 AM, Mircea Trofin via llvm-dev wrote:
> > TL;DR; When either of LLVM_BUILD_BENCHMARKS or LIBCXX_INCLUDE_BENCHMARKS are enabled, as well as for llvm-test-suite, a dependency to abseil would either be auto-downloaded by the build system, or need to be user-specifiable, or provided in the source tree.
> >
> > Details
> >
> > There are (afaik) 3 copies of the google/benchmark <https://github.com/google/benchmark <https://github.com/google/benchmark>> project in the llvm tree: in llvm-test-suite, in llvm/utils, and in libcxx/utils/.
> >
> > The benchmark code uses some functionality otherwise offered by abseil <https://abseil.io/ <https://abseil.io/>>. Over time, this is inconvenient: continued need for duplication for some features; integration issues in projects using abseil due to macro conflicts; and overall bit rot / maintenance overhead.
> >
> > We want <https://github.com/google/benchmark/pull/1183 <https://github.com/google/benchmark/pull/1183>> to add a dependency to abseil to the benchmarks project.
> >
> > Abseil has some requirements <https://abseil.io/docs/cpp/platforms/platforms#:~:text=Abseil%20requires%20a%20code%20base,14%20through%20C%2B%2B20) <https://abseil.io/docs/cpp/platforms/platforms#:~:text=Abseil%20requires%20a%20code%20base,14%20through%20C%2B%2B20)>.> that may not perfectly match those of the impacted projects. For example, abseil stopped supporting Ubuntu 14.04 before its TLS.
> >
>
> Does this mean it would no longer be possible to build the test-suite
> on any architecture besides x86_64, aarch64, and arm?
>
> *if* there's a desire to keep in sync automatically with the upstream benchmark suite (which we don't currently do)
>
Ok, where in the test-suite is this code?
On Thu, 7 Oct 2021 at 17:46, Mircea Trofin <mtr...@google.com> wrote:Making sure we're talking about the same thing: this is strictly about benchmarks that require flipping LLVM_BUILD_BENCHMARKS or LIBCXX_INCLUDE_BENCHMARKS; and it's about exploring how those specific benchmarks relate to the 'benchmark' project which we currently have as a source copy in the llvm tree (i.e. we're sometimes manually cherry-picking changes over, but we're not updating it through any automated means)Honestly, I didn't understand what this means... :)But I mostly run the benchmarks via CMake from a recently built LLVM copy, and I don't do that "professionally", so I'm not the right person to such things.
Another way to put it: do you build anything under:llvm-test-suite/MicroBenchmarks/libs/benchmark/llvm/utils/benchmark
libcxx/utils/google-benchmark
Google Benchmark (from MicroBenchmarks/libs/benchmark) automatically
compiles/runs if TES_SUITE_SUBDIRS includes MicroBenchmarks, which is
included by default.
TEST_SUITE_RUN_BENCHMARKS is unrelated
Michael
_______________________________________________
LLVM Developers mailing list
llvm...@lists.llvm.org
Am Do., 7. Okt. 2021 um 11:47 Uhr schrieb Mircea Trofin via llvm-dev
<llvm...@lists.llvm.org>:
> I looked under llvm-zorg, and can't find any bot configuration that flips those flags in the first place, so perhaps these specific benchmarks are run elsewhere (or my search was naive - I just grep-ed for '_BENCHMARKS' - and only got one entry turning off TEST_SUITE_RUN_BENCHMARKS, which appears to be unrelated)?
Google Benchmark (from MicroBenchmarks/libs/benchmark) automatically
compiles/runs if TES_SUITE_SUBDIRS includes MicroBenchmarks, which is
included by default.
TEST_SUITE_RUN_BENCHMARKS is unrelated
Michael
On Thu, 30 Sept 2021 at 18:08, Mircea Trofin via llvm-dev <llvm...@lists.llvm.org> wrote:Abseil has some requirements that may not perfectly match those of the impacted projects. For example, abseil stopped supporting Ubuntu 14.04 before its TLS.The list of supported platforms is *definitely* too small for LLVM users. Half of their support is "best effort", which really isn't going to cut it once we forcefully depend on it.We definitely run benchmarks on X86_64, Arm32/64, MIPS, PowerPC (Linux, Mac and Windows on a mix of those), and there are probably people running on SystemZ, RISCV and other less known architectures.
What is your plan for all the other platforms where abseil isn't supported?
The plan should simply be: submit patches if it's broken on an architecture or OS that someone cares about.
Old versions of the toolchains is a different matter, however -- Abseil's general promise is to support an old release of a C++ compiler for 5 years after it has been superseded by a newer version. And supporting old compilers tends to be a significant burden, so unlike porting to a new CPU or OS, that isn't simply a "patches welcome" situation -- there would have to be a compelling case made that preserving support for an compiler older than that was important enough to be worth the hassle.
> On Sep 30, 2021, at 10:07 AM, Mircea Trofin via llvm-dev <llvm...@lists.llvm.org> wrote:
>
> TL;DR; When either of LLVM_BUILD_BENCHMARKS or LIBCXX_INCLUDE_BENCHMARKS are enabled, as well as for llvm-test-suite, a dependency to abseil would either be auto-downloaded by the build system, or need to be user-specifiable, or provided in the source tree.
FWIW: I'm not a fan of auto-downloading stuff. That's just a sneaky to add a dependency that sure may not give trouble to the users where the auto-download succeeds. But many companies have their build farms isolated from the internet and security people would not be happy if we just download a blob of code from a separate project that can change somewhat unnoticed by users of LLVM.
Can't we copy the thing into the LLVM repository (aka vendoring) like we copied the benchmark library? I feel that things become a different story when we actually add dependencies...
- Matthias
> On Sep 30, 2021, at 10:07 AM, Mircea Trofin via llvm-dev <llvm...@lists.llvm.org> wrote:
>
> TL;DR; When either of LLVM_BUILD_BENCHMARKS or LIBCXX_INCLUDE_BENCHMARKS are enabled, as well as for llvm-test-suite, a dependency to abseil would either be auto-downloaded by the build system, or need to be user-specifiable, or provided in the source tree.
FWIW: I'm not a fan of auto-downloading stuff. That's just a sneaky to add a dependency that sure may not give trouble to the users where the auto-download succeeds. But many companies have their build farms isolated from the internet and security people would not be happy if we just download a blob of code from a separate project that can change somewhat unnoticed by users of LLVM.
Can't we copy the thing into the LLVM repository (aka vendoring) like we copied the benchmark library? I feel that things become a different story when we actually add dependencies...
- Matthias
On Sep 30, 2021, at 10:07 AM, Mircea Trofin via llvm-dev <llvm...@lists.llvm.org> wrote:TL;DR; When either of LLVM_BUILD_BENCHMARKS or LIBCXX_INCLUDE_BENCHMARKS are enabled, as well as for llvm-test-suite, a dependency to abseil would either be auto-downloaded by the build system, or need to be user-specifiable, or provided in the source tree.
There are (afaik) 3 copies of the google/benchmark project in the llvm tree: in llvm-test-suite, in llvm/utils, and in libcxx/utils/.
The benchmark code uses some functionality otherwise offered by abseil. Over time, this is inconvenient: continued need for duplication for some features; integration issues in projects using abseil due to macro conflicts; and overall bit rot / maintenance overhead.
We want to add a dependency to abseil to the benchmarks project.
Abseil has some requirements that may not perfectly match those of the impacted projects. For example, abseil stopped supporting Ubuntu 14.04 before its TLS.
On Sep 30, 2021, at 10:07 AM, Mircea Trofin via llvm-dev <llvm...@lists.llvm.org> wrote:TL;DR; When either of LLVM_BUILD_BENCHMARKS or LIBCXX_INCLUDE_BENCHMARKS are enabled, as well as for llvm-test-suite, a dependency to abseil would either be auto-downloaded by the build system, or need to be user-specifiable, or provided in the source tree.Hi Mircea,As others have pointed out, this seems like a fairly problematic dependency to take on.
There are (afaik) 3 copies of the google/benchmark project in the llvm tree: in llvm-test-suite, in llvm/utils, and in libcxx/utils/.Ok, that sounds bad. It seems like an intermediately good step is to have a single copy of this in the monorepo (e.g.) in llvm-project/utils, and have livcxx and llvm-test-suite use that copy. Is there any downside to consolidating these?
The benchmark code uses some functionality otherwise offered by abseil. Over time, this is inconvenient: continued need for duplication for some features; integration issues in projects using abseil due to macro conflicts; and overall bit rot / maintenance overhead.I’m not sure what you mean here - I think you are saying that there is code from abseil that was copied into the google benchmark library, and downstream code that uses both has issues? Or are you saying it is similar-but-different functionality that happens to use the same macro names?
Because I don’t understand the benefit, it seems like introducing a new dependency is just a negative - can you explain the benefit more?
On Sat, Oct 9, 2021 at 6:15 PM Chris Lattner <clat...@nondot.org> wrote:On Sep 30, 2021, at 10:07 AM, Mircea Trofin via llvm-dev <llvm...@lists.llvm.org> wrote:TL;DR; When either of LLVM_BUILD_BENCHMARKS or LIBCXX_INCLUDE_BENCHMARKS are enabled, as well as for llvm-test-suite, a dependency to abseil would either be auto-downloaded by the build system, or need to be user-specifiable, or provided in the source tree.Hi Mircea,As others have pointed out, this seems like a fairly problematic dependency to take on.(For clarity, not attempting to argue pros/cons re abseil) it would be, if we wanted to start pulling more frequently and automatically from google/benchmark upstream. So far we've been cherry-picking changes, from what I can tell.
There are (afaik) 3 copies of the google/benchmark project in the llvm tree: in llvm-test-suite, in llvm/utils, and in libcxx/utils/.Ok, that sounds bad. It seems like an intermediately good step is to have a single copy of this in the monorepo (e.g.) in llvm-project/utils, and have livcxx and llvm-test-suite use that copy. Is there any downside to consolidating these?Would we also want to start more frequently sync-ing with the google/benchmark upstream - do we have a reason not to? (assuming there's no abseil dep to worry about).
The benchmark code uses some functionality otherwise offered by abseil. Over time, this is inconvenient: continued need for duplication for some features; integration issues in projects using abseil due to macro conflicts; and overall bit rot / maintenance overhead.I’m not sure what you mean here - I think you are saying that there is code from abseil that was copied into the google benchmark library, and downstream code that uses both has issues? Or are you saying it is similar-but-different functionality that happens to use the same macro names?It's mainly the former. IIRC, we also hit an issue with the latter, e.g. flag macros that are implemented slightly differently, but the root cause is the former. dominichamon@ may have more details, and there was another participant, oontvoo@, who expressed interest in the abseil dependency, but haven't dug deeper into their motivation.
Because I don’t understand the benefit, it seems like introducing a new dependency is just a negative - can you explain the benefit more?It would solve those downstream issues, but (and we'd have to check with e.g. oontvoo@ if it addressed their scenario) we can definitely think of an alternative that addressed the concerns expressed here, and solved the original problem we had. (We basically jumped to abseil first because it seemed like the obvious thing, not realizing the fullness of the implications, and gathering the feedback here and also on the thread in google/benchmark makes me, at least, strongly believe we need to think of an alternative)I think at this point there are 2 topics: one is about how we consume google/benchmark in llvm; the other is the arguments against the abseil dep, which, even if for some reason llvm decided to freeze its copy of google/benchmark and thus not be affected, I think are sufficiently concerning to get us (switching hats to google/benchmark) rethink our approach.Should we focus this thread then on the former?
I like to run the llvm-test-suite with other compilers as well such as
gcc. It requires LIT, but that can be installed separately
(https://pypi.org/project/lit/). I would already satisfied if there
there is a possibility to use alternative sources of google benchmark,
such as installed by the disto package manager (sudo apt install
libbenchmark1) or automatically downloaded using CMake:
include(FetchContent)
FetchContent_Declare(googlebenchmark
GIT_REPOSITORY https://github.com/google/benchmark.git
)
FetchContent_MakeAvailable(googlebenchmark)
Michael
Am Di., 12. Okt. 2021 um 15:20 Uhr schrieb Mircea Trofin <mtr...@google.com>:
> One thing that does come to mind, llvm-test-suite can be cloned separately from llvm-project/llvm. We'd need to point to llvm (or just llvm/utils/benchmark), and require that it be available on bots, for example. Does that cause an issue for anyone?
I like to run the llvm-test-suite with other compilers as well such as
gcc. It requires LIT, but that can be installed separately
(https://pypi.org/project/lit/). I would already satisfied if there
there is a possibility to use alternative sources of google benchmark,
such as installed by the disto package manager (sudo apt install
libbenchmark1) or automatically downloaded using CMake:
include(FetchContent)
FetchContent_Declare(googlebenchmark
GIT_REPOSITORY https://github.com/google/benchmark.git
)
FetchContent_MakeAvailable(googlebenchmark)
Michael
That sounds fine.
> 2 try a heuristic: either ../llvm/utils/benchmark, or, if that's not there, try fetching it, and if this fails, ok, can't build
> Probably looking at ../llvm would 'just work' on the build bots, too? (meaning, without needing to change buildbot scripts)
No, sources are at different directories relative to the build
directory. Typically, this is '../llvm.src/llvm' [1,2], but I am not
sure for all builders, but others might be different [3]. Builds by
LNT might be more complicated [4].
Generally, I also don't really like hardcoding paths, makes
reproducing problems more difficult.
[1] https://github.com/llvm/llvm-zorg/blob/529cab62b53092cafe42c0a127480bede2806206/zorg/buildbot/builders/PollyBuilder.py#L23
[2] https://github.com/llvm/llvm-zorg/blob/529cab62b53092cafe42c0a127480bede2806206/zorg/buildbot/builders/OpenMPBuilder.py#L34
[3] https://github.com/llvm/llvm-zorg/blob/529cab62b53092cafe42c0a127480bede2806206/zorg/buildbot/builders/ClangBuilder.py#L267
[4] https://github.com/llvm/llvm-zorg/blob/529cab62b53092cafe42c0a127480bede2806206/zorg/buildbot/builders/ClangBuilder.py#L551
One thing that does come to mind, llvm-test-suite can be cloned separately from llvm-project/llvm. We'd need to point to llvm (or just llvm/utils/benchmark), and require that it be available on bots, for example. Does that cause an issue for anyone?
cheers,--renato
It would be only part of the solution as libcxx also depends on other
things in llvm-project/llvm (CMake modules, lit, ...). If the goal is
to make libcxx etc independent of the /llvm we should find out where
those other dependencies go. Until then, IMHO there is nothing wrong
to have libcxx depend on /llvm/utils/benchmark since it has /llvm is
needed to build libc++ anyway.
> On Oct 29, 2021, at 7:00 AM, Michael Kruse <llv...@meinersbur.de> wrote:
>
> Am Mo., 25. Okt. 2021 um 10:18 Uhr schrieb Mircea Trofin <mtr...@google.com>:
>> Circling back from https://reviews.llvm.org/D112012 - would having google/benchmark under a new `llvm-project/third-party` work, instead of `llvm-project/llvm/utils`? (rationale there, TL;DR; libcxx (and other runtimes) wants to detach itself from anything `llvm-project/llvm`)
>
> It would be only part of the solution as libcxx also depends on other
> things in llvm-project/llvm (CMake modules, lit, ...). If the goal is
> to make libcxx etc independent of the /llvm we should find out where
> those other dependencies go. Until then, IMHO there is nothing wrong
> to have libcxx depend on /llvm/utils/benchmark since it has /llvm is
> needed to build libc++ anyway.
I think it would make sense to move third party dependencies out of llvm-project/llvm for other reasons too, including layering (they can’t depend on other things in llvm) and license clarity.
-Chris
> On Oct 29, 2021, at 7:00 AM, Michael Kruse <llv...@meinersbur.de> wrote:
>
> Am Mo., 25. Okt. 2021 um 10:18 Uhr schrieb Mircea Trofin <mtr...@google.com>:
>> Circling back from https://reviews.llvm.org/D112012 - would having google/benchmark under a new `llvm-project/third-party` work, instead of `llvm-project/llvm/utils`? (rationale there, TL;DR; libcxx (and other runtimes) wants to detach itself from anything `llvm-project/llvm`)
>
> It would be only part of the solution as libcxx also depends on other
> things in llvm-project/llvm (CMake modules, lit, ...). If the goal is
> to make libcxx etc independent of the /llvm we should find out where
> those other dependencies go. Until then, IMHO there is nothing wrong
> to have libcxx depend on /llvm/utils/benchmark since it has /llvm is
> needed to build libc++ anyway.
I think it would make sense to move third party dependencies out of llvm-project/llvm for other reasons too, including layering (they can’t depend on other things in llvm) and license clarity.
-Chris
I think it would make sense to move third party dependencies out of llvm-project/llvm for other reasons too, including layering (they can’t depend on other things in llvm) and license clarity.
I'm in favor of this, but gtest currently has a dependency on LLVMSupport.
-Tom
> On Nov 1, 2021, at 12:15 PM, paul.r...@sony.com wrote:
>
>> On 11/1/21 10:39 AM, Reid Kleckner via llvm-dev wrote:
>>> On Sun, Oct 31, 2021 at 11:57 AM Chris Lattner via llvm-dev <llvm-
>> d...@lists.llvm.org <mailto:llvm...@lists.llvm.org>> wrote:
>>>
>>> I think it would make sense to move third party dependencies out of
>> llvm-project/llvm for other reasons too, including layering (they can’t
>> depend on other things in llvm) and license clarity.
>>>
>>>
>>> +1, gtest & gmock come to mind.
>>
>> I'm in favor of this, but gtest currently has a dependency on LLVMSupport.
>
> According to the README we have local patches to support a few targets that
> upstream gtest doesn't, and also allow some LLVM types (StringRef etc) to be
> used in the printing features.
Huh ok. Could that be handled by making them be a template or something?
-Chris