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.

0
votes
0answers
10 views

Is there a way to use OpenCL C mad function in Vulkan SPIR-V?

As we know, there's at least 2 ways to calculate a * b + c: ret := a*b; ret := ret + c; ret := fma(a, b, c); But in OpenCL C, there's a third function called "mad" that trades precision for ...
0
votes
0answers
21 views

How could I use a vector<char**> buffer on opencl c kernel or set a SVM with this vector?

I am trying to allocate a vector (array of strings) to store 2 or more char(bytes) but the OpenCL kernel's compiler(clang) throw the following error kernel parameter cannot be declared as a pointer to ...
0
votes
0answers
17 views

OpenCL/OpenGL interop wasting CPU

I generate frames in OpenCL 60 times per second using one OpenCL kernel call each time and write them to an OpenGL texture so that I can display them on the screen. There's no performance problem, the ...
0
votes
1answer
23 views

OpenCL program works only for the multiple of itemsize

I'm new to openCL program and this is the problem I'm facing while executing a simple vector addition. I have the following kernel code #include <CL/cl.hpp> #include<iostream> #include &...
0
votes
0answers
15 views

How to pass vector type to kernel with javacl

I'm developing a simple ray-tracer in Java using JavaCL. I have a constant in my kernel, but it (could) change over each call, the origin of the ray. I wanted to do as I usually do in C++, passing ...
0
votes
0answers
13 views

Determine implementation specified limits of native_ functions

tl;dr: How can I determine the implementation-defined input range and result accuracy of native_ functions? According to the OpenCL spec, the supported input range and the result accuracy of ...
0
votes
1answer
15 views

Call to clGetDeviceInfo required for kernel to run

I have some OpenCL code that runs fine as follows: # ocl_helpers.h typedef struct { cl_context context; cl_command_queue queue; cl_device_id device; cl_platform_id platform; } ...
1
vote
0answers
24 views

Equivalent of memcpy in opencl

I'm new to opencL and this question might look silly. I have a kernel which takes two structures A and C. I want to copy contents of structure A to structure C. Structure looks like below: struct ...
0
votes
1answer
19 views

Invalid argument size in image convolution with OpenCL

I am trying to combine OpenCV for the ease of use regarding images and OpenCL. The task is to load in a image and convert it to a grayscale with floating point pixel values. Then I want to do image ...
0
votes
1answer
20 views

Buildroot: annoying false error architecture for “/root/foo/bar.aocx” is “Advanced Micro Devices X86-64”, should be “ARM”

I have a buildroot-based project, for an Intel FPGA SoC, using OpenCL. There are some precompiled OpenCL binaries for the FPGA in the overlay source directory with the file extension .aocx that should ...
0
votes
0answers
37 views

Earliest CUDA version with certain libraries

What was the earliest version of CUDA to have (integrated or separately) the following libraries? nVIDIA Tools Extension (a.k.a. nvtx, nvToolsExt)? nVIDIA OpenCL support (a.k.a. OpenCL)?
0
votes
1answer
26 views

QueryperformanceFrequency and QueryperformanceCounter Quick Sort GPU Programming OpenCL

I'm trying to execute Quick Sort algorithm on GPU using OpenCL. I found a package developed by Intel titled "GPU-Quicksort in OpenCL 2.0: Nested Parallelism and Work-Group Scan Functions". However ...
0
votes
0answers
17 views

OpenCL header file not found

So please bear with me if the question is very trivial. I wanted to install Intel implementation of OpenCL to code in integrated intel GPU. I installed the OpenCL driver using Beignet. It ...
1
vote
1answer
49 views

implementation of atom_add function on non-integers in openCL, devices with older compute capability

I want to use atomic functions on device memory with non-integer numbers (float and double), for instance I saw in the CUDA C Programming Guide the next code for implement atomicAdd function for ...
0
votes
0answers
22 views

How to fix 'Error: Can't find board_spec.xml ()' when compiling using OpenCL compiler

When trying to compile the Intel vector add example using the compiler provided by OpenCL 19.1 i have been running into this error message: Warning: Command has been deprecated. Please use -board= ...
0
votes
2answers
24 views

Get X and Y positions of a Pixel given the HEIGHT , WIDTH and index of a pixel in FLATTENED array representing the image

Imagine you have this image [[1 2 3] [4 5 6] [7 8 90]] You flatten it into this format - [1 2 3 4 5 6 7 8 90] Now you are given the index of Pixel 90 to be 8. How can you find that pixel 90 ...
0
votes
0answers
23 views

OpenCL doesn't list Intel integrated GPU

I'm new to OpenCL and I have two graphics cards on my system 1. AMD and 2. Integrated Intel GPU. My Processor is Intel i7-3rd gen. I have installed the latest Intel SDK openCL. And I have ...
0
votes
0answers
15 views

PyopenCL.array.sum doesn't work correctly

I want to calculate float numbers using PyopenCL.array.sum but the result will be always weird. I create numpyarray first then pass it to PyopenCL my cord is below as shown import numpy as np ...
0
votes
1answer
41 views

Atomic operation between integrated GPU and CPU

Hi I'm working on developing an application, which involves working on shared data between GPU and CPU. I know I can do atomic operation GPU and CPU separately. And also I don't want to use event ...
0
votes
0answers
46 views

Convert structured Numpy array into a normal array

I have a numpy array with the dtype.names as: ('s0', 's1', 's2', 's3') What steps would I follow to revert the numpy array dtype to np.float32? I obtain the numpy array ('s0', 's1', 's2', 's3') ...
0
votes
0answers
22 views

Intel Inspector causes an OpenCL application to crash on clBuildProgram

The title says it all; the application works fine otherwise if the Inspector is not attached. We are using II integrated with Visual Studio 2017. Linker set to a Full debug info output.
2
votes
1answer
87 views

What is the best way to handle additional data produced by a small fraction of GPU threads in OpenCL?

I am pretty new to OpenCL and have the following problem: I have a large array (6 * 1,000,000 floats). For each element of the array I need to do a calculation. The basic algorithm works well on up ...
0
votes
0answers
53 views

Segmentation fault: 11 with images in Pyopencl

I am trying to apply a filter in OpenCL. However, It appears there are some aspects of copying images to/from the device and doing image kernel computations that I do not understand. As a result, I ...
1
vote
1answer
19 views

I can't get clinfo to show gpu or cpu

I am running Ubuntu 18.04 and have an RX 580 amd GPU. I installed the pro drivers (19.10) and I installed opencl, but when I run clinfo it shows 0 platforms. How can I make it detect my GPU. I had ...
0
votes
0answers
26 views

How to install Theano for AMD Radeon GPU?

I have an AMD Radeon R5 GPU on my machine and I've noticed that it is not supported by TensorFlow (if it is though please tell me how to install). So I've tried to install Theano instead but so far I ...
0
votes
1answer
70 views

Get bool if a Nvidia or a AMD GPU card is installed

I need to somehow to get a list of the GPUs installed and available to use and for each GPU detected i need to get the brand name of it using Java. Only on Windows
0
votes
1answer
39 views

OpenCL, problem with vector types: cross product is not working as I expect

I am newbie to OpenCL as well as heavy parallel computing. I came across a problem with operations over vector types. I am crazy about taking advantage of SIMD instructions for operations with vectors ...
0
votes
1answer
49 views

OpenCL2.0 runtime compiler not supporting c++11

I am trying to build an OpenCL kernel using OpenCL2.0. I am calling the cl::Program build function and passing the flag -cl-std=CL2.0. The g++ compiler finishes and links with no errors. However, when ...
-1
votes
0answers
15 views

Is an OpenCL platform also a software interface or just a library of functions specific to a piece of hardware?

so I have seen written that an OpenCL platform is an actual implementation such as Intel OpenCL. Does this mean that an OpenCL platform is the "programming language" or a library of functions that are ...
0
votes
0answers
34 views

OpenCL Image convolution doesn't work (stack overflow)

I'm fairly new to programming with OpenCL in general and English is not my native language, so please excuse any mistakes. What I am trying to do is to load in an input image with OpenCV and perform ...
0
votes
1answer
12 views

How to use cl2.hpp with AMD GPU and rocm

I've been developing with OpenCL on my Laptop for a while now, but want to move to my more powerful desktop pc with an AMD GPU. I followed the breadcrumbs through APP SDK (which is apparently gone) ...
0
votes
1answer
46 views

OpenCL and C++: events not working properly

I'm very lost, but luckily I narrowed the problem to a few lines of code. I'm defining a class that stores events as pointers in member std::vector<cl::Event*> m_lastaccesses. In call to ...
0
votes
1answer
35 views

OpenCL: can I do simultaneous “read” operations?

I have an OpenCL buffer created with the read and write flag. Can I access the same memory address simultaneously? say, calling enqueueReadBuffer and a kernel that doesn't modify the contents out-of-...
2
votes
1answer
39 views

C++ OpenCL: what happens to a subbuffer when a buffer goes out of scope?

I haven't been able to find a clear source on how memory deallocation is handled by OpenCL's C++ wrapper; any pointer to such a reference would be great. My particular question right now is, what ...
0
votes
2answers
84 views

How to use __local variables in OpenCL?

I'm trying to implement a convolution algorithm in OpenCL (using Vivado HLS). I'm trying to load part of the image into the local memory before executing the workgroup (for example, if the workgroup ...
0
votes
2answers
45 views

No OpenCL / HSA support for rx 470 / vega 8 on Ubuntu 18.04 using ROCM

I installed ROCm, ROCm-Tensorflow and PlaidML on a fresh installation of Ubuntu 18.04 using the instructions given on: https://rocm.github.io/ROCmInstall.html https://rocm.github.io/QuickStartOCL....
0
votes
1answer
28 views

In OpenCL, why do I have one platform for each Intel device?

I'm starting OpenCL. As I've understood, a platform is a vendor-specific OpenCL implementation, and a device is a processing unit that can be used by a platform. I've made a simple C++ code that ...
-1
votes
1answer
25 views

OpenCL kernel provides wrong results when I use private arguments

When I pass scalar values as kernel arguments,OpenCl gives wrong results. But when I hardcode the values inside the kernel it works perfect. I think i have done some mistake in kernel code. Plz help. ...
0
votes
0answers
23 views

How to get higher performance with asynchronous copy in OpenCL?

I write a program that performs a Matrix-Vector-Multiplication on all available OpenCL devices. Any device is running in a thread with a own context and CommandQueue. The matrix is divided in two-...
0
votes
1answer
17 views

Using vloadn (opencl) to load unallocated memory

I am using vloadn to load data and as a parameter I pass the range I want to read and it works, but I am wondering what's the behavior of vload4. If this might cause some unexpected issue or I am ...
4
votes
1answer
96 views

Troubles with slow speeds in opencl

I am trying to use opencl for the first time, the goal is to calculate the argmin of each row in an array. Since the operation on each row is independent of the others, I thought this would be easy to ...
0
votes
0answers
79 views

Using Python and Opencv, how do I convert Umat back to mat?

My project is written in python 3.6, and I'm using opencv and fast.ai. I'm trying to determine if Umat can outperform mat for some live video analysis. I have code that works to detect objects in a ...
0
votes
0answers
39 views

How is OpenCL encapsulated as a class and called in c#

My graphics card is inter, so far I have added the opencl.net reference from the nuget package of C#, but the following problems are as follows :(1)How to configure the environment and main function ...
0
votes
0answers
46 views

OpenCL error using Python 3.6 on Windows 10

I am trying to use PyOpenCL for the first time on Windows 10 (64 bit) to accelerate some code using my GPU. When trying to import pyopencl I get the error: File "C:\Users\me\Anaconda3\lib\site-...
0
votes
0answers
35 views

OpenCL enqueueReadBuffer throwing out of resources error

New to OpenCL here. I have this code written in C++ OpenCL below: cl::Kernel kernel_Hist = cl::Kernel(program, "hist_simple"); kernel_Hist.setArg(0, buffer_A); kernel_Hist.setArg(1, buffer_B); ...
0
votes
2answers
41 views

Error: “UnsatisfedLinkError: com.aparapi.internal.jni.OPENCLJNI.getPlatforms()” JNI configuration

I would try to execute an example script based on Aparapi, on MAC OS. I'm using the last version of Eclipse, but when I execute DeviceInfo example to get all the available devices: public class ...
1
vote
3answers
57 views

Intel OpenCL SDK for FPGA compile kernel for emulation with aoc command gives linker error

I'm trying to compile a kernel for emulation with aoc in the Intel FPGA SDK, I have set all environment variables as possible even using the init_opencl.bat included in the SDK. I'm running the ...
0
votes
1answer
21 views

How to monitor runtime behavior of OpenCL host code

I need to run a big test suite of OpenCL host codes and kernels, and I need to extract some features from each execution. I 've managed to extract static features from the kernel source files, but ...
0
votes
0answers
25 views

Android Compiling project with OpenCl on MacOs

I am trying to integrate the example Use OpenCL in Android camera preview based CV application in AndroidStudio 3.4 on MacOs Mojave. Problem I am ending with errors on classes of the standard ...
0
votes
0answers
21 views

What does clEnqueueMarkerWithWaitList do that parameters of cl functions can't?

Assume I have a set of kernels that I want to run asynchronously with some dependencies between them. One option for synchronization is clEnqueueMarkerWithWaitList. The specification states that this ...