Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.


Big issue to run software by gpu

  • amirsdream

    hi i write orthogonal matching pursuit algorithm to run on the gpu but when i check the kernel creation i always see this and also i have too low gpu activity when my software run
    i must submit this code till friday any help will appreciated
    ViennaCL: Building kernel assign_cpu
    ViennaCL: Starting 1D-kernel 'assign_cpu'...
    ViennaCL: Global work size: '512'...
    ViennaCL: Local work size: '128'...
    ViennaCL: Kernel assign_cpu finished!

    Last edit: amirsdream 2013-07-30
  • ngagewj

    how many opencl platform in your system?
    maybe you use the default platform, but in this platform ,only cpu device exist.

  • amirsdream

    i have AMD BART 6870 gpu and and i have amd 2.8 sdk i add all library neaded.
    i use iennacl::ocl::set_context_device_type(0, viennacl::ocl::gpu_tag());
    and also this code give me these information,
    std::cout << viennacl::ocl::current_device().info() << std::endl;

    CL Device Vendor ID: 4098
    CL Device Name: Barts
    CL Driver Version: 1113.2

    CL Device Max Compute Units: 12
    CL Device Max Work Group Size: 256
    CL Device Global Mem Size: 536870912
    CL Device Local Mem Size: 32768

    also when i want to complie debug show me this
    ViennaCL: Querying devices available at current platform.
    ViennaCL: Found 1 devices.
    but i have 2 device 1 cpu and one gpu
    if any one could help me i will buy bear for him i am really in trouble any help will be appreciated

    Last edit: amirsdream 2013-07-30
  • Karl Rupp
    Karl Rupp

    Hi amirsdream,

    sorry for the huge delay caused by sourceforge cancelling my email notification subscriptions in the forum :-/

    The best way to use multiple devices is to set up a separate context for each device, because otherwise there may be a lot of implicit host-device transfer going on in the OpenCL SDK. Currently there is no 'automatic distribution' of data to multiple devices to speed up operations, mostly because this is typically very algorithm-specific. If you still want to have both CPU and GPU in the same context, use

    viennacl::ocl::set_context_device_type(0, CL_DEVICE_TYPE_CPU | CL_DEVICE_TYPE_GPU);

    Best regards,