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
I know CUDA only got UVA (Unified Virtual Addressing) with version 4.0. But - is that only a software feature? Or does it require some kind of hardware support (on the GPU side I mean)?
Notes:
In this GTC 2011 presentation it says a Fermi-class GPU is necessary for P2P copies, but it doesn't say that's necessary for UVA itself.
Note: I know UVA is not a good idea on a 32-bit-CPU system, I don't mean that kind of hardware support.
The UVA which was introduced back in May 2011 with CUDA 4.0 requires for hardware support some Fermi-class GPUs. So, this implies compute capability 2.0 onwards.
But apparently, that's not enough since, according to slide #17 of this presentation of the new features of CUDA 4.0, it seems to be only supported in 64-bit (which makes sense since otherwise you would run out of address space pretty quick), and with TCC (Tesla Compute Cluster) when on Windows. I'm not sure if this later limitation still exists since I never ever developed on Windows.
I'm involved in a project where I have to do gpu programming, one of my constraint is to do it on a nvidia device (thus in CUDA).
But I haven't access to a device equipped with nvidia gpu.
So I would like to know if there is any wrapper that exist which could allow me to write a CUDA code but executed as an openCL code to make it work on an amd gpu ?
ps : gpuocelot could fit well IF I would not have to do it on windows system.
Is the "CUDA" constraint an actual one? Because GPU programming on NVIDIA hardware doesn't necessarily imply CUDA. You have other possible solutions such as:
OpenCL which you mentioned already, which is quite complex and cumbersome to use, but which opens you up plenty of possible back-ends.
Thrust which permits you to target NVIDIA GPUs with a CUDA back-end, or CPUs with an OpenMP and a TBB back-end.
OpenACC with the PGI compiler which permits (AFAIK) to target both NVIDIA and AMD GPUs.
If it were me and the code permitting, I would try to develop using Thrust. But that's up to you.
You could take a look at GPU Ocelot. According to its website:
Ocelot currently allows CUDA programs to be executed on NVIDIA GPUs, AMD GPUs, and x86-CPUs at full speed without recompilation.
I have problem running samples provided by Nvidia in their GPU Computing SDK (there's a library of compiled sample codes).
For cuda I get message "No CUDA-capable device is detected", for OpenCL there's error from function that should find OpenCL capable units.
I have installed all three parts from Nvidia to develop with OpenCL - devdriver for win7 64bit v.301.27, cuda toolkit 4.2.9 and gpu computing sdk 4.2.9.
I think this might have to do with Optimus technology that reroutes output from Nvidia GPU to Intel to render things (this notebook has also Intel 3000HD accelerator), but in Nvidia control pannel I set to use high performance Nvidia GPU, set power profile to prefer maximum performance and for PhysX I changed from automatic selection to Nvidia processor again. Nothing has changed though, those samples won't run (not even those targeted for GF8000 cards).
I would like to play somewhat with OpenCL and see what it is capable of but without ability to test things it's useless. I have found some info about this on forums, but it was mostly about linux users where you need Bumblebee to access Nvidia GPU. There's no such problem on Windows however, drivers are better and so you can access it without dark magic (or I thought so until I found this problem).
My laptop has a GeForce 540M as well, in an Optimus configuration since my Sandy Bridge CPU also has Intel's integrated graphics. To run CUDA codes, I have to:
Install NVIDIA Driver
Go to NVIDIA Control Panel
Click 3D Settings -> Manage 3D Settings -> Global Settings
In the Preferred Graphics processor drop down, select "High-performance NVIDIA processor"
Apply the settings
Note that the instructions above apply the settings for all applications, so you don't have to worry about CUDA errors any more. But it will drain more battery.
Here is a video recap as well. Good luck!
Ok this has proven to be totally crazy solution. I was thinking if something isn't hooking between the hardware and application and only thing that came to my mind was AV software. I'm using Comodo with sandbox and Defense+ on and after turning them off I could run all those samples. What's more, only Defense+ needs to be turned off.
Now I just think about how much apps could have been blocked from accessing that GPU..
That's most likely because of the architecture of Optimus. So I'd suggest you to read
NVIDIA CUDA Developer Guide for NVIDIA Optimus Platforms, especially the section "Querying for a CUDA Device" which addresses this issue, I believe.
I want to learn GPGPU and CUDA programming. But I know that only Nvidia card support it. My laptop has an Intel HD Graphic Card. So I need to search if it is possible to do GPGPU or something like that with Intel graphic card. Thanks for any information.
To develop in CUDA your options are:
Use an NVIDIA GPU - all NVIDIA server, desktop and laptop GPUs support CUDA since around 2006, since your laptop does not have one you could try using one remotely.
Use PGI CUDA x86, not free but does what you want.
Use gpuocelot to execute the PTX on the CPU, that's an open-source project in development so YMMV.
You cannot do GPGPU on Intel HD Graphics cards today, unless you do shader-based programming (which was common practice in the days before CUDA and OpenCL).
In my experience, the PGI X86 stuff seems to have fallen flat and I'm not aware of anyone using that. Ocelot is another attempt at the same, but it is very reasearchy and not fully robust at this point.
The only OpenCL compliant devices from Intel are the latest CPUs (Sandy Bridge and Ivy Bridge).
What CPU do you have in your system?
CUDA is Nvidia specific as starter. The GPU emulators are always there in CUDA, so you can use them without a graphics card easily, though it will be slow. A faster solution is the
the x86 implementation. Any of these will allow you to learn the basics of CUDA without using the GPU at all.
If you are want to learn GPGPU in general you still have the option to learn OpenCL, which more widely supported, including AMD, Intel, Nvidia etc... E.g. Intel has an OpenCL SDK (the target is the CPU then, but I guess is irrelevant for you).
After learning the basics of either CUDA or OpenCL, the other will be easy to learn. Neither the syntax nor the semantics are the same, but it is easy step forward as the concepts are the same.
I'm taking a course that teaches CUDA. I would like to use it my personal laptop, but I don't have Nvidia graphics processor. mine is ATI . so I was thinking is there any Virtual Hardware simulator that I can use? or that there is no other way than using a PC with CUDA Graphics processor.
Thank you very much
The CUDA toolkit used to ship with a host CPU emulation mode, but that was deprecated early in the 3.0 release cycle and has been fully removed from toolkits for the best part of two years.
Your only real option today is to use Ocelot. It has a PTX assembly translator and a pretty reliable reimplementation of the CUDA runtime for x86 CPUs, and there is also a rather experimental PTX to AMD IL translator (I have no experience with the latter). On a modern linux system with an up to date GNU toolchain, Ocelot is reasonably easy to get running. I am not sure if there is a functioning Windows port or not.
CUDA has its own emulation mode witch runs everything on CPU. Problem is that in such case you don't have real concurrency so programs that runs successfully in emulation mode can fail (and usually does) in normal mode. You can develop your code in emulation mode, but then you have to debug it on computer with CUDA card.