OpenCL support for both Intel CPU and Nvidia GPU - linux

When querying for supported OpenCL platforms/devices, my Nvidia GPU gets returned, thanks to the OpenCL runtime provided by the CUDA SDK.
However, the Intel Xeon CPU does not.
I see that Intel provides an OpenCL Runtime for its CPUs. However, it seems to require replacing libOpenCL.so.
With some linker hackery I was able to get the Intel runtime loaded into my process but then only the Intel CPU, not the Nvidia device, is enumerated.
Is there a way to get them to co-exist so I can distribute tasks across both the GPU and CPU?

Related

Android studio error running emulator screen shot provided

Keep getting this error and have tried pretty much everything I have found on this website and no luck.SS
It means that the hardware acceleration is either disabled or not available for your cpu.
Most intel chips and amd chips have this feature. All AMD Ryzen cpus have this feature. Check the website for your cpu if it is available.
Now if it is disabled then you can go to bios to enable it.
If you are on amd cpu then it won't work with windows os. Windows os can support only intel cpus for hardware acceleration using haxm or recently on Ryzen cpus with windows 10 latest april update and hyper-v enabled.
If you are using amd cpus before the ryzen series, you can switch to any linux distro which will be fine, at it has kvm for hardware acceleration.

On which CPU processor is OpenCL kernel running

I want to determine exactly how AMD schedules its OpenCL kernels on the CPU and I could not find any OpenCL function to determine the physical processor/core id on which it is running.
I could only find the following links related to my problem:
Getting the machine serial number and CPU ID using C/C++ in Linux
How to know on which physical processor and on which physical core my code is running
NUMA Get Current Node/Core
I tried the above but none of the solutions worked. I saw that OpenCL kernels do not support C99 headers like stddef.h which is required for sched.h or even fopen().
Is there any way I can see exactly how the openCL kernels have been assigned to each CPU core/processor?
Note: I am using Ubuntu 14.04, gcc version 4.8.2 and AMD APP SDK 3.0.
Thanks for your help!

Can I run Cuda or OpenCl on Intel processor graphics I7 (3rd or 4rd generation)

I'm developing on SBC (which have Intel I7 3ed or 4ed, and doesn't have external GPU)
I'm using linux.
I want to take the advantage of Intel processor graphics .
I thought to learn developing with Cuda or OpenCl.
I read some old posts (several years ago) (and I'm not sure there is a better technology now):
Can i run CUDA on Intel
GPU Programming, CUDA or OpenCL
Can I run cuda code on Intel processor graphics ?
Can I run OpenCl code on Intel processor graphics ?
If I can run Cuda & OpenCl code on Intel processor graphics, which is better ?
As #Robert Crovella said you cannot run CUDA on Intel GPU/CPU. Where it comes to OpenCL you have few choices:
Intel OpenCL Driver for Intel GPU and CPU
Open Source Beignet for Intel GPU
AMD APP SDK which can be run on Intel CPU
I cannot say which one will be best for Intel GPU on Linux. I think Beignet was first to support Intel GPU then official Intel drivers appeared. For Intel CPU on Linux I use AMD APP SDK.
You can now :-) Using: coriander, which is an NVIDIA® CUDA™ compiler for OpenCL 1.2 GPUs (full disclosure: I'm the author)

run opencl in microsoft vc using amd app or intel

In my computer with Windows 7 OS I have two versions of the OpenCL SDKS's from these vendors:
Intel
AMD.
I build my application using vs and add this path of lib for intel or amd.
the library and include file
C:\Program Files (x86)\Intel\OpenCL SDK\3.0\include
C:\Program Files (x86)\Intel\OpenCL SDK\3.0\lib
C:\Program Files (x86)\AMD APP\include
C:\Program Files (x86)\AMD APP\lib\x86
when use intel lib run gpu ok when use amd lib run gpu ok
the question what difference between them ????
can i install only intel sdk that enough to run opencl for cpu and gpu
my laptop have cpu : intel core i7 2.2GH gpu : amd radeon hd 6700M
the specification clinfo clinfo device cpu-gpu info
any help please
The SDK gets you the include files (e.g, cl.h) and library (OpenCL.lib, which loads OpenCL.dll at runtime). It does NOT select which devices your program can access. Therefore using either SDK should get you access to both devices, as well as any OpenCL GPU devices in your system.
Your program can then select from the available platforms and devices to select which one (or ones) it runs kernels on.
As per as AMD concern, AMD APP SDK compiler will be able to detect and run your OpenCL code even on Intel CPU, but vice-a-verse may not be true.
You can install only AMD SDK and use it for OpenCL Development.
Also Do check on which GPU is getting used by the kernel because even after having AMD GPU and only AMD SDK, It may run your code on CPU (This could happen due to priority).

Can I run CUDA on Intel's integrated graphics processor?

I have a very simple Toshiba Laptop with i3 processor. Also, I do not have any expensive graphics card. In the display settings, I see Intel(HD) Graphics as display adapter. I am planning to learn some cuda programming. But, I am not sure, if I can do that on my laptop as it does not have any nvidia's cuda enabled GPU.
In fact, I doubt, if I even have a GPU o_o
So, I would appreciate if someone can tell me if I can do CUDA programming with the current configuration and if possible also let me know what does Intel(HD) Graphics mean?
At the present time, Intel graphics chips do not support CUDA. It is possible that, in the nearest future, these chips will support OpenCL (which is a standard that is very similar to CUDA), but this is not guaranteed and their current drivers do not support OpenCL either. (There is an Intel OpenCL SDK available, but, at the present time, it does not give you access to the GPU.)
Newest Intel processors (Sandy Bridge) have a GPU integrated into the CPU core. Your processor may be a previous-generation version, in which case "Intel(HD) graphics" is an independent chip.
Portland group have a commercial product called CUDA x86, it is hybrid compiler which creates CUDA C/ C++ code which can either run on GPU or use SIMD on CPU, this is done fully automated without any intervention for the developer. Hope this helps.
Link: http://www.pgroup.com/products/pgiworkstation.htm
If you're interested in learning a language which supports massive parallelism better go for OpenCL since you don't have an NVIDIA GPU. You can run OpenCL on Intel CPUs, but at best you can learn to program SIMDs.
Optimization on CPU and GPU are different. I really don't think you can use Intel card for GPGPU.
Intel HD Graphics is usually the on-CPU graphics chip in newer Core i3/i5/i7 processors.
As far as I know it doesn't support CUDA (which is a proprietary NVidia technology), but OpenCL is supported by NVidia, ATi and Intel.
in 2020 ZLUDA was created which provides CUDA API for Intel GPUs. It is not production ready yet though.

Resources