From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id 8A1BF384D99B for ; Mon, 21 Nov 2022 14:19:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8A1BF384D99B 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.96,181,1665475200"; d="scan'208";a="90433785" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 21 Nov 2022 06:19:11 -0800 IronPort-SDR: PEh5gwJmhzBD383eLlcpnE7DrksjkfoGCOaLgC2exFR05Gum1y72S7ZsF+szcjkZj1/M9eNrKx vjtyO67fxAd4K42xhXESkQRbNwbZiKbXvCDEb+RaQWU6/rUNIlNQKP/c0NZ6KIGa7U2GvoYWw/ DpLPiJhkGHJOlc0rkiF2UtKEZkG/ij+u7cFU5RCxQZ4InqFU8X0ogIf7rIFEoeJitqrg37OWQJ p3ke3+lLqK67KnBHvSPbfn+7GLq652Hc/R4ylNW4El3jFy1rdCmJVvraZYpfwJpuVGPU8Gee8l YUs= Message-ID: <2e8284f4-9347-be73-23fe-06a4cb9243a3@codesourcery.com> Date: Mon, 21 Nov 2022 14:19:06 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [Patch] libgomp/gcn: fix/improve struct output (was: [Patch] libgomp/gcn: Prepare for reverse-offload callback handling) Content-Language: en-GB To: Tobias Burnus , Andrew Stubbs , gcc-patches References: <55dacdd3-4a82-8087-fdba-824d9910e186@codesourcery.com> <02ec5f29-953b-63dd-7d44-04f9af36a114@codesourcery.com> <1c5166f4-91d2-b320-7fd9-6831c7e26342@codesourcery.com> <23880d62-9f02-8073-a8ea-52032f979089@codesourcery.com> From: Andrew Stubbs In-Reply-To: <23880d62-9f02-8073-a8ea-52032f979089@codesourcery.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-15.mgc.mentorg.com (139.181.222.15) To svr-ies-mbx-11.mgc.mentorg.com (139.181.222.11) X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS,TXREP 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: On 21/11/2022 13:40, Tobias Burnus wrote: > Working on the builtins, I realized that I mixed up (again) bits and byes. > While 'uint64_t var[2]' has a size of 128 bits, 'char var[128]' has a > size of 128 bytes. > Thus, there is sufficient space for 16 pointer-size/uin64_t values but I > only need 6. > > This patch now makes use of the available space, avoiding one > device-to-host memory copy; > additionally, it avoids a 32bit vs 64bit alignment issue which I somehow > missed :-( > > Tested with libgomp on gfx908 offloading and getting only the known fails: > (libgomp.c-c++-common/teams-2.c, libgomp.fortran/async_io_*.f90, > libgomp.oacc-c-c++-common/{deep-copy-10.c,static-variable-1.c,vprop.c}) > > OK for mainline? OK, although why not set value64 to 16 entries, even though reverse offload only uses 6? Andrew