]> gcc.gnu.org Git - gcc.git/commit
libgomp: Add offload_device_gcn check, add requires-4a.c test
authorTobias Burnus <tobias@codesourcery.com>
Thu, 20 Oct 2022 10:58:52 +0000 (12:58 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Thu, 20 Oct 2022 10:58:52 +0000 (12:58 +0200)
commit12d9f5afbd2660862045acd41cb65a77e35bea4d
tree9f6ce9c506c62938f9f40147dac4fa259e6fe7af
parent5362b5cc8dba9de70904613fff1d5391a9c087ce
libgomp: Add offload_device_gcn check, add requires-4a.c test

Duplicate libgomp.c-c++-common/requires-4.c (as ...-4a.c) but
with using a heap-allocated instead of static memory for a variable.

This change and the added offload_device_gcn check prepare for
pseudo-USM, where the device hardware cannot access all host
memory but only managed and pinned memory; for those, requires-4.c
will fail and the new check permits to add
  target { ! { offload_device_nvptx || offload_device_gcn } }
to requires-4.c; however, it has not been added yet as pseuo-USM
support is not yet on mainline. (Review is pending for the USM
patches.)

include/ChangeLog:

* gomp-constants.h (GOMP_DEVICE_HSA): Comment out unused define.

libgomp/ChangeLog:

* testsuite/lib/libgomp.exp (check_effective_target_offload_device_gcn):
New.
* testsuite/libgomp.c-c++-common/on_device_arch.h (device_arch_gcn,
on_device_arch_gcn): New.
* testsuite/libgomp.c-c++-common/requires-4a.c: New test; copied from
requires-4.c but using heap-allocated memory.
include/gomp-constants.h
libgomp/testsuite/lib/libgomp.exp
libgomp/testsuite/libgomp.c-c++-common/on_device_arch.h
libgomp/testsuite/libgomp.c-c++-common/requires-4a.c [new file with mode: 0644]
This page took 0.056688 seconds and 5 git commands to generate.