Open Hardware & RISC-V

chipStar open-source project compiles CUDA and HIP kernels to SPIR-V for OpenCL portability

Key Takeaway

The chipStar toolchain enables scientific applications written for NVIDIA CUDA and AMD HIP to run on diverse hardware including Intel GPUs, Apple M4, Arm, and RISC-V through OpenCL and SPIR-V without manual kernel rewrites.

Summary

The Khronos Group has detailed chipStar, an open-source compiler project that translates CUDA and HIP GPU kernels into SPIR-V intermediate representation for execution via OpenCL. This allows scientific applications with years of investment in proprietary GPU code to run on hardware from multiple vendors without rewriting kernels for each platform. The project uses a Clang/LLVM-based toolchain and has demonstrated production workloads including molecular dynamics (OpenMM), finite element computation (libCEED), and quantum chemistry (GAMESS-GPU-HF) on Intel's Aurora exascale system and Ponte Vecchio GPUs.

chipStar supports multiple backends including OpenCL and Intel's Level Zero API, with runtime compatibility spanning AMD, Intel, NVIDIA, Arm, Apple M4, and RISC-V processors. The project also provides library integrations for hipBLAS, hipFFT, and hipSOLVER through Intel oneMKL. However, successful porting still requires evaluating unsupported CUDA/HIP features, math library availability, hardware-specific thread assumptions, and numerical correctness testing for each target workload.

Architecture and portability mechanics

  • Compiler toolchain: chipStar uses a Clang/LLVM-based pipeline to compile supported CUDA or HIP kernels into SPIR-V, packaging them with host code for runtime execution through OpenCL or Level Zero backends.
  • Runtime backends: The project supports both OpenCL drivers and Intel's Level Zero oneAPI runtime API as alternative execution paths, with reported closely matched timings between the two in tested libCEED configurations.
  • Hardware coverage: Compatible implementations run on CPU and GPU systems from AMD, Arm, Apple M4, Intel, NVIDIA, and RISC-V processors, contingent on OpenCL drivers providing required SPIR-V support.
  • Library ecosystem: chipStar includes ports of parallel primitives, algorithms, random number generation, and sparse matrix libraries, plus Intel GPU integrations for hipBLAS, hipFFT, and hipSOLVER through oneMKL adapters.
  • Application validation: Production demonstrations include OpenMM molecular dynamics on Ponte Vecchio GPUs, libCEED finite element computation with synchronization-adjusted kernels, and GAMESS-GPU-HF quantum chemistry with oneMKL math library connections.

Why it matters

chipStar directly addresses vendor lock-in in scientific computing by reducing the cost of migrating CUDA and HIP workloads to alternative hardware, which strengthens the negotiating position of research institutions and cloud customers while expanding the viable market for Intel GPUs and RISC-V accelerators. For Linux distributions and HPC system administrators, the project provides a practical path to diversify hardware procurement without abandoning existing application investments. The work also generates feedback for Khronos standards evolution by exposing gaps between proprietary GPU programming models and OpenCL capabilities.

What to do

  • Identify the CUDA or HIP features used by your application.
  • Identify all required math library dependencies.
  • Evaluate unsupported features, math library availability, hardware-specific thread assumptions, and numerical correctness for each target workload.

Original reference: www.khronos.org →