From patchwork Thu Mar 24 21:42:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 601817 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3qWKfP0CYnz9s4x for ; Fri, 25 Mar 2016 08:42:36 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=Qick3jKo; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type:content-transfer-encoding; q=dns; s= default; b=OENaQqJJrYApvvnQNQzkkeJd/ddi5T1SjxpJzmCu+pYaDRSJqo/dY ntlLghd09r+7G+bjf0TWM+uH7VqUaJDiSd6mkVyuKzENJomhEXF6R8JnBL+jCB28 H3HXx2Srnpfyx3prjQRdyRATBJXhvQVY1AEns+mphQVVA/WeqMdxMw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type:content-transfer-encoding; s=default; bh=awngqzCbxDt/7xWhnE0b2HMdXtI=; b=Qick3jKoORwh+Q/9PKnKccDHn7/T 8NEesyKClt32VY36iX99hO2O/lgLEpRbuiWaZaXZ3FewpLCfODafe561xnF/YnqO c4g/mu2mBi/dHQ+8HbxvYBeWJuVq+RkMQsw/75qtpdHeQCYkGFjVl/6WxUv7ZtfO zmEn07rq3g1Gtj0= 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-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@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: Thu, 24 Mar 2016 22:42:10 +0100 Message-ID: <87shzfa6z1.fsf@hertz.schwinge.homeip.net> MIME-Version: 1.0 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 what > > 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? > > 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) = 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 %) = 2240 s (+ 177 %). 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 %) = 2580 s (+ 15 %). Grüße Thomas --- 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_tool_flags] }