From patchwork Fri Aug 2 20:12:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Brown X-Patchwork-Id: 1141378 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-506141-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="mXGSF/3V"; 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 460ddj4w2dz9sML for ; Sat, 3 Aug 2019 06:13:29 +1000 (AEST) 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:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; q=dns; s= default; b=N/ax3xTOd2kdVEk4brvWX77zKXH90x8SJou34bAGGpbUWDpBqq+e0 uFdBB5NwqKeUsoo7s+Ba6u1AkCC9efBuhPgPhws/EuK0FJhf20ctDk+fGNylWLPi 7hy5m0dTH7/Zv2jXFZGZ0fx6l1sZwAMmYgjUSPzUu1eJCYDkkYzNOA= 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:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=default; bh=MEG9oiWn0VLY1Q9MiRh53DHDu6s=; b=mXGSF/3VUiunijp3bREQae4ylcfs WGhdaRMAN/wYp7I82y5dYA3fJhb2tt8x0dI0DYsYmO4ev9mcYZ5GwLgXQTou6dS4 FQwT85v1adSfbL2VCReptW9XVk4St1AglLgiudM4Qu2/DuzammpodGMHOte8Bcud 4DraPuckgUjnqqE= Received: (qmail 6809 invoked by alias); 2 Aug 2019 20:13:04 -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 6781 invoked by uid 89); 2 Aug 2019 20:13:04 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-23.6 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= 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; Fri, 02 Aug 2019 20:13:02 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-MBX-04.mgc.mentorg.com) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1htdvB-0001CH-Cb from Julian_Brown@mentor.com ; Fri, 02 Aug 2019 13:13:01 -0700 Received: from build5-trusty-cs.sje.mentorg.com (147.34.91.1) by SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Fri, 2 Aug 2019 21:12:57 +0100 From: Julian Brown To: CC: Andrew Stubbs , Jakub Jelinek Subject: [PATCH 7/8] [og9] NVPTX GOMP_OFFLOAD_openacc_async_construct arg fix and gomp_print_* support Date: Fri, 2 Aug 2019 13:12:42 -0700 Message-ID: <3df3ea7e8163b9ec0c7227c70c6e1154bf95c24a.1564776081.git.julian@codesourcery.com> In-Reply-To: References: MIME-Version: 1.0 X-IsSubscribed: yes This patch introduces versions of the gomp_print_{string,integer,double} low-level printing functions that work for NVPTX. ChangeLog 2019-07-31 Julian Brown libgomp/ * config/nvptx/gomp_print.c (gomp_print_string, gomp_print_integer, gomp_print_double): New. * plugin/plugin-nvptx.c (GOMP_OFFLOAD_openacc_async_construct): Add dummy device parameter. --- libgomp/ChangeLog.openacc | 7 +++++++ libgomp/config/nvptx/gomp_print.c | 20 ++++++++++++++++++++ libgomp/plugin/plugin-nvptx.c | 2 +- 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 libgomp/config/nvptx/gomp_print.c diff --git a/libgomp/ChangeLog.openacc b/libgomp/ChangeLog.openacc index c03f8714408..c850203e145 100644 --- a/libgomp/ChangeLog.openacc +++ b/libgomp/ChangeLog.openacc @@ -1,3 +1,10 @@ +2019-07-31 Julian Brown + + * config/nvptx/gomp_print.c (gomp_print_string, gomp_print_integer, + gomp_print_double): New. + * plugin/plugin-nvptx.c (GOMP_OFFLOAD_openacc_async_construct): Add + dummy device parameter. + 2019-07-31 Julian Brown * libgomp.map (GOMP_2.0.GOMP_4_BRANCH): Remove GOACC_parallel_keyed_v2. diff --git a/libgomp/config/nvptx/gomp_print.c b/libgomp/config/nvptx/gomp_print.c new file mode 100644 index 00000000000..811bdd6e9a9 --- /dev/null +++ b/libgomp/config/nvptx/gomp_print.c @@ -0,0 +1,20 @@ +#include +#include + +void +gomp_print_string (const char *msg, const char *value) +{ + printf ("%s%s\n", msg, value); +} + +void +gomp_print_integer (const char *msg, int64_t value) +{ + printf ("%s%ld\n", msg, value); +} + +void +gomp_print_double (const char *msg, double value) +{ + printf ("%s%f\n", msg, value); +} diff --git a/libgomp/plugin/plugin-nvptx.c b/libgomp/plugin/plugin-nvptx.c index 09567ce852c..4beb3222e8f 100644 --- a/libgomp/plugin/plugin-nvptx.c +++ b/libgomp/plugin/plugin-nvptx.c @@ -1732,7 +1732,7 @@ GOMP_OFFLOAD_openacc_cuda_set_stream (struct goacc_asyncqueue *aq, void *stream) } struct goacc_asyncqueue * -GOMP_OFFLOAD_openacc_async_construct (void) +GOMP_OFFLOAD_openacc_async_construct (int device __attribute__((unused))) { CUstream stream = NULL; CUDA_CALL_ERET (NULL, cuStreamCreate, &stream, CU_STREAM_DEFAULT);