Questions tagged [opencl]

OpenCL (Open Computing Language) is a framework for writing programs that execute across heterogeneous platforms consisting of CPUs, GPUs, and other processors.

This tag refers to the OpenCL (Open Computing Language) by Khronos Group. It is the first open, royalty-free standard for cross-platform, parallel programming of modern processors found in personal computers, servers and handheld/embedded devices. Using OpenCL, one can affect execution of parallel computations greatly improving speed and responsiveness of a wide spectrum of applications: From gaming and entertainment to scientific and medical software.

OpenCL is an API and a C99-like language; for each device, implementations are provider-specific. Some of the OpenCL implementation providers are:

Questions about OpenCL can be asked here along with the vendor/provider and architecture details. Bug reports should be discussed in the respective forums of the vendors NVIDIA Forums, Intel Forums, AMD Forums

Books

5705 questions
12
votes
7 answers

Getting starting with Parallel programming

So it looks like multicore and all its associated complications are here to stay. I am planning a software project that will definitely benefit from parallelism. The problem is that I have very little experience writing concurrent software. I…
Talesh
  • 550
  • 1
  • 5
  • 12
12
votes
3 answers

include headers to OpenCL .cl file

I've written an OpenCL kernel in a .cl file. It attempts to #include several headers. Its compilation fails, since the included header files are "not found". I am aware that clBuildProgram can take the -I dir option, which adds the directory dir to…
YAKOVM
  • 9,805
  • 31
  • 116
  • 217
12
votes
4 answers

Benchmarks comparing Intel Xeon Phi and Nvidia Tesla K20

To my surprise, I cannot find a comparison of these products using open source OpenCL benchmark suites, such as rodinia and SHOC. Such a comparison could be more interesting than comparisons of theoretical peak performance, or of performance in…
Matt
  • 569
  • 1
  • 4
  • 16
12
votes
2 answers

Running OpenCL on hardware from mixed vendors

I've been playing with the ATI OpenCL implementation in their Stream 2.0 beta. The OpenCL in the current beta only uses the CPU for now, the next version is supposed to support GPU kernels. I downloaded Stream because I have an ATI GPU in my work…
Roel
  • 19,338
  • 6
  • 61
  • 90
12
votes
1 answer

Aligning GPU memory accesses of an image convolution (OpenCL/CUDA) kernel

To understand how to make sure alignment requirement is met I read the following passage from the book Heterogeneous Computing with OpenCL p.no: 157, several times. This shows how to put padding for a problem in Image convolution (assuming 16 x 16…
gpuguy
  • 4,607
  • 17
  • 67
  • 125
12
votes
1 answer

How to pass and access C++ vectors to OpenCL kernel?

I'm new to C, C++ and OpenCL and doing my best to learn them at the moment. Here's a preexisting C++ function that I'm trying to figure out how to port to OpenCL using either the C or C++ bindings. #include using namespace std; class Test…
junkie
  • 809
  • 2
  • 8
  • 19
12
votes
5 answers

OpenCL device uniqueness

Is there a way to get OpenCL to give me a list of all unique physical devices which have an OpenCL implementation available? I know how to iterate through the platform/device list but for instance, in my case, I have one Intel-provided platform…
Thomas
  • 3,321
  • 1
  • 21
  • 44
12
votes
2 answers

What is the algorithm to determine optimal work group size and number of workgroup

OpenCL standard defines the following options to get info about device and compiled kernel: CL_DEVICE_MAX_COMPUTE_UNITS CL_DEVICE_MAX_WORK_GROUP_SIZE CL_KERNEL_WORK_GROUP_SIZE CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE Given this values, how can…
Kentzo
  • 3,881
  • 29
  • 54
11
votes
1 answer

Can't link OpenCL on Windows with GHC

I'm trying to get the OpenCLRaw bindings to a point where I can use them on windows. I've forked the the OpenCLRaw repo on github so I can make modifications as needed. My branch is here: https://github.com/dagit/OpenCLRaw I've been mostly working…
Jason Dagit
  • 13,684
  • 8
  • 33
  • 56
11
votes
4 answers

Getting Started with OpenCL on Windows 7

I am trying to get OpenCL up and running on a Windows 7 machine. The machine has an NVIDIA GEFORCE GT 520M with driver version 8.17.12.6721. Does anyone know about getting started with GPU computing in OpenCL on Windows? Or of a good in-depth…
follyroof
  • 3,430
  • 2
  • 28
  • 26
11
votes
3 answers

macro for simulating access two dimensional array in C

OpenCL only offers access to single dimensional arrays using the C99 specs. My problem however is in two dimensions and I am using two dimensional arrays on the host side Rather than making my code less readable by calculating indices, I would like…
Robert
  • 673
  • 2
  • 7
  • 8
11
votes
1 answer

What should replace "memcpy" inside OpenCL kernels?

The OpenCL language, which extends C99, does not provide the memcpy function. What should be used instead?
grrussel
  • 7,209
  • 8
  • 51
  • 71
11
votes
2 answers

Download OpenCL AMD APP SDK 3.0 for windows and linux

I want to download standalone version of OpenCL AMD APP SDK 3.0 for Windows and Linux.
Tal
  • 1,145
  • 2
  • 14
  • 32
11
votes
3 answers

Is there a limit to OpenCL local memory?

Today I added four more __local variables to my kernel to dump intermediate results in. But just adding the four more variables to the kernel's signature and adding the corresponding Kernel arguments renders all output of the kernel to "0"s. None of…
Framester
  • 33,341
  • 51
  • 130
  • 192
11
votes
2 answers

Untrusted GPGPU code (OpenCL etc) - is it safe? What risks?

There are many approaches when it goes about running untrusted code on typical CPU : sandboxes, fake-roots, virtualization... What about untrusted code for GPGPU (OpenCL,cuda or already compiled one) ? Assuming that memory on graphics card is…
Grzegorz Wierzowiecki
  • 10,545
  • 9
  • 50
  • 88