Fwd: [RFC][gomp4] Offloading patches (2/3): Add tables generation
Wed Jan 29 14:43:00 GMT 2014
On 01/28/2014 01:52 PM, Ilya Verbin wrote:
> The table is used in libgomp (see my patch ), as proposed by Jakub
> (see ). The idea is that the order of entries in the host and
> target tables must be identical. This allows to set up one-to-one
> correspondence between host and target addresses.
I was worried the answer was going to be something like this. These are
produced by two different compilers/linkers, aren't they? This seems
really fragile to me and a recipe for hard-to-debug silent failures.
For ptx, I think we can create both tables at the same time in the
image-generating tool, so I'm hoping that it won't be a problem. I'll
let you know what I find, but it would still be nice to come up with
something more robust.
> Could you please describe how functions would be invoked on
First we let the driver compile and load all the ptx code, then we'd
call a cuda library function with the name of the function passed as a
string. So I guess the host table would contain pointers to the host
version of the functions, and the target table would contain a pointer
to the name.
More information about the Gcc-patches