[Openmp-dev] Build is terribly slow on Arm
Itaru Kitayama via Openmp-dev
openmp-dev at lists.llvm.org
Thu Jun 11 17:10:17 PDT 2020
I’ve been trying to build LLVM on Arm with CUDA Toolkit within a reasonable
amount of time that’s all.
On Fri, Jun 12, 2020 at 2:44 Michael Kruse <llvm at meinersbur.de> wrote:
> Wait, what was your original test about? Aren't you interested in
> getting the problem fixed?
>
> Michael
>
> Am Do., 11. Juni 2020 um 00:06 Uhr schrieb Itaru Kitayama
> <itaru.kitayama at gmail.com>:
> >
> > Michael, all,
> >
> > An LLVM build process together with clang, openmp, and other projects
> > on Arm becomes normal, ie
> > about 15 minutes or so (in my last couples of attempts). So, I will
> > move on to app build performance evaluation.
> >
> > On Thu, Jun 11, 2020 at 8:57 AM Michael Kruse <llvm at meinersbur.de>
> wrote:
> > >
> > > Ok, you are using a non-assert/release build of clang, therefore
> > > Jonas' remark does not apply.
> > >
> > > Since your original question was how to investigate further, we have
> > > to find out where the time is spent.
> > >
> > > 1. Run clang -ftime-trace:
> > >
> https://aras-p.info/blog/2019/01/16/time-trace-timeline-flame-chart-profiler-for-Clang/
> > >
> > > 2. Create a performance trace, e.g.
> https://github.com/brendangregg/FlameGraph
> > > Note that for this, a non-optimized build with debug symbols of clang
> > > would be better, but Linux perf may still get useful information
> > > without.
> > >
> > >
> > > Michael
> > >
> > > Am Mi., 10. Juni 2020 um 18:45 Uhr schrieb Itaru Kitayama
> > > <itaru.kitayama at gmail.com>:
> > > >
> > > > ```
> > > >
> > > > cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_LLD=ON
> > > > -DCMAKE_INSTALL_PREFIX=$HOME/opt/clang/${now}
> -DCMAKE_C_COMPILER=clang
> > > > -DCMAKE_CXX_COMPILER=clang++ -DLLVM_TARGETS_TO_BUILD=all
> > > > -DLLVM_ENABLE_PROJECTS="openmp;clang;lld;libcxx;libcxxabi;libunwind"
> > > > -DCLANG_OPENMP_NVPTX_DEFAULT_ARCH=sm_70
> > > > -DLIBOMPTARGET_NVPTX_COMPUTE_CAPABILITIES=70 /tmp/llvm-project/llvm
> > > > ```
> > > >
> > > > On Thu, Jun 11, 2020 at 8:43 AM Michael Kruse <llvm at meinersbur.de>
> wrote:
> > > > >
> > > > > How do you compile LLVM (your cmake ... command line)?
> > > > >
> > > > > What flags do you use to compile your application?
> > > > >
> > > > > Michael
> > > > >
> > > > > Am Mi., 10. Juni 2020 um 18:26 Uhr schrieb Itaru Kitayama
> > > > > <itaru.kitayama at gmail.com>:
> > > > > >
> > > > > > Michael, David,
> > > > > >
> > > > > > Sorry I wasn't clear; I am building LLVM on Arm with CUDA
> Toolkit 11 RC.
> > > > > >
> > > > > > On Thu, Jun 11, 2020 at 8:23 AM Michael Kruse <
> llvm at meinersbur.de> wrote:
> > > > > > >
> > > > > > > Itaru could mean compiling his application with debug symbols
> (-O0 -g)
> > > > > > > using a release build of clang (it's always good to mention
> which
> > > > > > > version of clang you are using) or an optimized version of his
> > > > > > > application using an CMAKE_BUILD_TYPE=Debug build of clang.
> Maybe he
> > > > > > > could clarify?
> > > > > > >
> > > > > > > If you are running linux, a performance trace (flame graph /
> Linux
> > > > > > > perf record) would be useful, especially if you are using a
> debug
> > > > > > > build of clang.
> > > > > > >
> > > > > > > Michael
> > > > > > >
> > > > > > > Am Mi., 10. Juni 2020 um 04:55 Uhr schrieb Jonas Hahnfeld via
> > > > > > > Openmp-dev <openmp-dev at lists.llvm.org>:
> > > > > > > >
> > > > > > > > You wrote "They were both Debug build". Maybe I
> misunderstand?
> > > > > > > >
> > > > > > > > Am Mittwoch, den 10.06.2020, 18:52 +0900 schrieb Itaru
> Kitayama:
> > > > > > > > > Why do you think I build in Debug? I try to
> > > > > > > > > avoid that all time.
> > > > > > > > >
> > > > > > > > > On Wed, Jun 10, 2020 at 18:38 Jonas Hahnfeld <
> hahnjo at hahnjo.de> wrote:
> > > > > > > > > > You should not use Debug build to compare the
> performance of compilers.
> > > > > > > > > > As you're targeting different architectures, you might
> run into
> > > > > > > > > > different checks in the two backends. I believe it's
> possible this is
> > > > > > > > > > triggered by OpenMP code generation which might hit some
> corner cases.
> > > > > > > > > > This could also happen in Release builds, but might be
> less probable.
> > > > > > > > > >
> > > > > > > > > > Also keep in mind that AArch64 (which you're probably
> talking about in
> > > > > > > > > > the context of HPC) now uses GlobalISel in some
> configurations. I don't
> > > > > > > > > > remember if it's with or without optimizations (or maybe
> even both
> > > > > > > > > > nowadays?), but you can try to deactivate this on the
> command line to
> > > > > > > > > > rule out this area.
> > > > > > > > > >
> > > > > > > > > > Regards
> > > > > > > > > > Jonas
> > > > > > > > > >
> > > > > > > > > > Am Dienstag, den 09.06.2020, 08:12 +0900 schrieb Itaru
> Kitayama via
> > > > > > > > > > Openmp-dev:
> > > > > > > > > > > They were both Debug build, but it took 20-25 minutes
> to finish on Arm.
> > > > > > > > > > >
> > > > > > > > > > > On Tue, Jun 9, 2020 at 7:50 AM Itaru Kitayama <
> > > > > > > > > > > itaru.kitayama at gmail.com
> > > > > > > > > > > > wrote:
> > > > > > > > > > > > My OpenMP offloading app builds within a minute or
> so on
> > > > > > > > > > > > x86, but the same app takes longer than 5 minutes on
> Arm.
> > > > > > > > > > > > How do I investigate this further, supplying -v and
> post
> > > > > > > > > > > > the log here?
> > > > > > > > >
> > > > > > > > >
> > > > > > > > _______________________________________________
> > > > > > > > Openmp-dev mailing list
> > > > > > > > Openmp-dev at lists.llvm.org
> > > > > > > > https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20200612/93771893/attachment.html>
More information about the Openmp-dev
mailing list