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: 6313 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp238352wrr; Thu, 20 Oct 2022 10:39:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5KETaJlp9ARIjqJR/5qs3UZrFf2R/zpNgUbAaFXarw93poHuFIwLuYRlKnW/ZJa4xaRgHW X-Received: by 2002:a17:906:db0d:b0:77b:a7cd:8396 with SMTP id xj13-20020a170906db0d00b0077ba7cd8396mr12531923ejb.264.1666287548043; Thu, 20 Oct 2022 10:39:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666287548; cv=none; d=google.com; s=arc-20160816; b=QM4ReMUlmChBcmI7qzK/NKahwn1V9ht+piDHZRtjf+dG+wkrPUwVCa2vImT1TC6XPt U/WIuK0r7ayEcvhofAZvUplEbcJmDvLmEPputOqBM1EACAKmCct78UNE9UQcmuBroLUX czN1rxxmBYyLB1ifwmuF/qgKdihPNfXEQ0AzQR6vf6B7nKlB2Wz29vfU3O7oZJ6p3QD7 g/HMVIWAWK9DlkqF/ZR0bYO+AIviHX/gFn/ME7lJRGERTbyn300MS8Cauh2NCry0pDHt PgpkYrW5lYxonWYH+ugoBytz8p1P0U1Z4ouW5OfYOs/JnMZKJ3vKEQU2/Z5rcRkVTsxW 9A7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:from:to :content-language:user-agent:mime-version:date:message-id :ironport-sdr:dmarc-filter:delivered-to; bh=TNcCD7gVmjTtW/xkSJrHrKTBIgieb/u5Ux/hkNF6tSo=; b=hxLZZLOFMbfUqr0AKICNtA31Nd8PxFVIectXyHNBKcN4dC8IWj3ETt1MLvM4KnIWXh VfmgAE274u8V2hCL/1HW1yajP3/Osqu3VYatU5uZ4iqxNZXUnKsShabsLPFfiYTro/xc tdFk3DnX25u2TmQF2hJC9OfCaKRg/g4S2ZSI446AySKpK8tRZgNNcOy/iVrnmhq2w9Hq GQ0v/kSkBoB+nNnRo2jQVcTw8XWyIhWp5UTC3Ka95mhS/Q2Y0ZfHM2M7jUiYyYgiD54p tlZkMkz28OjjlKYsgCGVYxep3KaK6KcmPjTuKAPUM9YdPsabSemmj+E+Vf3HEV6q3o+Y +3Og== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id dm3-20020a170907948300b007807e613e5bsi15148149ejc.933.2022.10.20.10.39.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 10:39:08 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9329C384B83A for ; Thu, 20 Oct 2022 17:39:02 +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+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747229131833745508?= X-GMAIL-MSGID: =?utf-8?q?1747229131833745508?= 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 */