opencl

Why not using GPUs as a CPU?

北战南征 提交于 2019-12-03 06:38:50
问题 I know the question is only partially programming-related because the answer I would like to get is originally from these two questions: Why are CPU cores number so low (vs GPU)? and Why aren't we using GPUs instead of CPUs, GPUs only or CPUs only? (I know that GPUs are specialized while CPUs are more for multi-task, etc.). I also know that there are memory (Host vs GPU) limitations along with precision and caches capability. But, In term of hardware comparison, high-end to high-end CPU/GPU

How to profile OpenCL application with CUDA 8.0 nvprof

家住魔仙堡 提交于 2019-12-03 06:32:50
I'm trying to profile OpenCL application, a.out , in a system with NVIDIA TITAN X and CUDA 8.0. If it was CUDA application, nvprof ./a.out would be enough. But I found this does not work with OpenCL application, with a message "No kernels were profiled." Until CUDA 7.5, I successfully used COMPUTE_PROFILE=1 following this . Unfortunately, the documentation says "The support for command-line profiler using the environment variable COMPUTE_PROFILE has been dropped in the CUDA 8.0 release." The question is, is there any way other than downgrading CUDA to profile OpenCL application with nvprof? To

OpenCL - is it possible to invoke another function from within a kernel?

99封情书 提交于 2019-12-03 06:06:58
问题 I am following along with a tutorial located here: http://opencl.codeplex.com/wikipage?title=OpenCL%20Tutorials%20-%201 The kernel they have listed is this, which computes the sum of two numbers and stores it in the output variable: __kernel void vector_add_gpu (__global const float* src_a, __global const float* src_b, __global float* res, const int num) { /* get_global_id(0) returns the ID of the thread in execution. As many threads are launched at the same time, executing the same kernel,

How to obtain OpenCL SDK?

半腔热情 提交于 2019-12-03 05:38:21
问题 I was perusing http://www.khronos.org/ web site and only found headers for OpenCL (not OpenGL which I don't care about). How can I obtain OpenCL SDK? 回答1: AMD's ATI Stream SDK works perfectly for me and it uses multicore cpu's. I have an Intel CPU and an NVIDIA card but it works with using the CPU. Just registration is required and no special selection like Nvidia requires: http://developer.amd.com/GPU/ATISTREAMSDKBETAPROGRAM/Pages/default.aspx I got it to work in ubuntu 9.04. Just download

What future does the GPU have in computing? [closed]

扶醉桌前 提交于 2019-12-03 03:47:23
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . Your CPU may be a quad-core, but did you know that some graphics cards today have over 200 cores? We've already seen what GPU's in

What do work items execute when conditionals are used in GPU programming?

空扰寡人 提交于 2019-12-03 03:23:40
If you have work items executing in a wavefront and there is a conditional such as: if(x){ ... } else{ .... } What do the work-items execute? is it the case whereby all workitems in the wavefront will execute the first branch (i.e. x == true ). If there are no work-items for which x is false, then the rest of the conditional is skipped? What happens if one work-item takes the alternative path. Am I told that all workitems will execute the alternate path as well (therefore executing both paths?). Why is this the case and how does it not mess up the program execution talonmies NVIDIA gpus use

The right way to setup VisualStudio 2010 for OpenCL

旧街凉风 提交于 2019-12-03 03:06:55
what is the right way to setup VisualStuio 2010 for working with *.cl files? I have added *.cl under Tool/Text editor/File extensions and copied usertype.dat into the common7/ide folder, but VS underlines keywords like float4 or cross. Is it necessary to add some key in registry or can somebody propose a tutorial? Thanks in advance. PS i have already asked similar question old one question , but now i am looking explicit for a solution with vs2010. It is not bad, but really nerves and deflects me from programming tasks. A hint for syntax color, as pointed in this article , the usertype.dat

How do I test OpenCL on GPU when logged in remotely on Mac?

匿名 (未验证) 提交于 2019-12-03 02:56:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: My OpenCL program can find the GPU device when I am logged in at the console, but not when I am logged in remotely with ssh. Further, if I run the program as root in the ssh session, the program can find the GPU. The computer is a Snow Leopard Mac with a GeForce 9400 GPU. If I run the program (see below) from the console or as root, the output is as follows (notice the "GeForce 9400" line): 2 devices found Device #0 name = GeForce 9400 Device #1 name = Intel(R) Core(TM)2 Duo CPU P8700 @ 2.53GHz but if it is just me, over ssh, there is no

Untrusted GPGPU code (OpenCL etc) - is it safe? What risks?

匿名 (未验证) 提交于 2019-12-03 02:49:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: There are many approaches when it goes about running untrusted code on typical CPU : sandboxes, fake-roots, virtualization... What about untrusted code for GPGPU (OpenCL,cuda or already compiled one) ? Assuming that memory on graphics card is cleared before running such third-party untrusted code, are there any security risks? What kind of risks? Any way to prevent them ? Is sandboxing possible / available on gpgpu ? maybe binary instrumentation? other techniques? P.S. I am more interested in gpu binary code level security rather than hight

How to launch custom OpenCL kernel in OpenCV (3.0.0) OCL?

匿名 (未验证) 提交于 2019-12-03 02:45:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm probably misusing OpenCV by using it as wrapper to the official OpenCL C++ bindings so that I can launch my own kernels. However, OpenCV does have classes like Program, ProgramSource, Kernel, Queue, etc. that seem to tell me that I can launch my own (even non-image-based) kernels with OpenCV. I am having trouble finding documentation out there for these classes, let alone examples. So, I took a stab at it so far: #include <fstream> #include <iostream> #include "opencv2/opencv.hpp" #include "opencv2/core/ocl.hpp" #define ARRAY_SIZE 128