From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id 676703858429 for ; Mon, 18 Dec 2023 15:24:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 676703858429 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 676703858429 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=68.232.137.252 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702913043; cv=none; b=DVxzYzzAlJ8k/PohCer8+7jgqRRgWRWZK8sj1wKVd91GHR1vuyJuetOHtHQ9bFqrfDlUlwqsWun9Oa9f2xGdRT0+ECj4uaQsOTVdxSVjULIhh6FaP0ltrD+HXIXnnLNm9PKtsDJHjupoT9P0vo+fXanAD/6Iu0rCh4g5p9/Ao1s= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702913043; c=relaxed/simple; bh=H85DvHIs4vAHXbPqK4S5VSEGHnLjMANFq3I+GgTU/wo=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=Bwo5/txaChL3yByxhb4aQfymNPDbvZoNptAiqorwAqF84316EG3w5+LPfvrO4h/Tun7urywEbxtk6tH6fOvfhuIsujcKbwdyheeceQyLWz/0MaWSwJPwhWEkaBE6goh2ejhTzvd5Q4UgqsA5ChV877qY8Ez9YJvqCFeTxU9DVQU= ARC-Authentication-Results: i=1; server2.sourceware.org X-CSE-ConnectionGUID: T4TFnLAjSjO6ezirc2JomA== X-CSE-MsgGUID: kVkzn8Z4QMmyRqYO0CArRg== X-IronPort-AV: E=Sophos;i="6.04,286,1695715200"; d="scan'208";a="25646254" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 18 Dec 2023 07:23:56 -0800 IronPort-SDR: LmntaE8ddeFCMcB9DBvjzlSRo9GqqAKyqmNPh4NOYB+tntPTAhjVFU+siHKIwGCfW1LG3vpUVi oHafSXUSYUqE2R3cmjpFQFTWV4XrZqyFLnVFpX75tdD3w8y1Tmnv44iRG6RWD+9iBqCKT3NEts gQgoawM1llxZCGrqc3sY0QyEJ2fJ9xwI2PzlfXy1oTJVRvMeAHTgSpc6nlzKG8MNYue/7pghfy QnZHKuq4+xGiCCJLowlSMcvMvSsPHLjXOjl2ExdF+OWCI8omQNWuUhbECXI1HFgvUZqVO7fBx1 lMk= From: Thomas Schwinge To: Andrew Stubbs CC: Subject: Re: [committed] amdgcn: XNACK support In-Reply-To: References: User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/28.2 (x86_64-pc-linux-gnu) Date: Mon, 18 Dec 2023 16:23:49 +0100 Message-ID: <875y0v4jqy.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Andrew! On 2023-12-13T15:46:45+0000, Andrew Stubbs wrote: > Some AMD GCN devices support an "XNACK" mode in which the device can > handle page-misses (and maybe other traps in memory instructions), but > it's not completely invisible to software. > > We need this now to support OpenMP Unified Shared Memory (I plan to post > updated patches for that in January), and in future it may enable > support for APU devices (such as MI300). > > The first patch ensures that load instructions are "restartable", > meaning that the outputs do not overwrite the input registers (address > and offsets). This maps pretty much exactly to the GCC "early-clobber" > concept, so we just need to add additional alternatives and then not > generate problem instructions explicitly. > > The second patch is a workaround for the register allocation patch I > asked about on gcc@ yesterday. The early clobber increases register > pressure which causes compile failure when LRA is unable to spill > additional registers without needing yet more registers. This doesn't > become a problem on gfx90a (MI200) so soon due to the additional AVGPR > spill registers, and that's the only device that really supports USM, so > far, so limiting XNACK to that device will work for now. In case that's useful (I don't know which test cases you've been looking at) -- in GCN target testing, I've (presumably) ran into this issue here: {+WARNING: gfortran.dg/pr92161.f -O (test for excess errors) program= timed out.+} [-PASS:-]{+FAIL:+} gfortran.dg/pr92161.f -O (test for excess errors) Manually reproducing, in '-march=3Dgfx90a' testing, this disappears with '-mxnack=3Doff' added. Similarly for '-march=3Dgfx908', '-march=3Dgfx906', '-march=3Dgfx900', with explicit '-mxnack=3Don'. Gr=C3=BC=C3=9Fe Thomas > The -mxnack option was already added as a placeholder, so not much is > needed there. > > Committed to master. An older version of these patches is already > committed to devel/omp/gcc-13 (OG13). > > Andrew ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955