Time allocation methods, apparatus, computer equipment and storage media for operator graphs

By allocating runtime periods to operator graphs in the many-core system and meeting their runtime requirements, the problem of unreasonable operator graph runtime configuration is solved, thereby improving resource utilization and the utilization of core resources.

CN115269166BActive Publication Date: 2026-05-26LYNXI TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
LYNXI TECH CO LTD
Filing Date
2021-04-29
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

The operation configuration of operator graphs in the existing technology is unreasonable, resulting in low utilization of computing resources and serious waste of resources.

Method used

In a many-core system, by acquiring operator graphs configured with operational requirements information, the operational cycle is divided into multiple time periods according to these requirements, and a time period is assigned to each operator graph to ensure that the operational requirements are met within the assigned time period.

Benefits of technology

It improves the time resource utilization of operator graphs in many-core systems, reduces resource waste, rationally allocates runtime cycles, and improves the utilization of core resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115269166B_ABST
    Figure CN115269166B_ABST
Patent Text Reader

Abstract

This invention discloses a time allocation method, apparatus, computer device, and storage medium for operator graphs. The method includes: obtaining a first operator graph configured with runtime requirement information from a set of operator graphs to be run on a many-core system; dividing the runtime cycle into multiple runtime periods according to the runtime requirement information of each first operator graph, and allocating runtime periods to each first operator graph; wherein the runtime data of the first operator graph within the allocated runtime period satisfies the runtime requirement information under the runtime cycle. This invention can rationally configure the runtime mode of operator graphs, improving the utilization rate of core resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of artificial intelligence, and in particular to a time allocation method, apparatus, computer device and storage medium for operator graphs. Background Technology

[0002] In recent years, with the rapid development of artificial intelligence applications and technologies, the requirements for computing power and power efficiency have been increasing. However, some related technologies suffer from drawbacks such as unreasonable configuration of operator graphs. Summary of the Invention

[0003] This invention provides a time allocation method, apparatus, computer device, and storage medium for operator graphs, which can reasonably configure the operation mode of operator graphs and improve the utilization rate of core resources.

[0004] In a first aspect, embodiments of the present invention provide a time allocation method for operator graphs, applied to many-core systems, including:

[0005] In the set of operator graphs to be run on many-core systems, obtain the first operator graph configured with runtime requirements information;

[0006] According to the operation requirements information of each first operator graph, the operation cycle is divided into multiple operation time periods, and an operation time period is assigned to each first operator graph;

[0007] The running data of the first operator graph within the allocated running time period satisfies the running requirements information under the running cycle.

[0008] Secondly, embodiments of the present invention also provide an operator graph time allocation device configured in a many-core system, comprising:

[0009] The first operator graph acquisition module is used to acquire the first operator graph with configuration of running requirements information from the set of operator graphs to be run on the many-core system.

[0010] The running time period division module is used to divide the running cycle into multiple running time periods according to the running requirements information of each first operator graph, and to allocate a running time period to each first operator graph; wherein, the running data of the first operator graph within the allocated running time period satisfies the running requirements information under the running cycle.

[0011] Thirdly, embodiments of the present invention also provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the time allocation method of the operator graph as described in any of the embodiments of the present invention.

[0012] Fourthly, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the time allocation method for operator graphs as described in any of the embodiments of the present invention.

[0013] This invention provides a new method for allocating time to operator graphs in a many-core system by allocating a running time period to a first operator graph configured with running requirement information during the running cycle, and ensuring that the running data of the first operator graph during the allocated running time period meets the running requirement information under the running cycle. This method rationally configures the running cycle of the many-core system while taking into account the running requirement information of the operator graph, thereby improving the utilization rate of time resources and reducing the waste of many-core system resources. Attached Figure Description

[0014] Figure 1 This is a flowchart of an operator graph time allocation method according to Embodiment 1 of the present invention;

[0015] Figure 2 This is a schematic diagram of the structure of an operator graph time allocation device according to Embodiment 2 of the present invention;

[0016] Figure 3 This is a schematic diagram of the structure of a computer device according to Embodiment 3 of the present invention. Detailed Implementation

[0017] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.

[0018] Figure 1 This is a flowchart of a time allocation method for an operator graph according to Embodiment 1 of the present invention. This embodiment is applicable to situations where resources are allocated to an operator graph based on its runtime requirements. This method can be executed by the time allocation device for the operator graph provided in this embodiment of the invention. This device can be implemented in software and / or hardware and is generally integrated into computer equipment. Figure 1 As shown, the method in this embodiment includes:

[0019] Any embodiment of the present invention is applied to a many-core system, which includes allocable core resources.

[0020] In this context, allocatable core resources refer to cores specifically allocated to operator graphs. A core is the smallest independently schedulable unit with full computational capabilities, possessing its own storage and computational resources. In addition to allocatable core resources, computer equipment resources also include core resources allocated to non-operator graph programs to run other programs. Computer equipment executing operator graph time allocation methods includes many-core systems, which are used to run multiple operator graphs simultaneously. Many cores consist of a large number (potentially hundreds or thousands in the future) of various types of cores connected in a pre-defined manner, possessing high-performance parallel processing capabilities.

[0021] S110: Obtain the first operator graph with runtime requirement information from the set of operator graphs to be run on the many-core system.

[0022] The operator graph set can refer to a collection of operator graphs running in a many-core system. Runtime requirement information refers to the performance requirements of the corresponding operator graph. Runtime requirement information can be configured by the user. For example, runtime requirement information includes the minimum running speed and / or minimum running accuracy of the operator graph with configured runtime requirement information. The first operator graph refers to the operator graph in the operator graph set that has configured runtime requirement information. An operator graph with configured runtime requirement information indicates that its running data matches the runtime requirement information. Operator graphs without configured runtime requirement information have no performance restrictions or requirements and can be allocated any number of core resources greater than zero.

[0023] The set of operator graphs includes at least one operator graph. An operator graph can include at least one operator; when an operator graph includes at least two operators, the output of the preceding operator serves as the input of the adjacent following operator. Operators can refer to algorithms such as convolution, addition, subtraction, multiplication, division, or matrix addition and multiplication. Operator graphs are used to implement specific functions and can refer to high-performance computing algorithms. Operator graphs can include, but are not limited to, AI algorithms, machine learning algorithms, and general scientific computing algorithms. More specifically, for example, an operator graph can be a deep learning model or a neural network. Multiple operator graphs can be allocated resources. At least two operator graphs can be independent or dependent, where the output of the first operator graph serves as the input of the second. Operator graphs require resources to run; core resources are allocated to the operator graphs to run them, compute the input data, obtain the output data, and thus achieve the specific function.

[0024] Optionally, the operator graph includes: a neural network model or at least one network included in the neural network model.

[0025] In this context, an operator graph can be the entirety or a part of a neural network model. It can be understood as an operator graph used to implement a complete specific function, or a portion of a specific function. For example, an operator graph can be a neural network model, or a collection of networks consisting of at least one network within a neural network model.

[0026] In some optional embodiments, the operator graph may include a model formed by an image detection network and a speech recognition network, or the operator graph may only include an image detection network, or the operator graph may only include a speech recognition network. Similarly, the operator graph may include a model formed by an image detection network and an object recognition network, or the operator graph may only include an image detection network, or the operator graph may only include an object recognition network.

[0027] By configuring the operator graph as the entire model or as a part of the network included in the model, the application scenarios of the operator graph that the chip can execute can be enriched, as well as the business models of the operator graph, while improving the utilization rate of core resources.

[0028] S120, according to the operation requirement information of each first operator graph, the operation cycle is divided into multiple operation time periods, and an operation time period is assigned to each first operator graph; wherein, the operation data of the first operator graph within the assigned operation time period satisfies the operation requirement information under the operation cycle.

[0029] The runtime cycle refers to the preset runtime of the many-core system, which repeats the runtime cycle cyclically. One runtime cycle is the time required for the many-core system to complete one execution of the computational tasks corresponding to all operator graphs in the operator graph set. Runtime data describes the performance of the current operator graph within the current processing runtime period. The runtime data of operator graphs configured with runtime requirements must meet the configured runtime requirements. A runtime period refers to a portion of the runtime cycle, and its duration is shorter than the runtime cycle. The first operator graph is loaded into the many-core system and runs within its allocated runtime period, and is removed from the many-core system at the end of the allocated runtime period. The runtime period can be divided based on the number of first operator graphs. For example, if there are 8 first operator graphs, the runtime cycle can be divided into 4 runtime periods of equal duration, with two first operator graphs running in each runtime period. Different first operator graphs can be assigned the same or different runtime periods.

[0030] In one possible implementation, the on-chip memory of the many-core system cannot hold all the operator graphs included in the operator graph set at once. Therefore, the operator graphs need to be loaded into the many-core system in batches to achieve time-sharing execution within the many-core system. The time period during which the operator graphs run in the many-core system is called the execution time period. On-chip memory can refer to the allocatable storage resources in the many-core system or the chip's memory, used to store the data associated with the operator graph set. If the on-chip memory is smaller than the space occupied by the operator graph set, it indicates that the chip cannot store (or fit) the operator graph set at the same time. If the on-chip memory is smaller than the space occupied by the operator graph set and cannot hold the entire set, a portion of the operator graphs can be loaded first. After the partial operator graphs have completed execution and obtained the output results, the partial operator graphs are removed from the on-chip memory, and the remaining operator graphs are loaded into the on-chip memory to run the remaining portion of the operator graphs, continuing the calculation, and so on, until the final result is obtained.

[0031] Dividing the runtime cycle into multiple runtime periods can be achieved by pre-allocating a period shorter than the runtime cycle as the current runtime period. For each first operator graph, it is placed into the many-core system to run within that runtime period, and runtime data is collected. If the runtime data meets the runtime requirements, the runtime period is determined to be the runtime period for that first operator graph. If the runtime requirements are not met, the first operator graph is determined to be mismatched with that runtime period. This process continues until all unassigned first operator graphs have been determined to be running within a runtime period. Based on the number of unassigned first operator graphs, the remaining runtime cycle is then divided into the next runtime period, and the unassigned first operator graphs are again determined to be running within the currently allocated runtime period. This process continues until all first operator graphs have been assigned, at which point the runtime period division is considered complete. Here, an unassigned first operator graph may refer to a first operator graph that has not yet been assigned a runtime period within the currently allocated runtime period.

[0032] This invention provides a new method for allocating time to operator graphs in a many-core system by allocating a running time period to a first operator graph configured with running requirement information during the running cycle, and ensuring that the running data of the first operator graph during the allocated running time period meets the running requirement information under the running cycle. This method rationally configures the running cycle of the many-core system while taking into account the running requirement information of the operator graph, thereby improving the utilization rate of time resources and reducing the waste of many-core system resources.

[0033] Optionally, the step of dividing the running cycle into multiple running time periods according to the running requirement information of each first operator graph and allocating a running time period to each first operator graph includes: alternately executing the operation of dividing a running time period within the running cycle, and determining the operation of each target first operator graph running within the divided running time period according to the running requirement information of each first operator graph to be allocated, until a matching running time period is allocated to all first operator graphs within the running cycle.

[0034] In one possible implementation, the running time periods are determined one by one. When a running time period is divided, it is checked whether the first operator graph to be assigned is the target first operator graph. That is, it is checked whether the running data of the first operator graph to be assigned during the running time period meets the configured running requirements. Thus, the operation of dividing the running time period and the operation of determining the target first operator graph within the running time period are executed alternately.

[0035] The target first operator graph refers to the first operator graph in which the running data within the divided running time period satisfies the configured running requirements. The target first operator graph matches the currently divided running time period.

[0036] In one possible implementation, after dividing the runtime into a runtime period, the system checks whether the runtime data obtained by each first operator graph during that runtime period meets the runtime requirements. If it does, the first operator graph is identified as the target first operator graph for that runtime period. If it does not, the first operator graph is determined to be mismatched with the runtime period, i.e., it is not the target first operator graph for that runtime period. After all operator graphs have been checked for matching with the runtime period, the system divides into the next runtime period and checks whether the runtime data obtained by the remaining first operator graphs during that runtime period meets the runtime requirements, and so on.

[0037] By alternately executing the operations of dividing the running time period and determining the target first operator graph within the running time period, the running time period can be quickly and accurately divided into running time periods. For each running time period, the matching target first operator graph is sequentially determined in the first operator graph to be assigned, reducing the omission of first operator graphs, improving the accuracy of running time period allocation, improving the utilization rate of the running cycle, and ensuring that each first operator graph can meet the configured running requirements information, thereby rationally allocating the resources of the many-core system and improving the resource utilization rate of the many-core system.

[0038] Optionally, based on the operational requirements of each of the currently to-be-assigned first operator graphs, determine each target first operator graph running within the divided operational time period, including: determining each target first operator graph running within the divided operational time period based on the intra-segment requirements obtained by converting the operational requirements of the currently to-be-assigned first operator graph to the divided operational time period, and the operational data of the currently to-be-assigned first operator graph within the divided operational time period.

[0039] The segment-specific demand information is used to determine whether the divided running time period matches the running time period of the first operator graph, that is, to determine whether the first operator graph is the target first operator graph running within the divided running time period. The segment-specific demand information matches the running demand information; the running demand information is the demand information within the running cycle, while the segment-specific demand information is the demand information within the divided running time period. The segment-specific demand information can be determined based on the running cycle, the duration of the divided running time period, and the running demand information. For example, the product of the ratio of the running cycle to the duration of the divided running time period and the corresponding value of the running demand information is the value corresponding to the segment-specific demand information.

[0040] In essence, the operational requirements information of the first operator graph refers to the requirements that need to be met throughout the entire operational cycle. The first operator graph runs within its allocated time slots and does not run within unallocated time slots. This means that the operational data of the first operator graph within its allocated time slots must also meet certain requirements within the unallocated time slots. Accordingly, the operational requirements information can be mapped to the divided time slots, becoming segment-specific requirements information. This segment-specific requirements information is then compared with the operational data of the first operator graph to check whether the operational data of the first operator graph meets the segment-specific requirements, thereby determining whether the operational data of the first operator graph meets the operational requirements for the entire operational cycle.

[0041] By converting the operational demand information under the operational cycle into the intra-segment demand information within the operational time period, and based on the intra-segment demand information, detecting whether the operational data of the first operator graph within the operational time period meets the intra-segment demand information, it is possible to determine whether the first operator graph matches the operational time period. This can accurately determine whether the operational data of the first operator graph within the operational time period meets the operational demand information under the operational cycle, thereby accurately determining the target first operator graph that matches the operational time period, improving the accuracy of operational time period allocation, and precisely meeting the operational demand information configured for each first operator graph.

[0042] Optionally, based on the segmental demand information obtained by converting the current first operator graph to be allocated into the divided running time period, and the running data of the current first operator graph to be allocated within the divided running time period, the target first operator graphs running within the divided running time period are determined, including: determining the current operator graph among the current first operator graphs to be allocated; determining the segmental demand information of the current operator graph within the divided running time period based on the running demand information of the current operator graph, the duration within the divided running time period, and the running cycle; obtaining the running data of the current operator graph within the divided running time period; determining the current operator graph as the target first operator graph when the current operator graph meets the performance conditions based on the segmental demand information and the running data; returning to the operation of determining the current operator graph among the current first operator graphs to be allocated, until the end allocation condition is met.

[0043] In the currently pending first operator graph, one first operator graph is selected as the current operator graph. For example, the current operator graph can be determined based on the priority of each first operator graph. For example, the priority can be whether the first operator graph has a temporal relationship, and whether the temporal relationship to which the first operator graph with a temporal relationship belongs contains a first operator graph with an assigned runtime period. The order of priority from high to low can be: pending first operator graphs with a temporal relationship to the first operator graph with an assigned runtime period, all pending first operator graphs with a temporal relationship, and all pending first operator graphs without a temporal relationship. Two first operator graphs with a temporal relationship have a dependency relationship in their input data and / or output data.

[0044] The ratio between the numerical value corresponding to the current operator graph's runtime requirement information and the numerical value corresponding to the segment requirement information within the divided runtime time period corresponds to the ratio between the runtime cycle and the duration within the divided runtime time period. For example, the former is inversely proportional to the latter. Performance conditions are used to determine whether the current operator graph's runtime data meets the segment requirement information. The end-of-allocation condition is used to determine whether the current first operator graph to be allocated has been completely evaluated. For example, the end-of-allocation condition is that the matching results between the current first operator graph to be allocated and the runtime time period have been determined, and there is no further first operator graph to be allocated.

[0045] By iteratively determining whether each first operator graph is the target first operator graph running within the running time period, the matching relationship between each first operator graph and the running time period is determined, thereby accurately allocating running time periods to each first operator graph and avoiding omission of first operator graphs. At the same time, each first operator graph needs to be determined whether it meets the performance requirements. Running time periods can be allocated when the running requirements of the first operator graph are accurately met, improving the flexibility and control precision of running time period allocation.

[0046] Optionally, two first operator graphs that have a temporal relationship may be assigned the same or adjacent running time periods.

[0047] Temporal relationships include sequential temporal relationships and / or parallel temporal relationships. At least two operator graphs with a sequential temporal relationship can mean that the dependencies of at least two operator graphs on data are sequential in time; for example, the input data of the first operator graph is the output data of the second operator graph. At least two operator graphs with a parallel temporal relationship can mean that the dependencies of at least two operator graphs on the same data are simultaneous; one input data is input into two operator graphs for computation. For operator graphs with temporal relationships, data flows sequentially from beginning to end. When a parallel temporal relationship is encountered, the data is simultaneously delivered to all operator graphs with parallel temporal relationships.

[0048] Two operator graphs with a temporal relationship have data dependencies. If at least two operator graphs with a temporal relationship run in different time periods, intermediate data from the previous time period needs to be retained until the next time period or more. This results in storing a large amount of intermediate data, consuming excessive storage resources, and wasting storage resources. Therefore, placing operator graphs with a temporal relationship in the same time period or in two adjacent time periods can reduce the storage time of intermediate data, release storage resources for intermediate data in a timely manner, and improve the utilization rate of storage resources.

[0049] It should be noted that the serial timing relationship between two operator graphs with a serial timing relationship corresponds to the timing of the running time period. For example, the operator graph with the earlier timing relationship runs in the running time period with the earlier timing relationship, while the operator graph with the later timing relationship runs in the running time period with the later timing relationship.

[0050] By placing operator graphs with temporal relationships in the same runtime period or in two adjacent runtime periods, the storage time of intermediate data can be reduced, storage resources for intermediate data can be released in a timely manner, and the utilization rate of storage resources can be improved.

[0051] Optionally, the operation demand information includes the operation demand speed, and the segment demand information includes the segment demand speed; determining the segment demand information of the current operator graph within the divided operation time period includes: calculating the ratio of the operation cycle to the duration corresponding to the divided operation time period; calculating the product of the operation demand speed and the ratio to determine the segment demand speed.

[0052] The running data is the average speed of the current operator graph within the divided running time period, and the running requirement information is the running requirement speed. The intra-segment requirement information is the intra-segment requirement speed. The average speed of the current operator graph is the speed at which the operator graph calculates the output data based on the received random data. Running requirement information can be divided into running requirement information for a single image and running requirement information for multiple images. The latency in the running requirement information for a single image is not negligible, but it can be ignored for multiple images. The running requirement information in the above scheme can be running requirement information over a period of time, not for a single image. The ratio of intra-segment requirement speed to running requirement speed is equal to the ratio of the running cycle to the duration corresponding to the divided running time period.

[0053] By configuring the specific content of the running data and the corresponding calculation method, the running performance of the first operator graph can be accurately determined, so that the operator graph can be allocated running time periods in the direction of meeting performance requirements. This can meet diverse performance requirements, flexibly configure the running mode of the operator graph, and enrich the application scenarios of the operator graph.

[0054] Optionally, determining that the current operator graph meets the performance conditions includes: if it is determined that the running speed of the current operator graph is greater than or equal to the required speed within the segment, then the current operator graph is determined to meet the performance conditions.

[0055] The running data of the current operator graph within the defined running time period constitutes the running speed of the current operator graph. If it is determined that the running speed of the current operator graph is greater than or equal to the required speed within the segment, then the current operator graph is determined to meet the performance conditions, that is, the running data within the running time period meets the running requirements, and the current operator graph is the target first operator graph running within the running time period. If it is determined that the running speed of the current operator graph is less than the required speed within the segment, and it is determined that the current operator graph does not meet the performance conditions, that is, the running data within the running time period does not meet the running requirements, the current operator graph is not the target first operator graph running within the running time period.

[0056] By analyzing the actual running speed of the current operator graph and the required speed within the segment, it is possible to detect whether the current operator graph matches the running time period. This allows for precise control of the running cycle of each operator graph, flexible configuration of time-sharing reuse of core resources, and improved utilization of core resources.

[0057] Optionally, obtaining the running data of the current operator graph within the divided running time period includes: obtaining the allocable core resources of the many-core system; obtaining the target core resources corresponding to the determined target first operator graph within the divided running time period; determining the remaining core resources of the divided running time period based on the allocable core resources and the target core resources of each target first operator graph; and running the current operator graph using the remaining core resources to determine the running data of the current operator graph within the divided running time period.

[0058] Allocable core resources refer to the cores that the many-core system can allocate to operator graph computation. The determined target first operator graph can refer to the first operator graph matched within the defined time period, i.e., the first operator graph whose running data within the defined time period satisfies the performance conditions. The target core resources corresponding to the determined target first operator graph can refer to the core resources already allocated to the target first operator graph within the defined running time period from the allocable core resources available within that time period. The remaining core resources within the defined running time period can refer to the difference between the allocable core resources and the target core resources corresponding to the determined target first operator graph. Running the current operator graph with the remaining core resources to determine the running data of the current operator graph within the defined running time period can refer to running the current operator graph with all remaining allocable core resources to determine the running data of the current operator graph. If the running data obtained by running the current operator graph with the remaining core resources cannot make the current operator graph meet the performance conditions, it indicates that the many-core system cannot make the current operator graph meet the performance conditions within the running time period, thus determining that the current operator graph does not match the running time period.

[0059] It's important to note that the remaining core resources differ from the core resources ultimately allocated to the current operator graph during its runtime. The remaining core resources are used to determine whether the many-core system within the defined time period still has the capacity to meet the operational requirements of the current operator graph. In contrast, the core resources allocated to the current operator graph refer to the minimum core resources allocated while still meeting the configured operational requirements. This allows for the allocation of remaining resources to other operator graphs, improving core resource utilization, even after fulfilling the current operator graph's operational needs.

[0060] By calculating the remaining core resources and running the current operator graph with the remaining core resources, the running data of the current operator graph can be determined. This allows for an accurate assessment of whether the many-core system can meet the running requirements of the current operator graph within the divided running time period. It also enables a precise evaluation of the remaining computing power of the many-core system, thereby accurately allocating the required time period to each first operator graph and providing a precise allocation method for the running time period of the operator graph.

[0061] Optionally, the time allocation method for the operator graph further includes: when it is determined that the set of operator graphs includes a second operator graph and there are remaining core resources for the target running time period, allocating the target running time period to at least one second operator graph, wherein the second operator graph is not configured with running requirement information.

[0062] Operator graphs without configured runtime requirements have no performance limitations and can be allocated any number of core resources greater than zero. After allocating runtime periods for all first operator graphs, a runtime period is selected as the target runtime period, and this process continues until all runtime periods have been traversed. A runtime period can be selected sequentially. If there are remaining core resources for the target runtime period, these can be allocated to any second operator graph. For example, the allocation method can be determined based on the number of second operator graphs. For instance, if the remaining core resources are greater than or equal to the number of second operator graphs, the target runtime period can be allocated to all second operator graphs, or a subset of second operator graphs can be allocated to the target runtime period; if the remaining core resources are less than the number of second operator graphs, a subset of second operator graphs can be allocated to the target runtime period. The selection of some second operator graphs can be based on priority. The priority order can be: second operator graphs to be assigned that have a temporal relationship with operator graphs in the currently assigned time period or the previous time period adjacent to the already assigned time period; second operator graphs in unassigned time periods; all second operator graphs to be assigned that have a temporal relationship; and all second operator graphs to be assigned that do not have a temporal relationship. Two second operator graphs with a temporal relationship have a dependency relationship in their input and / or output data.

[0063] After the first operator graph is allocated, the second operator graph can be allocated to each running time period to make full use of the core resources in each running time period, thereby improving the utilization rate of core resources and reducing the waste of core resources.

[0064] Optionally, dividing a running time period within the running cycle includes: dividing the running cycle into a first running time period based on the starting time of the running cycle and a preset duration; or dividing the currently unassigned first operator graphs to determine the number of groups formed by the division; determining the remaining duration based on the running cycle and the durations corresponding to the divided running time periods; dividing the remaining duration according to the number of groups to obtain sub-durations; and dividing a running time period within the running cycle based on the end point of the last running time period in the time sequence and the sub-durations.

[0065] The starting point of the running cycle is determined as the starting point of the first running time segment, and the preset duration is determined as the duration of the first running time segment. Based on the starting point and duration of the first running time segment, the first running time segment can be determined within the running cycle. The preset duration can be determined based on the running requirements information of each first operator graph, or it can be determined based on the average running cycle of the first operator graphs as statistically analyzed in experiments, or it can be determined by calculating the ratio between the running cycle and the number of groups formed by the currently assigned first operator graphs.

[0066] Apart from the first running time period, the division of other running time periods is determined by the number of groups and the remaining time, and the end point of the last running time period in the time sequence.

[0067] The number of groups is used to divide the remaining time. The number of groups can be calculated as the ratio between the number of first operator graphs to be assigned and the number of first operator graphs in the group, based on the number of first operator graphs in the preset group. For example, if the number of first operator graphs in the group is 2 and the number of first operator graphs to be assigned is 8, the number of groups is 8 / 2 = 4.

[0068] The difference between the running cycle and the sum of the durations of each of the pre-divided running time periods is determined as the remaining time. The ratio of the remaining time to the number of groups is determined as the minute duration. For example, if the number of groups is 4 and the remaining time is 8 minutes, then the minute duration is determined to be 8 / 4 = 2 minutes.

[0069] The end point of the last running time period in the divided running time period is taken as the starting point of the running time period other than the first time period. Based on the time length, the running time period other than the first time period is determined in the running cycle.

[0070] By providing a way to divide the runtime, the duration of the runtime can be flexibly adjusted in real time according to the number of each first operator graph to be allocated. This allows for precise control of the runtime of each first operator graph, reasonable configuration of the runtime of the many-core system, improved utilization and flexibility of time resources, and reduced waste of many-core system resources.

[0071] Example 2

[0072] Figure 2 This is a schematic diagram of a time allocation device for an operator graph according to Embodiment 2 of the present invention. Embodiment 2 is a corresponding device for implementing the time allocation method for an operator graph provided in the above embodiments of the present invention. This device can be implemented in software and / or hardware, and is generally integrated into computer devices, specifically in many-core systems.

[0073] The first operator graph acquisition module 210 is used to acquire the first operator graph with configuration of running requirement information from the set of operator graphs to be run on the many-core system.

[0074] The running time period division module 220 is used to divide the running cycle into multiple running time periods according to the running requirement information of each first operator graph, and to allocate a running time period to each first operator graph; wherein, the running data of the first operator graph within the allocated running time period satisfies the running requirement information under the running cycle.

[0075] This invention provides a new method for allocating time to operator graphs in a many-core system by allocating a running time period to a first operator graph configured with running requirement information during the running cycle, and ensuring that the running data of the first operator graph during the allocated running time period meets the running requirement information under the running cycle. This method rationally configures the running cycle of the many-core system while taking into account the running requirement information of the operator graph, thereby improving the utilization rate of time resources and reducing the waste of many-core system resources.

[0076] Furthermore, the running time period division module 220 includes: a cyclic allocation time period unit, used to alternately execute the operation of dividing a running time period within the running cycle, and to determine the operation of each target first operator graph running within the divided running time period according to the running requirement information of each first operator graph to be allocated, until a matching running time period is allocated to all first operator graphs within the running cycle.

[0077] Furthermore, the cyclic allocation time period unit includes: a running requirement information conversion calculation subunit, used to determine each target first operator graph running in the divided running time period based on the segment requirement information obtained by converting the running requirement information of the first operator graph to be allocated into the divided running time period, and the running data of the first operator graph to be allocated in the divided running time period.

[0078] Furthermore, the operation requirement information conversion calculation subunit is specifically used for: determining the current operator graph according to the priority of each of the first operator graphs to be allocated; determining the segment requirement information of the current operator graph within the divided operation time period based on the operation requirement information of the current operator graph, the duration within the divided operation time period, and the operation cycle; obtaining the operation data of the current operator graph within the divided operation time period; determining the current operator graph as the target first operator graph when it is determined that the current operator graph meets the performance conditions based on the segment requirement information of the current operator graph and the operation data; and returning to execute the operation of determining the current operator graph according to the priority of each of the first operator graphs to be allocated until the end allocation condition is met.

[0079] Furthermore, the operational demand information includes operational demand speed, and the intra-segment demand information includes intra-segment demand speed; the operational demand information conversion calculation subunit is specifically used to: calculate the ratio of the operational cycle to the duration corresponding to the divided operational time period; calculate the product of the operational demand speed and the ratio, and determine the intra-segment demand speed.

[0080] Furthermore, the operation requirement information conversion calculation subunit is specifically used to: if it is determined that the operation speed of the current operator graph is greater than or equal to the segment requirement speed, then it is determined that the current operator graph meets the performance conditions.

[0081] Furthermore, the operation requirement information conversion calculation subunit is specifically used for: obtaining the allocable core resources of the many-core system; obtaining the target core resources corresponding to the determined target first operator graph within the divided operation time period; determining the remaining core resources of the divided operation time period based on the allocable core resources and the target core resources of each target first operator graph; and using the remaining core resources to run the current operator graph to determine the operation data of the current operator graph within the divided operation time period.

[0082] Furthermore, the time allocation device for the operator graph also includes: an operator graph allocation module without configured requirements, used to allocate the target running time period to at least one second operator graph when it is determined that the set of operator graphs includes a second operator graph and there are remaining core resources for the target running time period, wherein the second operator graph is not configured with running requirement information.

[0083] Furthermore, the two first operator graphs that have a temporal relationship are assigned the same or adjacent running time periods.

[0084] Furthermore, the running time period division module 220 includes: a running time period division unit, used to divide the first running time period within the running cycle according to the time start point of the running cycle and a preset duration; or to divide each of the currently to-be-allocated first operator graphs to determine the number of groups formed by the division; to determine the remaining duration according to the running cycle and the duration corresponding to each of the divided running time periods; to divide the remaining duration according to the number of groups to obtain a sub-duration; and to divide a running time period within the running cycle according to the end point of the last running time period in the time sequence and the sub-duration.

[0085] The image generation apparatus described above can execute any of the time allocation methods for operator graphs provided in the embodiments of the present invention, and has the corresponding functional modules and beneficial effects of the executed image generation method.

[0086] Example 3

[0087] Figure 3 This is a schematic diagram of the structure of a computer device provided in Embodiment 3 of the present invention. Figure 3 A block diagram of an exemplary computer device 12 suitable for implementing embodiments of the present invention is shown. Figure 3 The computer device 12 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.

[0088] like Figure 3 As shown, the computer device 12 is represented in the form of a general-purpose computing device. Components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and a bus 18 connecting different system components (including system memory 28 and processing units 16). The computer device 12 may be a device connected to a bus.

[0089] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MCA) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0090] Computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer device 12, including volatile and non-volatile media, removable and non-removable media.

[0091] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (…). Figure 3 Not shown; commonly referred to as a "hard drive mechanic"). Although Figure 3Not shown, a disk drive may be provided for reading and writing to removable non-volatile disks (e.g., "floppy disks"), and an optical disc drive may be provided for reading and writing to removable non-volatile optical discs (e.g., compact disc read-only memory (CD-ROM), digital video disc read-only memory (DVD-ROM), or other optical media). In these cases, each drive may be connected to bus 18 via one or more data media interfaces. System memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.

[0092] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28. Such program modules 42 include—but are not limited to—an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of the present invention.

[0093] Computer device 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with the computer device 12, and / or with any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 22. Furthermore, computer device 12 can also communicate with one or more networks (e.g., local area network (LAN) or wide area network (WAN)) via network adapter 20. As shown, network adapter 20 communicates with other modules of computer device 12 via bus 18. It should be understood that although... Figure 3 As not shown, other hardware and / or software modules may be used in conjunction with computer device 12, including but not limited to: microcode, device movers, redundant processing units, external disk RAID (Redundant Arrays of Inexpensive Disks) systems, tape movers, and data backup storage systems.

[0094] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing a time allocation method for an operator graph provided in any embodiment of the present invention.

[0095] Example 4

[0096] Embodiment 4 of the present invention provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the time allocation method for operator graphs as provided in all embodiments of the present application:

[0097] That is, when the program is executed by the processor, it implements the following: in the set of operator graphs to be run on the many-core system, a first operator graph configured with running requirement information is obtained; according to the running requirement information of each first operator graph, the running cycle is divided into multiple running time periods, and a running time period is allocated to each first operator graph; wherein, the running data of the first operator graph in the allocated running time period satisfies the running requirement information under the running cycle.

[0098] The computer storage medium of this invention can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, RAM, read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable CD-ROM, optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0099] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including—but not limited to—electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of transmitting, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0100] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wire, optical fiber, radio frequency (RF), etc., or any suitable combination thereof.

[0101] Computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as "C" or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including LANs or WANs—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0102] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. A time allocation method for operator graphs, characterized in that, Configured in a many-core system, the method includes: In the set of operator graphs to be run on many-core systems, obtain the first operator graph configured with runtime requirements information; According to the operation requirements information of each first operator graph, the operation cycle is divided into multiple operation time periods, and an operation time period is assigned to each first operator graph; Wherein, the running data of the first operator graph within the allocated running time period satisfies the running requirements information under the running cycle; the step of dividing the running cycle into multiple running time periods according to the running requirements information of each first operator graph, and allocating a running time period to each first operator graph, includes: Alternately execute operations that divide the runtime into a runtime period, and determine the operations of each target first operator graph to run within the divided runtime period according to the runtime requirement information of each first operator graph to be assigned, until a matching runtime period is assigned to all first operator graphs within the runtime; determining each target first operator graph to run within the divided runtime period according to the runtime requirement information of each first operator graph to be assigned includes: Based on the segment demand information obtained by converting the current first operator graph to be assigned into the divided running time period, and the running data of the current first operator graph to be assigned within the divided running time period, each target first operator graph running within the divided running time period is determined.

2. The method according to claim 1, characterized in that, Based on the segmental demand information obtained by converting the current first operator graph to be assigned into the divided running time period, and the running data of the current first operator graph to be assigned within the divided running time period, the target first operator graphs running within the divided running time period are determined, including: In each of the first operator graphs to be assigned, determine the current operator graph; Based on the current operator graph's operational requirements information, the duration within the divided operational time period, and the operational cycle, the segmental requirements information of the current operator graph within the divided operational time period are determined. Obtain the running data of the current operator graph within the divided running time period; When the current operator graph meets the performance conditions based on the segment requirement information and the running data, the current operator graph is determined to be the target first operator graph. Return to the first operator graph currently awaiting allocation, determine the operation of the current operator graph, and continue until the allocation termination condition is met.

3. The method according to claim 2, characterized in that, The operational demand information includes the operational demand speed, and the intra-segment demand information includes the intra-segment demand speed. Determining the segment-specific demand information of the current operator graph within the divided runtime period includes: Calculate the ratio of the operating cycle to the duration corresponding to the divided operating time period; The product of the required operating speed and the ratio is calculated to determine the required speed within the segment.

4. The method according to claim 3, characterized in that, Determining that the current operator graph satisfies the performance conditions includes: If it is determined that the running speed of the current operator graph is greater than or equal to the required speed within the segment, then the current operator graph is determined to meet the performance conditions.

5. The method according to claim 2, characterized in that, The step of obtaining the running data of the current operator graph within the divided running time period includes: Obtain the allocatable core resources of the many-core system; Obtain the target core resources corresponding to the first target operator graph that has been determined within the divided running time period; Based on the allocable core resources and the target core resources of each target first operator graph, determine the remaining core resources of the divided running time period; The remaining core resources are used to run the current operator graph, and the running data of the current operator graph within the divided running time period is determined.

6. The method according to claim 1, characterized in that, Also includes: When it is determined that the set of operator graphs includes a second operator graph and there are remaining core resources for the target running time period, the target running time period is allocated to at least one second operator graph, wherein the second operator graph is not configured with running requirement information.

7. The method according to claim 1, characterized in that, Two first operator graphs that have a temporal relationship are assigned the same or adjacent running time periods.

8. The method according to claim 1, characterized in that, The process of dividing the operating cycle into a time period includes: Within the stated operating cycle, the first operating time period is divided according to the starting time of the operating cycle and a preset duration; or Divide the current first operator graphs to be assigned into groups and determine the number of groups formed by the division; The remaining time is determined based on the operating cycle and the duration of each pre-divided operating time period; The remaining time is divided according to the number of groups to obtain the time segments; Based on the end point of the last running time segment in the running cycle and the duration of the segment, a running time segment is divided within the running cycle.

9. A time allocation device for an operator graph, characterized in that, Configured in a many-core system for executing the time allocation method of operator graphs as described in any one of claims 1-8, the apparatus includes: The first operator graph acquisition module is used to acquire the first operator graph with configuration of running requirements information from the set of operator graphs to be run on the many-core system. The running time period division module is used to divide the running cycle into multiple running time periods according to the running requirements information of each first operator graph, and to allocate a running time period to each first operator graph; wherein, the running data of the first operator graph within the allocated running time period satisfies the running requirements information under the running cycle.

10. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the time allocation method for operator graphs as described in any one of claims 1-8.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the time allocation method for the operator graph as described in any one of claims 1-8.