Control: retitle -1 mesa-opencl-icd: installing this breaks other ICDs
Control: reassign -1 mesa-opencl-icd
Control: found -1 10.3.2-1

Those aren't normal "this is not valid OpenCL C" build errors (see #769403 for those crashing beignet), they're compiler load errors, matching http://sources.debian.net/src/llvm-toolchain-3.5/1:3.5-6/lib/Support/CommandLine.cpp lines 162 and 194.

On my system, they occur when attempting to use either beignet 0.9.3 (not 0.8) or pocl-opencl-icd when mesa-opencl-icd from sid (10.3.2-1/libclc-r600 0~git20140101-5, using llvm 3.5 only) is installed.

mesa-opencl-icd from testing (10.3.2-1/libclc-r600 0~git20140101-4, using both llvm 3.5 and 3.4) causes a different error in beignet 0.9.3 (below) and no error in pocl.

Note that the platform order is mesa,beignet,pocl in sid but beignet,pocl,mesa in testing. pocl and beignet 0.9.3 use llvm 3.5, beignet 0.8 uses llvm 3.4.

Using beignet (either version) and pocl at the same time (see attached test script) works; I don't have the hardware to actually use mesa-opencl-icd.

beignet 0.9.3 + mesa/testing error (matches http://sources.debian.net/src/llvm-toolchain-3.5/1:3.5-6/lib/IR/LegacyPassManager.cpp#L633 ):

Pass 'Merge compatible Load/stores for Gen' is not initialized.
Verify if there is a pass dependency cycle.
Required Passes:
Segmentation fault

gdb backtrace:
#0  0x00007fffeda5c61f in llvm::PMTopLevelManager::schedulePass(llvm::Pass*)
    () from /usr/lib/x86_64-linux-gnu/libLLVM-3.5.so.1
No symbol table info available.
#1  0x00007ffff18445b0 in ?? () from /usr/lib/beignet//libgbe.so
No symbol table info available.
#2  0x00007ffff17eeb02 in ?? () from /usr/lib/beignet//libgbe.so
No symbol table info available.
#3  0x00007ffff18a5f10 in ?? () from /usr/lib/beignet//libgbe.so
No symbol table info available.
#4  0x00007ffff17f325b in ?? () from /usr/lib/beignet//libgbe.so
No symbol table info available.
#5  0x00007ffff5a0386d in ?? () from /usr/lib/beignet/libcl.so
No symbol table info available.
#6  0x00007ffff59fbdf5 in clBuildProgram () from /usr/lib/beignet/libcl.so
No symbol table info available.
#7 0x00007ffff66d6a7b in pyopencl::program::build(std::string, boost::python::api::object) () from /usr/lib/python3/dist-packages/pyopencl/_cl.cpython-34m-x86_64-linux-gnu.so
No symbol table info available.
from __future__ import division,print_function
import pyopencl
import pyopencl.array
import numpy as np
import time
import pyopencl.clmath
ctx1=pyopencl.create_some_context()
cq1=pyopencl.CommandQueue(ctx1)
ctx2=pyopencl.create_some_context()
cq2=pyopencl.CommandQueue(ctx2)
a=np.random.randn(1e6).astype(np.dtype('float32'))
aCL1=pyopencl.array.to_device(cq1,a)
aCL2=pyopencl.array.to_device(cq2,a)
bCL1=pyopencl.array.to_device(cq1,a)
bCL2=pyopencl.array.to_device(cq2,a)
f1=pyopencl.elementwise.ElementwiseKernel(ctx1,pyopencl.tools.dtype_to_ctype(aCL1.dtype)+" *a,"+pyopencl.tools.dtype_to_ctype(aCL1.dtype)+" *b","b[i]=cos(a[i])+sin(a[i])+sqrt(a[i])","cossinsqrt1")
f2=pyopencl.elementwise.ElementwiseKernel(ctx2,pyopencl.tools.dtype_to_ctype(aCL2.dtype)+" *a,"+pyopencl.tools.dtype_to_ctype(aCL2.dtype)+" *b","b[i]=cos(a[i])+sin(a[i])+sqrt(a[i])","cossinsqrt2")
b=np.cos(a)+np.sin(a)+np.sqrt(a)
w=f1(aCL1,bCL1)
f2(aCL2,bCL2).wait()
w.wait()
print("error 1",np.max(np.nan_to_num(np.abs(bCL1.get()-b))))
print("error 2",np.max(np.nan_to_num(np.abs(bCL2.get()-b))))

Reply via email to