From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtphub1.cc.ic.ac.uk (smtphub1.cc.ic.ac.uk [IPv6:2a0c:5bc0:80:117::79]) by sourceware.org (Postfix) with ESMTPS id 2B3323858CDB for ; Fri, 31 Mar 2023 12:35:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2B3323858CDB Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=imperial.ac.uk Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=imperial.ac.uk DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=imperial.ac.uk; s=main01; h=MIME-Version:Content-Type:In-Reply-To: References:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=e8Nfe8oelfEIBMg6npSKvlV8p1cfpUjuO1B9yZBnvdg=; b=CDsIoEL6Q1ROpQAp3jUH3l1E8N lYJ3icDskvHmSYmS+DVSzVsP8ngFF6dPA29uc8F07qYAbrHfORxYwSvWLNqN2pwn1xEZ5+wsWjhP3 UOCBycw0OJNPQp9iZVd2dHFgxTu2w7mbk2DzFX7sPKYpY5Wq9vsHQi9iQgxy+MMkbodI=; Received: from mail-lo2gbr01lp20202.outbound.protection.outlook.com ([2a01:111:f400:7e15::202] helo=GBR01-LO2-obe.outbound.protection.outlook.com) by smtphub1.cc.ic.ac.uk with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1piDyf-0002Mi-Fr; Fri, 31 Mar 2023 13:35:34 +0100 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VcMHWyVSlur73o2ithmbtmWz9QqtKAfBR3H0oIRhNdkVq+rNQ6/xwVvRBuOtzoBaNZRxeTy4do6RmDjKjRJcHaEvei/2vSOnUqw9/v7vOcZHxjn2+kA2DJTmPlEbbCFyDtIMh57G7isAfI9pvkC4hbJ1VOPRf/C4POeA2WAr/8t0qiGM1S1gKMizkLgkNFfX2Sse/RJ6YTFsUDHwxmUAwfoXEYrv5HQG3+EiwX2slYLr8bgudX6GAELBxyvCLP8O5JEHk/Xg96Vxs9I6mZIS4ZasassYh0zjhXJyT4ACdv+KzTyBZYDJ/ePugyxUD32tf3P+kMcMelZ4tuRTtBBU1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=e8Nfe8oelfEIBMg6npSKvlV8p1cfpUjuO1B9yZBnvdg=; b=HtpJdxN0yszpr7NiPeuRfjnIA5A8Ph6jyb8lI+AbpS1q+/o1ti6Icd7EVqCpXE5PiTq8rp+U+0/ABMr3aKaQr86uPiyCosgcaP+elDniCoc5Mphc1S4AAoP53DbkNa+mzFiT4FHpJpFPdiJFbC6WiOvuInR1iL7kwIfE1m5px2yylOu8VvVGXzpA0q+OVOKxV+ykLsFNrJYhMzkPjd+Oh5hdT3FAra57eSUgvbnFNoNfZOtIe5cCkCtDmvgMLfl9SBnsz9K+C7xM3lerxJen+gBH2NrXVAk8DPzBesXrw6onVdOsImIYWgBTQuc5MStapxmUNdCM611EXkWU6inVXw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=imperial.ac.uk; dmarc=pass action=none header.from=imperial.ac.uk; dkim=pass header.d=imperial.ac.uk; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ImperialLondon.onmicrosoft.com; s=selector2-ImperialLondon-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=e8Nfe8oelfEIBMg6npSKvlV8p1cfpUjuO1B9yZBnvdg=; b=etffUyWkc53oAoYv2CIt7hjjtZPiB4reQn/ogBvpKUjkVsujvWg4zbIncGkfFv389wekoS3aJOv7RCwHsDlPjWOAtQSpQHGlnEgNwAfwpdvB40P9jSKbzG+zEgJ4KjFd7QFIpcwPrigjHDRiRjERNzV5PYCb/+miEK9FM/IZQ/w= Received: from LO0P265MB5874.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:267::9) by LOYP265MB1886.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:ef::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.21; Fri, 31 Mar 2023 12:35:31 +0000 Received: from LO0P265MB5874.GBRP265.PROD.OUTLOOK.COM ([fe80::1cea:5246:3ed6:d4f8]) by LO0P265MB5874.GBRP265.PROD.OUTLOOK.COM ([fe80::1cea:5246:3ed6:d4f8%6]) with mapi id 15.20.6254.023; Fri, 31 Mar 2023 12:35:30 +0000 From: "Prasad, Adi" To: Thomas Schwinge CC: "gcc@gcc.gnu.org" , Tobias Burnus Subject: Re: GSoC Separate Host Process Offloading Thread-Topic: GSoC Separate Host Process Offloading Thread-Index: AQHZYbVEWRJxgIBkWkq2HuaFcW40G68SOZMAgAKdSNs= Date: Fri, 31 Mar 2023 12:35:30 +0000 Message-ID: References: <87cz4rthqx.fsf@euler.schwinge.homeip.net> In-Reply-To: <87cz4rthqx.fsf@euler.schwinge.homeip.net> Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=imperial.ac.uk; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: LO0P265MB5874:EE_|LOYP265MB1886:EE_ x-ms-office365-filtering-correlation-id: 979f969a-a7a1-4a73-5437-08db31e469f8 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: g30qyVxD4JWJV6GtSrLX+kMQra1ZwZm1/ykWrYo5/Oj8PVvHCB72lFjcITBmbqlyq0+MPq6HO+/1dQi4mcix2kHhE2c1zvxzmahelKxwQCr0xWNbMLxOcQw8KIpzqxZ009cK6T9XgUY5Of+O2xwjmTn4WrR9UXc8VEfAQ/8boUSgJYPOJ4Q919rE7QXr8q/3CrlswLpnzCFMhouczn17V3h7XZ2dXpvqdzcfQCwpS2jisTxQQWO4d3mpdCg1p1W3JH5PsfaUD8nwnCdkQNQkrqOeKFg78c4cHzHgGl8XiRhqemBiidCN1bccM2MFicrUkejT78a7qN1B/YmKU04dbU48O4dXBE7afJ32/N1By+ueoCqk6zq0Y8iJU68HkgwdOLhkTOuQULRG38D/5zyAGzxwOoLtT7ahtY0sClfNs6GtKUaK+I2F/BZsOEqJ8VvGdK6+zoQZ/hiABsvT7me2mZmh9Kg/rp/NOXajCA7CHPbwWb2sB3UiC23dMOwXE+VVTjYSqlNBW5nrfgj2RuwBEJwkRVyfKwqPIFWElJK/+jlUy7tMhsWGxHvcpEIee68CzF/YDfPuZCoBBDmJaOOpiz4+c/GnrMWknZ9XS/fd++o= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LO0P265MB5874.GBRP265.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230028)(4636009)(136003)(39860400002)(376002)(346002)(396003)(366004)(451199021)(66899021)(316002)(55016003)(41300700001)(54906003)(122000001)(8936002)(52536014)(786003)(6916009)(4326008)(66556008)(66946007)(64756008)(66446008)(66476007)(91956017)(8676002)(76116006)(186003)(26005)(6506007)(53546011)(66574015)(83380400001)(9686003)(71200400001)(7696005)(478600001)(966005)(33656002)(2906002)(38070700005)(166002)(5660300002)(38100700002)(86362001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?Windows-1252?Q?Gqd6tNUrX6vVd0jITGx1kvFTe5N4blE3p5mOFIKF13cDPFaKkF12Wld/?= =?Windows-1252?Q?RdoHGk/m+4qkCtGEQSmxAPuOrMBeUPv5N/BRmXAI5WS4KR3a3xLbUN93?= =?Windows-1252?Q?HTW8hwCHF4zu5kjxuePfOl1tpj4h92S8zOvQYQtqRtw5o6e5GxgMS+Me?= =?Windows-1252?Q?J7ytSNoZP+7+uCzE26kzFsnBmsq4U3fwFN+bjiSrfQL3Na5fIh/tY49x?= =?Windows-1252?Q?RbQDID/TUxagQA0ABCTMWAbmRzP1QFnuxLXM9wJRsC59xFH81Sk23RPX?= =?Windows-1252?Q?0gB0EDPwxqe1MiUO/zxDkdV0X0/sQIHK+ii/pmLW7lWlZLaCo3SX/h77?= =?Windows-1252?Q?VUaJD3xSi/lwfJ/Aae088PpHU5+4pxppOYuXBKUdqbfbPIKbHgqRVHeS?= =?Windows-1252?Q?EOgIpzWPuEJgec1H3x3S3BqlDpL1HbF4CGwYpPMBalZwlMjmnrGGGsBp?= =?Windows-1252?Q?PM6j/RJ531oYAI0CwelR+ozlUbgPeoTPWGIiXkgp/zj5DdLiOj9FmDCs?= =?Windows-1252?Q?1mYySAdXV+IYMZcHXnhkzpPLQS85YuGbQUQukOjeuL8Hw+UKKGJHY0cF?= =?Windows-1252?Q?bp10eRKQokG2sEpaFbit7DUsRUhEcmbJsvIVMYjhXd4w7MjIJvm276CW?= =?Windows-1252?Q?Ifq1ddlojRFZ8CdP6ERq4EvsGHPhdwdGua7+RE2ZLCblo4Z24kWp5swO?= =?Windows-1252?Q?yaYEy1m6AjS2acjqCyDpUjA1+z/9h/o8tUEUi6lLq2Vb6wnHjh2ghNxf?= =?Windows-1252?Q?iKqY1SH/CaV78u3Iish4z3X6ZjoTAae+WCN3lP8S80YH114HCfwL+qCP?= =?Windows-1252?Q?mRYF8L6gcEUf3QTJZGGzMSPehEwgTCgEe34d3MQeIUnVpJcDhebbV3j0?= =?Windows-1252?Q?dyru7rYPX4e6nNol7Hi7WNm2ij92qtZojN4xrutFWC3yaM4JHYoAgLNw?= =?Windows-1252?Q?hNxChjkI/XlUk0oxQq8E0skZ2teOWJvWNLQ0HnFbJXSfMq/UHf9bVLnU?= =?Windows-1252?Q?GOgnKxteYh9d1bAsrU2U2GrAAQpfmz7+sp3wvhENPbLHsSxel/FpzdjP?= =?Windows-1252?Q?SF0N8ql7R0o9CXIhvczoM3fN2UZSLcpCnQPlGy4IBEmyDHTAR9/CXk2w?= =?Windows-1252?Q?/vboxlhhY5V/DcijW0i+QZvHawAPKQIrX1RCvmpwZTyJr5KIL6Dxinol?= =?Windows-1252?Q?JTaK1llQ9WdAgTB4WE7wBaUDCkMQQ7t10+2hTD+sz9X/gQI4rLXjG8DS?= =?Windows-1252?Q?kgMATY27MdfjWNg8WgyAFAK2mie6vx+jzkuK1q4RtE6D2X96KJNg/ALc?= =?Windows-1252?Q?eMpXnkGakzq1hNDcuVpyLomBApiopaioilZnpw0enf4pdiB0gpfEU+1A?= =?Windows-1252?Q?O6WuLEXAdD2lQ8vT1B1d9cU0iME2AIw8E1VGWUMKJceC6JrCqAqAvnDd?= =?Windows-1252?Q?1c212WLrYhRl5s4OvB5V3SnacLEaTTBEoWYpXudmuWFxn0VHN+hcKBXk?= =?Windows-1252?Q?Qp5Drr6M6Ig9SWogQqZDma+4bzlm0VeigZiIb6c4zVNnSwB7czDD/05o?= =?Windows-1252?Q?aRfYmK2hyOzFW4gPE0KNa64UJpfM9c0l1vCDbw/SdUxzHww6khukZ+0q?= =?Windows-1252?Q?pUbPCW9xpnw/VwiBULr5qq+IJ2xzaMDWYtLsAkj7dVdotn3WJI4qTmz/?= =?Windows-1252?Q?/lU/D+ZWRf5f8Z35/hRZbemdJswpn0wg?= Content-Type: multipart/alternative; boundary="_000_LO0P265MB587460A506AFA2299FE75F81B58F9LO0P265MB5874GBRP_" MIME-Version: 1.0 X-OriginatorOrg: imperial.ac.uk X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: LO0P265MB5874.GBRP265.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 979f969a-a7a1-4a73-5437-08db31e469f8 X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Mar 2023 12:35:30.3038 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 2b897507-ee8c-4575-830b-4f8267c3d307 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: j1+UEYRTSdU+deCU+4HPxuXAxszCVmGlGM5jCKPP4lW24t7pK1ho7VwXKata+SMB X-MS-Exchange-Transport-CrossTenantHeadersStamped: LOYP265MB1886 X-IC-MsgID: 1piDyf-0002Mi-Fr X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,KAM_SHORT,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 List-Id: --_000_LO0P265MB587460A506AFA2299FE75F81B58F9LO0P265MB5874GBRP_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Hi Thomas, Thanks for the info - I=92ve read through the page on =93Offloading=94 and = looked at some code and have successfully built and tested GCC from source.= I=92ll also watch the videos on LTO on the Getting Started page, as offloa= ding seems to be quite intertwined with LTO. Before I start writing the proposal, I came up with a rough list of TODOs t= hat I wanted to run by you (not necessarily in this order; I will order thi= ngs in a way that makes it easiest to test): 1. Add an =97enable-offload-targets option for a separate host process 2. Rework lto-wrapper so that if the separate host process target is ena= bled, it finds and calls a mkoffload for the host architecture instead of l= ooking for an offloading compiler=92s mkoffload; then write a mkoffload too= l for a separate host process. 3. Write a libgomp plugin for separate host processes 4. Document changes, certify Developer Certificate of Origin, produce a = ChangeLog etc according to https://gcc.gnu.org/wiki/GettingStarted#Tutorial= s.2C_HOWTOs and https://gcc.gnu.org/contribute.html#patches 5. Submit to the mailing list and respond to any requests for changes 6. Commit! :) One thing I was wondering that I may be missing - the offloading docs state= that the patch for adding the Intel MIC target have a =93runtime offloadin= g library=94 called Intel MIC. I haven=92t been able to figure out the purp= ose of this (my best guess is it=92s used to implement the libgomp plugin?)= , and whether it=92s Intel-specific or needed for multiple targets. Finally, I was wondering if, having built and tested GCC, there are now any= patches, tests, or docs that I can work on? Thanks so much for the help! Adi ________________________________ From: Thomas Schwinge Sent: Wednesday, March 29, 2023 9:39:02 PM To: Prasad, Adi Cc: gcc@gcc.gnu.org ; Tobias Burnus Subject: Re: GSoC Separate Host Process Offloading ******************* This email originates from outside Imperial. Do not click on links and atta= chments unless you recognise the sender. If you trust the sender, add them to your safe senders list https://spam.ic= .ac.uk/SpamConsole/Senders.aspx to disable email stamping for this address. ******************* Hi Adi! On 2023-03-28T20:39:04+0000, "Prasad, Adi via Gcc" wrote: > I=92m Adi Prasad, a 2nd year Computing student at Imperial College London= , interested in doing the Separate Host Process Offloading GSoC project thi= s summer. Greak, and welcome to GCC! :-) > First off, I=92m aware I=92m getting in touch very late; I have been busy= up until now with a university project deadline. I am however determined t= o work as hard as I need to this week to catch up for my late start; I hope= you are still willing to consider me. No worries, you're to too late; no decisions have been made, yet. > I was wondering if the devs had any recommendations for starter issues to= work on (or simpler tasks like tests and documentation) that would help me= familiarise myself with the relevant code? Building GCC and producing test results would be one obvious first task. and have some pointers to get started. If you have specific questions, we're happy to help, of course. Then, get familiar with the basic concepts of code offloading in GCC. is the best (only?) we have, unfortunately, and it's somewhat out of date, so beware, sorry. Looking at existing libgomp plugins may help: 'libgomp/plugin/plugin-*.c' (The 'GOMP_OFFLOAD_[...]' functions implement the offloading plugin API), and actually also the very simple 'libgomp/oacc-host.c'. That's essentially the API you need to care about (for OpenACC; but OpenMP 'target' also won't require much more, for a start). Make some thoughts (or actual experiments) about how we could use/implement a separate host process for code offloading. > Thank you for reading this, and I will stay in touch as I develop my prop= osal! Yes, please do. In particular, think about a timeline for your proposal. Gr=FC=DFe Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=DFe 201, 8= 0634 M=FCnchen; Gesellschaft mit beschr=E4nkter Haftung; Gesch=E4ftsf=FChre= r: Thomas Heurung, Frank Th=FCrauf; Sitz der Gesellschaft: M=FCnchen; Regis= tergericht M=FCnchen, HRB 106955 --_000_LO0P265MB587460A506AFA2299FE75F81B58F9LO0P265MB5874GBRP_--