Hello,

I want to ask some question about using PoCL with a custom device.

*"pocl uses Clang as an OpenCL C frontend and LLVM for the kernel compiler
implementation, and as a portability layer. Thus, if your desired target
has an LLVM backend, it should be able to get OpenCL support easily by
using pocl."*

Considering the quote above obtained from portablecl.org, we've decided to
give PoCL a shot to use it as OpenCL front-end to target our custom
architecture.

The aforementioned target is a many-core co-processor implemented using
FPGA. It has its own Instruction Set Architecture which is a little bit
similar to NVIDIA PTX. Anyway, the goal is to make it support OpenCL v1.2,
at least the main functionality of it.

Currently, we've our LLVM back-end which we use to translate LLVM IR to our
own instructions. What have to be done after this point is implementing the
compiler front-end and OpenCL header. Also, we don't have any properly
working driver yet. I've listed below some points that I'm not clear with:

- How should the driver interface look like? What have to be done to
register our target as PoCL device? I want clGetDeviceIDs return ID for our
target also query the device info.
- As I see, I need only to make a "device" implementation similar to
"pthread" and "tce" but not to modify the OpenCL library implementation (I
mean the files such as clBuildProgram.c, clCreateBuffer.c, etc.). Am I on
the right way?
- What is "tce" device exactly? What kind of changes should I make there,
if necessary, to convert it to a custom target? And how can I made tce
device available for clGetDeviceIDs function?

Thanks in advance,


Hasan
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck®
Code Sight™ - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
pocl-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pocl-devel

Reply via email to