aboutsummaryrefslogtreecommitdiff
path: root/include/gomp-constants.h
diff options
context:
space:
mode:
authorTobias Burnus <tobias@codesourcery.com>2022-10-20 12:58:52 +0200
committerTobias Burnus <tobias@codesourcery.com>2022-10-20 12:58:52 +0200
commit12d9f5afbd2660862045acd41cb65a77e35bea4d (patch)
tree9f6ce9c506c62938f9f40147dac4fa259e6fe7af /include/gomp-constants.h
parent5362b5cc8dba9de70904613fff1d5391a9c087ce (diff)
downloadgcc-12d9f5afbd2660862045acd41cb65a77e35bea4d.zip
gcc-12d9f5afbd2660862045acd41cb65a77e35bea4d.tar.gz
gcc-12d9f5afbd2660862045acd41cb65a77e35bea4d.tar.bz2
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.
Diffstat (limited to 'include/gomp-constants.h')
-rw-r--r--include/gomp-constants.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/gomp-constants.h b/include/gomp-constants.h
index 84316f9..fac7316 100644
--- a/include/gomp-constants.h
+++ b/include/gomp-constants.h
@@ -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