[Libclc-dev] Beignet wants to apply libclc
awatry at gmail.com
Wed Sep 17 05:39:57 PDT 2014
On Wed, Sep 17, 2014 at 2:44 AM, He Junyan <junyan.he at inbox.com> wrote:
> On 二, 2014-09-16 at 10:33 -0400, Tom Stellard wrote:
>> On Tue, Sep 16, 2014 at 09:26:27PM +0800, He Junyan wrote:
>> > hi,
>> > I am a developer of Intel's open source CL stack, which name is Beignet.
>> > We used to include all the CL built-ins in one huge header file and
>> > compile it as a PCH.
>> > We find some disadvantages of that manner and switched to the same
>> > manner as libclc recently. We now have a internal lib, which play the
>> > same role as the libclc, and we are attempting to apply the libclc to
>> > replace it in the near future.
>> > But I find some problems when I try to integrate the libclc:
>> > 1. There is no support for Image related functions in it now. Is that on
>> > your plan?
>> libclc only supports GPU targets and these targets require target-specific
>> implementations of the image functions, which is why there are no
>> generic image functions. If you were to use libclc for Intel GPUs, you
>> would need to implement your own target specific image functions.
> OK, get it. The image module is really specific for each vendor and some
> of them do not want to expose the HW details to the public.
>> > 2. I find it is not compatible with OpenCL1.2, which Beignet must
>> > support, are you going to implement it?
>> In what way is it not compatible? The goal is to implement everything,
>> but as far as I know no one has spent much time on OpenCL 1.2 features.
> The beignet has declared the full support for 1.2, but if we use clc, we
> have to fallback to 1.1, this seems weird.
> So far as I know, there are really some changes for CL APIs between 1.1
> and 1.2, but for the builtin functions and defines, the changes are not
> so big. The major changes are: adding 1d image and sampler-less image
> read functions, adding printf function, and adding extern and static
> keyword support. And the image module is even not included in clc, so I
> think this is not a big task to support 1.2, and I can do that job if
> you do not mind.
Also, I believe that the only non-image built-in function that was
added is popcount, which we don't support yet. I think it would be
easy to add, but it hasn't been added yet due to time constraints.
I'm not quite sure if anything has to be done for extern/static
besides enabling the clang extension
cl_clang_storage_class_specifiers. For R600/Clover, I believe that
we're just not enabling it correctly (we're defining the macro but not
enabling the extension in the CL source), but I haven't been able to
finish the code to test that.. It's possible that beignet may be able
to do something similar.
>> > 3. Because beignet as a backend does not completely follow the PTX or
>> > NVPTX framework, it has a lot of internal implementations for the
>> > builtin functions. We may need to add a lot of files for it, is that
>> > acceptable?
>> Yes, if you are adding a new target with a lot of target specific
>> implementations, then it is not a problem if there are a lot of files.
> OK, I will consider how to integrate our implementation and maximize the
> use of the clc's code.
>> > Thanks
>> > _______________________________________________
>> > Libclc-dev mailing list
>> > Libclc-dev at pcc.me.uk
>> > http://www.pcc.me.uk/cgi-bin/mailman/listinfo/libclc-dev
> Libclc-dev mailing list
> Libclc-dev at pcc.me.uk
More information about the Libclc-dev