On Wed, 5 Nov 2014 22:02:33 +0300
Ilya Verbin <iver...@gmail.com> wrote:

> Hi,
> 
> On 05 Nov 17:56, Julian Brown wrote:
> > +GOMP_OFFLOAD_register_image (void *host_table, void *target_data)
> > +GOMP_OFFLOAD_get_table (struct mapping_table **table)
> 
> FYI, these interfaces may change in the near future.
> Currently GOMP_OFFLOAD_get_table returns a joint table for all
> images, offloaded to a device.  But this doesn't work properly with
> offloading from dlopened libs. Do you plan to support such cases for
> PTX? Perhaps it's worth to replace them with a function like
> GOMP_OFFLOAD_load_image, which will offload one image, and return a
> target table for this image. In this case there is no need to pass
> host_table to the plugin, and return a joint table, since libgomp
> will join host and target tables itself.

I made some changes to table initialisation on the gomp4 branch also --
probably not enough to genuinely support multiple devices, but
hopefully some of the way there. Have you seen those? I haven't
considered dlopened libs though.

> Another question is what to do with multiple devices of same type.
> Can they have different images?  There are 2 options:
> 1. GOMP_OFFLOAD_load_image will offload one image to one device and
> receive a table from it.
> or
> 2. GOMP_OFFLOAD_register_image will register one image in the plugin
> for all devices of same type, and
> GOMP_OFFLOAD_get_table will return a table for one image and for one
> device.

Similarly, I added (partial, in the case of OpenMP) support for
multiple devices of the same type on the gomp4 branch.

Thanks,

Julian

Reply via email to