Hi! On 2019-12-13T17:43:57+0000, Andrew Stubbs <a...@codesourcery.com> wrote: > On 19/11/2019 12:21, Andrew Stubbs wrote: >> This patch adds GCN special casing for most of the OpenACC libgomp tests >> that require it. > > [...] I've gone ahead and committed the attached.
> * testsuite/libgomp.oacc-c-c++-common/acc_prof-kernels-1.c: [Handle > gcn.] > --- a/libgomp/testsuite/libgomp.oacc-c-c++-common/acc_prof-kernels-1.c > +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/acc_prof-kernels-1.c > @@ -106,6 +106,8 @@ static void cb_enqueue_launch_start (acc_prof_info > *prof_info, acc_event_info *e > assert (event_info->launch_event.vector_length >= 1); > else if (acc_device_type == acc_device_nvidia) /* ... is special. */ > assert (event_info->launch_event.vector_length == 32); > + else if (acc_device_type == acc_device_gcn) /* ...and so is this. */ > + assert (event_info->launch_event.vector_length == 64); > else > { > #ifdef __OPTIMIZE__ > @@ -118,6 +120,8 @@ static void cb_enqueue_launch_start (acc_prof_info > *prof_info, acc_event_info *e > > if (acc_device_type == acc_device_host) > assert (api_info->device_api == acc_device_api_none); > + else if (acc_device_type == acc_device_gcn) > + assert (api_info->device_api == acc_device_api_other); > else > assert (api_info->device_api == acc_device_api_cuda); > assert (api_info->valid_bytes == _ACC_API_INFO_VALID_BYTES); (Someone please scold me for making 'acc_device_api_cuda' the default 'else' case here, without 'if (acc_device_type == acc_device_nvidia)'...) To make this testcase work in the current GCN setting, I've pushed "Fix 'libgomp.oacc-c-c++-common/acc_prof-kernels-1.c' for 'acc_device_radeon'" to master branch in commit 984df1e1630f262d782c00cefad2643b8e8469f8, see attached. (... to be adjusted again, later...) Grüße Thomas ----------------- Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Frank Thürauf
>From 984df1e1630f262d782c00cefad2643b8e8469f8 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge <tho...@codesourcery.com> Date: Sun, 6 Jun 2021 10:41:18 +0200 Subject: [PATCH] Fix 'libgomp.oacc-c-c++-common/acc_prof-kernels-1.c' for 'acc_device_radeon' ... on top of r279378 (commit 26b74ed0223d108d7d7818c3c860f20cfe81a4af) "Update OpenACC tests for amdgcn". libgomp/ * testsuite/libgomp.oacc-c-c++-common/acc_prof-kernels-1.c: Fix for 'acc_device_radeon'. --- .../testsuite/libgomp.oacc-c-c++-common/acc_prof-kernels-1.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/acc_prof-kernels-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/acc_prof-kernels-1.c index ad33f72e2fb..7f74ee922b7 100644 --- a/libgomp/testsuite/libgomp.oacc-c-c++-common/acc_prof-kernels-1.c +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/acc_prof-kernels-1.c @@ -93,6 +93,11 @@ static void cb_enqueue_launch_start (acc_prof_info *prof_info, acc_event_info *e } if (num_workers < 1) assert (event_info->launch_event.num_workers >= 1); + /* GCN currently enforces 'num_workers (1)'. */ + else if (acc_device_type == acc_device_radeon + /*TODO ... just not in the "Parallelism dimensions: variable" case. */ + && /*TODO*/ num_gangs != 22) + assert (event_info->launch_event.num_workers == 1); else { #ifdef __OPTIMIZE__ -- 2.30.2