M5 - Introduction to CAL

M5 - Introduction to CAL - Introduction to Compute...

Info iconThis preview shows pages 1–14. Sign up to view the full content.

View Full Document Right Arrow Icon
Introduction to Compute Abstraction Layer (CAL) Praveen Bhaniramka
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Module Overview CAL Overview CAL Runtime API CAL Compiler API CAL Kernel Execution 2
Background image of page 2
3 Learning Objectives Understand CAL architecture from a high-level Understand the flow of a typical CAL application Review and understand various components involved in a CAL application and their characteristics Used a simple example to see how to write a simple CAL application
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CAL Overview 4
Background image of page 4
FireStream SDK AMD Confidential 5 5 ACML RapidMind Compilers Libraries Profilers 3 rd Party Tools Stream Applications Brook + Shader Analyzer Compute Abstraction Layer Close-to-the-Metal AMD Runtime API Bindings 3D Graphics Inter-operability
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CAL Overview Device driver library for AMD Stream Processors Programming Model (similar to Brook+, just lower- level) Decouples program compilation from execution completely Programs can be compiled off-line and binaries can later be loaded on the GPU Binary is GPU architecture dependent Consists of two main components amdcalcl – Compiler to generate machine binary amdcalrt – Runtime infrastructure for executing GPU programs 6
Background image of page 6
CAL Overview Provides interface for Compiling GPU kernels Running kernels on the GPU Transferring data between the host and the GPU Managing GPU Local resources Managing Host-side GPU resources 7 amdcalcl Compiler Library amdcalrt Runtime Library
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CAL System Architecture 8 Host Application GPU Kernel GPU Local Resources Host-side GPU Resources Data Transfer
Background image of page 8
CAL Application Architecture Consists of two distinct components Host Application Performs application work Sends commands to the GPU using CAL API Manages GPU and Host-side resources GPU Kernel Reads input data Performs parallel computation Writes output data 9
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CALDevice Abstraction for a Stream Processor Initialized explicitly by application Attributes can be queried via API Executes a GPU Kernel Reads inputs and writes to outputs Accesses both GPU-local as well as Host-side GPU resources 10
Background image of page 10
CALResource Abstraction for memory buffer accessible by GPU Local resource – resident on GPU Local memory Remote resource – resident in Host-side GPU memory (PCIe memory) Allocated explicitly by application Can be specific to a device or shared between multiple devices Can be 1D or 2D Can be used as inputs, outputs or constants Total available and maximum size are fixed and can be queried Attributes include dimensions, data format and data type 11
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CALResource 12 Remote Resources Local Resources Device can access both PCIe Local Interconnect
Background image of page 12
Remote Resources GPU can address and access system memory directly Not all of system memory is accessible from GPU Driver allocates dedicated system memory for GPU buffers Can be accessed directly from GPU kernel for reading and writing Available in GPU’s address space
Background image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 14
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/03/2011 for the course CDA 6938 taught by Professor Zou,c during the Spring '08 term at University of Central Florida.

Page1 / 75

M5 - Introduction to CAL - Introduction to Compute...

This preview shows document pages 1 - 14. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online