Show Your Support: Did you know that the hundreds of articles written on Phoronix each month are mostly authored by one individual? Phoronix.com doesn't have a whole news room with unlimited resources and relies upon people reading our content without blocking ads and alternatively by people subscribing to Phoronix Premium for our ad-free service with other extra features.
AMD Provides A CPU-Based HIP Implementation For When Lacking A GPU
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.