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

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.

Related

OpenCL support for both Intel CPU and Nvidia GPU

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?

Is there any way to create emulator for Linux KVM

I want to test Linux KVM functionality. So to test, Instead of creating the Linux KVM (Hypervisor), I want to setup the emulator for that, which reduces the cost of hardware/resources.
Please let me know if is there any way to create emulator for Linux KVM ?
As you are looking for the emulation then BOCHS is your choice. One of the KVM's requirements is the Virtualization support by the host CPU.
According to the chip support list it emulates AMD Phenom X3 8650 among other AMD and Intel models. The real AMD Phenom X3 8650 does support AMD-V technology. However, I can't tell you to what extent the implementation is complete. Anyway, you could try all emulated AMD models that supports AMD-V and Intel models that supports VT-x and see what happens.
However, do not expect it to be sufficiently fast as you are going to run KVM guest inside KVM host running inside BOCHS emulator.

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)

CUDA performance penalty when running in Windows

I've noticed a big performance hit when I run my CUDA application in Windows 7 (versus Linux). I think I may know where the slowdown occurs: For whatever reason, the Windows Nvidia driver (version 331.65) does not immediately dispatch a CUDA kernel when invoked via the runtime API.
To illustrate the problem I profiled the mergeSort application (from the examples that ship with CUDA 5.5).
Consider first the kernel launch time when running in Linux:
Next, consider the launch time when running in Windows:
This post suggests the problem might have something to do with the windows driver batching the kernel launches. Is there anyway I can disable this batching?
I am running with a GTX 690 GPU, Windows 7, and version 331.65 of the Nvidia driver.
There is a fair amount of overhead in sending GPU hardware commands through the WDDM stack.
As you've discovered, this means that under WDDM (only) GPU commands can get "batched" to amortize this overhead. The batching process may (probably will) introduce some latency, which can be variable, depending on what else is going on.
The best solution under windows is to switch the operating mode of the GPU from WDDM to TCC, which can be done via the nvidia-smi command, but it is only supported on Tesla GPUs and certain members of the Quadro family of GPUs -- i.e. not GeForce. (It also has the side effect of preventing the device from being used as a windows accelerated display adapter, which might be relevant for a Quadro device or a few specific older Fermi Tesla GPUs.)
AFAIK there is no officially documented method to circumvent or affect the WDDM batching process in the driver, but unofficially I've heard , according to Greg#NV in this link the command to issue after the cuda kernel call is cudaEventQuery(0); which may/should cause the WDDM batch queue to "flush" to the GPU.
As Greg points out, extensive use of this mechanism will wipe out the amortization benefit, and may do more harm than good.
EDIT: moving forward to 2016, a newer recommendation for a "low-impact" flush of the WDDM command queue would be cudaStreamQuery(stream);
EDIT2: Using recent drivers on windows, you should be able to place Titan family GPUs in TCC mode, assuming you have some other GPU set up for primary display. The nvidia-smi tool will allow you to switch modes (using nvidia-smi --help for more info).
Additional info about the TCC driver model can be found in the windows install guide, including that it may reduce the latency of kernel launches.
The statement about TCC support is a general one. Not all Quadro GPUs are supported. The final determinant of support for TCC (or not) on a particular GPU is the nvidia-smi tool. Nothing here should be construed as a guarantee of support for TCC on your particular GPU.
Even it's been almost 3 years since the issue has been active, I still consider it necesssary to provide my findings.
I've been in the same situation: the same cuda programme elapsed for 5ms in Ubuntu cuda 8.0 while over 30ms in Windows 10 cuda 10.1. Both with GTX 1080Ti.
However, in Windows when I changed the compiler from VS Studio to cmd's nvcc compiler suddenly the programme was boosted to the same speed as the Linux one.
This suggests that maybe the problem comes from Visual Studio.

Is JavaFX 2.2 going to support GPU acceleration in Linux?

I've been experimenting with JavaFX, and I've found out that as of 2.2.0.b15, it uses GPU to provide improved font rendering. This makes a big difference for me. I intend to use it for visualization and animated UI features, so I'd like to know if GPU support will be provided in Linux.
I have come accross many statements that say that JavaFX will use my GPU if it is supported, and it does, but only under Windows. I have not seen anything about hardware acceleration for graphics under Linux, so I'm curious, can I expect to have this with 2.2 release?
I believe JavaFX for Linux already supports hardware acceleration for some features based on this statement from the JavaFX 2.1 Linux Develop Preview Release Notes:
3D features are supported for Nvidia cards (proprietary drivers only).
Not entirely conclusive, as it does not explicitly mention hardware acceleration, but I think use of hardware acceleration is likely if you have the appropriate Nvidia card and driver installed. Potentially, over time, hardware acceleration support under Linux for other hardware and driver configurations may be added.

Resources