Heidelberg University drives heterogenous computing with oneAPI

Heidelberg University drives heterogenous computing with oneAPI’s Math Kernel Library Open-Source Interfaces (oneMKL Interfaces)

oneMKL Interfaces Random Number Generators (RNG) & Basic Linear Algebra Subprograms (BLAS) Domains now support AMD GPUs

The increasing number of high-performance computing centers around the globe is providing physicists and other researchers access to heterogeneous systems — comprising multiple central processing units and graphics processing units per node — with various platforms. However, more often than not, it is the case that domain scientists have limited resources such that writing multiple implementations of their code to target the different platforms is unfeasible. To help address this, a number of portability layers are being developed that aim to allow programmers to achieve performance portable codes; for example, Kokkos, Raja, Alpaka, hipSYCL and SYCL. Nevertheless, portable application programming interfaces often lack some features and tools that are manifest in a platform-specific API.

The oneMKL open-source interfaces project is part of the oneAPI industry initiative that provides SYCL-based APIs for math algorithms for CPUs and compute accelerator architectures.  The interfaces provide a cross-architecture solution for speeding up applications with effective and modern linear algebra and pseudorandom number generation functionality familiar to C++ developers.  In particular, the oneMKL interface’s random number generator domain provides commonly used pseudorandom engines with various continuous and discrete distributions.  Random number generators are used almost ubiquitously in stochastic algorithms (most importantly, Monte Carlo simulations) applied in math, science, engineering, financial and other spheres. Additionally, basic linear algebra subprograms (BLAS) domain provides highly optimized APIs that perform various combinations of vector and matrix operations such as vector addition, dot product and matrix multiplication. These APIs are widely used in scientific simulation, data analytics and machine learning workloads, and deep learning frameworks.

Thanks to SYCL’s interoperability functionality and open software, adding support for rocRAND and rocBLAS into the oneMKL open-source interfaces project was a straightforward exercise. It is now possible to generate random numbers and perform linear algebra computations when using the hipSYCL compiler.  By utilizing existing optimizations, nearly native performance in cross-platform applications written in hipSYCL is achieved. 

This work not only allows oneMKL open-source interfaces to be used on additional hardware platforms. It also makes oneMKL open-source interfaces the first oneAPI component with upstream support for other SYCL implementations apart from DPC++. One of the advantages of oneAPI being an open specification is the possibility for independent implementations. To this end, Heidelberg University is actively investigating the question to what extent the oneAPI ecosystem can be an open ecosystem driven by multiple compilers, similarly to other standards-driven ecosystems. 

The oneMKL open-source interfaces now provide rocBLAS and rocRAND support via hipSYCL. They are the latest components of a wider study that investigates this question (https://dl.acm.org/doi/abs/10.1145/3529538.3530005),and showcase that oneAPI can indeed be implemented by compilers other than DPC++.

The following figure illustrates the performance of the new oneMKL interfaces rocBLAS backend for single precision axpy, gemv and gemm operations on an AMD Radeon™ Pro VII GPU.  Native RocBLAS 4.5 performance is shown as well  As can be seen, the new backend demonstrates competitive performance, with deviations from native performance only apparent at the smallest of problem sizes.

 In conclusion, I am thrilled to announce that Heidelberg University (emcl.iwr.uni-heidelberg.de) has recently enabled ROCm support for random number generation & BLAS in oneMKL interfaces. This is a new and significant community contribution to the oneMKL interfaces project. More to come!  

Aksel Alpay is a researcher from Heidelberg University’s Engineering Mathematics and Computing Lab (EMCL) and the Heidelberg University Computing Center. In this capacity he works on parallel programming models and compiler technologies. His work focuses on developing the hipSYCL project as both a production SYCL implementation for CPUs and GPUs from all major vendors, as well as a research platform for parallel compiler and runtime technologies.  As technical lead of the oneAPI Center of Excellence (CoE) at Heidelberg University, he has been working on improving the compatibility between hipSYCL and DPC++, as well as the wider oneAPI ecosystem.

Call to Action:

  • Learn more of oneAPI specification hipSYCL work at Heidelberg University by reading this blog.
  • Learn about Heidelberg University’s engineering vision with the oneAPI project here. 
  • Understand more about other key contributors to the oneAPI CoE ecosystem here.
  • Learn more about the oneAPI initiative at oneapi.io.    
  • Start developing with the oneMKL open-source interfaces here.
×


Watch the oneAPI DevSummit hosted by UXL:

Watch Now