Results 1 to 4 of 4

Thread: how to run openCL on one CPU?

  1. #1
    Junior Member
    Join Date
    Dec 2009
    Posts
    22

    how to run openCL on one CPU?

    hi all, very simple question, just want to know how to run openCL on just one CPU.

    say, my machine is multi-core, and when I set CL_DEVICE_TYPE_CPU in clCreateContextFromType, I can see the openCL program uses many cores. I want to see the performance of just one CPU. What else should I set?

    Thanks!

  2. #2
    Senior Member
    Join Date
    Sep 2002
    Location
    Santa Clara
    Posts
    105

    Re: how to run openCL on one CPU?

    Which platform are you running on?

  3. #3
    Junior Member
    Join Date
    Dec 2009
    Posts
    22

    Re: how to run openCL on one CPU?

    linux, fedora 10

  4. #4
    Senior Member
    Join Date
    Jul 2009
    Location
    Northern Europe
    Posts
    311

    Re: how to run openCL on one CPU?

    The only generic way to do this is to set the global work size to 1 (or use enqueue task, which does effectively the same thing). I believe there is a non-standard way to control how many CPUs the AMD implementation uses, but since OpenCL is data-parallel, there is no standard way to do this. OpenCL treats the CPUs as one data-parallel compute device and runs as many work-items across them at the same time as it can.

Similar Threads

  1. how to run on cpu graphics card
    By prince in forum OpenCL
    Replies: 12
    Last Post: 02-08-2013, 12:43 AM
  2. when run on cpu or graphics card of cpu
    By prince in forum OpenCL
    Replies: 2
    Last Post: 01-20-2013, 07:35 AM

Posting Permissions

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