From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id 397FC3858417 for ; Mon, 27 Mar 2023 11:26:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 397FC3858417 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.98,294,1673942400"; d="scan'208,223";a="506546" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 27 Mar 2023 03:26:36 -0800 IronPort-SDR: FIjoEO7MVVJzDV0ZDk8Lwdi8W8H9jG+rlDUDoJK1IviQL3o2QYh3oWbaD/9QKx6e2Tl8ocLIE7 5eqCnNuKyuwZM540itoWZfclnhGsIo6asmypNzB/AeKj/BX1NYTtWnSByCqQaPrI5bmtC1YROk ytF74NYA2YqcO1L8PvREbxKXHjXf3Wcx/OObl7HhjYhE5oLk7Sa+cnbdjhPASF853r2Ng6+tr4 ZjMdVPJqW5o+JgC/2CXT6qYGrww6tLLxr6pfkbqFqdbgmnACjTfvvUDWTa8l/lvkJhEiT9G09f K0E= From: Thomas Schwinge To: , Andrew Stubbs , "Tobias Burnus" Subject: [og12] libgomp: Document OpenMP 'pinned' memory (was: [PATCH] libgomp, openmp: pinned memory) In-Reply-To: References: <87bkki9mji.fsf@euler.schwinge.homeip.net> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/28.2 (x86_64-pc-linux-gnu) Date: Mon, 27 Mar 2023 13:26:28 +0200 Message-ID: <878rfiqvtn.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-14.mgc.mentorg.com (139.181.222.14) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --=-=-= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi! On 2023-03-27T09:27:31+0000, "Stubbs, Andrew" w= rote: >> -----Original Message----- >> From: Thomas Schwinge >> Sent: 24 March 2023 15:50 >> >> On 2022-01-04T15:32:17+0000, Andrew Stubbs >> wrote: >> > This patch implements the OpenMP pinned memory trait [...] >> >> I figure it may be helpful to document the current og12 state of affairs= ; does >> the attached "libgomp: Document OpenMP 'pinned' memory" look good to >> you? > > I don't really know what "allocated via the device" means? Heh, you're right. > I mean, I presume you mean "via CUDA", but I don't think this is obvious = to the average reader. > Maybe "allocation is optimized for the device" or some such thing? As we're in sections that are documenting GCN vs. nvptx specifics, we might indeed call out which exact interfaces we're using. How's the updated "libgomp: Document OpenMP 'pinned' memory", see attached? Gr=C3=BC=C3=9Fe Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename="0001-libgomp-Document-OpenMP-pinned-memory.patch" >From 03e09ad4e0b4cd2232e8bb036dd2562b18ea2686 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 24 Mar 2023 15:14:57 +0100 Subject: [PATCH] libgomp: Document OpenMP 'pinned' memory libgomp/ * libgomp.texi (AMD Radeon, nvptx): Document OpenMP 'pinned' memory. --- libgomp/libgomp.texi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libgomp/libgomp.texi b/libgomp/libgomp.texi index 288e0b3a8ea..6355ce2a37b 100644 --- a/libgomp/libgomp.texi +++ b/libgomp/libgomp.texi @@ -4456,6 +4456,9 @@ The implementation remark: @item OpenMP code that has a requires directive with @code{unified_address} or @code{unified_shared_memory} will remove any GCN device from the list of available devices (``host fallback''). +@item OpenMP @emph{pinned} memory (@code{omp_atk_pinned}, + @code{ompx_pinned_mem_alloc}, for example) + is allocated via @code{mmap}, @code{mlock}. @end itemize @@ -4518,6 +4521,11 @@ The implementation remark: @item OpenMP code that has a requires directive with @code{unified_address} or @code{unified_shared_memory} will remove any nvptx device from the list of available devices (``host fallback''). +@item OpenMP @emph{pinned} memory (@code{omp_atk_pinned}, + @code{ompx_pinned_mem_alloc}, for example) + is allocated via @code{cuMemHostAlloc} (CUDA Driver API). + This potentially helps optimization of host <-> device data + transfers. @end itemize -- 2.25.1 --=-=-=--