aboutsummaryrefslogtreecommitdiff
path: root/libgomp/libgomp.texi
diff options
context:
space:
mode:
authorTobias Burnus <tobias@codesourcery.com>2023-07-11 16:11:35 +0200
committerTobias Burnus <tobias@codesourcery.com>2023-07-11 16:11:35 +0200
commit8c2fc744a25ec423ab1a317bf4e7d24315c40024 (patch)
treebbe8d7fad2d7af8c23e8b37e4918a27fd647d2c7 /libgomp/libgomp.texi
parentb76d71564925abcabe6f5ad61d904b23c682cdfb (diff)
downloadgcc-8c2fc744a25ec423ab1a317bf4e7d24315c40024.zip
gcc-8c2fc744a25ec423ab1a317bf4e7d24315c40024.tar.gz
gcc-8c2fc744a25ec423ab1a317bf4e7d24315c40024.tar.bz2
libgomp: Update OpenMP memory allocation doc, fix omp_high_bw_mem_space
libgomp/ * allocator.c (omp_init_allocator): Use malloc for omp_high_bw_mem_space when the memkind lib is unavailable instead of returning omp_null_allocator. * libgomp.texi (OpenMP 5.0): Fix typo. (Memory allocation with libmemkind): Document implementation in more detail.
Diffstat (limited to 'libgomp/libgomp.texi')
-rw-r--r--libgomp/libgomp.texi30
1 files changed, 28 insertions, 2 deletions
diff --git a/libgomp/libgomp.texi b/libgomp/libgomp.texi
index 7d27cc5..d1a5e67 100644
--- a/libgomp/libgomp.texi
+++ b/libgomp/libgomp.texi
@@ -192,7 +192,7 @@ The OpenMP 4.5 specification is fully supported.
env variable @tab Y @tab
@item Nested-parallel changes to @var{max-active-levels-var} ICV @tab Y @tab
@item @code{requires} directive @tab P
- @tab complete but no non-host devices provides @code{unified_shared_memory}
+ @tab complete but no non-host device provides @code{unified_shared_memory}
@item @code{teams} construct outside an enclosing target region @tab Y @tab
@item Non-rectangular loop nests @tab P @tab Full support for C/C++, partial for Fortran
@item @code{!=} as relational-op in canonical loop form for C/C++ @tab Y @tab
@@ -4634,6 +4634,17 @@ smaller number. On non-host devices, the value of the
@node Memory allocation with libmemkind
@section Memory allocation with libmemkind
+For the memory spaces, the following applies:
+@itemize
+@item @code{omp_default_mem_space} is supported
+@item @code{omp_const_mem_space} maps to @code{omp_default_mem_space}
+@item @code{omp_low_lat_mem_space} maps to @code{omp_default_mem_space}
+@item @code{omp_large_cap_mem_space} maps to @code{omp_default_mem_space},
+ unless the memkind library is available
+@item @code{omp_high_bw_mem_space} maps to @code{omp_default_mem_space},
+ unless the memkind library is available
+@end itemize
+
On Linux systems, where the @uref{https://github.com/memkind/memkind, memkind
library} (@code{libmemkind.so.0}) is available at runtime, it is used when
creating memory allocators requesting
@@ -4641,9 +4652,24 @@ creating memory allocators requesting
@itemize
@item the memory space @code{omp_high_bw_mem_space}
@item the memory space @code{omp_large_cap_mem_space}
-@item the partition trait @code{omp_atv_interleaved}
+@item the partition trait @code{omp_atv_interleaved}; note that for
+ @code{omp_large_cap_mem_space} the allocation will not be interleaved
@end itemize
+Additional notes:
+@itemize
+@item The @code{pinned} trait is unsupported.
+@item For the @code{partition} trait, the partition part size will be the same
+ as the requested size (i.e. @code{interleaved} or @code{blocked} has no
+ effect), except for @code{interleaved} when the memkind library is
+ available. Furthermore, for @code{nearest} the memory might not be
+ on the same NUMA node as thread that allocated the memory; on Linux,
+ this is in particular the case when the memory placement policy is
+ set to preferred.
+@item The @code{access} trait has no effect such that memory is always
+ accessible by all threads.
+@item The @code{sync_hint} trait has no effect.
+@end itemize
@c ---------------------------------------------------------------------
@c Offload-Target Specifics