From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id CE0F93858D28 for ; Mon, 4 Dec 2023 16:04:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CE0F93858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CE0F93858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=68.232.141.98 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701705880; cv=none; b=IbqbPh+vBjW8DwrBTkvr1V0RqGlj3WBtUIvmZ0MtMGY4FcWEqPh6LBvS99Bx90W3Ulj5FEhr58Lj7Jb6rbfTdkYP4gJRV9x7CeNwuhQScQJjeXRHmk6HuAqOpQ1Yf/hCplHW1X8s7SNIxbpRK8oU85hodfZ8GfAsGO+Z+U3qTek= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701705880; c=relaxed/simple; bh=lxBeEFP+2tWhYJftFqCbFUoNsmL21CKd89PQjGy5UKg=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=h7cEIz0a1rO/N49+7WQ1NTji/6gxPUvdRjFV+bRn1PXlbcfRI+PDNbRldiXEnHq1ajP1kaunVp2Me8k8328YO7xMo77mTUy1BRIq9fSimB9Rm0Fe0T69j0y34VfvK61uxVrRv9AuGVMMq++Mt7eTcmomKAqJNk6GyzEfGGCGvGo= ARC-Authentication-Results: i=1; server2.sourceware.org X-CSE-ConnectionGUID: Mx3EtkFcQB6ZBkXffcF2QQ== X-CSE-MsgGUID: r23+07JnQFuyV1dQ25RqDQ== X-IronPort-AV: E=Sophos;i="6.04,250,1695715200"; d="scan'208";a="27340662" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 04 Dec 2023 08:04:37 -0800 IronPort-SDR: aKMVIQv2MVUG8DS2Kt/z1waf8uFJjA154hasX3oRw7n42Mo3EqP29U5/FYraB6Fg67X8g7Eg2y gmauY6J/GgXhups+NoVXpZC1GS4yfPH0rZhIfjH6FPYZUYtHHvFqQlSSyfQV6r8eZntevYo7jk OZy3Ee9t+BJe1ZW5cx/MKCH8yi3xdQbhyoIEUrbUGJKUSHMq+1z9GE6u16JNSlhuXpwmAPG6lW 4bx+c/WYCqXtWoU26Iy+TiZoQNFDuOxZrvbzVY2PxH4khkuYyUKRDwAsBZStp8sfwW8cBnA3xH E6o= Message-ID: <7b0a9719-9787-4cf0-8916-a337ff9084f0@codesourcery.com> Date: Mon, 4 Dec 2023 17:04:31 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 1/3] libgomp, nvptx: low-latency memory allocator Content-Language: en-US To: Andrew Stubbs , References: <20231203003224.1638841-1-ams@codesourcery.com> <20231203003224.1638841-2-ams@codesourcery.com> From: Tobias Burnus In-Reply-To: <20231203003224.1638841-2-ams@codesourcery.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) To svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00,GIT_PATCH_0,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,KAM_SHORT,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: On 03.12.23 01:32, Andrew Stubbs wrote: > This patch adds support for allocating low-latency ".shared" memory on > NVPTX GPU device, via the omp_low_lat_mem_space and omp_alloc. The memor= y > can be allocated, reallocated, and freed using a basic but fast algorithm= , > is thread safe and the size of the low-latency heap can be configured usi= ng > the GOMP_NVPTX_LOWLAT_POOL environment variable. > > The use of the PTX dynamic_smem_size feature means that low-latency alloc= ator > will not work with the PTX 3.1 multilib. > > For now, the omp_low_lat_mem_alloc allocator also works, but that will ch= ange > when I implement the access traits. ... LGTM, however, I about the following: > diff --git a/libgomp/libgomp.texi b/libgomp/libgomp.texi > index e5fe7af76af..39d0749e7b3 100644 > --- a/libgomp/libgomp.texi > +++ b/libgomp/libgomp.texi > @@ -3012,11 +3012,14 @@ value. > @item omp_const_mem_alloc @tab omp_const_mem_space > @item omp_high_bw_mem_alloc @tab omp_high_bw_mem_space > @item omp_low_lat_mem_alloc @tab omp_low_lat_mem_space > -@item omp_cgroup_mem_alloc @tab -- > -@item omp_pteam_mem_alloc @tab -- > -@item omp_thread_mem_alloc @tab -- > +@item omp_cgroup_mem_alloc @tab omp_low_lat_mem_space (implementati= on defined) > +@item omp_pteam_mem_alloc @tab omp_low_lat_mem_space (implementati= on defined) > +@item omp_thread_mem_alloc @tab omp_low_lat_mem_space (implementati= on defined) > @end multitable > > +The @code{omp_low_lat_mem_space} is only available on supported devices. > +See @ref{Offload-Target Specifics}. > + Whether it would be clearer to have this wording not here for the OMP_ALLOC= ATOR env, i.e. https://gcc.gnu.org/onlinedocs/libgomp/OMP_005fALLOCATOR.html but just a simple crossref like: --- a/libgomp/libgomp.texi +++ b/libgomp/libgomp.texi @@ -3061,5 +3061,5 @@ OMP_ALLOCATOR=3Domp_low_lat_mem_space:pinned=3Dtrue,p= artition=3Dnearest @item @emph{See also}: @ref{Memory allocation}, @ref{omp_get_default_allocator}, -@ref{omp_set_default_allocator} +@ref{omp_set_default_allocator}, @ref{Offload-Target Specifics} @item @emph{Reference}: And add your wording to: https://gcc.gnu.org/onlinedocs/libgomp/Memory-allocation.html As this sections mentions that "omp_low_lat_mem_space maps to omp_default_m= em_space" in general. Hence, mentioning in this section in addition that omp_low_lat_mem_space = is honored on devices seems to be the better location. Tobias ----------------- 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