Results 1 to 6 of 6

Thread: what CPU will be doing while GPU is on its assigned task by cpu

  1. #1
    Junior Member
    Join Date
    Jan 2015
    Posts
    20

    what CPU will be doing while GPU is on its assigned task by cpu

    Hi,

    I have a doubt , please help me in understanding that, when cpu assigns tasks to gpu using opencl, gpu start working on that, what cpu will be doing? i mean in which state the cpu will be?

    and how can i observe the performance difference while running some code using cpu and gpu.


    Thanks,
    Shabuddin.

  2. #2
    Senior Member
    Join Date
    Dec 2011
    Posts
    190
    The API is designed to be async -- all of the clEnqueue calls are designed to return quickly. The OpenCL driver uses a separate thread to push work to the GPU. So once you've queued up work to the GPU your CPU code continues on its way. If you use a blocking flag (e.g., with clEnqueueReadBuffer) or a blocking API (e.g., clFinish) then the CPU thread blocks until the GPU is done.

    You can observe what CPU and GPU are doing with tools like NVIDIA's Nsight or AMD's CodeXL.

  3. #3
    Junior Member
    Join Date
    Jan 2015
    Posts
    20
    Hi,

    I am running performance test for opencv with opencl, its taking more time to run on GPU than on CPU, can you tell me the reason why its behaving like that.

    details:
    device name: odroid-xu
    code version: opencv-4.2.9

  4. #4
    Junior Member
    Join Date
    Aug 2014
    Posts
    11
    Probably your GPU does not have big performance, maybe does not have many cores? What is your card and what is your GPU?

  5. #5
    Junior Member
    Join Date
    Jan 2015
    Posts
    20
    Hi,

    I am running the code on odroid-xu board with android platform, the GPU present on that board is PowerVR series5XT SGX544 MP3.

  6. #6
    Junior Member
    Join Date
    Aug 2014
    Posts
    11
    According this http://blog.imgtec.com/powervr/the-p...ding-platforms your GPU has 16 cores which should be sufficient to reach good performance. Are you sure your program is designed in the fashion of parallel programming? I mean, are you sure your program uses all 16 cores effectively? Be sure to check this website/ to learn good programing in OpenCL

    .

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •