OpenCL C is a programming language based on C99 that is used for writing kernel code to be used in OpenCL.
Questions tagged [opencl-c]
88 questions
3
votes
1 answer
OpenCL 2.0 Device command queue keeps filling up and halting execution
I am utilizing OpenCL's enqueue_kernel() function to enqueue kernels dynamically from the GPU to reduce unnecessary host interactions. Here is a simplified example of what I am trying to do in the kernels:
kernel void kernelA(args)
{
//This…

Porter Morgan
- 493
- 1
- 4
- 7
3
votes
3 answers
CL_PLATFORM_NOT_FOUND_KHR in opencl
This is a very strange situation. Why do I get error
CL_PLATFORM_NOT_FOUND_KHR
when I'm calling this function:
clGetPlatformIDs(0, NULL, &platformCount);
Earlier this error was not. I have installed the driver and SDK from Intel and Nvidia. Are…
user5583781
3
votes
2 answers
Proper way of compiling OpenCL applications and using available compiler options
I am a newbie in OpenCL stuffs.
Whats is the best way to compiler an OpenCL project ?
Using a supported compiler (GCC or Clang):
When we use a compiler
like gcc or clang, how do we control these options? Are they
have to be set inside the source…

Amir
- 1,348
- 3
- 21
- 44
2
votes
2 answers
How to run OpenCL Kernel (khronos example)?
I am trying to run the c++ code example from the OpenCL C++ Bindings Doc: Example.
Compilation of the c++ code works fine, but compilation of the kernel gives errors in connection with pipes:
:10:71: error: unknown type name 'pipe'
…

CGYak
- 49
- 5
2
votes
2 answers
Are there any public OpenCL C libraries?
The title says it all, but to be even clearer: I'm looking for libs / collections of OpenCL C (kernel) code, not libs that use / provide an interface to OpenCL. Also, my interest is not restricted to a specific use case. Therefore the question is…

XOR
- 29
- 5
2
votes
1 answer
Debugging OpenCL on CPU
I'm trying to debug OpenCL kernels on CPU target, following this guide without success.
The kernel builds, app runs, but the breakpoints are not hit.
There is a statement "The Debugger requires setting the global ID of the work-item to debug before…

Miro Krsjak
- 355
- 1
- 16
2
votes
1 answer
Char*** in OpenCL kernel argument?
I need to pass a vector> to a kernel OpenCL. What is the easiest way of doing it? Passing a char*** gives me an error:
__kernel void vadd(
__global char*** sets,
__global int* m,
__global long* result)
{}
ERROR:…

pinotto
- 45
- 7
2
votes
1 answer
Why SYCL supports openCL 1.2 or above?
I am a student. My question may be very silly but I want to clear it. I have a device with Vivante GPU with openCL 1.1 version. I want to run tensorflow sample code with SYCL support on GPU. But before trying Tensorflow sample code, I want to try…

Akhilesh
- 1,024
- 1
- 9
- 26
2
votes
1 answer
OpenCL copy character from global to local memory
I'm implementing sha512 in OpenCL technology. I have simple definition of kernel function
__kernel void _sha512(__global char *message, const uint length, __global char *hash);
On host I have implemented and successfully tested implementation of…

ventaquil
- 2,780
- 3
- 23
- 48
2
votes
2 answers
How to run OpenCL programs on Linux (ubuntu 16.04)?
I am trying to learn OpenCL on my own and I have just started off. Now I am reading this book OpenCL In Action.
I have copied a test code in my file but I am not able to get a hang of how to run that code. That is, how do I compile it ?
In C, we…

Mehar Charan Sahai
- 183
- 1
- 12
1
vote
0 answers
Multi GPU clCreateBuffer failure on single context
I have two Intel ARC A770 GPUs and I am seeing this behavior (test code attached).
I am trying to allocate memory using clCreateBuffer (1 MB each).
I have two GPU devices.
The test code creates a context, loads a kernel program, builds it.
The test…

jordan
- 35
- 3
1
vote
0 answers
Opencl Program block occurred after the program running for a long time
We met a weird problem:The program worked as expected at start then got block after running for a long time.(10000 times or more).
Command queue:
clEnqueueWriteBuffer(CL_TRUE) * 3 times;
clEnqueueNDRangeKernel() * N times;
clEnqueueReadBuffer();
we…

Sernnia
- 11
- 2
1
vote
2 answers
Access violation reading location with openCL with high n values
I have to program the Floyd algorithm using OpenCL, it works fine but only with n<268. when n>=268 i have an "Access violation reading location" when calling clEnqueueWriteBuffer (the buffer_distances one, in the loop).
Here is my code:
graphe is an…

alex
- 21
- 5
1
vote
1 answer
Using OpenCL to get the energy consumption of my OpenCL Kernel
I am trying to estimate the power consumption of my OpenCL Kernel running on AMD Radeon RX Vega GPU. is there a way to access the power consumption through OpenCL directly?
I tried using profilers but could not find one that supports amd GPUs or…

Lama RL
- 31
- 3
1
vote
1 answer
Looking for examples for `atomic_fetch_add` for float32 in OpenCL 3.0
It appears that OpenCL 3.0 had added support to the long-waited atomic operations for floating point numbers, however, after spending hours, I still can't find a single example showing how to use such functions.
I've already been using a common hack…

FangQ
- 1,444
- 10
- 18