SuperKernel Development

SuperKernel is a binary fusion technology for operators. Different from source code fusion, SuperKernel focuses on the binary scheduling solution of kernel functions and performs in-depth optimization. Based on the compiled binary code, a super kernel function (SuperKernel) is created to call multiple other kernel functions (subkernels) by calling sub-functions. Compared with single-operator delivery, the SuperKernel technology can reduce the task scheduling waiting time and scheduling overhead, and further optimize the operator header overhead by utilizing the task gap resources.

  • SuperKernel applies only to static graphs.
  • SuperKernel is supported by the following models:
    • Atlas A3 training product / Atlas A3 inference product
    • Atlas 350 Accelerator Card

Supporting SuperKernel for Custom Operators

The development process for custom operators to support SuperKernel is similar to that of common operators. However, you need to pay attention to some specific restrictions (as described below). Currently, the SuperKernel feature can be used only in the PyTorch framework. Therefore, after integrating operators into a GE graph, you need to integrate them into a PyTorch graph by referring to Integrating Custom Operators to a Graph in PyTorch Graph Mode User Guide (TorchAir). In addition, TorchAir provides the capability of calibrating the scope of SuperKernel. You can annotate operators and configure optimizations within the fusion scope based on actual service requirements. For details, see "GE Graph Mode > GE Graph Mode Features > Marking the SuperKernel Scope in a Graph" in PyTorch Graph Mode User Guide (TorchAir).

The specific restrictions during development are as follows:

Performance Optimization Suggestions