This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [hsa 2/10] Modifications to libgomp proper
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Alexander Monakov <amonakov at ispras dot ru>
- Cc: Martin Jambor <mjambor at suse dot cz>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 12 Jan 2016 14:10:39 +0100
- Subject: Re: [hsa 2/10] Modifications to libgomp proper
- Authentication-results: sourceware.org; auth=none
- References: <20151207111758 dot GA24234 at virgil dot suse dot cz> <20151207111957 dot GC24234 at virgil dot suse dot cz> <alpine dot LNX dot 2 dot 20 dot 1601121550560 dot 31462 at monopod dot intra dot ispras dot ru>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Jan 12, 2016 at 04:00:11PM +0300, Alexander Monakov wrote:
> Hello, Martin, Jakub, community,
>
> This part of the patch:
>
> On Mon, 7 Dec 2015, Martin Jambor wrote:
> > include/
> > * gomp-constants.h (GOMP_DEVICE_HSA): New macro.
> [snip]
> > (GOMP_kernel_launch_attributes): New type.
> > (GOMP_hsa_kernel_dispatch): New type.
>
> is going to break build of NVPTX cross-compiler, because it uses uint32_t,
> uint64_t types like below, but those types will not be available when building
> nvptx libgcc. gomp-constants.h is #include'd in libgcc via tm.h and
> offload.h.
>
> Note how other files in include/ need to do a special dance with #ifdef
> HAVE_STDINT_H to include <stdint.h> and obtain uint64_t.
>
> Shall I move the problematic structs into a separate file, gomp-types.h?
Or just move those into libgomp-plugin.h, those type definitions don't have
to be shared between the compiler and libgomp, the compiler has to duplicate
those definitions anyway, as it needs to create the IL of those types and
can't use the host structure type for that purpose.
> > diff --git a/include/gomp-constants.h b/include/gomp-constants.h
> > index dffd631..1dae474 100644
> > --- a/include/gomp-constants.h
> > +++ b/include/gomp-constants.h
> [snip]
> > +/* Structure describing the run-time and grid properties of an HSA kernel
> > + lauch. */
> > +
> > +struct GOMP_kernel_launch_attributes
> > +{
> > + /* Number of dimensions the workload has. Maximum number is 3. */
> > + uint32_t ndim;
> > + /* Size of the grid in the three respective dimensions. */
> > + uint32_t gdims[3];
> > + /* Size of work-groups in the respective dimensions. */
> > + uint32_t wdims[3];
> > +};
Jakub