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.
At execution time, current linkers does not check that the loaded
library (through the file name) has the requested SONAME. So, programs
will run.
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.

For me, without ICD, OpenCL programs would link to pocl through
libpocl.so.1
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.

> Scenario 2: ICD is wanted
> -> install libpocl.so so that will not get loaded as libOpenCL.so
> (keep name or put in not loadable directory) adn install the ICD
> loader as libOpenCL.so.The actiual libpocl.so will be found using
> the /etc/xxx config files defined by ICD spec, but no one will
> call the "standalone" (non-prefixed) versions.
> 
> Drawback is one extra indirection for every call on the standalone scenario, 
> but I do not think it is a big deal.
> 
> Carlos

-- 
Vincent Danjean          Adresse: Laboratoire d'Informatique de Grenoble
Téléphone:  +33 4 76 61 20 11            ENSIMAG - antenne de Montbonnot
Fax:        +33 4 76 61 20 99            ZIRST 51, avenue Jean Kuntzmann
Email: [email protected]           38330 Montbonnot Saint Martin

------------------------------------------------------------------------------
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