opencl

Using async_work_group_copy with a custom data type

爷,独闯天下 提交于 2020-01-03 02:55:09
问题 I need to copy some data from __global to __local in openCL using async_work_group_copy. The issue is, I'm not using a built-in data type. The code snip of what I have tried is as follows: typedef struct Y { ... } Y; typedef struct X { Y y[MAXSIZE]; } X; kernel void krnl(global X* restrict x){ global const Y* l = x[a].y; local Y* l2; size_t sol2 = sizeof(l); async_work_group_copy(l2, l, sol2, 0); } where 'a' is just a vector of int. This code does not work, specifically because the gen_type

Using async_work_group_copy with a custom data type

时光怂恿深爱的人放手 提交于 2020-01-03 02:55:07
问题 I need to copy some data from __global to __local in openCL using async_work_group_copy. The issue is, I'm not using a built-in data type. The code snip of what I have tried is as follows: typedef struct Y { ... } Y; typedef struct X { Y y[MAXSIZE]; } X; kernel void krnl(global X* restrict x){ global const Y* l = x[a].y; local Y* l2; size_t sol2 = sizeof(l); async_work_group_copy(l2, l, sol2, 0); } where 'a' is just a vector of int. This code does not work, specifically because the gen_type

What is the relationship between NVIDIA GPUs' CUDA cores and OpenCL computing units?

核能气质少年 提交于 2020-01-02 07:41:50
问题 My computer has a GeForce GTX 960M which is claimed by NVIDIA to have 640 CUDA cores. However, when I run clGetDeviceInfo to find out the number of computing units in my computer, it prints out 5 (see the figure below). It sounds like CUDA cores are somewhat different from what OpenCL considers as computing units? Or maybe a group of CUDA cores form an OpenCL computing unit? Can you explain this to me? 回答1: What is the relationship between NVIDIA GPUs' CUDA cores and OpenCL computing units?

clEnqueTask showing deprecated in openCL 2.0

六月ゝ 毕业季﹏ 提交于 2020-01-02 07:09:20
问题 I am trying to build a hello world program in Visual Studio using OpenCL AMD SDK, but it is saying that a few commands are deprecated. I tried to define a macro CL_USE_DEPRECATED_OPENCL_1_2_APIS , but it's still not working. What do I need to do? For the code I referred to : https://www.fixstars.com/en/opencl/book/OpenCLProgrammingBook/first-opencl-program/ 回答1: Yoink! Stealing DarkZeros comment. From https://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/clEnqueueTask.html we read:

Installed beignet to use OpenCL on Intel, but OpenCL programs only work when run as root

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-02 07:02:45
问题 I have an Intel HD graphics 4000 3rd Gen Processor, and my OS is Linux Mint 17.1 64 bit. I installed beignet to be able to use OpenCL and thus run programs on the GPU. I had been having lots of problems using the pyOpenCL bindings, so I just decided to uninstall my current beignet version and install the latest one (You can see the previous question I asked and answered myself about it here). Upgrading beignet worked and I can now run OpenCL code on my GPU through python and C/C++ bindings.

libOpenCL.so uses VFP register arguments, output does not

给你一囗甜甜゛ 提交于 2020-01-02 06:58:27
问题 currently I am trying to build Buddhabrot for ARM architecture but I am stuck at one point when I get the following error. I hope somebody can help. libOpenCL.so uses VFP register arguments, output does not libGAL.so uses VFP register arguments, output does not here's my makefile LIBS = -lm -lOpenCL -lGAL -lGL -lGLEW -lglut -lpthread CFLAGS = -Wall -g OBJECTS = main.o environment.o input.o animate.o buddhabrot.o buddhacl.o cmodules/timer.o all: prog prog: $(OBJECTS) c++ $(CFLAGS) -o prog $

Build OpenCV with OpenCL support

偶尔善良 提交于 2020-01-02 06:18:10
问题 in CMake, I built OpenCV with OpenCL Enable ON(It automatically detected the OPENCL_INCLUDE_DIR path but the OPENCL_LIBRARY was empty, even after clicking config. for OPENCL_LIBRARY i don't see browse button either .. after generating opencv binaries then i run the below code #include <iostream> #include <fstream> #include <string> #include <iterator> #include <opencv2/opencv.hpp> #include <opencv2/core/ocl.hpp> int main() { if (!cv::ocl::haveOpenCL()) cout << "OpenCL is not avaiable..." <<

OpenCL research/ academic papers

守給你的承諾、 提交于 2020-01-02 05:45:11
问题 I'm about to start my honours project at uni on OpenCL and how it can be used to improve modern game development. I know there is a couple of books out now/soon about learning opencl but I was wondering if anyone knows any good papers on opencl. I've been looking but can't seem to find any. Part of my project requires a literary review and contrast so any help on this would be appreciated. 回答1: I'll not point you directly to any papers, instead I'll give you a few hints on where to look for

How to know if an OpenCV 3.0 algorithm has an OpenCL implementation in the transparent API

穿精又带淫゛_ 提交于 2020-01-02 03:39:17
问题 I am migrating my OpenCV 2.4.2 to OpenCV 3.0 for using OpenCL performance throught the Transparent-API. But, I note that some algorithms take the same time in CPU or GPU implementation. I searched in the official documentation, but I didn't find the answer. How to know if an algorithm has an automatic OpenCL translation in the Transparent API or not ? 回答1: If you have amd gpu, use codexl and create a new codexl project, attach your project and start session from codexl, or, start your project

How to effectively swap OpenCL memory buffers?

99封情书 提交于 2020-01-02 03:39:06
问题 Exactly as the title suggests I am looking for how to effectively swap two OpenCL buffers. My kernel uses two gloabl buffers, one as input and one as output. However, I invoke my kernel in a for loop with the same NDRange, each time setting the kernel arguments, enqueueing the kernel, and swapping the buffers because the previous output buffer will be the input buffer seed for the next iteration. What is the appropriate way here, to swap these two buffers? I imagine that copying the buffer