Professional Documents
Culture Documents
Opencl: Parallel Computing On The Gpu and Cpu
Opencl: Parallel Computing On The Gpu and Cpu
CPUs
!
Multiple cores are driving performance increases
GPUs
!
Transforming into general purpose data-parallel
computational coprocessors
!
Improving numerical precision (single and double)
Opportunity: Processor
Beyond Programmable Shading: Fundamentals
Platform Layer
!
query and select compute devices in the system
!
initialize a compute device(s)
!
create compute contexts and work-queues
Runtime
!
resource management
!
execute compute kernels
Compiler
!
A subset of ISO C99 with appropriate language
additions
!
Compile and build compute program executables
!
online or o$ine
OpenCL Software Stack
Beyond Programmable Shading: Fundamentals
Compute Kernel
!
Basic unit of executable code similar to a C
function
!
Data-parallel or task-parallel
Compute Program
!
Collection of compute kernels and internal functions
!
Analogous to a dynamic library
Implements a relaxed
consistency, shared memory
model
Implements a relaxed
consistency, shared memory
model
Implements a relaxed
consistency, shared memory
model
Implements a relaxed
consistency, shared memory
model
A few restrictions
!
Recursion, function pointers, functions in C99
standard headers ...