AMD Provides A CPU-Based HIP Implementation For When Lacking A GPU

Written by Michael Larabel in AMD on 10 December 2020 at 03:49 PM EST. 7 Comments
AMD
AMD's HIP C++ Runtime API / Kernel Language for allowing portable, single-source applications on AMD and NVIDIA GPUs can now run on CPUs too.

For the past several years AMD has been working on HIP for single-source C++ programming that can work on NVIDIA CUDA-enabled GPUs and AMD Radeon graphics. Their "HIPIFY" tool allows automatically converting CUDA code to HIP. To date HIP has just been about GPU programming but now it's becoming a heterogeneous API at the same time Intel is now promoting their oneAPI alternative.

With HIP-CPU, HIP code can be easily run on CPUs now with this work-in-progress implementation as it strives to become a complete HIP implementation where possible. Granted, cases like inline NVIDIA PTX / Radeon graphics assembly aren't portable.

This AMD HIP-CPU support isn't a run-time implementation but consists of just a header file for building out the support at compile time. HIP-CPU is implemented as a generic C++17 header file that can execute across CPUs/architectures. This header-only C++ project should work across operating systems and with all major compilers supporting C++17 or later -- HIP-CPU makes use of the C++ standard parallel algorithms. Because it is header-only, it also does not require AMD's ROCm stack.

Downloads and more details on the new AMD HIP-CPU project via GitHub.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week