Note that there are some explanatory texts on larger screens.

plurals
  1. POOpenCL Verification of Parallel Execution
    primarykey
    data
    text
    <p><strong>What methods exist to verify that work is indeed being parallelized by OpenCL? (How can I verify that work is being distributed to all the processing elements for execution?) Or at least a method to monitor which cores/processors of the GPU or CPU are being used?</strong></p> <p>I would simply like a way to verify that OpenCL is actually doing what its specification claims it is supposedly doing. To do this, I need to collect hard evidence that OpenCL / the OS / the drivers are indeed scheduling kernels and work items to be executed in parallel (as opposed to serially).</p> <p>I have written an OpenCL program conforming to the OpenCL API 1.2 specification along with a simple OpenCL C kernel which simply squares in the input integer.</p> <p>In my program, <code>work_group_size = MAX_WORK_GROUP_SIZE</code> (so that they will fit on the compute units and so that OpenCL won't throw a fit).</p> <p>The total <code>amount_of_work</code> is a scalar multiple of (<code>MAX_COMPUTE_UNITS * MAX_WORK_GROUP_SIZE</code>). Since <code>amount_of_work &gt; MAX_COMPUTE_UNITS * MAX_WORK_GROUP_SIZE</code>, hopefully OpenCL</p> <p>Hopefully this would be enough to force the schedulers to execute the maximum number of kernels + work items efficiently as possible, making use of the available cores / processors.</p> <ul> <li>For a CPU, you can check <code>cpuid</code>, or <code>sched_getcpu</code>, or <code>GetProcessorNumber</code> in order to check which core / processor the current thread is currently executing on.</li> <li>Is there a method on the OpenCL API which provides this information? (I have yet to find any.)</li> <li>Is there an OpenCL C language built in function... or perhaps do the vendor's compilers understand some form of assembly language which I could use to obtain this information?</li> <li>Is there an equivalent to <code>cpuid</code>, <code>sched_getcpu</code>, or <code>GetProcessorNumber</code> for GPUs for core usage monitoring, etc? Perhaps something vender architecture specific?</li> <li>Is there an external program which I could use as a monitor for this information? I have tried Process Monitor and AMD's CodeXL, both of which are not useful for what I'm looking for. Intel has VTune, but I doubt that works on an AMD GPU.</li> <li>Perhaps I could take a look at the compiled kernel code as generated from the AMD and Intel Compilers for some hints?</li> </ul> <p><strong>Hardware Details</strong>:</p> <ul> <li>GPU: AMD FirePro, using AMD Capeverde architecture, 7700M Series chipset. I don't know which one exactly of in the series it is. If there is an AMD instruction set manual for this architecture (i.e. there are manuals for x86), that would possibly be a start.</li> <li>CPU: Intel(R) Core(TM) i7-3630QM CPU @ 2.40GHz</li> </ul> <p><strong>Development Environment Details</strong>:</p> <ul> <li>OS: Win 7 64-bit, will also eventually need to run on Linux, but that's besides the point.</li> <li>Compiling with MinGW <code>GNU GCC 4.8.1 -std=c++11</code></li> <li>Intel OpenCL SDK (OpenCL header, libraries, and runtime)</li> <li>According to Process Manager, Intel's OpenCL compiler is a clang variant.</li> <li>AMD APP OpenCL SDK (OpenCL header, libraries, and runtime)</li> <li>OpenCL 1.2</li> <li>I am trying to keep the source code as portable as possible.</li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload