AMD HIP 프로그래밍 가이드
Heterogeneous-compute Interface for Portability(HIP)를 위한 포괄적인 기술 매뉴얼입니다. 이 매뉴얼은 개발자가 단일 소스 코드에서 AMD 및 NVIDIA GPU용 포터블 애플리케이션을 개발할 수 있도록 하는 C++ 런타임 API와 커널 언어를 제공합니다. 가이드에서는 설치, 환경 설정, 프로그래밍 모델, 메모리 할당 및 CUDA 코드를 HIP로 마이그레이션하는 데 필요한 도구에 대해 다룹니다.
강좌 개요
📚 콘텐츠 요약
다양한 컴퓨팅 인터페이스를 위한 포터블성(hip)에 대한 종합적인 기술 매뉴얼입니다. 이 매뉴얼은 단일 소스 코드에서 AMD 및 NVIDIA GPU용 포터블 애플리케이션을 개발할 수 있도록 해주는 C++ 런타임 API와 커널 언어를 제공합니다. 가이드는 설치, 환경 구성, 프로그래밍 모델, 메모리 할당, 그리고 CUDA 코드를 HIP로 이식하기 위한 도구를 다룹니다.
포터블 GPU 프로그래밍 마스터: 하나의 소스로 AMD와 NVIDIA 플랫폼 모두 지원.
저자: Advanced Micro Devices, Inc. (AMD)
감사의 말씀: AMD, AMD Arrow 로고, AMD Instinct, Radeon, ROCm 및 이들의 조합은 Advanced Micro Devices, Inc.의 상표입니다. Linux는 Linus Torvalds의 등록 상표입니다. PCIe는 PCI-SIG Corporation의 등록 상표입니다.
🎯 학습 목표
- HIP 프레임워크의 주요 기능과 가치 제안을 정의한다.
- 시스템 도구를 사용하여 HIP 환경에 접근하고 쿼리하는 방법을 보여준다.
- HIP 포터블성과 컴파일러 기술 간의 아키텍처적 관계를 설명한다.
- NVIDIA 및 AMD 환경에 맞는 플랫폼별 설치를 수행한다.
- 여러 저장소를 통합하여 HIP 소스 코드에서 빌드하는 과정을 조율한다.
- 시스템 구성 및 검증 도구를 활용하여 성공적인 설치 여부를 확인한다.
- HIP 할당, 일관성 제어, 제로-코피 호스트 메모리 가시성 등을 통해 GPU 메모리를 구성하고 관리한다.
- HIP 전용 함수/변수 퀄리파이어, 벡터 타입, 동기화 원시 기능을 사용해 고성능 커널을 개발한다.
- 워프 샤프르, 보이트, 볼랏, 협업 그룹 기능을 활용한 고급 병렬 알고리즘을 구현한다.
- HIPIFY 도구를 사용하여 CUDA 코드를 자동으로 변환하고, 프로젝트 내부에서의 변환을 관리한다.
수업 共 4 课时 · 预计 12.0h
수업
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.