Back to Courses
AI022 Professional

AMD HIP Programming Guide

A comprehensive technical manual for the Heterogeneous-compute Interface for Portability (HIP). It provides a C++ Runtime API and kernel language that allows developers to create portable applications for AMD and NVIDIA GPUs from a single source code. The guide covers installation, environment configuration, programming models, memory allocation, and tools for porting CUDA code to HIP.

4.9
12.0h
841 students
0 likes
Artificial Intelligence
Start Learning

Lessons

Lesson

This lesson introduces the multi-vendor dilemma in high-performance computing, where hardware heterogeneity and proprietary APIs create software fragmentation and maintenance debt. Students will learn how the HIP framework addresses these challenges by enabling performance portability and simplifying the transition between different GPU architectures.

This lesson covers the installation and configuration of the Heterogeneous-compute Interface for Portability (HIP) environment, focusing on the single-source paradigm for cross-platform GPU development. Students will learn how to manage environment variables like CUDA_PATH and HIP_PATH to enable the hipcc compiler to route code effectively across NVIDIA and AMD hardware architectures.

AI022: HIP Programming Model and API Deep Dive (Lesson 3) explores the architectural foundations of the HIP ecosystem, focusing on the ROCm stack, hardware discovery, and the porting workflow from CUDA to AMD architectures. Students will learn to utilize the hipify-perl and hipcc toolchains, manage low-level HSA runtime initialization, and implement effective memory mapping for GPU resource orchestration.

This lesson explores the Heterogeneous-compute Interface for Portability (HIP), a C++ runtime API designed to enable cross-platform GPU development by abstracting hardware layers for both NVIDIA and AMD systems. Students will learn how to configure the HIP environment, utilize the hipcc compiler, and apply functional mappings to migrate legacy CUDA applications to a unified, portable codebase.

Course Overview

📚 Content Summary

A comprehensive technical manual for the Heterogeneous-compute Interface for Portability (HIP). It provides a C++ Runtime API and kernel language that allows developers to create portable applications for AMD and NVIDIA GPUs from a single source code. The guide covers installation, environment configuration, programming models, memory allocation, and tools for porting CUDA code to HIP.

Master portable GPU programming: One source for both AMD and NVIDIA platforms.

Author: Advanced Micro Devices, Inc. (AMD)

Acknowledgments: AMD, the AMD Arrow logo, AMD Instinct, Radeon, ROCm and combinations thereof are trademarks of Advanced Micro Devices, Inc. Linux is a registered trademark of Linus Torvalds. PCIe is a registered trademark of PCI-SIG Corporation.

🎯 Learning Objectives

  1. Define the primary features and value propositions of the HIP framework.
  2. Demonstrate how to access and query the HIP environment using system tools.
  3. Explain the architectural relationship between HIP portability and its compiler technology.
  4. Execute platform-specific installations for both NVIDIA and AMD environments.
  5. Coordinate the multi-repository build process to compile HIP from source code.
  6. Validate a successful installation using system configuration and verification tools.
  7. Configure and manage GPU memory using HIP allocation, coherency controls, and zero-copy host memory visibility.
  8. Develop high-performance kernels using HIP-specific function/variable qualifiers, vector types, and synchronization primitives.
  9. Implement advanced parallel algorithms utilizing warp shuffle, vote, ballot, and cooperative group functions.
  10. Automate the translation of CUDA code to HIP using HIPIFY tools and manage in-place project conversions.

Lessons