CN-122019163-A - CPU multi-core resource intelligent collaborative scheduling method oriented to artificial intelligent acceleration
Abstract
The invention discloses an artificial intelligence acceleration-oriented CPU multi-core resource intelligent collaborative scheduling method, which relates to the technical field of processor resource scheduling and improves the utilization rate of CPU multi-core resources. According to the method, preference information factors are set for each CPU core node through historical calculation processing records to a core preference information field, task mirror image reports are generated based on AI tasks, the task mirror image reports are divided into task mirror image report fragments and input into the core preference information field, the task mirror image report fragments are matched with the best adaptation cores through matching results between the preference information factors and the task mirror image report fragments, corresponding CPU core routes are generated, the task mirror image report fragments are scheduled to the corresponding CPU cores based on the CPU core routes to execute and generate task results, terminal particles are connected with the task results, and further according to the dependency relationship of the task mirror image report fragments in the task mirror image report, the task results are connected with each other through the connection terminal particles in a time sequence mode, and the AI task results are obtained.
Inventors
- LI JUNJUN
- LIU CHAO
Assignees
- 成都正朝龙朗科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260129
Claims (9)
- 1. An artificial intelligence acceleration-oriented CPU multi-core resource intelligent collaborative scheduling method is characterized by comprising the following steps: Step S1, acquiring historical calculation processing records of each CPU core, establishing a core preference information field according to hardware attributes of the CPU cores, and setting preference information factors for each CPU core node to the core preference information field through the historical calculation processing records; Step S2, generating task mirror image reports based on AI tasks, dividing the task mirror image reports into task report fragments, inputting the task mirror image report fragments into a core preference information field, matching the task report fragments with the best adaptation cores through matching results between preference information factors and the task report fragments, and generating corresponding CPU core routes; And step S3, scheduling the task drawing fragments to the corresponding CPU cores based on the CPU core journey to execute and generate task results, connecting the task results with end grains, and further carrying out time sequence connection on the task results through the connecting end grains according to the dependency relationship of each task drawing fragment in the task mirror drawing to obtain the AI task results.
- 2. The intelligent collaborative scheduling method for CPU multi-core resources for artificial intelligence acceleration according to claim 1, wherein the process of obtaining the history calculation processing record of the CPU core includes: In the running process of the CPU multi-core system, distributed log acquisition buried points are deployed, and historical running records of each CPU core in the process of calculating AI tasks are captured in real time, wherein the historical running records comprise task types, time dimension data and resource consumption records; The time dimension data comprises task completion time length, task completion times and total execution times; The resource consumption records comprise the utilization rate of a CPU core and the cache hit rate of various original data resources in the process of executing the AI task by the task.
- 3. The intelligent collaborative scheduling method for CPU multi-core resources for artificial intelligence acceleration according to claim 2, wherein the establishing process of the core preference information field includes: extracting the hardware attribute of each CPU core by setting a hardware information reading interface, setting and editing each CPU core, setting a corresponding space topological structure according to the space structure distribution of the CPU cores in the CPU multi-core system, setting CPU core nodes in the space topological structure, inputting the hardware attribute into each CPU core node, and further obtaining a core preference information field.
- 4. The intelligent collaborative scheduling method for CPU multi-core resources for artificial intelligence acceleration according to claim 3, wherein the preference information factor is used for recording a data packet of each item of information of the CPU core, and the data packet includes computation load information, data affinity information and communication overhead information.
- 5. The intelligent collaborative scheduling method for CPU multi-core resources for artificial intelligence acceleration according to claim 4, wherein the task mirror drawing report generating process comprises the following steps: The AI task is decomposed into a plurality of atomic operations, the atomic operations are mutually matched, corresponding task nodes are arranged for each atomic operation according to a matching result, parallel-serial unidirectional connection operation is carried out on each task node, further task mirror image drawing is obtained, and a connecting line represents the dependency relationship among the atomic operations; Predicting the resource requirement of each atomic operation based on the dependency relationship in the task mirror drawing, and marking the resource requirement of each atomic operation on the corresponding task node: computing resources, namely estimating the required CPU instruction set support and CPU core utilization rate requirements according to the operation type and the calculated amount corresponding to the atomic operation; marking the type, storage position and data volume of the needed original resource data; And communication resources, namely if the atomic operation needs to interact data with other atomic operations, estimating the communication bandwidth requirement, otherwise, not estimating the communication bandwidth requirement.
- 6. The intelligent collaborative scheduling method for CPU multi-core resources for artificial intelligence acceleration according to claim 5, wherein the dividing process of task drawing fragments comprises: The task drawing fragments are local subunits of the task mirror drawing, each fragment corresponds to one or more closely related atomic operations, and the dividing rule comprises: the dependence strength is that if two atomic operations exist in the task mirror image drawing, the judgment rule passes, otherwise, the task mirror image drawing fragments cannot be formed; Setting a demand threshold, judging that task drawing fragments cannot be formed if the CPU core utilization rate demand of the task drawing fragments formed by a plurality of atomic operations is greater than the demand threshold, otherwise judging that the rule passes; And (3) data synchronization, namely preferentially dividing the operation of accessing the same original data resource into the same task drawing fragments.
- 7. The intelligent collaborative scheduling method for CPU multi-core resources for artificial intelligence acceleration according to claim 6, wherein the process of generating a CPU core trip comprises: Constructing a matching feature vector for each task drawing fragment, and constructing a core feature vector for each CPU core; Obtaining the similarity between the matching feature vector and the core feature vector by adopting a cosine similarity calculation method, and marking the similarity as the matching degree between the corresponding task drawing fragments and the CPU core; setting a matching degree threshold, and if the matching degree is larger than or equal to the matching degree threshold, selecting a CPU core with the highest matching degree as an optimal adaptation core; If the matching degree is not greater than or equal to the matching degree threshold value, triggering the adjustment of a preference information field, temporarily improving preference information factors related to the task drawing and reporting fragment demand, and judging whether the matching degree is greater than or equal to the matching degree threshold value after recalculating the matching degree; If the CPU cores with the matching degree larger than or equal to the matching degree threshold value still exist after adjustment, marking the task drawing fragments as high priority, preempting the CPU core with the lowest current CPU use rate, and marking the CPU core as the best adaptation core of the corresponding task drawing fragments; According to the sequence of atomic operation in the task drawing fragments, sequentially calling the corresponding optimal adaptation cores to form a CPU core journey, and outputting the CPU core journey in a form of a structured document, wherein the CPU core journey comprises CPU core numbers, the starting execution time and the ending time of each CPU core and a resource scheduling instruction which are arranged according to the execution sequence.
- 8. The intelligent collaborative scheduling method for CPU multi-core resources for artificial intelligence acceleration according to claim 7, wherein the process of setting connection telomeres for task results comprises: sequentially calling the task drawing fragments into corresponding CPU cores according to the CPU core journey, and sequentially calling the original data resources to execute the atomic operation in the task drawing fragments by the CPU cores according to the resource scheduling instruction in the CPU core journey; After all atomic operations are completed, a connection telomere is arranged on the task result, and the connection telomere structure comprises: The head part is used for quickly matching task results of task drawing fragments with dependency relations; The middle part is a time sequence code and records the time sequence position of the task result in the task mirror image drawing report; and the tail part is a check code, which is used for checking the check code through a CRC32 algorithm, and detecting whether the telomeres are damaged according to the checking result.
- 9. The intelligent collaborative scheduling method for CPU multi-core resources for artificial intelligence acceleration according to claim 8, wherein the process of performing time sequence splicing on task results comprises the following steps: According to the position distribution of task drawing fragments in a task mirror drawing, performing time sequence splicing on task results, firstly performing matching through the head of a connecting end grain based on the unidirectional serial relation of atomic operation in the task drawing fragments in the task mirror drawing, and performing main time sequence connection after tail verification; If the atomic operation is judged to have the unidirectional parallel relation in the process of connecting the main sequence, the branch time sequence connection of the task drawing fragments corresponding to the unidirectional parallel relation is first merged into the main time sequence connection result, and an AI task result is obtained after the time sequence connection of all the task drawing fragments is completed; When the task drawing fragments exist, a plurality of task results are generated according to the CPU core journey, and task result replacement of the corresponding task drawing fragments in the AI task results is realized through the time sequence code of the middle part of the connecting end grain.
Description
CPU multi-core resource intelligent collaborative scheduling method oriented to artificial intelligent acceleration Technical Field The invention relates to the technical field of processor resource scheduling, in particular to an artificial intelligent acceleration-oriented CPU multi-core resource intelligent collaborative scheduling method. Background In the age of rapid development of artificial intelligence today, the demand for computing resources for various types of artificial intelligence applications such as deep learning, natural language processing, image recognition, etc. has exhibited explosive growth. CPU is a core computing component of a computer system and plays a vital role in the task of artificial intelligence computing. However, with the increasing complexity and scale of artificial intelligence tasks, conventional CPU multi-core resource scheduling methods gradually expose a number of problems. On the one hand, conventional scheduling methods often lack sufficient consideration of CPU core hardware attributes. Different CPU cores have different performance performances when processing specific types of computing tasks due to the differences of hardware attributes such as architecture, cache size, processing speed and the like. However, the conventional scheduling method generally regards all cores as equivalent computing units, and simply performs task allocation, which results in that some cores may be inefficient because they are not suitable for processing the current task, while other cores that are more suitable are not fully utilized, resulting in waste of computing resources. On the other hand, conventional scheduling methods have difficulty in effectively coping with the complex nature of artificial intelligence tasks. Artificial intelligence tasks typically have a high degree of parallelism and data dependence, with complex dependencies between different task segments. The traditional scheduling method often cannot accurately grasp the dependency relationships when the tasks are distributed, so that waiting, blocking and other conditions frequently occur in the task execution process, and the execution efficiency and the overall performance of the tasks are seriously affected. In addition, the traditional scheduling method lacks dynamic optimization capability for the task execution process, cannot be flexibly adjusted according to the real-time execution condition of the task and the load state of the core, and further reduces the calculation efficiency of the system. Therefore, how to realize intelligent collaborative scheduling of CPU multi-core resources, improving the execution efficiency and the resource utilization rate of artificial intelligent tasks becomes a problem to be solved urgently in the current artificial intelligent computing field, and therefore, the intelligent collaborative scheduling method for the CPU multi-core resources for artificial intelligent acceleration is provided. Disclosure of Invention The invention aims to provide an artificial intelligence acceleration-oriented CPU multi-core resource intelligent collaborative scheduling method, which aims to solve the problem of the deficiency in the background technology. In order to achieve the above object, the present invention provides the following technical solutions: an intelligent collaborative scheduling method for CPU multi-core resources oriented to artificial intelligence acceleration comprises the following steps: Step S1, acquiring historical calculation processing records of each CPU core, establishing a core preference information field according to hardware attributes of the CPU cores, and setting preference information factors for each CPU core node to the core preference information field through the historical calculation processing records; Step S2, generating task mirror image reports based on AI tasks, dividing the task mirror image reports into task report fragments, inputting the task mirror image report fragments into a core preference information field, matching the task report fragments with the best adaptation cores through matching results between preference information factors and the task report fragments, and generating corresponding CPU core routes; And step S3, scheduling the task drawing fragments to the corresponding CPU cores based on the CPU core journey to execute and generate task results, connecting the task results with end grains, and further carrying out time sequence connection on the task results through the connecting end grains according to the dependency relationship of each task drawing fragment in the task mirror drawing to obtain the AI task results. Further, the process of obtaining the history calculation processing record of the CPU core includes: In the running process of the CPU multi-core system, distributed log acquisition buried points are deployed, and historical running records of each CPU core in the process of calculating AI tasks are captu