From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 104767 invoked by alias); 12 Jan 2019 22:21:18 -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 104717 invoked by uid 89); 12 Jan 2019 22:21:18 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.2 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_SOFTFAIL autolearn=ham version=3.3.2 spammy=HX-detected-operating-system:timestamps X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (209.51.188.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 12 Jan 2019 22:21:16 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1giReU-0007FC-6w for gcc-patches@gcc.gnu.org; Sat, 12 Jan 2019 17:21:14 -0500 Received: from mx2.suse.de ([195.135.220.15]:52524 helo=mx1.suse.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1giReU-0007EH-0o for gcc-patches@gcc.gnu.org; Sat, 12 Jan 2019 17:21:14 -0500 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id D880DAE63; Sat, 12 Jan 2019 22:21:10 +0000 (UTC) From: Tom de Vries To: gcc-patches@gcc.gnu.org Cc: Thomas Schwinge Subject: [PATCH 8/9] [nvptx] Enable setting vector length using -fopenacc-dim Date: Sat, 12 Jan 2019 22:21:00 -0000 Message-Id: <20190112222131.29519-9-tdevries@suse.de> In-Reply-To: <20190112222131.29519-1-tdevries@suse.de> References: <20190112222131.29519-1-tdevries@suse.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 195.135.220.15 X-IsSubscribed: yes X-SW-Source: 2019-01/txt/msg00717.txt.bz2 Enable setting vector length using -fopenacc-dim, f.i. -fopenacc-dim=::128. 2019-01-12 Tom de Vries * config/nvptx/nvptx.c (nvptx_goacc_validate_dims_1): Alow setting vector length using -fopenacc-dim. * plugin/plugin-nvptx.c (nvptx_exec): Update error message. --- gcc/config/nvptx/nvptx.c | 3 ++- libgomp/plugin/plugin-nvptx.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c index 8d2740cd50f..03c0f82f4a2 100644 --- a/gcc/config/nvptx/nvptx.c +++ b/gcc/config/nvptx/nvptx.c @@ -5705,7 +5705,8 @@ nvptx_goacc_validate_dims_1 (tree decl, int dims[], int fn_level, unsigned used) if (oacc_default_dims_p) { - dims[GOMP_DIM_VECTOR] = default_vector_length; + if (dims[GOMP_DIM_VECTOR] < 0) + dims[GOMP_DIM_VECTOR] = default_vector_length; if (dims[GOMP_DIM_WORKER] < 0) dims[GOMP_DIM_WORKER] = PTX_DEFAULT_RUNTIME_DIM; if (dims[GOMP_DIM_GANG] < 0) diff --git a/libgomp/plugin/plugin-nvptx.c b/libgomp/plugin/plugin-nvptx.c index 8912660966a..dd2bcf3083f 100644 --- a/libgomp/plugin/plugin-nvptx.c +++ b/libgomp/plugin/plugin-nvptx.c @@ -1321,7 +1321,7 @@ nvptx_exec (void (*fn), size_t mapnum, void **hostaddrs, void **devaddrs, " region or '-fopenacc-dim=:x:' where x <= 15" "; " "or, recompile the program with 'vector_length = 32' on that" - " offloaded region" + " offloaded region or '-fopenacc-dim=::32'" ".\n"); GOMP_PLUGIN_fatal (msg, targ_fn->launch->fn, dims[GOMP_DIM_WORKER], dims[GOMP_DIM_VECTOR]); -- 2.16.4