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.

opencl
1,597 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1 vote
1 answer
518 views

How to better handle a class member type that depends on template parameters?

I'm trying to write some code to convert an array of a native C++ type into an appropriately sized vector-type defined by the OpenCL standard. Endian-ness and packing are OpenCL implementation ...
NoahR's user avatar
  • 1,437
1 vote
1 answer
1k views

OpenCL subbuffers, why is important?

I try to implement a multi-gpu OpenCL code. In my model, GPUs have to communicate and exchange data. I found (I don't remember where, it is been some time) that one solution is to deal with ...
Giorgos's user avatar
  • 21
1 vote
1 answer
612 views

Sharing GPU resources in code

My program uses OpenGL to draw on the screen. This task is low-intensive but latency-sensitive. Another CPU thread of my program makes some calculations which are highly-intensive but of low priority. ...
AdelNick's user avatar
  • 993
1 vote
1 answer
707 views

difference between parameter __local and within-kernel __local in OpenCL

Sometimes openCL kernels have in their parameters kernel someName (some globalparameters, __local int* myArray) { while other scripts have somewhere inside the kernel __local int myArray[length]; ...
user1111929's user avatar
  • 6,080
1 vote
0 answers
539 views

PyOpenCL - 'Build succeeded, but resulted in non-empty logs'

I just started using PyOpenCL and OpenCL in general (coming from CUDA). Thing is, when I'm using this very simple dummy kernel: typedef struct type_complex64 { float real; float imag; } ...
tamacun's user avatar
  • 421
1 vote
1 answer
742 views

Possible to use AMD gDEBugger 6.0 only for OpenCL CPU Kernel debugging? NVIDIA GPU seems to hold this off

is there a way to make AMD gDEBugger 6 debug at least OpenCL CPU Kernels even though a dedicated NVIDIA GPU is installed? When I start the gDEBugger, I get a warning: You do not have an AMD GPU ...
WDev's user avatar
  • 33
1 vote
2 answers
472 views

OpenCL development platform?

I am developing OpenCL code on a linux cluster through SSH - are there any tools that would make this process easier, i.e. something like NVIDIA Parallel Nsight for OpenCL ?
hola's user avatar
  • 11
1 vote
1 answer
485 views

OpenCL bank conflict - dropping memory / corrupting data?

I apologize in advance for the vagueness of this question. Background: I am attempting to write a morphological image processing function in OpenCL. I have a __local buffer which I use to store ...
Reefpoints's user avatar
1 vote
2 answers
1k views

openCL and crashing, is there a better way to find memory leaks? (JOCL)

I have been auditing my calling code for openCL for a while and I cannot find any memory leaks. Note, I am using JOCL, so I have a bunch of JUnit tests. If I run any of my tests individually or if I ...
smuggledPancakes's user avatar
1 vote
0 answers
575 views

Images in OpenCL without image support

I need to access non-contiguous locations in an image (a sliding square window of n x n pixels for n > 5 overlaid on an image that's between SDTV and HDTV resolutions). I'd like to use OpenCL on a Mac ...
snackdefend's user avatar
1 vote
0 answers
2k views

OpenCL build program from binary

I'm trying to test the OpenCL functionality of building a program from pre-compiled binaries. So far I've managed to create the binary file, but I'm having trouble to load it. I'm trying to adapt this ...
Ruiii's user avatar
  • 11
1 vote
2 answers
2k views

Unable to profile OpenCL code using NVidia Visual Profiler

I have an OpenCL code which adds two arrays and prints the output. I want to profile this program using NVidia Visual Profiler that comes with CUDA Toolkit 3.0. I selected the appropriate program(.exe)...
Rakesh K's user avatar
  • 8,315
1 vote
1 answer
255 views

OpenCL how to save and reuse a number of commands?

I am new to OpenCL. I am trying to implement my own fixed pipeline renderer like that of OpenGL 1. I am using 1st version of OpenCL so I can't call any kernel inside kernel. I have created my own ...
newbie_developer93's user avatar
1 vote
1 answer
201 views

OpenCL - write_imagef Compilation failure : CL_INVALID_VALUE

If I run the code below (OpenCL C 1.1, JavaCL RC3) I got error Compilation failure : CL_INVALID_VALUE The strength thing about the code is that after replacing the line: write_imagef(output, (...
Radim Burget's user avatar
  • 1,506
1 vote
2 answers
498 views

AMD GPUs Dynamic Parallelism

Does AMD GPUs support dynamic parallelism ? If so kindly let me know the GPU model details and I know OpenCL 2.0 supports Dynamic parallelism. Thanks!
Kaliuday's user avatar
  • 110
1 vote
1 answer
2k views

OpenCL, simple vector addition but wrong output for large input

So, after spending hours reading and understanding I have finally made my first OpenCL program that actually does something, which is it adds two vectors and outputs to a file. #include <iostream&...
Nixt's user avatar
  • 144
1 vote
1 answer
5k views

NVIDIA OpenCL sample compile

I'm a newbie in OpenCL. Now I'm trying to compile one of the NVIDIA OPENCL SDK CODE SAMPLES named "OpenCL Bandwidth Test" linked here (https://developer.nvidia.com/opencl). In this sample, a file ...
Umbrella's user avatar
  • 485
0 votes
0 answers
34 views

OpenCL - how exactly is the kernel-code compiled

Good afternoon! To use OpenCL, you need to define the context, the device, and compile the kernel from the source code in a .cl file. If I understand correctly, compilation takes place at this stage ...
Roman Zuev's user avatar
0 votes
0 answers
34 views

OpenCL segfault on call to clCreateFromGLRenderbuffer

#include <iostream> // this stuff is allready setup in main #define GLAD_GL_IMPLEMENTATION #include <glad/gl.h> #define GLFW_INCLUDE_NONE #include <GLFW/glfw3.h> // opencl 3.0 #...
Well Silver's user avatar
0 votes
0 answers
6 views

clgetplatformids returns wrong platform count

I have installed the Intel Oneapi under Ubuntu in order to get opencl for Intel integrated graphics. clinfo shows 4 cl systems on the machine *paul@paul-HM570:~/src$ clinfo -l Platform #0: Intel(R) ...
Paul Cockshott's user avatar
0 votes
0 answers
49 views

What is the parameter for CLI YOLOv8 predict to use Intel GPU?

I installed OpenVINO dependencies and converted the model to OpenVINO format. I have OpenCL device available: $ clinfo -l Platform #0: Intel(R) OpenCL HD Graphics `-- Device #0: Intel(R) Graphics [...
Paul Jurczak's user avatar
  • 7,694
0 votes
0 answers
26 views

How to exploit Unified Memory in OpenCL with CL_MEM_ALLOC_HOST_PTR flag?

How can I use unified memory on an OpenCL device without copying data correctly? OpenCL defined CL_DEVICE_HOST_UNIFIED_MEMORY as: Is CL_TRUE if the device and the host have a unified memory subsystem ...
fabian's user avatar
  • 1,613
0 votes
0 answers
59 views

PyOpenCl code hanging on a simple get() - how can I troubleshoot?

Running some code from the literature (https://github.com/michaelmell/HiPFSTA), the basic idea is that you load images of a wobbly sphere in there and it will, for each frame, iteratively find the ...
Josh-M's user avatar
  • 1
0 votes
0 answers
12 views

Do all OpenCL drivers come with the IntelOneAPI compiler

I would like to ask if the Intel OneAPI compiler from the Intel OneApi toolkit comes with the required OpenCL drivers for the relevant processors that support SPIR capable OpenCL runtimes
Selorm K.aw's user avatar
0 votes
1 answer
32 views

How to move an array of structures to the GPU?

Lets say I created the tree and initilized it. Now, how am I going to move nodes vector to the GPU in openCL? struct BVHNode { BoundingBox bbox; BoundingSphere bsphere; std::vector<int&...
berk2609's user avatar
0 votes
1 answer
34 views

OpenCV acceleration (OpenCL) of gaussian blur

I'm porting an image post-processing library to OpenCV, and testing the UMat OpenCL acceleration features. First tests work quite well, with complex filters using lots of arithmetic and math ...
galinette's user avatar
  • 9,092
0 votes
0 answers
21 views

OpenCL Kernel hangs at clEnqueueReadBuffer on AMD rocm

#include <stdio.h> #include <stdint.h> #include <stdlib.h> #define CL_TARGET_OPENCL_VERSION 210 #include "CL/cl.h" char* program_src = "__kernel void SAXPY (__global ...
Delfin's user avatar
  • 333
0 votes
0 answers
49 views

Attempting to run PyOpenCL on google colab GPU environment returns that no devices were found

I was trying to start my program that I had running before on Google Colab once again, but this time, the moment I invoke !sudo apt update !sudo apt purge *nvidia* -y !sudo apt install nvidia-driver-...
GnKonkort's user avatar
0 votes
0 answers
37 views

OpenCL sub buffer alignment

I have a nested loop structure in which I want to work with a sub buffer of a OpenCL buffer object. However, the sub buffer is not alignment to the CL_DEVICE_MEM_BASE_ADDR_ALIGN of my device (which ...
mr_jnrdve's user avatar
0 votes
1 answer
71 views

OpenCL overhead by kernel invocation

I want to measure the execution time of a OpenCL kernel in a loop. When I use clGetEventProfilingInfo() to measure the time for enqueueing, submitting and starting the kernel, I encountered an massive ...
mr_jnrdve's user avatar
0 votes
0 answers
102 views

Cross-compiling for AArch64 and OpenCL on Linux

When I tried to cross-compile for AArch64 and OpenCL on Linux using NDK-r14b, I encountered the following errors: /home/ferey/Android/android-ndk-r14b-linux-x86_64/android-ndk-r14b/toolchains/aarch64-...
Ferey Mao's user avatar
0 votes
1 answer
41 views

JOCL CL_OUT_OF_RESOURCES only if value is assigned

i am currently working on a sha256 kernel in OpenCL. I am having trouble reading the output of the kernel if i write values to it via the kernel. If i don't write any value to the variable the code ...
Marek Salzinger's user avatar
0 votes
0 answers
61 views

How can I compile offline opencl kernel files for adreno GPU?

I can not compile runtime for some security reason. I can not compile runtime for some security reason. I tried adreno offline compiler, but I could not fine the output file. I tried adreno offline ...
octavia's user avatar
0 votes
1 answer
58 views

OpenCL’s function clGetPlatformInfo runtime problem. Win10, VS2012

My hardware are Intel Core I7 6700, 32 GB RAM, Nvidia GT1030. My Software are Windows 10 64bit, Visual Studio 2012 professional. I bought the book “OpenCL Parallel Programing Development Cookbook”. ...
John Smit's user avatar
0 votes
0 answers
52 views

OpenCL compiling problem at Win10 and Visual studio 2012

My hardware are Intel Core I7 6700, 32 GB RAM, Nvidia GT1030. My Software are Windows 10 64bit, Visual Studio 2012 professional. I bought the book “OpenCL Parallel Programing Development Cookbook”. ...
John Smit's user avatar
0 votes
2 answers
29 views

In opencl how to synchronize the threads with in a if/while block

OpenCL standard says using barrier inside if/while block results undefined behavior. But I don't see a reason why synchronizing threads with in an if/while block is not possible; the divergent threads ...
Necktwi's user avatar
  • 2,583
0 votes
0 answers
52 views

Alpha Blend issue with python and opencl

I'm experimenting a bit with a small python app that uses OpenCL to alpha blend a number of images, but I'm probably doing something wrong either with the math, or with the colorspace when loading the ...
Nick's user avatar
  • 221
0 votes
1 answer
55 views

2D forward FFT produces no result with clFFT library

I want to perform a 2D real-to-complex FFT with the clFFT library. The output array just holds zeros for the real- and imaginary-part which is not correct (I have a working version implemented with ...
mr_jnrdve's user avatar
0 votes
0 answers
102 views

LLVM ERROR: Do not know how to split this operator's operand! Why this error happen when opencl kernel was compiled with pyopencl with CPU device?

I am trying to use pyopencl to implement my kernel function on python, but I get an error when I build the OpenCL program as "LLVM ERROR: Do not know how to split this operator's operand!". ...
Sorawich Maichum's user avatar
0 votes
0 answers
56 views

why "write_imageh" write the vector data into unpredicted position for OpenCL?

I am doing some OpenCL test on mobile GPU (Mali-G77 MC9), to calculate general matrix multiply. My host side code is like below: Define matrices and output buffers: int h = 8; int w = 8; ...
walter's user avatar
  • 11
0 votes
0 answers
45 views

Best practice to operate on large and many buffers in OpenCl?

I would like to know what options would there be to process multiple large buffers using an OpenCL kernel considering the memory limit of the device. To put the problem into perspective imagine that ...
Paunescu Daniel's user avatar
0 votes
0 answers
316 views

How to enable hw OpenCL acceleration with Mali GPU?

I have a OPPO Find X6, its SOC is dimensity 9200 which have a Mali-G715 Immortalis MP11 GPU. I have try to run clpeak in termux, but it report error: clGetPlatformIDs (-1001) no platforms found here ...
edison's user avatar
  • 5
0 votes
0 answers
29 views

OpenCL writing to an Image blocks

I have this rust code using opencl3 crate. I am trying to learn OpenCL with Rust. The code is pretty simple, it attempts to create an image pass it to opencl and copies it. I am trying to learn about ...
Oussama Ben Ghorbel's user avatar
0 votes
0 answers
39 views

Python OpenCV - Using cv2.UMat in separate thread leads to exit code -1

I need to use cv2.UMat in a separate thread (continously read image data from a camera). My problem is that when using cv2.Umat in a separate Python thread, my application always exits with result -1. ...
0b1001001's user avatar
0 votes
1 answer
212 views

Some questions about building CLBlast and OpenCL for android device

What I'm Doing I'm coding an android app with JNI, and I want to accelerate c++ codes with CLBlast. Background I have read android guidance in https://github.com/CNugteren/CLBlast and know I have to ...
david's user avatar
  • 884
0 votes
0 answers
74 views

OpenCL kernel -44 compilation error while using OpenGL context on Intel under Manjaro

Recently I've been trying to use OpenCL-OpenGL interop. After some trial and error I've found that I need to initialize OpenCL context providing it correct properties. I got it working under Manjaro ...
Stimmer02's user avatar
0 votes
1 answer
69 views

OpenCL kernel long execution time, I split it to avoid timeouts but they still happen

I have this OpenCL kernel that, depending on the parameters, can take a long time to execute. I then get some kind of timeout errors (no message, but the screen flickers and things crash). I tried a ...
Paul Aner's user avatar
  • 439
0 votes
1 answer
41 views

What is the execution time of opencl related to?

The time function that displays queue, submission, start, and end is as follows: void PrintProfilingInfo(cl_event event) { cl_int err_num = -1; cl_ulong t_queued; cl_ulong t_submitted; ...
lanling's user avatar
  • 11
0 votes
0 answers
52 views

Unexpected results for addition big numbers with carry on GPU (OpenCL)

I am writing a function to add numbers of arbitrary length on GPU using OpenCL and Boost::compute as frontend. No error occurs when the numbers are not so big (4096 bits): Bits length: 4096 Limbs Size:...
JML's user avatar
  • 1
0 votes
0 answers
57 views

pyopencl: "clEnqueueReadBuffer failed: INVALID_VALUE"

I have attempted to search for a solution or possible cause for this but I cant find anything. Python 3.9 / pyopencl 2022.3.1 Getting Context / Queue: PLATFORM = cl.get_platforms()[0] DEVICE = ...
ImASausage's user avatar

1
12 13
14
15 16
32