I am unable to pass a pointer to a kernel using intel's OpenCL drivers for Intel(R) Xeon(R) CPU E3-1245 v3 @ 3.40GHz on Linux.
I was able to get the program to work using AMD's CPU OpenCL drivers instead.
Any idea what the issue could be?
Also, I've been able to execute SPIR kernels on intel that do not have pointer arguments.
I uploaded the example program and kernel I've been working with.
> ioc64 -input=add.cl -spir64=add.bc -bo="-cl-std=CL1.2"And your program sucessfully consumed generated SPIR. Thanks, Yuri
any progress with this?
I did some investigating and it looks like you have a bug reading the binary format for LLVM IR.
If I take the binary generated from ioc64
ioc64 -input=add.cl -spir64=add.bc -bo="-cl-std=CL1.2"
It runs. But then if I disassemble and reassemble the binary using llvm
llvm-dis add.bc -o add.ll
llvm-as add.ll -o add.bc
the program crashes.
LLVM is not equal SPIR - two different things, though one is based on another. So, disassembly and reassembly of SPIR binary with LLVM tools is not supported.
No, that's not at all correct. From the 1.2 SPIR spec page 6:
"""SPIR is a mapping from the OpenCL C programming language into LLVM IR"""
This means that SPIR is conforming LLVM IR and you can use the LLVM tools llvm-as and llvm-dis which convert between textual LLVM IR and LLVM bitcode.
Do you know that this works for any other vendor toolchains? Do they provide their own versions of llvm-dis and llvm-as? We don't provide llvm-as, as far as I know, so if it were to work, your version of LLVM distribution should match ours. I am trying to find out which version of LLVM we use as a base.