

































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


































Kyu Ho Park March 2, 2017
Single Instruction Multiple Data (SIMD) Multiple Instruction Multiple Data (MIMD) Single Instruction Single Data (SISD) Multiple Instruction Single Data (MISD) NVIDIA GPU: SIMT(Single Instruction Multiple Thread)
Classification based on the memory organization
[NVIDIA]
FERMI (Tesla c2050) KEPLER (Tesla k10) CUDA cores 448 1536 x 2 Memory 6GBytes 8GBytes Peak Performance 1.0 TFLOPS 4.6 TFLOPS Memory Bandwidth 144GBytes/s 320 Gbytes/s
2006: Advent of NVIDIA’s GeForce 8800GTX (^) the first GPU of CUDA Architecture (^) for general purpose computing, ALUs complying IEEE requirements, allowing R/W of shared memory Few months after the launch of GeForce 8800GTX, CUDA C announced. (^) the first language for general-purpose
#include <stdio.h> int main(void){ printf(“Hello, World!\n”); return 0; }
#include <stdio.h> global void funct(void) { printf(“Hello from GPU!\n”); } int main(void){ funct<<<1,4>>>( ); printf(“Hello, World from CPU!\n”); cudaDeviceReset(); return 0; } Angle bracket
CUDA C adds the global qualifier to standard C. It alerts the compiler that a function is to be compiled to run on a device. ‘nvcc’ sends the funct( ) to the compiler that handles device code. And it feeds main( ) to the host compiler. CUDA nvcc compiler separates the
#include <stdio .h> global void add(int a, int b, int *c) { c = a + b; } int main() { int c; int dev_c; cudaMalloc((void)&dev_c, sizeof(int)); add<<<1, 1>>>(2, 7, dev_c); cudaMemcpy(&c, dev_c, sizeof(int), cudaMemcpyDeviceToHost); printf("2 + 7 = %d\n", c); cudaFree(dev_c); return 0; }