0
votes

I'm starting OpenCL. As I've understood, a platform is a vendor-specific OpenCL implementation, and a device is a processing unit that can be used by a platform.

I've made a simple C++ code that prints the platform name and for each of its devices prints the device name, and its output is

Platform 0: Intel(R) OpenCL HD Graphics
    Device 0: Intel(R) Gen9 HD Graphics NEO
Platform 1: Intel(R) CPU Runtime for OpenCL(TM) Applications
    Device 0: Intel(R) Core(TM) i5-6200U CPU @ 2.3GHz

My question is, shouldn't I expect the two devices to be under the same platform? Given I have a laptop, and the GPU is integrated together with the processor. Also, will this then forbid me for assigning both GPU and CPU devices to the same context? (which I've read has some memory sharing advantages)

1

1 Answers

0
votes

shouldn't I expect the two devices to be under the same platform

Only if the vendor provides a platform with drivers for both those devices. I'm not sure if Intel's "NEO" platform has also CPU driver, but i'm pretty sure the "CPU runtime" only has driver for the CPU, not the iGPU. You'll have to list the devices of each platform to find out.

will this then forbid me for assigning both GPU and CPU devices to the same context

You have to list the devices - if NEO has both devices then you can use that. But you can't have devices from different platforms in a single context.