1

I am quite new to opencl and would like to do a bit of experimenting. Specifically, I want to know if anyone can point me in the right direction to create a custom platform or device with an opencl interface attached. How this is to be used is to create a simple simulator/debugger that runs alongside the GPU and CPU. Are there any official documents relating to the development of custom opencl platforms, devices etc.? Also, are there any good online resources that covers this area?

Thank you for any help.

2 Answers2

1

Yes, you can write your own OpenCL driver that shows up as a platform with devices on a system. Khronos has released sample ICD source code you can use. This is part of the OpenCL API registry.

Ani
  • 10,826
  • 3
  • 27
  • 46
0

What you want can be achived by implementing a self made OpenCL implmentation. This means you have to implement a library that provides an interface according to the OpenCL standard. If you want this for debugging and/or device emulation you have to interrupt the calls to the device query mechanisms from an underlying OpenCL implementation (e.g., Intel's) add an additional device and pass this to the program, which requested the devices from your OpenCL library. Your proxy implementation can than just pass all operations involving real devices to the underlaying OpenCL implementation, while operations involving your virtual device get handled by your own code.

Michael Haidl
  • 5,384
  • 25
  • 43