Kernel Operator Generation with Layered APIs for Hardware Portability
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing deep neural network frameworks require separate development of Kernel functions for each operator, leading to inefficiencies in hardware adaptation and maintenance due to differing implementations across hardware platforms.
Innovation Solution
A method and apparatus for generating operators by constructing a group of basic application programming interfaces (APIs) for access, storage, and computing functions, and a kernel API to implement operator logic, allowing for the generation of target kernel operators adaptable to different hardware architectures.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of manufacture
If separate Kernel functions are developed for each operator, then operator functionality is achieved, but development complexity and maintenance burden increase significantly
Solution Approach 1:
The patent segments the Kernel implementation into two distinct layers: a unified Kernel interface layer that handles hardware-specific operations, and operator-specific logic layers that can be independently developed. This segmentation allows each operator to be developed without directly implementing hardware-specific kernels, reducing overall system complexity while maintaining functionality.
Solution Approach 2:
The patent introduces a Kernel interface as an intermediary layer between the operator logic and hardware implementation. This intermediary abstracts hardware-specific details, allowing operators to be developed independently while the Kernel interface handles the complexity of hardware adaptation, thereby reducing both development and maintenance burden.
2Adaptability or versatility
If separate Kernel implementations are created for each hardware platform, then hardware adaptability is achieved, but the number of Kernels to maintain increases
Solution Approach 1:
The patent creates a universal Kernel interface that can work with multiple hardware platforms through a standardized approach. Rather than creating separate Kernel implementations for each operator-hardware combination, the unified interface handles hardware-specific operations, allowing the same operator logic to be deployed across different hardware platforms without increasing the number of Kernel implementations.
Solution Approach 2:
The patent resolves the hardware adaptability problem by adding an abstraction dimension. Instead of varying Kernel implementations across the operator-hardware matrix, the solution introduces a Kernel interface layer that absorbs hardware variability, allowing operators to remain hardware-agnostic while achieving platform adaptability through the standardized interface.
3Reliability
If individual Kernel operators are upgraded for each hardware platform, then hardware optimization is achieved, but maintenance time and resources increase
Solution Approach 1:
The patent segments maintenance activities into two independent parts: operator logic updates and Kernel interface optimizations. This segmentation allows operator upgrades to be performed independently of hardware-specific Kernel implementations, significantly reducing maintenance time and resources while maintaining hardware optimization through the specialized interface layer.
Solution Approach 2:
The Kernel interface acts as a mediator that isolates hardware-specific optimization work from operator logic. When hardware optimizations are needed, only the Kernel interface layer requires modification, not the entire operator implementation. This intermediary structure dramatically reduces maintenance burden while preserving hardware optimization benefits.
4Productivity
If a unified Kernel interface is used across hardware platforms, then development efficiency is improved, but hardware-specific optimizations may be lost
Solution Approach 1:
The patent applies local quality by making the Kernel interface hardware-specific while keeping operator logic hardware-agnostic. Each Kernel interface implementation is locally optimized for its target hardware platform, preserving hardware-specific optimizations. Meanwhile, the unified operator logic benefits from simplified development, achieving both high productivity and hardware performance.
Data Source
AI summary
A method and apparatus for generating an operator are provided. The method includes: constructing a group of basic application programming interfaces for providing one of the following basic functions: an access function, a storage function, and a computing function; constructing a kernel application programming interface for invoking the basic application programming interfaces to implement an operator logic; and generating a target kernel operator based on the group of basic application programming interfaces and the kernel application programming interface.


