From patchwork Mon Apr 1 15:29:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chung-Lin Tang X-Patchwork-Id: 1072928 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-498714-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=mentor.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="J3rIVZns"; dkim-atps=neutral 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 44Xx9Z62RTz9sPb for ; Tue, 2 Apr 2019 02:30:06 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :reply-to:to:cc:from:subject:message-id:date:mime-version :content-type; q=dns; s=default; b=YCpN+3XvH83CaKnIpvAFzxrLZrMoi cMwPvon8GTbmQ6Y3Dmcfm+hDobryLQdcbLYstk7NyQyvA8bSG3D88zq4fX8EZPQg jlORQF6oy0w1arusIykt1cSTMx86uVqsNNwZqp7sdIcyPI7ZTf/yGYhWP022EhJn W/FohABEQEa9d4= 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 :reply-to:to:cc:from:subject:message-id:date:mime-version :content-type; s=default; bh=wylWzE1qhePgddKdrd02BTh1/jQ=; b=J3r IVZnsyM4oozAS2RbVxVlDXKB2/co6Tmmw5VE6c2ry5A/KAXwuv5L0bd0FCGsAOhD m4OL8NVmtMNURn5RAibiA5Gui/FKkiCzYH4ju9LfJsut3AvYWsjqF5TfJ/UEc4mb d5E/31ZEf+vvapPMIaCEbIwzXAk97CKvNZWxOIts= Received: (qmail 75797 invoked by alias); 1 Apr 2019 15:29:59 -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 75785 invoked by uid 89); 1 Apr 2019 15:29:59 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-13.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=61, gang, 70, 6.1 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 ESMTP; Mon, 01 Apr 2019 15:29:57 +0000 Received: from svr-orw-mbx-02.mgc.mentorg.com ([147.34.90.202]) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1hAysk-00001B-A8 from ChungLin_Tang@mentor.com ; Mon, 01 Apr 2019 08:29:54 -0700 Received: from [0.0.0.0] (147.34.91.1) by svr-orw-mbx-02.mgc.mentorg.com (147.34.90.202) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Mon, 1 Apr 2019 08:29:51 -0700 Reply-To: To: gcc-patches CC: Thomas Schwinge , Tom de Vries , Catherine Moore From: Chung-Lin Tang Subject: [PATCH, OpenACC, og8, committed] Handle Compute Capability 7.0 in libgomp Message-ID: <18bb8aa8-b368-006a-1989-e4dba5a1fdd4@mentor.com> Date: Mon, 1 Apr 2019 23:29:45 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 I've committed this single-liner (and added a comment) to OG8. This allows detection of Compute Capability 7.0 (Volta) and lets libgomp allocate a more reasonable default gang number for Volta GPUs. Tested without regressions on a powerpc64le-linux system. Note that mainline has different code for doing this task, so this patch doesn't apply there (not needed there). Chung-Lin [og] Handle Compute Capability 7.0 (Volta) libgomp/ * plugin/plugin-nvptx.c (GOMP_OFFLOAD_load_image): Handle up to Compute Capability 7.0. diff --git a/libgomp/plugin/plugin-nvptx.c b/libgomp/plugin/plugin-nvptx.c index c2d3b71..706a36f 100644 --- a/libgomp/plugin/plugin-nvptx.c +++ b/libgomp/plugin/plugin-nvptx.c @@ -1273,8 +1273,9 @@ GOMP_OFFLOAD_load_image (int ord, unsigned version, const void *target_data, dev->register_allocation_unit_size = 256; dev->register_allocation_granularity = 2; } - else if (dev->binary_version <= 62) + else if (dev->binary_version <= 70) { + /* Compute Capability 6.1, 6.2, 7.0 share same parameters. */ dev->register_allocation_unit_size = 256; dev->register_allocation_granularity = 4; }