Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Getting started on GPU programming (opencl)

Tags:
  1. Jul 2, 2016 #1

    fluidistic

    User Avatar
    Gold Member

    I'd like to know how to get started to write a program for the GPU. Say I want to let the GPU calculate 4*2.
    I have an intel integrated HD4000 graphics card so I'd be better to use opencl I believe.
    I'm not really finding any tutorial on how to do this. Any help or comment is welcome.
     
  2. jcsd
  3. Jul 2, 2016 #2

    FactChecker

    User Avatar
    Science Advisor
    Gold Member

    Do you have the opencl SDK for the Intel HD4000? If so, have you looked at the information in https://software.intel.com/en-us/intel-opencl ?

    PS. I am not familiar with it, so I can't say for sure that the information there will answer your questions. But it may let you focus in on more specific issues.
     
  4. Jul 2, 2016 #3

    fluidistic

    User Avatar
    Gold Member

    Thanks, I wasn't aware I'd need specific packages. I use arch linux so I'm reading https://wiki.archlinux.org/index.php/GPGPU.
    Apparently I need the AUR package intel-opencl-runtime to execute code and ocl-icd, as well as opencl-headers.

    I also see a Python language binding package called python-pyopencl.
    Programming in python would be nice, to say the least.
     
  5. Jul 3, 2016 #4

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    Python is not the first thing I would think of in this context. Python is so slow, and PyOpenCL is a very thin wrapper on top of the very verbose and rather hard to use OpenCL framework. You'll get all of the pain of OpenCL and all of the slowness of Python.

    If you're willing to work in C++ (or better, C++11), there are a lot of options. Three of them, in alphabetical order, are ArrayFire, Boost.Compute, and VexCL. I'm sure there are others.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Getting started on GPU programming (opencl)
  1. OpenCL Questions (Replies: 1)

  2. GPU Programming (Replies: 13)

Loading...