Error compiling CUDA from Command Prompt

You will need to add the folder containing the “cl.exe” file to your path environment variable. For example: C:\Program Files\Microsoft Visual Studio 10.0\VC\bin Edit: Ok, go to My Computer -> Properties -> Advanced System Settings -> Environment Variables. Here look for “PATH” in the list, and add the path above (or whatever is the location … Read more

CUDA determining threads per block, blocks per grid

In general you want to size your blocks/grid to match your data and simultaneously maximize occupancy, that is, how many threads are active at one time. The major factors influencing occupancy are shared memory usage, register usage, and thread block size. A CUDA enabled GPU has its processing capability split up into SMs (streaming multiprocessors), … Read more

GPU Programming, CUDA or OpenCL? [closed]

If you use OpenCL, you can easily use it both on Windows and Linux because having display drivers is enough to run OpenCL programs and for programming you would simply need to install the SDK. CUDA has more requirements on specific GCC versions etc. But it is not much more difficult to install on Linux … Read more

When to call cudaDeviceSynchronize?

Although CUDA kernel launches are asynchronous, all GPU-related tasks placed in one stream (which is the default behavior) are executed sequentially. So, for example, kernel1<<<X,Y>>>(…); // kernel start execution, CPU continues to next statement kernel2<<<X,Y>>>(…); // kernel is placed in queue and will start after kernel1 finishes, CPU continues to next statement cudaMemcpy(…); // CPU … Read more

How can I flush GPU memory using CUDA (physical reset is unavailable)

check what is using your GPU memory with sudo fuser -v /dev/nvidia* Your output will look something like this: USER PID ACCESS COMMAND /dev/nvidia0: root 1256 F…m Xorg username 2057 F…m compiz username 2759 F…m chrome username 2777 F…m chrome username 20450 F…m python username 20699 F…m python Then kill the PID that you no … Read more

In CUDA, what is memory coalescing, and how is it achieved?

It’s likely that this information applies only to compute capabality 1.x, or cuda 2.0. More recent architectures and cuda 3.0 have more sophisticated global memory access and in fact “coalesced global loads” are not even profiled for these chips. Also, this logic can be applied to shared memory to avoid bank conflicts. A coalesced memory … Read more

Streaming multiprocessors, Blocks and Threads (CUDA)

The thread / block layout is described in detail in the CUDA programming guide. In particular, chapter 4 states: The CUDA architecture is built around a scalable array of multithreaded Streaming Multiprocessors (SMs). When a CUDA program on the host CPU invokes a kernel grid, the blocks of the grid are enumerated and distributed to … Read more

NVIDIA vs AMD: GPGPU performance

Metaphorically speaking ati has a good engine compared to nvidia. But nvidia has a better car 😀 This is mostly because nvidia has invested good amount of its resources (in money and people) to develop important libraries required for scientific computing (BLAS, FFT), and then a good job again in promoting it. This may be … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)