Preparing Ginkgo for AMD GPUs -- A Testimonial on Porting CUDA Code to HIP
Yuhsiang M. Tsai (1), Terry Cojean (1), Tobias Ribizel (1), Hartwig, Anzt (1, 2) ((1) Karlsruhe Institute of Technology, (2) University of, Tennessee, Innovative Computing Lab)

TL;DR
This paper discusses porting the Ginkgo linear algebra library from CUDA to HIP to support AMD GPUs, covering technical challenges, performance considerations, and a shared codebase approach for NVIDIA and AMD hardware.
Contribution
It introduces a HIP backend for Ginkgo, details the porting process from CUDA, and presents a shared codebase design for supporting both NVIDIA and AMD GPUs.
Findings
Successful implementation of HIP backend for Ginkgo
Performance trade-offs when compiling HIP for AMD GPUs
Effective shared codebase reducing duplication
Abstract
With AMD reinforcing their ambition in the scientific high performance computing ecosystem, we extend the hardware scope of the Ginkgo linear algebra package to feature a HIP backend for AMD GPUs. In this paper, we report and discuss the porting effort from CUDA, the extension of the HIP framework to add missing features such as cooperative groups, the performance price of compiling HIP code for AMD architectures, and the design of a library providing native backends for NVIDIA and AMD GPUs while minimizing code duplication by using a shared code base.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
