Buffer Entry Management for Heterogeneous Computing Memory Utilization
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In existing data processing systems, buffers are allocated and released inefficiently, leading to low utilization of device memory during heterogeneous computing tasks, as they are applied for before the dependent task is initiated and released only after execution, resulting in idle periods.
Innovation Solution
A data processing method where the computer device obtains a buffer entry after executing the preceding task and before the successive task, allowing for buffer application or release at optimal times, thereby improving memory utilization.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the buffer is applied for in advance before the dependent task is initiated, then the buffer is ready for use when needed, but the buffer remains in an idle state during the period from task initiation to task execution, reducing device memory utilization
Solution Approach 1:
The patent applies preliminary action by pre-allocating buffer entries in the buffer management module before tasks are executed. The buffer entry is allocated when the task is submitted to the task scheduler, not when the task is initiated. This ensures the buffer is ready for use while minimizing the idle period, as the actual buffer memory is only allocated after the preceding task completes and before the successive task starts.
Solution Approach 2:
The patent implements dynamic buffer management where the buffer allocation timing is flexible and adaptive. The buffer is allocated dynamically based on task execution status - specifically, after the preceding task completes and before the successive task begins. This dynamic approach allows the system to optimize memory utilization by allocating buffers only when necessary, rather than statically pre-allocating them which would cause idle periods.
2Reliability
If the buffer is released only after the dependent task is executed, then the buffer is available during the entire task execution period, but the buffer remains idle after task completion until the application routine module synchronously returns, further reducing device memory utilization
Solution Approach 1:
The patent applies preliminary action in reverse (post-action) by arranging for the buffer to be released immediately after the successive task completes execution, rather than waiting for the application routine module to synchronously return. The buffer management module monitors task completion and triggers buffer release automatically, ensuring the buffer is freed as soon as it's no longer needed, thus minimizing idle time and improving device memory utilization.
3Reliability
If the application routine module synchronously waits for task execution, then task completion is ensured, but the buffer cannot be released earlier even after task completion, extending the idle period
Solution Approach 1:
The patent implements feedback mechanisms where the buffer management module continuously monitors task execution status through callbacks or interrupts. When the successive task completes execution, the buffer management module receives feedback and automatically triggers buffer release, independent of the application routine module's synchronous wait status. This decouples buffer release timing from application synchronization, allowing the buffer to be freed immediately upon task completion and reducing idle time.
Solution Approach 2:
The buffer management module performs self-service by automatically managing buffer allocation and release based on task execution status without requiring explicit synchronization with the application routine module. The system autonomously determines when buffers should be allocated and released based on task completion feedback, eliminating the need for the application routine module to hold buffers during its synchronous wait period.
Data Source
Figure 1-A
Figure 1-B~2
Figure 3A
AI summary
Embodiments of this application disclose a data processing method. The method in the embodiments of this application includes: generating, by a computer device, a target task, where the target task includes a buffer application task or a buffer release task, the target task is a successive task of a first task and is a preceding task of a second task, the first task and the second task are to-be-executed tasks between which there is a sequential dependency relationship, and when the target task is the buffer application task, a buffer corresponding to the buffer application task is used when the second task is executed, or when the target task is the buffer release task, a buffer corresponding to the buffer release task is used when the first task is executed; and after a preceding task of the target task is executed and before a successive task of the target task is executed, obtaining, by the computer device based on the target task, a buffer entry corresponding to the target task, where the buffer entry is an entry including a memory size of a buffer corresponding to the target task, a memory location of the buffer, and a memory address of the buffer, and executing the target task to apply for or release the buffer corresponding to the target task.