aboutsummaryrefslogtreecommitdiff
path: root/libgomp/oacc-init.c
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2020-04-21 14:16:24 +0200
committerThomas Schwinge <thomas@codesourcery.com>2020-04-29 09:24:07 +0200
commit4912a04f8b35fadf65973bffc7037432ff7b7980 (patch)
tree15b9899192585644f7db2afe89cbb1d120473292 /libgomp/oacc-init.c
parentb9dc11b6730a8030cfc85f0222cef523c9c5d27c (diff)
downloadgcc-4912a04f8b35fadf65973bffc7037432ff7b7980.zip
gcc-4912a04f8b35fadf65973bffc7037432ff7b7980.tar.gz
gcc-4912a04f8b35fadf65973bffc7037432ff7b7980.tar.bz2
[gcn] Use 'radeon' for the environment variable 'ACC_DEVICE_TYPE'
..., per OpenACC 3.0, A.1.2. "AMD GPU Targets". This complements commit 6687d13a87c42dddc7d1c7adade38d31ba0d1401 "Rename acc_device_gcn to acc_device_radeon". libgomp/ * oacc-init.c (get_openacc_name): Handle 'gcn'. * testsuite/lib/libgomp.exp (offload_target_to_openacc_device_type) [amdgcn*]: Return 'radeon'. Adjust all users. (check_effective_target_openacc_amdgcn_accel_present): Rename to... (check_effective_target_openacc_radeon_accel_present): ... this. Adjust all users. (check_effective_target_openacc_amdgcn_accel_selected): Rename to... (check_effective_target_openacc_radeon_accel_selected): ... this. Adjust all users.
Diffstat (limited to 'libgomp/oacc-init.c')
-rw-r--r--libgomp/oacc-init.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libgomp/oacc-init.c b/libgomp/oacc-init.c
index ef12b4c..5d786a5 100644
--- a/libgomp/oacc-init.c
+++ b/libgomp/oacc-init.c
@@ -99,7 +99,9 @@ unknown_device_type_error (acc_device_t invalid_type)
static const char *
get_openacc_name (const char *name)
{
- if (strcmp (name, "nvptx") == 0)
+ if (strcmp (name, "gcn") == 0)
+ return "radeon";
+ else if (strcmp (name, "nvptx") == 0)
return "nvidia";
else
return name;