[Beignet] [PATCH] update to OpenCL 1.1 header

Zhigang Gong zhigang.gong at linux.intel.com
Wed Jun 19 00:39:32 PDT 2013


On Wed, Jun 19, 2013 at 06:54:35AM +0000, Xing, Homer wrote:
> I've checked it.
> 
> Trailing whitespaces error messages are because of OpenCL 1.1 official headers have trailing whitespace inside.
No, don't modify those header files.
> 
> The patch cannot be applied, because it was not based on the last commit of the master branch.
> 
> I've rebased the patch and sent version 2. I've tested that patch and it can successfully apply.
Still fails at my side. I dig into it and found the root cause 
> 
> Thanks.
> 
> -----Original Message-----
> From: Zhigang Gong [mailto:zhigang.gong at linux.intel.com] 
> Sent: Wednesday, June 19, 2013 2:43 PM
> To: Xing, Homer
> Cc: beignet at lists.freedesktop.org
> Subject: Re: [Beignet] [PATCH] update to OpenCL 1.1 header
> 
> I'm ok with this patch. But it failed to apply, here are the error messages.
> Could you check it? Thanks.
> 
> Applying: update to OpenCL 1.1 header
> /home/gong/git/fdo/beignet/.git/rebase-apply/patch:361: trailing whitespace.
> 
> /home/gong/git/fdo/beignet/.git/rebase-apply/patch:414: trailing whitespace.
> /*
> /home/gong/git/fdo/beignet/.git/rebase-apply/patch:421: trailing whitespace.
>  *  Software developers previously relying on this API are instructed to set the command queue
> /home/gong/git/fdo/beignet/.git/rebase-apply/patch:422: trailing whitespace.
>  *  properties when creating the queue, instead.
> /home/gong/git/fdo/beignet/.git/rebase-apply/patch:426: trailing whitespace.
>                           cl_command_queue_properties   /* properties */,
> error: patch failed: include/CL/cl.hpp:2900
> error: include/CL/cl.hpp: patch does not apply
> Patch failed at 0001 update to OpenCL 1.1 header
> The copy of the patch that failed is found in:
>    /home/gong/git/fdo/beignet/.git/rebase-apply/patch
> When you have resolved this problem run "git am --resolved".
> If you would prefer to skip this patch, instead run "git am --skip".
> To restore the original branch and stop patching run "git am --abort".
> 
> 

> >  #if defined(CL_VERSION_1_1)
> > -    /*! \brief Registers a callback function to be called when the memory object
> > -     *         is no longer needed.
> > -     *
> > -     *  Wraps clSetMemObjectDestructorCallback().
> > -     *
> > -     *  Repeated calls to this function, for a given cl_mem value, will append
> > -     *  to the list of functions called (in reverse order) when memory object?s
You can see that there is an illegal(?) character in the above line of your patch which
is not the same as the original text. Thus fail to apply.

The original line is as below:
*  to the list of functions called (in reverse order) when memory object\222s

It seems there is a typo in the official 1.2 header file. But you did generate a
broken patch for my environment. I remember you have a code page related problem
with your editor and may have issues with these special symbols.

I will fix this issue and modify the patch at my side, no need to submit another
new patch.

Is there anybody else can try to apply Homer's patch and tell me the result? Just
want to know whether it works on others' environment. Thanks.

> > -     *  resources are freed and the memory object is deleted.
> > -     *
> > -     *  \note
> > -     *  The registered callbacks are associated with the underlying cl_mem
> > -     *  value - not the Memory class instance.
> > -     */
> >      cl_int setDestructorCallback(
> >          void (CL_CALLBACK * pfn_notify)(cl_mem, void *),		
> >          void * user_data = NULL)
> > @@ -2930,30 +1735,12 @@ public:
> >  
> >  __GET_INFO_HELPER_WITH_RETAIN(cl::Memory)
> >  


More information about the Beignet mailing list