- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
> ioc64 -input=add.cl -spir64=add.bc -bo="-cl-std=CL1.2"And your program sucessfully consumed generated SPIR. Thanks, Yuri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the update Yuri.
Were you able to reproduce the problem with the SPIR that I supplied? and could you attach the SPIR that ioc64 generated so that I can compare?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ryan,
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ryan,
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.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page