From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 84856 invoked by alias); 24 Mar 2016 21:42:27 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 84786 invoked by uid 89); 24 Mar 2016 21:42:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=680, 203, clock, streaming X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 24 Mar 2016 21:42:16 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-02.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1ajD1C-0007DQ-6e from Thomas_Schwinge@mentor.com ; Thu, 24 Mar 2016 14:42:14 -0700 Received: from hertz.schwinge.homeip.net (137.202.0.76) by SVR-IES-FEM-02.mgc.mentorg.com (137.202.0.106) with Microsoft SMTP Server id 14.3.224.2; Thu, 24 Mar 2016 21:42:13 +0000 From: Thomas Schwinge To: Jakub Jelinek CC: Subject: check-target-libgomp wall time, without vs. with offloading (was: Also test -O0 for OpenACC C, C++ offloading test cases) In-Reply-To: <20160323190201.GF3017@tucnak.redhat.com> References: <87mvpqrets.fsf@kepler.schwinge.homeip.net> <20160323190201.GF3017@tucnak.redhat.com> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu) Date: Fri, 25 Mar 2016 01:05:00 -0000 Message-ID: <87shzfa6z1.fsf@hertz.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-SW-Source: 2016-03/txt/msg01408.txt.bz2 Hi! On Wed, 23 Mar 2016 20:02:01 +0100, Jakub Jelinek wrote: > On Tue, Mar 22, 2016 at 11:23:43AM +0100, Thomas Schwinge wrote: > > As discussed in > > > > (and similar to what we're already doing for Fortran, and similar to wh= at > > recently got committed to libgomp/testsuite/libgomp.hsa.c/c.exp), it has > > been helpful to also run C, C++ offloading test cases with -O0 in > > addition to the -O2 default. Making my earlier gomp-4_0-branch patch > > conceptually simpler, I came up with the following; OK for trunk? >=20 > How big difference in make check-target-libgomp time is that? > Without PTX offloading I bet zero, but with PTX offloading configured, is= it > 10% or 50% slower? 15 %. The major part of the total time is still spent in Fortran testing... ;-/ Offloading compilation is slow; I suppose because of having to invoke several tools (LTO streaming -> mkoffload -> offload compilers, assemblers, linkers -> combine the resulting images; but I have not done a detailed analysis on that). I used the following patch to gather the following numbers: Baseline, without offloading: TIME 1458823399 START [...]/libgomp.c/c.exp TIME 1458823544 (145) END [...]/libgomp.c/c.exp TIME 1458823544 START [...]/libgomp.c++/c++.exp TIME 1458823672 (128) END [...]/libgomp.c++/c++.exp TIME 1458823672 START [...]/libgomp.fortran/fortran.exp TIME 1458824080 (408) END [...]/libgomp.fortran/fortran.exp TIME 1458824080 START [...]/libgomp.graphite/graphite.exp TIME 1458824083 (3) END [...]/libgomp.graphite/graphite.exp TIME 1458824083 START [...]/libgomp.hsa.c/c.exp TIME 1458824083 (0) END [...]/libgomp.hsa.c/c.exp TIME 1458824084 START [...]/libgomp.oacc-c/c.exp TIME 1458824109 (25) END [...]/libgomp.oacc-c/c.exp TIME 1458824109 START [...]/libgomp.oacc-c++/c++.exp TIME 1458824141 (32) END [...]/libgomp.oacc-c++/c++.exp TIME 1458824141 START [...]/libgomp.oacc-fortran/fortran.exp TIME 1458824215 (74) END [...]/libgomp.oacc-fortran/fortran.exp Total: 680 s (OpenMP) + 130 s (OpenACC) =3D 810 s. With OpenMP IntelMIC (emulated) and OpenACC nvptx offloading: TIME 1458824215 START [...]/libgomp.c/c.exp TIME 1458824461 (246) END [...]/libgomp.c/c.exp TIME 1458824461 START [...]/libgomp.c++/c++.exp TIME 1458824664 (203) END [...]/libgomp.c++/c++.exp TIME 1458824664 START [...]/libgomp.fortran/fortran.exp TIME 1458825269 (605) END [...]/libgomp.fortran/fortran.exp TIME 1458825269 START [...]/libgomp.graphite/graphite.exp TIME 1458825272 (3) END [...]/libgomp.graphite/graphite.exp TIME 1458825273 START [...]/libgomp.hsa.c/c.exp TIME 1458825273 (0) END [...]/libgomp.hsa.c/c.exp TIME 1458825273 START [...]/libgomp.oacc-c/c.exp TIME 1458825533 (260) END [...]/libgomp.oacc-c/c.exp TIME 1458825533 START [...]/libgomp.oacc-c++/c++.exp TIME 1458825860 (327) END [...]/libgomp.oacc-c++/c++.exp TIME 1458825860 START [...]/libgomp.oacc-fortran/fortran.exp TIME 1458826459 (599) END [...]/libgomp.oacc-fortran/fortran.exp Total: 1050 s (OpenMP; + 54 %) + 1190 s (OpenACC; + 815 %) =3D 2240 s (+ 17= 7 %). Patched with "Also test -O0 for OpenACC C, C++ offloading test cases", that results in the following changes (with offloading only): TIME 1458834409 START [...]/libgomp.oacc-c/c.exp TIME 1458834814 (405) END [...]/libgomp.oacc-c/c.exp TIME 1458834814 START [...]/libgomp.oacc-c++/c++.exp TIME 1458835338 (524) END [...]/libgomp.oacc-c++/c++.exp Total: 1050 s (OpenMP) + 1530 s (OpenACC; + 29 %) =3D 2580 s (+ 15 %). --- libgomp/testsuite/lib/libgomp-dg.exp +++ libgomp/testsuite/lib/libgomp-dg.exp @@ -1,3 +1,18 @@ +rename dg-init dg-init_ +proc dg-init { } { + dg-init_ + global CLOCK_START + set CLOCK_START [clock seconds] + verbose "TIME $CLOCK_START START [info script]" 0 +} +rename dg-finish dg-finish_ +proc dg-finish { } { + dg-finish_ + set CLOCK [clock seconds] + global CLOCK_START + verbose "TIME $CLOCK ([expr $CLOCK - $CLOCK_START]) END [info script]"= 0 +} + proc libgomp-dg-test { prog do_what extra_tool_flags } { return [gcc-dg-test-1 libgomp_target_compile $prog $do_what $extra_too= l_flags] } Gr=C3=BC=C3=9Fe Thomas