El 31/08/2012, a las 16:40, Vincent Danjean escribió:

> Le 31/08/2012 15:02, Carlos Sánchez de La Lama a écrit :
>> Moving the discussion to the list instead of the bug log :)
>> 
>>>>> Pekka Jääskeläinen just suggested to completely remove the support
>>>>> for a standalone version.
>>>> I disagree :) ICD is only an extension - and the overhead of dragging 
>>>> the stand-alone possibility along is small. But I think this requires 
>>>> interactive debating on IRC...
>>> Yes, ICD being only an extension is a good point. The best would be if the 
>>> same lib worked in the both use cases.
>> 
>> What about having libpocl.so define the ICD versions of the calls (with 
>> POxxx prefixes) *and* standalone versions that simply call this ones? Both 
>> exported, I mean. And keeping the ICD loader as a separate library. If we 
>> did this:
>> 
>> Scenario 1: ICD is not wanted
>> -> install libpocl.so so that is directly loadable (in a shared library 
>> loader path (<prefix>/lib or whatever) renamed/symlinked to libOpenCL.so)
> 
> It would not be really correct even if it will work partially:
> the SONAME in the library (libpocl.so.1) would not correctly linked to
> the file name.

I am unsure if ICD spec allows full paths in etc/OpenCL/vendors/xxx.icd files 
(can someone confirm this?), but if it does we could place name the library 
"libOpenCL.so" and place it in some private place (i.e. 
/usr/lib/pocl/libOpenCL.so) where it will not get LDloaded even having the same 
name.

> However, at compile time, programs linked against libOpenCL.so
> would register the POCL SONAME (ie libpocl.so.1), so they would not
> be executable if POCL is remove in flavor of AMD implementation for
> example.

And this is wrong. Programs linked against pocl should work with AMD/nVIDIA or 
whatever. So changing the pocl library name is something we should do at some 
point (probably soon as pocl stops being a "developers only" package).

> Otherwise said: either pocl provide an ICD (and programs go through
> the ICD loader) and/or libpocl.so.1 is used directly. But do not try
> to put libpocl.so.1 as libOpenCL.so.1 without compiling it like that
> at the start. And I really do not see any benefit to do that now
> that a free ICD loader exists.

Ok, symlinking/renaming is thus discarded. I still see a small benefit on not 
depending on an ICD loader, if it is doable. But if ICD does not allow full 
names in xxx.icd files, meaning libpocl.so.1 has to keep this name, then I 
would go to an ICD only unless someone thinks of another solution. Having the 
OpenCL applications link against libpocl.so instead of libOpenCL.so is weird 
and prevents using pocl as a real OpenCL development library.

Carlos


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
pocl-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pocl-devel

Reply via email to