From patchwork Mon Oct 14 08:38:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 1996717 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=vg+J0xTZ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XRrJ35sPgz1xvm for ; Mon, 14 Oct 2024 19:39:30 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1D3B73858D29 for ; Mon, 14 Oct 2024 08:39:27 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by sourceware.org (Postfix) with ESMTPS id 53C2A3858D29 for ; Mon, 14 Oct 2024 08:38:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 53C2A3858D29 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=baylibre.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 53C2A3858D29 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::32c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728895141; cv=none; b=iuZn8g/QG/w+fDBCZx28IfdtzURRA7O+T3hULkt/HbIysRlA5y7QXE2MMivmjdsS0cy5OjrCKZa9oVTPqV139E+ScyAJcBs2sZnXWexQt8Cm88RuYvj9sjlDTH5aIOe++YlNQ1fSuPiLpo9niWSMmZ7KSo0hIGcgkA/20+MGdBk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728895141; c=relaxed/simple; bh=V5pPgDfVRAWeNvhXB/QVa9+EzthiCrfxfse56NceTDU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=GMlUsWR2Y0RzZNKHXtthexZ4NKSyZHERU35S65NOjr9RkrZkGNigB2cIdE4zJDlquV2k5JlyQNXy1q2ffJdUDFNivXfY7g/YLCy9QeC0hsUrWq1874f2uK8fvQG/8jUvco9IG/PcObSnCckWZNxEiRYVcAh3e79S4nDUhlwz58s= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-4311fd48032so18438685e9.0 for ; Mon, 14 Oct 2024 01:38:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1728895133; x=1729499933; darn=gcc.gnu.org; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=1IQ44+EJFQt6ZnL6q6LoDy4vYhsSK1cJMMQw59CkyZo=; b=vg+J0xTZkh7QX6Jdsa4ENSKmJWtwnMaqRSxrT2dqjbfTW3EvuevUhQd7N9QqE+qKRD FlfalqJ7ra3ry0+Yr53aAhUrc4Zj0Kaawm1NcMlInjXAgx2Wxf9/DzY2LM/gP61prQXt LO6fWDh7RwcH7+IeyKL6Qrg792MZ7upohF9AYQMMsbpfuBSu+9ldbvZqGovtrX2u9ggi pR6JD1ibJwkKWnK+kTi/bsytUHmFZLJiBvBKmAujhTkqUCrco+585tZBxNWBCOLB9W/2 ykUkI5Q4LI+I5qPy2fceF9dB97Bj0/C1ldnjoBsLZO7dWS75R+enCrYxrLkd2SAu91n7 qMoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728895133; x=1729499933; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=1IQ44+EJFQt6ZnL6q6LoDy4vYhsSK1cJMMQw59CkyZo=; b=YsfDeqdv2PUZ1JAxOQyQWEINC5r5ncqkQgyJNoE1+8t8upds8WqhldhLX5rhQusMLW EVZQ9O+2nxJI/j6uurNxd3BprO/qeW8kCzbfGEyESy5MBi7Ybv8Cs1RcfkgU2kGsVwU1 3a3wqFhsgZKygOcmL0ItQoiOzbkZwbkouqmkNImpubcwBaSpaIZPC3dPVyP4jl3IgYmW VVNPJloqM/nOomVP9FJOWl20BnLkZzNAmZPMZPajexFKw4u37cnRdR5FyVG5HYKvoiT+ iimIyBO3EmjDpHjDYNy3pG04Nt+fNq1AI3M/XIx+Jo9wuhrmKd/V9JSLuAS+WGx/ZwBW 353g== X-Forwarded-Encrypted: i=1; AJvYcCX9wN9xXMD2tpdgLbVgIw38CLVzXSiB6ADjzrGKzo85Ks2ti0XckiTHno4+qrTH+V6ciP8qfHSxNnzitg==@gcc.gnu.org X-Gm-Message-State: AOJu0Ywi3oT3SAgiuklSFXHb5AQIrXOYzsAkZ3n6DX+Qo/mxol4O9Gk8 Z86ZSNRd/FuzADPoK6Gfaib7sn/km3p/JUIeIbW7cBq/a2an0VXZYiBVNdB4Tck= X-Google-Smtp-Source: AGHT+IHkTYf2cBuPPuf3mg3oJa3h+F1j2DIQVvl2MAJEIxm6HqAXAE8Fuu9iq8xFnZ3Vom4H2EbXUg== X-Received: by 2002:a05:600c:1ca3:b0:42c:de2f:da27 with SMTP id 5b1f17b1804b1-4311debbc0bmr80713905e9.2.1728895132847; Mon, 14 Oct 2024 01:38:52 -0700 (PDT) Received: from euler.schwinge.ddns.net (p200300c8b733b9005e8fc6f38b6af531.dip0.t-ipconnect.de. [2003:c8:b733:b900:5e8f:c6f3:8b6a:f531]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d4b6cfb2asm10742778f8f.51.2024.10.14.01.38.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Oct 2024 01:38:52 -0700 (PDT) From: Thomas Schwinge To: Tobias Burnus , gcc-patches@gcc.gnu.org Cc: fortran@gcc.gnu.org, Jakub Jelinek Subject: Fortran: Use OpenACC's acc_on_device builtin, fix OpenMP' __builtin_is_initial_device: Harmonize 'libgomp.oacc-fortran/acc_on_device-1-*' In-Reply-To: <87jzeb8543.fsf@euler.schwinge.ddns.net> References: <27b9bc80-8a5a-43c1-a528-04cdf08a1bf7@baylibre.com> <26fba4a3-a601-40a7-95d9-d9178de6ec52@baylibre.com> <7ad21f30-cdc4-4842-bd6c-2f845fc4dd74@baylibre.com> <87jzeb8543.fsf@euler.schwinge.ddns.net> User-Agent: Notmuch/0.30+8~g47a4bad (https://notmuchmail.org) Emacs/29.4 (x86_64-pc-linux-gnu) Date: Mon, 14 Oct 2024 10:38:43 +0200 Message-ID: <87ed4j84fg.fsf@euler.schwinge.ddns.net> MIME-Version: 1.0 X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org Hi! On 2024-10-14T10:23:56+0200, I wrote: > On 2024-10-13T10:21:01+0200, Tobias Burnus wrote: >> Now pushed as r15-4298-g3269a722b7a036. >> --- a/libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90 >> +++ b/libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90 >> -! TODO: Have to disable the acc_on_device builtin for we want to test the >> -! libgomp library function? The command line option >> -! '-fno-builtin-acc_on_device' is valid for C/C++/ObjC/ObjC++ but not for >> -! Fortran. Here, you've just remove the comment, whereas... >> --- a/libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f >> +++ b/libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f >> @@ -1,5 +1,5 @@ >> ! { dg-do run } >> -! { dg-additional-options "-cpp" } >> +! { dg-additional-options "-cpp -fno-builtin-acc_on_device" } >> -! TODO: Have to disable the acc_on_device builtin for we want to test >> -! the libgomp library function? The command line option >> -! '-fno-builtin-acc_on_device' is valid for C/C++/ObjC/ObjC++ but not >> -! for Fortran. ... here, and... >> --- a/libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f >> +++ b/libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f >> @@ -1,5 +1,5 @@ >> ! { dg-do run } >> -! { dg-additional-options "-cpp" } >> +! { dg-additional-options "-cpp -fno-builtin-acc_on_device" } >> -! TODO: Have to disable the acc_on_device builtin for we want to test >> -! the libgomp library function? The command line option >> -! '-fno-builtin-acc_on_device' is valid for C/C++/ObjC/ObjC++ but not >> -! for Fortran. ... here, you also specify '-fno-builtin-acc_on_device'. This should be done in the former, too, and some explanation be added, like in 'libgomp.oacc-c-c++-common/acc_on_device-1.c'. Pushed to trunk branch commit 9f549d216c9716e787aaa38593bc9f83195b60ae "Fortran: Use OpenACC's acc_on_device builtin, fix OpenMP' __builtin_is_initial_device: Harmonize 'libgomp.oacc-fortran/acc_on_device-1-*'", see attached. Grüße Thomas From 9f549d216c9716e787aaa38593bc9f83195b60ae Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Mon, 14 Oct 2024 10:34:34 +0200 Subject: [PATCH] Fortran: Use OpenACC's acc_on_device builtin, fix OpenMP' __builtin_is_initial_device: Harmonize 'libgomp.oacc-fortran/acc_on_device-1-*' The test case 'libgomp.oacc-fortran/acc_on_device-1-1.f90' added in commit 3269a722b7a03613e9c4e2862bc5088c4a17cc11 "Fortran: Use OpenACC's acc_on_device builtin, fix OpenMP' __builtin_is_initial_device" was missing '-fno-builtin-acc_on_device', and all 'libgomp.oacc-fortran/acc_on_device-1-*' need comments, why that option is specified. PR testsuite/82250 libgomp/ * testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90: Add '-fno-builtin-acc_on_device'. * testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f: Comment. * testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f: Comment. --- libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90 | 3 +++ libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f | 5 ++++- libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f | 5 ++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90 b/libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90 index 89748204f05..774c2b869e8 100644 --- a/libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90 +++ b/libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90 @@ -1,6 +1,9 @@ ! { dg-do run } ! { dg-additional-options "-cpp" } +! Disable the acc_on_device builtin; we want to test the libgomp library function. +! { dg-additional-options -fno-builtin-acc_on_device } + ! { dg-additional-options "-fopt-info-all-omp" } ! { dg-additional-options "--param=openacc-privatization=noisy" } ! { dg-additional-options "-foffload=-fopt-info-all-omp" } diff --git a/libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f b/libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f index e31e0fc715b..b57beac6f43 100644 --- a/libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f +++ b/libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f @@ -1,5 +1,8 @@ ! { dg-do run } -! { dg-additional-options "-cpp -fno-builtin-acc_on_device" } +! { dg-additional-options "-cpp" } + +! Disable the acc_on_device builtin; we want to test the libgomp library function. +! { dg-additional-options -fno-builtin-acc_on_device } ! { dg-additional-options "-fopt-info-all-omp" } ! { dg-additional-options "--param=openacc-privatization=noisy" } diff --git a/libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f b/libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f index 0595be241f8..969d530e30f 100644 --- a/libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f +++ b/libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f @@ -1,5 +1,8 @@ ! { dg-do run } -! { dg-additional-options "-cpp -fno-builtin-acc_on_device" } +! { dg-additional-options "-cpp" } + +! Disable the acc_on_device builtin; we want to test the libgomp library function. +! { dg-additional-options -fno-builtin-acc_on_device } ! { dg-additional-options "-fopt-info-all-omp" } ! { dg-additional-options "--param=openacc-privatization=noisy" } -- 2.34.1