M6 - CAL Kernel Programming

M6 - CAL Kernel Programming - CAL Kernel Programming 1...

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

View Full Document Right Arrow Icon
CAL Kernel Programming 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 Module Overview CAL Kernel Programming APIs Overview of AMD IL Overview of AMD GPU ISA
Background image of page 2
3 CAL Kernel Programming APIs AMD Brook+ DirectX High Level Shading Language (HLSL) AMD Intermediate Language (IL) AMD GPU-specific Assembly Instruction Set (ISA)
Background image of page 3

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

View Full DocumentRight Arrow Icon
AMD Brook+ ‘C’ with Streaming Extensions Includes Kernel programming interface Runtime implementation Transparent to application programmer Supports multiple runtimes Runtime API Simple and small API for basic operations Provides only high-level control over stream data 4
Background image of page 4
DirectX High Level Shading Language (HLSL) ‘C’ for GPU Programming for 3D applications Includes Kernel Programming Interface Runtime provided by associated runtime library (DirectX) Front-end compiler provided by Microsoft ( fxc ) Back-end code generation and optimization done by GPU vendors Original BrookGPU included as DirectX runtime Generate HLSL for Brook kernels Invoke DirectX runtime calls for stream management and kernel invocation, etc 5
Background image of page 5

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

View Full DocumentRight Arrow Icon
AMD Intermediate Language Psuedo-assembly interface Interface is Architecture Independent Includes graphics-ish commands as well Evolves with GPU evolution Specifications available with the SDK installation 6
Background image of page 6
AMD GPU ISA True GPU assembly Interface and Implementation is Architecture Dependent Exposes the GPU architecture completely Provides insight into GPU architecture and expected performance No optimizations done by the assembler on specified ISA Not expected to use directly for application development Very useful for performance profiling Useful for debugging programs 7
Background image of page 7

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

View Full DocumentRight Arrow Icon
Overview of AMD IL 8
Background image of page 8
AMD IL Interface An IL program consists of Versioning information, declarations, etc Registers (operands, temporaries and results) Instructions IL registers are 4-component vectors IL instructions that accept vectors by default perform vector instructions Current and future GPUs have superscalar units so scalar instructions are encouraged ! Use masking operators when vector instructions are not needed ! The compiler will optimize the generated code appropriately 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
AMD IL – Data Types IL is a type-less language
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 32

M6 - CAL Kernel Programming - CAL Kernel Programming 1...

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

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