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
2
votes
1 answer

OpenCL, do I need to use events to synchronize kernel launches inside the same command queue?

I am unsure if this is necessary. I have two kernels which I need to launch in serial. Do I need to create an event for the first one and then have the second kernel launch wait for that event or can I assume that everything is the queue executes…
chasep255
  • 11,745
  • 8
  • 58
  • 115
2
votes
1 answer

OpenCL get_local_id() never returns 0?

I am developing a basic ray tracer using OpenCL / OpenGL Interop. I am having some issues with a kernel which shared local memory shared within a workgroup. Here is the kernel: __kernel void ComputeDirectionalShadowTexture( write_only image2d_t…
Mr. Nex
  • 233
  • 1
  • 12
2
votes
2 answers

OpenCL: Is kernel running on CPU or iGPU?

I'm just starting to learn OpenCL. This is on a simple Desktop machine with Intel Haswell CPU + Intel HD Graphics 4600. For now I use PyOpenCL and the provided examples. My question is, if the code is running on CPU or GPU? platforms =…
beginner_
  • 7,230
  • 18
  • 70
  • 127
2
votes
1 answer

How OpenMP differs from OpenCL when it comes to GPGPU?

When program is run on GPGPU, how would it's execution differ if implemented with OpenMP vs OpenCL? Does OpenMP utilizes GPGPUs through OpenCL? If not, what's the common GPGPU API for them I can use directly (without any OpenMP/OpenCL built on top…
Slaus
  • 2,086
  • 4
  • 26
  • 41
2
votes
0 answers

Intel OpenCL only detecting the nvidia platform

I just installed the intel opencl sdk on ubuntu 15.10. I am trying to use it and for some reason I am only able to detect the nvidia opencl platform. #include #include #include int main() { cl_uint nids; …
chasep255
  • 11,745
  • 8
  • 58
  • 115
2
votes
1 answer

Equivalent of curand for OpenCL

I am looking at switching from nvidia to amd for my compute card because I want double precision support. Before doing this I decided to learn opencl on my nvidia card to see if I like it. I want to convert the following code from CUDA to OpenCL. …
chasep255
  • 11,745
  • 8
  • 58
  • 115
2
votes
1 answer

Set OpenCL device on OSX to dedicated AMD GPU

I'm in the process of setting up Torch on OSX on a 2015 macbook pro with a Radeon GPU using this library (cltorch) for OpenCL support I can successfully run Torch scripts now, but running this test script which outputs the device and platform being…
Christopher Reid
  • 4,318
  • 3
  • 35
  • 74
2
votes
1 answer

Issues with Inheritance and OpenCL

I am trying to port some code to linux from Windows. I have gotten pretty far, but now I am stuck on an error with inheritance. But I can't figure out what's not working. It appears that It's not importing the header, but I can't figure out why…
2
votes
0 answers

Android runtime exception on note5: libgles_MALI not found system.loadlibrary

Android jni project created on visual studio 2015 fail on runtime. system.loadlibrary (mylib) fails when invoking dlopen (OpenCl..). Error message: can not open libGLES_mali.so. IcCan see on my board next files: \vendor lib …
e. rozin
  • 21
  • 1
2
votes
1 answer

Does Nvidia GPUs support pipe like structures?

I am trying to write OpenCL code that takes advantage of the latest OpenCL 2.0 features like pipes. I have been working on AMD GPUs until now and they support pipes. But Nvidia driver doesnt support OpenCL 2.0. So are there any pipe like structures…
Johns Paul
  • 633
  • 6
  • 22
2
votes
2 answers

Using clEnqueueNDRangeKernel in OpenCL

I need help with one function in OpenCL. When I'm starting using clEnqueueNDRangeKernel instead of clEnqueueTask it takes much more time for program to succeed. Why so? As I understand, the program should use data parallel model and it will work…
Generwp
  • 514
  • 4
  • 16
2
votes
2 answers

Draw OpenGL renderbuffer to screen

I created a Renderbuffer, that's then modified in OpenCL. //OpenGL glGenFramebuffers(1, &frameBuffer); glBindFramebuffer(GL_FRAMEBUFFER, frameBuffer); glGenRenderbuffers(1, &colorRenderbuffer); glBindRenderbuffer(GL_RENDERBUFFER,…
l'arbre
  • 719
  • 2
  • 10
  • 29
2
votes
1 answer

Fastest way to compare uchar arrays in OpenCL

I need do many comparsions in opencl programm. Now i make it like this int memcmp(__global unsigned char* a,__global unsigned char* b,__global int size){ for (int i = 0; i
lebron2323
  • 990
  • 2
  • 14
  • 29
2
votes
2 answers

how to use user defined structure in opencl

I am trying to explore the way to use structure in opencl I first try struct (defined on host) typedef struct UserStruct { cl_int x; cl_int y; cl_int z; cl_int w; } UserStruct; and structure (defined on device) typedef struct…
Erkang
  • 31
  • 3
2
votes
1 answer

aparapi OpenCLDevice.best() returned null

i am trying to play with aparapi but i haven't even started. Tried to go from https://vasanthexperiments.wordpress.com/2011/11/20/aparapi-java-matrix-multiplication-example/#comments this code, but right after execution i get:" feb 02, 2016 8:12:30…
user3338991