This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fwd: [RFC][gomp4] Offloading patches (2/3): Add tables generation
- From: Ilya Verbin <iverbin at gmail dot com>
- To: Bernd Schmidt <bernds at codesourcery dot com>
- Cc: "Michael V. Zolotukhin" <michael dot v dot zolotukhin at gmail dot com>, Jakub Jelinek <jakub at redhat dot com>, Thomas Schwinge <thomas at codesourcery dot com>, Richard Biener <rguenther at suse dot de>, Kirill Yukhin <kirill dot yukhin at gmail dot com>, Andrey Turetskiy <andrey dot turetskiy at gmail dot com>, Ilya Tocar <tocarip dot intel at gmail dot com>, gcc <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 29 Jan 2014 20:06:54 +0400
- Subject: Re: Fwd: [RFC][gomp4] Offloading patches (2/3): Add tables generation
- Authentication-results: sourceware.org; auth=none
- References: <20131217113957 dot GA39975 at msticlxl57 dot ims dot intel dot com> <52E7927B dot 8030509 at codesourcery dot com> <CADG=Z0GQ8ORLe1XRUU7VMYeLhwuWisMyCcGLQj-nY_bhkbD_1Q at mail dot gmail dot com> <CADG=Z0HRb1ojtTc4xEAG=hH_GcfAARDAmn70XGB5khF0mME4pQ at mail dot gmail dot com> <52E9137C dot 4020706 at codesourcery dot com>
2014/1/29 Bernd Schmidt <bernds@codesourcery.com>:
> 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.
Yes.
> 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.
We also wanted to use function names at the beginning of our work [1].
Then Jakub noticed that the names aren't necessarily unique: [2], [3], [4], etc.
This led to the current approach of host/target address tables.
>
> Bernd
>
[1] http://gcc.gnu.org/ml/gcc/2013-08/msg00251.html
[2] http://gcc.gnu.org/ml/gcc-patches/2013-09/msg00250.html
[3] http://gcc.gnu.org/ml/gcc/2013-09/msg00146.html
[4] http://gcc.gnu.org/ml/gcc/2013-10/msg00184.html
-- Ilya