[Beignet] [PATCH] Compile against upstream LLVM 3.3

Steven Newbury steve at snewbury.org.uk
Mon Apr 22 04:01:18 PDT 2013


On Mon, 2013-04-22 at 16:44 +0800, Zhigang Gong wrote:
> Newbury,
> 
> It seems you need to redefine image2d_t/image3d_t/sampler/event_t to silent those errors.
> 
> compiler_clod:
> /tmp/fileizyJvX.cl:198:38: error: expected identifier or '('
> typedef __texture struct _image2d_t* image2d_t;
>                                      ^
> /tmp/fileizyJvX.cl:200:38: error: expected identifier or '('
> typedef __texture struct _image3d_t* image3d_t;
>                                      ^
> /tmp/fileizyJvX.cl:201:25: error: expected identifier or '('
> typedef __sampler uint* sampler_t;
>                         ^
> /tmp/fileizyJvX.cl:202:16: error: cannot combine with previous 'type-name' declaration specifier
> typedef size_t event_t;
> 
> 
> BTW,
> As clang 3.3 hasn't been released so far, we don't have a plan to support it right now. And we did some test
> With clang 3.3svn version, and found the it's not in a very stable stage. For example, some header files' locations
> have been changed during the past several months and there maybe some other changes we are not aware of.
> 

Mostly that's what the proposed changes deal with.

> So we decide to support 3.1/3.2 and will consider to support 3.3 when it is officially released.

It's worth keeping in mind the other F/OSS OpenCL implementations follow
upstream LLVM development, so anybody wanting to utilise multiple
compute devices probably doesn't want to have multiple LLVM/Clang
versions installed.  Not a problem yet, but it won't be long.

> 
> If you want to use beignet with LLVM 3.3svn at your machine, I'd be happy to provide help.  But the related patches
> have been to be pending until the LLVM3.3's official release.
> 

I'm happy to give it a go.

> Thanks for your contribution.
> 
Thanks for your help,

Steven

> > -----Original Message-----
> > From:
> > beignet-bounces+zhigang.gong=linux.intel.com at lists.freedesktop.org
> > [mailto:beignet-bounces+zhigang.gong=linux.intel.com at lists.freedesktop.
> > org] On Behalf Of Steven Newbury
> > Sent: Monday, April 22, 2013 3:31 PM
> > To: Zhigang Gong
> > Cc: 'Boqun Feng'; beignet at lists.freedesktop.org
> > Subject: Re: [Beignet] [PATCH] Compile against upstream LLVM 3.3
> > 
> > On Mon, 2013-04-22 at 15:05 +0800, Zhigang Gong wrote:
> > 
> > > My best guessing is that the latest llvm 3.3 svn introduces the
> > "image2d_t"
> > > and some related keywords in FE
> > > which is incompatible with Beignet's current implementation. One
> > > possible workaround is to redefine image2d_t to another name such as
> > > the following :
> > >
> > > #define image2d_t  beignet_image2d_t
> > >
> > > And put this line at the beginning of the ocl_stdlib.h. It should work.
> > 
> > I should have provided more of the errors, attached full utests output.
> 
> 
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet

> 




More information about the Beignet mailing list