ROCm/rocm-examples
A collection of examples for the ROCm software stack
What it solves
This repository provides a comprehensive set of practical examples to help users get started with and master the ROCm (Radeon Open Compute) platform. It bridges the gap between theoretical documentation and actual implementation for developers wanting to accelerate applications using AMD GPUs or port existing CUDA code to HIP.
How it works
The project organizes code examples into several functional categories:
- HIP-Basic: Self-contained recipes for core HIP runtime functionality (e.g., memory bandwidth, streams, and shared memory).
- Applications: Real-world GPU-accelerated implementations of algorithms like bitonic sort, discrete convolutions, and Monte Carlo estimation of $\pi$.
- Libraries: Examples demonstrating the use of higher-level ROCm libraries.
- AI: Specific instructions and examples for executing quantized models using Torch-MIGraphX.
- Systems: Low-level system examples, such as GPU-direct storage I/O via hipFile.
- HIP-Doc: Code samples that directly accompany the official HIP documentation.
Who it’s for
- New Users: Developers who are new to ROCm and need basic "Hello World" style examples to verify their environment.
- Experienced GPU Developers: Engineers looking for advanced patterns like cooperative groups, warp shuffle operations, or multi-GPU peer-to-peer communication.
- CUDA Developers: Those looking to port NVIDIA-based code to AMD hardware using the
hipifytool and portable HIP source.
Highlights
- Cross-Platform Support: Build instructions and project files for both Linux and Windows (Visual Studio).
- Hardware Flexibility: Supports compiling for both AMD GPUs (HIP) and NVIDIA GPUs (CUDA).
- Containerized Setup: Provides Dockerfiles to simplify the installation of complex prerequisites.
- Broad Algorithmic Coverage: Includes implementations of Floyd-Warshall, prefix sums, and optical flow.
相关
- 项目
- 项目
- 项目
- 项目
- 项目