Hi Thomas,

Thanks for the info - I’ve read through the page on “Offloading” and looked at 
some code and have successfully built and tested GCC from source. I’ll also 
watch the videos on LTO on the Getting Started page, as offloading seems to be 
quite intertwined with LTO.

Before I start writing the proposal, I came up with a rough list of TODOs that 
I wanted to run by you (not necessarily in this order; I will order things in a 
way that makes it easiest to test):

  1.  Add an —enable-offload-targets option for a separate host process
  2.  Rework lto-wrapper so that if the separate host process target is 
enabled, it finds and calls a mkoffload for the host architecture instead of 
looking for an offloading compiler’s mkoffload; then write a mkoffload tool 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#Tutorials.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 “runtime offloading 
library” called Intel MIC. I haven’t been able to figure out the purpose of 
this (my best guess is it’s used to implement the libgomp plugin?), and whether 
it’s 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 <tho...@codesourcery.com>
Sent: Wednesday, March 29, 2023 9:39:02 PM
To: Prasad, Adi <adi.prasa...@imperial.ac.uk>
Cc: gcc@gcc.gnu.org <gcc@gcc.gnu.org>; Tobias Burnus <tob...@codesourcery.com>
Subject: Re: GSoC Separate Host Process Offloading


*******************
This email originates from outside Imperial. Do not click on links and 
attachments 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" <gcc@gcc.gnu.org> wrote:
> I’m Adi Prasad, a 2nd year Computing student at Imperial College London, 
> interested in doing the Separate Host Process Offloading GSoC project this 
> summer.

Greak, and welcome to GCC!  :-)

> First off, I’m aware I’m getting in touch very late; I have been busy up 
> until now with a university project deadline. I am however determined to 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.
<https://gcc.gnu.org/wiki/SummerOfCode> and
<https://gcc.gnu.org/wiki/#Getting_Started_with_GCC_Development> 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.
<https://gcc.gnu.org/wiki/Offloading> 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 proposal!

Yes, please do.  In particular, think about a timeline for your proposal.


Grüße
 Thomas
-----------------
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

Reply via email to