opencl

Compile and build .cl file using NVIDIA's nvcc Compiler?

亡梦爱人 提交于 2019-12-08 02:49:44
问题 Is it possible to compile .cl file using NVIDIA's nvcc compiler?? I am trying to set up visual studio 2010 to code Opencl under CUDA platform. But when I select CUDA C/C++ Compiler to compile and build .cl file, it gives me errors like nvcc does not exist. What is the issue? 回答1: You should be able to use nvcc to compile OpenCL codes. Normally, I would suggest using a filename extension of .c for a C-compliant code, and .cpp for a C++ compliant code(*), however nvcc has filename extension

OpenCL to OpenGL texture problems

蹲街弑〆低调 提交于 2019-12-08 02:32:15
问题 I'm trying to use OpenCL to draw to a cl_image that I got from a OpenGL texture and then render that texture. The problem is when I run my code on CL_DEVICE_TYPE_CPU it works fine however when I run on CL_DEVICE_TYPE_GPU the texture appears to be some random pixels. I'm new to OpenCL and not sure what's goin on so I'll post code below, also using OpenCL on OSX. Host Code: #import "GLView.h" #import <GLKit/GLKit.h> #import <OpenCL/OpenCL.h> #import "kernel.cl.h" #define WIDTH 500 #define

Is there a maximum limit to private memory in OpenCL?

随声附和 提交于 2019-12-08 01:57:07
问题 Does the OpenCL specification set any maximum limit on the amount of private memory that can be used? If so, how do I get this number? I have a function which gives the correct result when run outside OpenCL, but when converted to a kernel, it spews out garbage. I checked the amount of private memory being used per work item using the CL_KERNEL_PRIVATE_MEM_SIZE flag and it is ~ 4000 bytes. I suspect that I am using too much private memory and this is somehow leading to junk computation. 回答1:

How to add header file path in CMake file

僤鯓⒐⒋嵵緔 提交于 2019-12-08 01:26:01
问题 I am new to OpenCL. I have written a vector addition code in OpenCL with help from Internet. I have included one header file i.e. CL/cl.h using #include . I am using NVIDIA graphic card and the OpenCL implementation is NVIDIA_GPU_Computing_SDK. My OpenCL header files are residing at this path /opt/NVIDIA_GPU_Computing_SDK/OpenCL/common/inc . I can run OpenCL programs through linux terminal by adding this path when compiling my code. But now I want to write CMake file for this code. CMake

How to get OpenCL working on an ATI Radeon card

二次信任 提交于 2019-12-08 01:06:14
问题 I'm trying to compile dolphin, a Nintendo emulator. I downloaded the trunk and it compiled fine but it won't link. Instead, I get this error: Linking CXX shared library ../../../Binaries/plugins/libPlugin_VideoOGL.so /usr/bin/ld: cannot find -lOpenCL collect2: ld returned 1 exit status make[2]: *** [Binaries/plugins/libPlugin_VideoOGL.so] Error 1 make[1]: *** [Source/Plugins/Plugin_VideoOGL/CMakeFiles/Plugin_VideoOGL.dir/all] Error 2 make: *** [all] Error 2 It looks like I need some sort of

Disable Nvidia watchdog with OpenCL on Mac OS X 10.7.4

眉间皱痕 提交于 2019-12-08 00:44:58
问题 I have a OpenCL program which runs fine for small problems but when running larger problems exceeds the 8-10s time limit for running kernels on Nvidia hardware. Although I have no monitors attached to the GPU I am computing on (Nvidia GTX580), the kernel will always be terminated once it runs for around 8-10s. The preliminary research I did on this problem indicates that the Nvidia watchdog should only enforce the time limit if a monitor is connected to the graphics card. However I do not

What is the minimal nesesary file subset, required to AMD OpenCL work on Linux?

痴心易碎 提交于 2019-12-07 20:48:26
问题 I've built Linux Kernel, with means of the buildroot. I've incorporated opensource amdgpu driver and required firmwares into it. Driver is fine, detecting GPUs, mode setting acts good, adjusting resolution for "small text", and command line shows up after boot. Now I require to run OpenCL program. I manually unpacked files from amdgpu-pro driver(rhel7 variant) and assembled skeleton fs then copied what I thought was required. OpenCL does not recognise any devices and clinfo utility throws cl:

Does the official OpenCL 2.2 standard support the WaveFront?

妖精的绣舞 提交于 2019-12-07 20:03:27
问题 As known, AMD-OpenCL supports WaveFront (August 2015): http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2013/12/AMD_OpenCL_Programming_Optimization_Guide2.pdf The AMD Radeon HD 7770 GPU, for example, supports more than 25,000 in-flight work-items and can switch to a new wavefront (containing up to 64 work-items) in a single cycle. But why in the OpenCL standards 1.0/2.0/2.2 there is no mention about the WaveFront? None of the PDF has not a word WaveFront : https://www.khronos.org

boost::compute stream compaction

泪湿孤枕 提交于 2019-12-07 18:54:52
问题 How to do stream compaction with boost::compute? E.g. if you want to perform heavy operation only on certain elements in the array. First you generate mask array with ones corresponding to elements for which you want to perform operation: mask = [0 0 0 1 1 0 1 0 1] Then perform exclusive scan (prefix sum) of mask array to get: scan = [0 0 0 0 1 2 2 3 3] Then compact this array with: if (mask[i]) inds[scan[i]] = i; To get final array of compacted indices (inds): [3 4 6 8] Size of the final

How much registers per thread does OpenCL kernel use on Nvidia GPU?

怎甘沉沦 提交于 2019-12-07 18:18:35
问题 My First Question is How to get registers used information for OpenCL kernel code on Nvidia GPU, as nvcc complier gives the same using nvcc --ptxas-options=-v flag for CUDA kernel code. I also got the same information on AMD GPU for OpenCL kernel, from .isa file generated while running the program, after exporting GPU_DUMP_DEVICE_KERNEL=3 . Same thing i also tried on Nvidia GPU but it did not get .isa file . My second question is that why Nvidia GPU not generating .isa file ? After googling I