Cross-vendor programming abstraction for diverse heterogeneous platforms

Topi Leppänen, Atro Lotvonen, Pekka JääskeläinenFrontiers in Computer Science 2022

Abstract

Hardware specialization is a well-known means to significantly improve the performance and energy efficiency of various application domains. Modern computing systems consist of multiple specialized processing devices which need to collaborate with each other to execute common tasks. New heterogeneous programming abstractions have been created to program heterogeneous systems. Even though many of these abstractions are open vendor-independent standards, cross-vendor interoperability between different implementations is limited since the vendors typically do not have commercial motivations to invest in it. Therefore, getting good performance from vendor-independent heterogeneous programming standards has proven difficult for systems with multiple different device types. In order to help unify the field of heterogeneous programming APIs for platforms with hardware accelerators from multiple vendors, we propose a new software abstraction for hardware-accelerated tasks based on the open OpenCL programming standard. In the proposed abstraction, we rely on the built-in kernel feature of the OpenCL specification to define a portability layer that stores enough information for automated accelerator utilization. This enables the portability of high-level applications to a diverse set of accelerator devices with minimal programmer effort. The abstraction enables a layered software architecture that provides for an efficient combination of application phases to a single asynchronous application description from multiple domain-specific input languages. As proofs of the abstraction layer serving its purpose for the layers above and below it, we show how a domain-specific input description ONNX can be implemented on top of this portability abstraction, and how it also allows driving fixed function and FPGA-based hardware accelerators below in the hardware-specific backend. We also provide an example implementation of the abstraction to show that the abstraction layer does not seem to incur significant execution time overhead.

Introduction

Modern computing is increasingly heterogeneous, relying on a mix of CPUs, GPUs, and specialized accelerators like FPGAs and NPUs to achieve high performance and energy efficiency. However, the software ecosystem remains fragmented. While standards like OpenCL exist, hardware vendors often prioritize their own proprietary stacks (e.g., NVIDIA’s CUDA or Intel’s oneAPI), leading to "vendor silos."

A typical software stack showing vendor-specific fragmentation.

Even when using open standards, achieving true cross-vendor interoperability is difficult because different implementations do not communicate well, and specialized hardware often requires vendor-specific "pragmas" or non-portable code. This makes it labor-intensive for developers to port high-level applications to new or diverse hardware sets. This paper proposes a cross-vendor abstraction layer for heterogeneous computing by leveraging the "built-in kernel" feature of the OpenCL standard.

Proposed Methodology: The Built-in Kernel Registry

The core innovation is a software abstraction based on OpenCL built-in kernels. This approach introduces a centralized "built-in kernel registry"—a standardized dictionary of function fingerprints (e.g., pocl.dnn.conv2d.nchw.f32) that defines exactly what a task does and how to call it.

Layered Architecture

The registry acts as a bridge between high-level tools and hardware-specific backends. High-level tools, such as the TVM compiler or OpenVX, query the registry to identify hardware capabilities. Below the registry, the hardware-specific backend implements these functions using hand-optimized libraries (like NVIDIA’s cuDNN or Intel’s oneDNN) or specialized FPGA bitstreams.

Implementation in PoCL

The system was implemented within PoCL (Portable Computing Language), an open-source OpenCL implementation. This allows a single OpenCL context to manage devices from multiple vendors simultaneously. If a device lacks a specialized implementation for a registry kernel, the system provides a "software fallback" using standard OpenCL C code, ensuring application continuity.

Experimental Evaluation

The researchers evaluated the abstraction using several real-world applications and standard datasets, including the Cityscapes dataset for semantic segmentation and YOLOv3-tiny for object detection.

Key Results

  • GPU Performance: On an NVIDIA RTX 2080 Ti, the PoCL-based abstraction achieved performance nearly identical to the native TVM/CUDA/cuDNN stack (approx. 110ms vs 115ms for accelerated convolution).
  • CPU Acceleration: By hooking into Intel’s oneDNN library via the abstraction, the authors achieved a 2.5x speedup on an Intel i7 CPU compared to standard compiled OpenCL code.
  • FPGA Integration: The system successfully drove a PYNQ-Z1 FPGA board for a real-time audio pipeline, handling microphone input and DNN processing without requiring the high-level application to manage FPGA-specific synthesis.
  • Object Detection: The YOLOv3-tiny test showed that using the abstraction for pre-processing was faster than standard CPU-based methods by minimizing data movement.

Discussion and Insights

The abstraction "hardens" complex operations into simple names, hiding hardware complexity. A developer only needs to know that a device supports a specific registry name, such as conv2d, without needing to understand the underlying implementation. Crucially, this demonstrates zero-overhead portability; by wrapping existing high-performance libraries, the layer adds negligible overhead.

Furthermore, the system allows for unified I/O, treating sensors (like microphones) as built-in kernels. This enables data to flow within a single asynchronous task graph, reducing CPU intervention and eliminating unnecessary data copies between different frameworks (e.g., OpenVX and TVM) sharing the same memory buffers.

Limitations and Future Work

As the registry grows to cover more data types and layouts, automated tools for management will be necessary. The authors also suggest moving toward "abstract operation graphs" where kernels are defined by their relationships to primitive operations. Finally, while task scheduling is handled, direct peer-to-peer communication between devices from different vendors (e.g., Xilinx FPGA to NVIDIA GPU) requires further hardware interface standardization.

Summary updated

BibTeX
@inproceedings{leppanen2022cross,
  author = {Topi Leppänen and Atro Lotvonen and Pekka Jääskeläinen},
  title = {{Cross-vendor programming abstraction for diverse heterogeneous platforms}},
  booktitle = {Frontiers in Computer Science},
  year = {2022},
  doi = {10.3389/fcomp.2022.945652},
}
Figure