[Beignet] [PATCH] Generate most of the vector builtin functions automatically
He Junyan
junyan.he at inbox.com
Tue Jul 23 01:14:13 PDT 2013
Good python script and decrease the ocl_std header file size a lot.
1.There is a typo at backend/src/CMakeLists.txt, set (ocl_blob_c_file
${GBE_SOURCE_DIR}/src/ocl_stdlib_str.c) should be .cpp
2. ocl_vector.h seems to be generated every time in build but the
ocl_as.h, ocl_convert.h need to be updated using the
update script. I think we can unify the manner here.
3. about the pch file, I think I need to do some investigation in clang
to find the exactly not compatible args. I think now you can
just use the pch when no buiding args passed, and once there are some
extra buiding args, totally fallback to the old manner.
On 07/22/2013 04:46 PM, Zhigang Gong wrote:
> On Fri, Jul 19, 2013 at 05:41:07PM +0800, Zhigang Gong wrote:
>> Hi,
>>
>> As Beignet is using the SOA model, and we need to lower down all
>> the vector builtin functions to the scalar version. This type of
>> thing is ideal to use a script to generate all the code according
>> to the OpenCL's spec. I just copy/paste most of the prototypes from
>> the OpenCL spec and put them into builtin_vector_proto.def. Then
>> I wrote a python script to parse the spec and generate all the
>> vector inline functions and I removed all existing duplicate
>> functions in ocl_stdlib.h.
>>
>> Now we have three parts of auto-generated code, the as/convert and
>> this vector related functions. The amount of these three parts are
>> much more than the other code in ocl_stdlib.h. To make the maintainance
>> easier, I split the auto-generated code out of the ocl_stdlib.h, and
>> refine the build process to generate one blob header file at build time.
>>
>> Then I also made a new patch based on Junyan's PCH patch to accelerate
>> the cl kernel build speed.
>>
>> As this patchset is handling tons of those auto-generated code, the
>> patch is relatively big. I just attached the compressed tar ball rather
>> than embed them directly.
>>
>> Waiting for your comments. Thanks.
> Sorry, that I sent the wrong attachment in last email.
> Now correct it here.
>
>> _______________________________________________
>> Beignet mailing list
>> Beignet at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/beignet
>
>
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/beignet/attachments/20130723/5d8c5f14/attachment.html>
More information about the Beignet
mailing list