From: Tobias Burnus <tobias@codesourcery.com>
To: Andrew Stubbs <ams@codesourcery.com>, <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH v3 1/3] libgomp, nvptx: low-latency memory allocator
Date: Mon, 4 Dec 2023 17:04:31 +0100 [thread overview]
Message-ID: <7b0a9719-9787-4cf0-8916-a337ff9084f0@codesourcery.com> (raw)
In-Reply-To: <20231203003224.1638841-2-ams@codesourcery.com>
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 memory
> 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 using
> the GOMP_NVPTX_LOWLAT_POOL environment variable.
>
> The use of the PTX dynamic_smem_size feature means that low-latency allocator
> will not work with the PTX 3.1 multilib.
>
> For now, the omp_low_lat_mem_alloc allocator also works, but that will change
> 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 (implementation defined)
> +@item omp_pteam_mem_alloc @tab omp_low_lat_mem_space (implementation defined)
> +@item omp_thread_mem_alloc @tab omp_low_lat_mem_space (implementation 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_ALLOCATOR 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=omp_low_lat_mem_space:pinned=true,partition=nearest
@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_mem_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ße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955
next prev parent reply other threads:[~2023-12-04 16:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-03 0:32 [PATCH v3 0/3] libgomp: OpenMP low-latency omp_alloc Andrew Stubbs
2023-12-03 0:32 ` [PATCH v3 1/3] libgomp, nvptx: low-latency memory allocator Andrew Stubbs
2023-12-04 16:04 ` Tobias Burnus [this message]
2023-12-05 15:39 ` Andrew Stubbs
2023-12-05 17:13 ` Tobias Burnus
2023-12-05 11:25 ` Tobias Burnus
2023-12-03 0:32 ` [PATCH v3 2/3] openmp, nvptx: low-lat memory access traits Andrew Stubbs
2023-12-03 0:32 ` [PATCH v3 3/3] amdgcn, libgomp: low-latency allocator Andrew Stubbs
2023-12-04 15:34 ` [PATCH v3 0/3] libgomp: OpenMP low-latency omp_alloc Tobias Burnus
2023-12-04 15:53 ` Tobias Burnus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7b0a9719-9787-4cf0-8916-a337ff9084f0@codesourcery.com \
--to=tobias@codesourcery.com \
--cc=ams@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).