[Openmp-dev] Offloading application build with a Trunk Debug Clang is so slow

Itaru Kitayama via Openmp-dev openmp-dev at lists.llvm.org
Sat Dec 21 13:38:00 PST 2019


Using a trunk Clang which was built with -DCMAKE_BUILD_TYPE=Release and
omitting
this variable entirely; -DLIBOMPTARGET_ENABLE_DEBUG=True, a build of my app
goes back to only taking a minute or two.

Experts, should I start a git bisect on the trunk tree of llvm-project
during the holidays?

On Fri, Dec 20, 2019 at 9:13 AM Itaru Kitayama <itaru.kitayama at gmail.com>
wrote:

> It isn't much exciting.
> $ time clang++ -fuse-ld=gold -g -fopenmp -fopenmp-targets=nvptx64 test.cpp
> ^[[O^[[Iptxas /tmp/test-e95684.s, line 2715; warning : Instruction 'vote'
> without '.sync' is deprecated since PTX ISA version 6.0 and will be
> discontinued in a future PTX ISA version
>
> real 0m19.138s
> user 0m18.377s
> sys 0m0.375s
> [kitayama1 at juron1-adm pcp0151]$ time clang++ -fuse-ld=ld -g -fopenmp
> -fopenmp-targets=nvptx64 test.cpp
> ^[[O^[[I^[[Optxas /tmp/test-498b51.s, line 2715; warning : Instruction
> 'vote' without '.sync' is deprecated since PTX ISA version 6.0 and will be
> discontinued in a future PTX ISA version
>
> real 0m19.373s
> user 0m18.677s
> sys 0m0.477s
>
> On Fri, Dec 20, 2019 at 8:46 AM Alexey Bataev <a.bataev at hotmail.com>
> wrote:
>
>> Try to use gold linker instead of default ld.
>>
>> Best regards,
>> Alexey Bataev
>>
>> 19 дек. 2019 г., в 01:16, Itaru Kitayama via Openmp-dev <
>> openmp-dev at lists.llvm.org> написал(а):
>>
>> 
>> On POWER8, my app builds 40 minutes with the Debug Clang (40 times
>> increase of time, when
>> it is built with Release Clang), but on an x86 host, it just takes about
>> 10 minutes and it is bearable.
>>
>> Could this be PowerPC specific, is it why most people aren't aware of the
>> slowness?
>>
>>
>> On Thu, Dec 19, 2019 at 1:38 PM Itaru Kitayama <itaru.kitayama at gmail.com>
>> wrote:
>>
>>> Trunk Clang built with setting both variables to
>>> -DCMAKE_BUILD_TYPE=Release -DLIBOMPTARGET_ENABLE_DEBUG=False
>>> builds my application in a minute or so.
>>>
>>> On Thu, Dec 19, 2019 at 8:18 AM Itaru Kitayama <itaru.kitayama at gmail.com>
>>> wrote:
>>>
>>>> The CMake was executed as below:
>>>>
>>>> cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DLIBOMPTARGET_ENABLE_DEBUG=True
>>>> -DCMAKE_INSTALL_PREFIX=$SCRATCH/pcp0151/opt/clang/${today}
>>>> -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
>>>> -DGCC_INSTALL_PREFIX=/gpfs/software/opt/gcc/7.2.0/
>>>> -DLLVM_ENABLE_PROJECTS="clang;openmp;libcxx;libcxxabi;lld"
>>>> -DCLANG_OPENMP_NVPTX_DEFAULT_ARCH=sm_60
>>>> -DLIBOMPTARGET_NVPTX_COMPUTE_CAPABILITIES=60
>>>> -DLLVM_TARGETS_TO_BUILD="PowerPC;NVPTX"
>>>> $SCRATCH/pcp0151/projects/llvm-project/llvm
>>>>
>>>> On Thu, Dec 19, 2019 at 7:57 AM Itaru Kitayama <
>>>> itaru.kitayama at gmail.com> wrote:
>>>>
>>>>> The Clang at this commit:
>>>>> commit 1c49553c19a7044fbbf4528b732926f19f210e54
>>>>> Author: Bjorn Pettersson <bjorn.a.pettersson at ericsson.com>
>>>>> Date:   Thu Dec 12 20:51:13 2019 +0100
>>>>> [kitayama1 at juron1-adm pcp0151]$ time clang++ -g -fopenmp
>>>>> -fopenmp-targets=nvptx64 mini.cpp
>>>>>
>>>>> real 0m2.344s
>>>>> user 0m2.231s
>>>>> sys 0m0.049s
>>>>> Release Clang 9
>>>>> [[kitayama1 at juron1-adm pcp0151]$ time clang++ -g -fopenmp
>>>>> -fopenmp-targets=nvptx64 mini.cpp
>>>>>
>>>>> real 0m0.693s
>>>>> user 0m0.533s
>>>>> sys 0m0.047s
>>>>>
>>>>> On Thu, Dec 19, 2019 at 5:32 AM Jon Chesterfield <
>>>>> jonathanchesterfield at gmail.com> wrote:
>>>>>
>>>>>> Ah, OK. In that case I still suspect a regression in clang, as
>>>>>> opposed to a change in the library. Does the compile time remain very slow
>>>>>> if you roll deviceRTL back by a few days?
>>>>>>
>>>>>> On Wed, Dec 18, 2019 at 8:30 PM Itaru Kitayama <
>>>>>> itaru.kitayama at gmail.com> wrote:
>>>>>>
>>>>>>> Sorry, of course it should include this #pragma
>>>>>>> omp target parallel for for(;;) {}. My local Debug Clang is updated
>>>>>>> daily, so the tool chain is pretty much up to date.
>>>>>>>
>>>>>>> On Thu, Dec 19, 2019 at 5:24 Jon Chesterfield <
>>>>>>> jonathanchesterfield at gmail.com> wrote:
>>>>>>>
>>>>>>>> On Wed, Dec 18, 2019 at 8:13 PM Itaru Kitayama <
>>>>>>>> itaru.kitayama at gmail.com> wrote:
>>>>>>>>
>>>>>>>>> The app build time increases can be reproduced with a simple int
>>>>>>>>> main() {} code.
>>>>>>>>>
>>>>>>>>
>>>>>>>> I thought the problem was with the compile time of deviceRTL.
>>>>>>>>
>>>>>>>> If you're compiling int main() {}, then there's no openmp involved,
>>>>>>>> so that seems out of scope for this list.
>>>>>>>>
>>>>>>>> _______________________________________________
>> 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/20191222/1cf9f753/attachment.html>


More information about the Openmp-dev mailing list