1

I want to determine exactly how AMD schedules its OpenCL kernels on the CPU and I could not find any OpenCL function to determine the physical processor/core id on which it is running.

I could only find the following links related to my problem:

Getting the machine serial number and CPU ID using C/C++ in Linux

How to know on which physical processor and on which physical core my code is running

NUMA Get Current Node/Core

I tried the above but none of the solutions worked. I saw that OpenCL kernels do not support C99 headers like stddef.h which is required for sched.h or even fopen().

Is there any way I can see exactly how the openCL kernels have been assigned to each CPU core/processor?

Note: I am using Ubuntu 14.04, gcc version 4.8.2 and AMD APP SDK 3.0.

Thanks for your help!

Community
  • 1
  • 1
Kunal Kapoor
  • 445
  • 4
  • 13
  • run top and press 1. It lists the CPUs. Press f and then j,, then return it adds the CPU the process last used to the list – Vorsprung Feb 01 '16 at 16:50
  • 1
    Why do you want to know this, anyway?OpenCL is pretty much designed specifically so that you would not have to worry about such details. – void_ptr Feb 01 '16 at 17:33
  • I want to understand exactly how the opencl programs are translated to run on CPU nodes. There's plenty of documentation on how the kernels are executed on the GPU but what happens when they are run on the CPU? How are the work items divided exactly, and are the CPU SIMD units actually used to execute them or are the kernels transformed into simple loops internally? These are the questions I want answered and I thought that printing the cpuid could open up further possibilities for experiments. – Kunal Kapoor Feb 02 '16 at 07:03
  • Then what you are asking amounts to reverse-engineering OpenCL driver provided by each vendor. – void_ptr Feb 02 '16 at 17:42
  • @void_ptr - I was really hoping it wouldn't come to that! – Kunal Kapoor Feb 02 '16 at 18:22

0 Answers0