]> git.ipfire.org Git - thirdparty/gcc.git/commit - libgomp/allocator.c
openmp, nvptx: low-lat memory access traits
authorAndrew Stubbs <ams@codesourcery.com>
Thu, 27 Jan 2022 13:48:50 +0000 (13:48 +0000)
committerAndrew Stubbs <ams@codesourcery.com>
Wed, 6 Dec 2023 16:48:57 +0000 (16:48 +0000)
commite9a19ead498fcc89186b724c6e76854f7751a89b
tree05acad4ba5e84a74d71b939372771b19e3d6287e
parent30486fab717a90dc7516722c24ef9c5ea246c350
openmp, nvptx: low-lat memory access traits

The NVPTX low latency memory is not accessible outside the team that allocates
it, and therefore should be unavailable for allocators with the access trait
"all".  This change means that the omp_low_lat_mem_alloc predefined
allocator no longer works (but omp_cgroup_mem_alloc still does).

libgomp/ChangeLog:

* allocator.c (MEMSPACE_VALIDATE): New macro.
(omp_init_allocator): Use MEMSPACE_VALIDATE.
(omp_aligned_alloc): Use OMP_LOW_LAT_MEM_ALLOC_INVALID.
(omp_aligned_calloc): Likewise.
(omp_realloc): Likewise.
* config/nvptx/allocator.c (nvptx_memspace_validate): New function.
(MEMSPACE_VALIDATE): New macro.
(OMP_LOW_LAT_MEM_ALLOC_INVALID): New define.
* libgomp.texi: Document low-latency implementation details.
* testsuite/libgomp.c/omp_alloc-1.c (main): Add gnu_lowlat.
* testsuite/libgomp.c/omp_alloc-2.c (main): Add gnu_lowlat.
* testsuite/libgomp.c/omp_alloc-3.c (main): Add gnu_lowlat.
* testsuite/libgomp.c/omp_alloc-4.c (main): Add access trait.
* testsuite/libgomp.c/omp_alloc-5.c (main): Add gnu_lowlat.
* testsuite/libgomp.c/omp_alloc-6.c (main): Add access trait.
* testsuite/libgomp.c/omp_alloc-traits.c: New test.
libgomp/allocator.c
libgomp/config/nvptx/allocator.c
libgomp/libgomp.texi
libgomp/testsuite/libgomp.c/omp_alloc-1.c
libgomp/testsuite/libgomp.c/omp_alloc-2.c
libgomp/testsuite/libgomp.c/omp_alloc-3.c
libgomp/testsuite/libgomp.c/omp_alloc-4.c
libgomp/testsuite/libgomp.c/omp_alloc-5.c
libgomp/testsuite/libgomp.c/omp_alloc-6.c
libgomp/testsuite/libgomp.c/omp_alloc-traits.c [new file with mode: 0644]