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.
This commit is contained in:
@@ -230,7 +230,7 @@ enum gomp_map_kind
|
||||
#define GOMP_DEVICE_NOT_HOST 4
|
||||
#define GOMP_DEVICE_NVIDIA_PTX 5
|
||||
#define GOMP_DEVICE_INTEL_MIC 6
|
||||
#define GOMP_DEVICE_HSA 7
|
||||
/* #define GOMP_DEVICE_HSA 7 removed. */
|
||||
#define GOMP_DEVICE_GCN 8
|
||||
|
||||
/* We have a compatibility issue. OpenMP 5.2 introduced
|
||||
|
||||
Reference in New Issue
Block a user