[Pkg-opencl-devel] can opencl-icds built against llvm 3.4 (beignet 0.8) and llvm 3.5 (mesa/libclc) coexist in a process?

Vincent Danjean vdanjean.ml at free.fr
Sat Nov 15 19:16:18 UTC 2014


On 12/11/2014 19:17, Rebecca N. Palmer wrote:
>> llvm errors Giuseppe reported and that depend on the icd loading order?
> In sid (platform order mesa,beignet,pocl), I get those errors on trying to use either pocl or beignet 0.9.3, but _not_ beignet 0.8, with mesa-opencl-icd installed.  #768185 was also beignet 0.9.3.
> 
> In testing (platform order beignet,pocl,mesa, with mesa-opencl-icd depending on both llvm 3.5 (directly) and 3.4 (via libclc)), I get a different error (that looks like it comes from beignet) with beignet 0.9.3, but not pocl or beignet 0.8.
> 
> I agree that this is a bug, but don't know yet where it is.
> 
> Using pocl and either version of beignet at the same time works; I don't have the hardware to actually use mesa-opencl-icd.
> 
> (When testing this, remember that up/downgrading beignet may not take effect without a reboot, #769293.)
> 
>> ... does pocl use llvm, too?
> Yes, 3.5, dynamically linked by default.  This has been known to cause version mismatch issues when used together with mesa (llvmpipe libGL, not mesa-opencl-icd): https://github.com/pocl/pocl/issues/46  They suggest linking statically, which is done by passing --enable-static-llvm to the configure step, https://lists.debian.org/debian-mentors/2014/04/msg00283.html

I wonder if using versionned symbols for all symbols in llvm library would fix this.

> beignet (both versions) already links llvm statically and disables cl-gl sharing (because it was broken by mesa changes), but I haven't actually tried using it with mesa llvmpipe.

Another try to do would be to recompile ocl-icd and adding "|RTLD_DEEPBIND"
to the flags passed to dlopen (in ocl_icd_loader.c:186)
  I know that using it breaks icd that are not linked correctly (ie depending
on symbols loaded by other parts). But if it fixes opensource icd, this
can be the default and we can add an option to revert to the current
behavior if required.
  If someone does the test, let me know the results.

  Regards,
    Vincent

> 
> 
> _______________________________________________
> Pkg-opencl-devel mailing list
> Pkg-opencl-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-opencl-devel
> 




More information about the Pkg-opencl-devel mailing list