From f1af7d65ff64fe7102d1490ef46ea491a533e641 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Tue, 6 Jun 2023 18:06:14 +0200 Subject: libgomp: plugin-gcn - support 'unified_address' Effectively, for GCN (as for nvptx) there is a common address space between host and device, whether being accessible or not. Thus, this commit permits to use 'omp requires unified_address' with GCN devices. (nvptx accepts this requirement since r13-3460-g131d18e928a3ea.) libgomp/ * plugin/plugin-gcn.c (GOMP_OFFLOAD_get_num_devices): Regard unified_address requirement as supported. * libgomp.texi (OpenMP 5.0, AMD Radeon, nvptx): Remove 'unified_address' from the not-supported requirements. --- libgomp/plugin/plugin-gcn.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libgomp/plugin') diff --git a/libgomp/plugin/plugin-gcn.c b/libgomp/plugin/plugin-gcn.c index 2181bf0..ef22d48 100644 --- a/libgomp/plugin/plugin-gcn.c +++ b/libgomp/plugin/plugin-gcn.c @@ -3231,7 +3231,9 @@ GOMP_OFFLOAD_get_num_devices (unsigned int omp_requires_mask) /* Return -1 if no omp_requires_mask cannot be fulfilled but devices were present. */ if (hsa_context.agent_count > 0 - && (omp_requires_mask & ~GOMP_REQUIRES_REVERSE_OFFLOAD) != 0) + && ((omp_requires_mask + & ~(GOMP_REQUIRES_UNIFIED_ADDRESS + | GOMP_REQUIRES_REVERSE_OFFLOAD)) != 0)) return -1; return hsa_context.agent_count; } -- cgit v1.1