From patchwork Sat Jan 12 22:21:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 1024009 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-493950-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="Q6Ga73j3"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43cZ3f412Cz9s7T for ; Sun, 13 Jan 2019 09:22:22 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references; q=dns; s= default; b=h9AvegNUk7J/fYwaZmfJ4IQLF3274wy2o8TYCh8xpca+TqmnlIlD9 f7TKFixYnBQnKanVwYoNEDED6E/wmh1T8gU/aK5No0YqUo21F3hA8I+VN/ipomHZ SPL0mI7n/8ms3tccdf/vzLgcb+vYjnrVRHc/qvwuHdTvGybvn036r8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references; s= default; bh=SbF7NQ1Soid5Kk1dm6hBmzrogM4=; b=Q6Ga73j33KCjPdM2sBRX 9hXYZ4boKkA9ZbwGhH4BBm5v7nsYLvpqCWm04ABUBv+i1gz0hziVp4Satj1tcpZH 1Q95VGW+eCsYRaXUniyxIQR34VPCSJKRadmZ07B+AFTQ2C/4HXXxc15WMx/6I22j /EjRUOP+dcD+k330kPeTz5E= Received: (qmail 104585 invoked by alias); 12 Jan 2019 22:21:17 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 104499 invoked by uid 89); 12 Jan 2019 22:21:17 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 12 Jan 2019 22:21:14 +0000 Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id A13BAAE60; Sat, 12 Jan 2019 22:21:10 +0000 (UTC) From: Tom de Vries To: gcc-patches@gcc.gnu.org Cc: Thomas Schwinge Subject: [PATCH 7/9] [nvptx] Add vector_length 64 test-cases Date: Sat, 12 Jan 2019 23:21:29 +0100 Message-Id: <20190112222131.29519-8-tdevries@suse.de> In-Reply-To: <20190112222131.29519-1-tdevries@suse.de> References: <20190112222131.29519-1-tdevries@suse.de> X-IsSubscribed: yes Add some test-cases using vector_length 64. 2019-01-10 Tom de Vries * testsuite/libgomp.oacc-c-c++-common/vector-length-64-1.c: New test. * testsuite/libgomp.oacc-c-c++-common/vector-length-64-2.c: New test. * testsuite/libgomp.oacc-c-c++-common/vector-length-64-3.c: New test. --- .../libgomp.oacc-c-c++-common/vector-length-64-1.c | 17 +++++++++++++++++ .../libgomp.oacc-c-c++-common/vector-length-64-2.c | 21 +++++++++++++++++++++ .../libgomp.oacc-c-c++-common/vector-length-64-3.c | 17 +++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-64-1.c create mode 100644 libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-64-2.c create mode 100644 libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-64-3.c diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-64-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-64-1.c new file mode 100644 index 00000000000..b6ee732f863 --- /dev/null +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-64-1.c @@ -0,0 +1,17 @@ +#include +#include + +int +main (void) +{ +#pragma acc parallel vector_length (64) num_workers (16) /* { dg-warning "using num_workers \\(15\\), ignoring 16" "" { target openacc_nvidia_accel_configured } } */ + { +#pragma acc loop worker + for (unsigned int i = 0; i < 32; i++) +#pragma acc loop vector + for (unsigned int j = 0; j < 64; j++) + ; + } + + return 0; +} diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-64-2.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-64-2.c new file mode 100644 index 00000000000..4dfbae8de91 --- /dev/null +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-64-2.c @@ -0,0 +1,21 @@ +/* { dg-set-target-env-var "GOMP_OPENACC_DIM" ":16:" } */ +/* { dg-shouldfail "" { openacc_nvidia_accel_selected } } */ + +#include +#include + +int +main (void) +{ +#pragma acc parallel vector_length (64) + { +#pragma acc loop worker + for (unsigned int i = 0; i < 32; i++) +#pragma acc loop vector + for (unsigned int j = 0; j < 64; j++) + ; + } + + return 0; +} +/* { dg-output "The Nvidia accelerator has insufficient barrier resources" { target openacc_nvidia_accel_selected } } */ diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-64-3.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-64-3.c new file mode 100644 index 00000000000..1acb40e8357 --- /dev/null +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-64-3.c @@ -0,0 +1,17 @@ +#include +#include + +int +main (void) +{ +#pragma acc parallel vector_length (64) + { +#pragma acc loop worker + for (unsigned int i = 0; i < 32; i++) +#pragma acc loop vector + for (unsigned int j = 0; j < 64; j++) + ; + } + + return 0; +}