Get in Touch

Course Outline

Introduction

  • Overview of ROCm
  • Introduction to HIP
  • Comparing ROCm, CUDA, and OpenCL
  • Features and architectural overview of ROCm and HIP
  • Preparing the development environment

Getting Started

  • Initiating a new ROCm project in Visual Studio Code
  • Examining project structure and file organization
  • Compiling and executing the program
  • Displaying output using printf and fprintf functions

ROCm API

  • The role of the ROCm API within the host program
  • Querying device information and capabilities via the ROCm API
  • Managing device memory allocation and deallocation using the ROCm API
  • Transferring data between host and device with the ROCm API
  • Launching kernels and synchronizing threads using the ROCm API
  • Handling errors and exceptions through the ROCm API

HIP Language

  • The role of the HIP language in device-side programming
  • Writing kernels for GPU execution and data manipulation using HIP
  • Utilizing HIP data types, qualifiers, operators, and expressions
  • Applying HIP built-in functions, variables, and libraries for common operations

ROCm and HIP Memory Model

  • Distinguishing between host and device memory models
  • Managing memory spaces such as global, shared, constant, and local
  • Working with memory objects like pointers, arrays, textures, and surfaces
  • Applying memory access modes including read-only, write-only, and read-write
  • Understanding the memory consistency model and synchronization mechanisms

ROCm and HIP Execution Model

  • Differences between host and device execution models
  • Defining parallelism using threads, blocks, and grids
  • Utilizing thread functions such as hipThreadIdx_x, hipBlockIdx_x, and hipBlockDim_x
  • Employing block functions like __syncthreads and __threadfence_block
  • Using grid functions including hipGridDim_x, hipGridSync, and cooperative groups

Debugging

  • Identifying common errors and bugs in ROCm and HIP programs
  • Inspecting variables, breakpoints, and call stacks using the Visual Studio Code debugger
  • Debugging ROCm and HIP programs on AMD devices with the ROCm Debugger
  • Analyzing program performance on AMD devices using the ROCm Profiler

Optimization

  • Factors influencing the performance of ROCm and HIP programs
  • Improving memory throughput via coalescing techniques
  • Reducing memory latency through caching and prefetching strategies
  • Optimizing memory access and bandwidth using shared and local memory techniques
  • Measuring and enhancing execution time and resource utilization through profiling and dedicated tools

Summary and Next Steps

Requirements

  • Familiarity with C/C++ programming and core parallel programming concepts
  • Foundational knowledge of computer architecture and memory hierarchy
  • Practical experience using command-line tools and code editors

Target Audience

  • Developers seeking to learn how to use ROCm and HIP to program AMD GPUs and harness their parallelism
  • Developers aiming to write high-performance, scalable code compatible with various AMD devices
  • Programmers interested in exploring low-level GPU programming aspects to optimize code performance
 28 Hours

Number of participants


Price per participant

Upcoming Courses

Related Categories