From patchwork Thu Oct 20 17:38:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tobias Burnus X-Patchwork-Id: 59209 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 59D04384B82E for ; Thu, 20 Oct 2022 17:38:55 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 2F40B384C004 for ; Thu, 20 Oct 2022 17:38:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2F40B384C004 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.95,199,1661846400"; d="diff'?scan'208";a="84958573" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 20 Oct 2022 09:38:16 -0800 IronPort-SDR: D4XKRskgf9UZWgB+ImPi1RoHNAuQ4bHcnHUXQVS1Y5/FOdhOwgHe/deSnTNycfiwBlWJqwKPkU 55712hIMiB/JFres2tpon83wCucXPJ0cHqWyy3ctEZa4fvYPDnEYJV8PL5I+DbC/mWe2FCIf5c 6I+9hXznlARXBLzykgoS04pW12NlExuZRo627DNNQGd9jqsjTK4OFOhd7iKjqx/vQwSNBqai/t +Y35afmbrd8kWBtqReOohlTIs881kAgrN7upukLE0b+ea06vz4iAGimrvA610YqbkMsKjAPqE0 r4A= Message-ID: <3df859fd-fb25-1930-5448-33299b51549a@codesourcery.com> Date: Thu, 20 Oct 2022 19:38:08 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.3 Content-Language: en-US To: gcc-patches From: Tobias Burnus Subject: [OG12] libgomp.c-c++-common/requires-4.c: dg-xfail-run-if for USM with -foffload-memory= X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-07.mgc.mentorg.com (139.181.222.7) To svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_PASS, 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Follow up to the mainline commit (https://gcc.gnu.org/r13-3407 + backported to OG12): "libgomp: Add offload_device_gcn check, add requires-4a.c test" This xfails requires-4.c on pseudo-USM systems. As mentioned in the email for that patch OG12's unified-share memory implemention is for pseudo-USM systems where only specially allocated memory (managed, pinned) is device accessible. - Thus, requires4.c failed as it used static memory. (requires4a.c works as it uses heap-allocated memory.) Tobias PS: For USM in mainline, see patch submission at https://gcc.gnu.org/pipermail/gcc-patches/2022-July/597976.html ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 commit 0c47ae1c9283a812f832e80e451bfa82519c21e8 Author: Tobias Burnus Date: Thu Oct 20 13:25:25 2022 +0200 libgomp.c-c++-common/requires-4.c: dg-xfail-run-if for USM with -foffload-memory= The USM implementation uses -foffload-memory=... which allocates variables in a special memory. This does not support static variables. Hence, XFAIL this test on nvptx/gcn. The requires-4a.c testcase tests the same but uses hash memory instead. libgomp/ * testsuite/libgomp.c-c++-common/requires-4.c: dg-xfail-run-if on nvptx and gcn. --- libgomp/testsuite/libgomp.c-c++-common/requires-4.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libgomp/testsuite/libgomp.c-c++-common/requires-4.c b/libgomp/testsuite/libgomp.c-c++-common/requires-4.c index 5883eff0d93..c6b28d5442f 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/requires-4.c +++ b/libgomp/testsuite/libgomp.c-c++-common/requires-4.c @@ -2,6 +2,8 @@ /* { dg-additional-options "-foffload-options=nvptx-none=-misa=sm_35" { target { offload_target_nvptx } } } */ /* { dg-additional-sources requires-4-aux.c } */ +/* { dg-xfail-run-if "USM via -foffload-memory=... does not support static variables" { offload_device_nvptx || offload_device_gcn } } */ + /* Check no diagnostic by device-compiler's or host compiler's lto1. Other file uses: 'requires reverse_offload', but that's inactive as there are no declare target directives, device constructs nor device routines */