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