Sorting Operator Compilation With Axis Splitting for Parallel Data
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing AI compilation frameworks for sorting operators suffer from low execution efficiency and lack schedule optimization, particularly in scenarios requiring multi-dimensional data sorting, such as target detection.
Innovation Solution
A method and apparatus that separate computation description from scheduling policy, allowing for the optimization of sorting operators by splitting the sorting axis into inner and outer axes, and performing merge sorting on data blocks to adapt to hardware computing capabilities, enhancing execution efficiency and adaptability.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If the sorting operator is compiled using existing AI compilation frameworks, then the sorting functionality is achieved, but the execution efficiency of the compiled sorting operator is low
Solution Approach 1:
The sorting operation is segmented by splitting the sorting axis into inner axis and outer axis, dividing the data into multiple data blocks that can be processed in parallel. This segmentation enables the sorting operator to utilize hardware parallelism capabilities, thereby improving execution efficiency without significantly increasing compilation time.
2Productivity
If the sorting axis is split into inner and outer axes to optimize sorting, then execution efficiency is improved, but the complexity of the sorting process increases
Solution Approach 1:
The sorting axis is segmented into inner and outer axes, creating a hierarchical sorting structure. This segmentation transforms a single complex sorting operation into multiple simpler sorting operations that can be executed in parallel, improving sorting speed while managing complexity through structured organization.
Solution Approach 2:
The sorting process transitions from a one-dimensional approach to a two-dimensional hierarchical structure by introducing inner and outer axes. This dimensional change enables parallel processing of data blocks along the outer axis while maintaining sorted order within each block along the inner axis, thereby improving sorting efficiency.
3Productivity
If merge sorting is performed on data blocks, then the sorting performance is enhanced, but the memory usage increases
Solution Approach 1:
The data is segmented into multiple data blocks that are sorted independently using merge sorting. This segmentation allows the sorting algorithm to process smaller chunks of data at a time, improving overall sorting performance while managing memory usage by processing data in manageable segments rather than loading entire datasets into memory simultaneously.
Data Source
AI summary
A method for compiling a sorting operator includes receiving a sorting parameter input by a user and a first primitive selected for invocation, where the sorting parameter and the first primitive are used to sort multi-dimensional data; generating a scheduling policy for the sorting operator based on the sorting parameter and the first primitive; and compiling a computation description and the scheduling policy for the sorting operator to obtain a sorting computation expression including the scheduling policy.


