public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [openacc, testsuite, committed] Fix libgomp.oacc-c-c++-common/loop-g-{1,2}.c for non-nvidia devices
@ 2017-09-28  6:47 Tom de Vries
  2017-10-05  8:34 ` [openacc, testsuite, committed] Fix libgomp.oacc-c-c++-common/{loop-red-g-1,routine-g-1}.c " Tom de Vries
  0 siblings, 1 reply; 2+ messages in thread
From: Tom de Vries @ 2017-09-28  6:47 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Thomas Schwinge, GCC Patches

[-- Attachment #1: Type: text/plain, Size: 562 bytes --]

Hi,

this patch makes the test-cases libgomp.oacc-c-c++-common/loop-g-{1,2}.c 
  work for non-nvidia devices.

For nvidia devices, a vector_length of 32 is required for the test to pass.

For devices with a non-32 forced vector_length, this test-case will fail 
the test for excess errors due to:
...
warning: using vector_length (x), ignoring 32
...

Fixed by removing the explicit vector_length setting. For nvidia 
devices, 32 is required, but that's also the forced default, so there's 
no need to be explicit about it.

Committed as obvious.

Thanks,
- Tom

[-- Attachment #2: 0001-Fix-libgomp.oacc-c-c-common-loop-g-1-2-.c-for-non-nvidia-devices.patch --]
[-- Type: text/x-patch, Size: 1620 bytes --]

Fix libgomp.oacc-c-c++-common/loop-g-{1,2}.c for non-nvidia devices

2017-09-28  Tom de Vries  <tom@codesourcery.com>

	* testsuite/libgomp.oacc-c-c++-common/loop-g-1.c (main): Remove
	vector_length(32) clause from acc parallel directive.
	* testsuite/libgomp.oacc-c-c++-common/loop-g-2.c (main): Same.

---
 libgomp/testsuite/libgomp.oacc-c-c++-common/loop-g-1.c | 2 +-
 libgomp/testsuite/libgomp.oacc-c-c++-common/loop-g-2.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-g-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-g-1.c
index 7bff6cd..ae1d588 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-g-1.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-g-1.c
@@ -15,7 +15,7 @@ int main ()
   for (ix = 0; ix < N;ix++)
     ary[ix] = -1;
   
-#pragma acc parallel num_gangs(32) vector_length(32) copy(ary) copy(ondev)
+#pragma acc parallel num_gangs(32) copy(ary) copy(ondev)
   {
 #pragma acc loop gang
     for (unsigned ix = 0; ix < N; ix++)
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-g-2.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-g-2.c
index 92b82a0..c06d861 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-g-2.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-g-2.c
@@ -15,7 +15,7 @@ int main ()
   for (ix = 0; ix < N;ix++)
     ary[ix] = -1;
   
-#pragma acc parallel num_gangs(32) vector_length(32) copy(ary) copy(ondev)
+#pragma acc parallel num_gangs(32) copy(ary) copy(ondev)
   {
 #pragma acc loop gang (static:1)
     for (unsigned ix = 0; ix < N; ix++)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [openacc, testsuite, committed] Fix libgomp.oacc-c-c++-common/{loop-red-g-1,routine-g-1}.c for non-nvidia devices
  2017-09-28  6:47 [openacc, testsuite, committed] Fix libgomp.oacc-c-c++-common/loop-g-{1,2}.c for non-nvidia devices Tom de Vries
@ 2017-10-05  8:34 ` Tom de Vries
  0 siblings, 0 replies; 2+ messages in thread
From: Tom de Vries @ 2017-10-05  8:34 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Thomas Schwinge, GCC Patches

[-- Attachment #1: Type: text/plain, Size: 792 bytes --]

[ was : Re: [openacc, testsuite, committed] Fix 
libgomp.oacc-c-c++-common/loop-g-{1,2}.c for non-nvidia devices ]

On 09/28/2017 08:47 AM, Tom de Vries wrote:
> Hi,
> 
> this patch makes the test-cases libgomp.oacc-c-c++-common/loop-g-{1,2}.c 
>   work for non-nvidia devices.
> 
> For nvidia devices, a vector_length of 32 is required for the test to pass.
> 
> For devices with a non-32 forced vector_length, this test-case will fail 
> the test for excess errors due to:
> ...
> warning: using vector_length (x), ignoring 32
> ...
> 
> Fixed by removing the explicit vector_length setting. For nvidia 
> devices, 32 is required, but that's also the forced default, so there's 
> no need to be explicit about it.
> 
> Committed as obvious.

Committed this similar patch.

Thanks,
- Tom

[-- Attachment #2: 0001-Fix-libgomp.oacc-c-c-common-loop-red-g-1-routine-g-1-.c-for-non-nvidia-devices.patch --]
[-- Type: text/x-patch, Size: 1649 bytes --]

Fix libgomp.oacc-c-c++-common/{loop-red-g-1,routine-g-1}.c for non-nvidia devices

2017-10-05  Tom de Vries  <tom@codesourcery.com>

	* testsuite/libgomp.oacc-c-c++-common/loop-red-g-1.c (main): Remove
	vector_length(32) clause from acc parallel directive.
	* testsuite/libgomp.oacc-c-c++-common/routine-g-1.c (main): Same.

---
 libgomp/testsuite/libgomp.oacc-c-c++-common/loop-red-g-1.c | 2 +-
 libgomp/testsuite/libgomp.oacc-c-c++-common/routine-g-1.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-red-g-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-red-g-1.c
index d241d41..929e01c 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-red-g-1.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-red-g-1.c
@@ -11,7 +11,7 @@ int main ()
   int ondev = 0;
   int t = 0, h = 0;
   
-#pragma acc parallel num_gangs(32) vector_length(32) copy(ondev)
+#pragma acc parallel num_gangs(32) copy(ondev)
   {
 #pragma acc loop gang  reduction (+:t)
     for (unsigned ix = 0; ix < N; ix++)
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/routine-g-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/routine-g-1.c
index 9d14c3b..b6ab713 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/routine-g-1.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/routine-g-1.c
@@ -36,7 +36,7 @@ int main ()
   for (ix = 0; ix < N;ix++)
     ary[ix] = -1;
   
-#pragma acc parallel num_gangs(32) vector_length(32) copy(ary) copy(ondev)
+#pragma acc parallel num_gangs(32) copy(ary) copy(ondev)
   {
     ondev = __builtin_acc_on_device (5);
     gang (ary);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-10-05  8:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-28  6:47 [openacc, testsuite, committed] Fix libgomp.oacc-c-c++-common/loop-g-{1,2}.c for non-nvidia devices Tom de Vries
2017-10-05  8:34 ` [openacc, testsuite, committed] Fix libgomp.oacc-c-c++-common/{loop-red-g-1,routine-g-1}.c " Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).