CN115269165A - Operator graph resource allocation method and device, computer equipment and storage medium - Google Patents

Operator graph resource allocation method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN115269165A
CN115269165A CN202110476735.1A CN202110476735A CN115269165A CN 115269165 A CN115269165 A CN 115269165A CN 202110476735 A CN202110476735 A CN 202110476735A CN 115269165 A CN115269165 A CN 115269165A
Authority
CN
China
Prior art keywords
operator graph
operator
graph
time period
graphs
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110476735.1A
Other languages
Chinese (zh)
Inventor
吴欣洋
李涵
丁瑞强
戚海涛
李康
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Lynxi Technology Co Ltd
Original Assignee
Beijing Lynxi Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Lynxi Technology Co Ltd filed Critical Beijing Lynxi Technology Co Ltd
Priority to CN202110476735.1A priority Critical patent/CN115269165A/en
Priority to PCT/CN2021/114217 priority patent/WO2022042519A1/en
Publication of CN115269165A publication Critical patent/CN115269165A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention discloses a method and a device for allocating operator graph resources, computer equipment and a storage medium. The method comprises the following steps: acquiring an operator graph to be operated in a many-core system; determining whether a first operator graph group is included in the operator graphs, wherein the first operator graph group comprises a plurality of first operator graphs, each first operator graph is configured with operation requirement information, and a time sequence relation exists among the plurality of first operator graphs in the first operator graph group; when the first operator graph group exists, determining an operation time period of each first operator graph in the first operator graph group to be operated in the many-core system and a target core resource for operating each first operator graph in the first operator graph group in each operation time period according to the operation requirement information of each first operator graph in the first operator graph group. The embodiment of the invention can reasonably configure the operator graph resources and improve the utilization rate of the operator graph resources.

Description

Operator graph resource allocation method and device, computer equipment and storage medium
Technical Field
The embodiment of the invention relates to the field of artificial intelligence, in particular to an operator graph resource allocation method and device, computer equipment and a storage medium.
Background
In recent years, with the rapid development of artificial intelligence-related applications and technologies, demands for computing power and power consumption efficiency have been increasing. In the related art, the core resource allocation is unreasonable, and the utilization rate of the core resource is low.
Disclosure of Invention
The embodiment of the invention provides a method and a device for allocating operator graph resources, computer equipment and a storage medium, which can reasonably allocate core resources and improve the utilization rate of the core resources.
In a first aspect, an embodiment of the present invention provides an operator graph resource allocation method, which is applied to a many-core system, where the many-core system includes an allocable core resource, and includes:
acquiring an operator graph to be operated in a many-core system;
determining whether a first operator graph group is included in the operator graphs, wherein the first operator graph group comprises a plurality of first operator graphs, each first operator graph is configured with operation requirement information, and a time sequence relation exists among the plurality of first operator graphs in the first operator graph group;
when the first operator graph group exists, determining an operation time period of each first operator graph in the first operator graph group to be operated in the many-core system and a target core resource for operating each first operator graph in the first operator graph group in each operation time period according to the operation requirement information of each first operator graph in the first operator graph group.
In a second aspect, an embodiment of the present invention further provides an operator graph resource allocation apparatus, configured in a many-core system, where the many-core system includes allocable core resources, and the apparatus includes:
the operator graph acquisition module is used for acquiring an operator graph to be operated in the many-core system;
the first operator graph group judgment module is used for determining whether the operator graph comprises a first operator graph group or not, the first operator graph group comprises a plurality of first operator graphs, each first operator graph is configured with operation requirement information, and a time sequence relation exists among the plurality of first operator graphs in the first operator graph group;
and the first operator graph resource allocation module is used for determining an operation time period in which each first operator graph in the first operator graph group is to be operated in the many-core system and target core resources for operating each first operator graph in the first operator graph group in each operation time period according to the operation requirement information of each first operator graph in the first operator graph group when the first operator graph group is determined to exist.
In a third aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program that is stored in the memory and is executable on the processor, where when the processor executes the computer program, the method for allocating operator map resources according to any one of the embodiments of the present invention is implemented.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the operator map resource allocation method according to any one of the embodiments of the present invention.
According to the method and the device, when the operator graph comprises the operation requirement and has a time sequence relation with other first operator graphs, the operation time period in which each first operator graph is to be operated is determined, and the target core resource for operating each first operator graph in each operation time period is determined, so that the problem that in the prior art, the core resource is wasted due to the fact that all resources are allocated for each operator graph is solved, the first operator graphs can be placed in different time periods to operate, the allocation mode of the time resource and the core resource is provided, the resources needed by the operator graphs can be reasonably allocated, the resources can be allocated in a targeted mode, the utilization rate of the resources is improved, and the waste of the resources is reduced.
Drawings
FIG. 1 is a flowchart of a method for allocating operator graph resources according to a first embodiment of the present invention;
fig. 2 is a schematic structural diagram of an operator map resource allocation apparatus according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a computer device in a third embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some structures related to the present invention are shown in the drawings, not all of them.
Example one
Fig. 1 is a flowchart of an operator map resource allocation method in an embodiment of the present invention, where this embodiment is applicable to a case where resources are allocated to multiple operator maps, and the method may be executed by an operator map resource allocation apparatus provided in an embodiment of the present invention, and the apparatus may be implemented in a software and/or hardware manner, and may be generally integrated into a computer device. As shown in fig. 1, the method of the present embodiment includes:
any of the embodiments of the present invention apply to a many-core system that includes allocable core resources.
Wherein, allocatable Core resources may refer to cores (cores) dedicated to be allocated to an operator graph. The core is the minimum unit which can be independently scheduled and has complete computing capacity, and the core has own storage resources and computing resources. The resources of the computer device are divided into allocable core resources and also comprise core resources of programs allocated to the non-operator graphs so as to run other programs. The computer equipment for executing the operator graph resource allocation method comprises a many-core system, wherein the many-core system is used for simultaneously operating a plurality of operator graphs. The Many Core is a Core set which is composed of a large number (hundreds to thousands in the future) of cores and various types of cores, connected together in a preset manner and has high-performance parallel processing capability.
S110, an operator graph to be operated in the many-core system is obtained.
An operator graph collection may refer to a collection of operator graphs running in a many-core system. Wherein the operator graph may comprise at least one operator, and when the operator graph comprises at least two operators, in the operator graph, the output of a previous operator is used as the input of an adjacent subsequent operator. The operator can be convolution, addition, subtraction, multiplication, division or matrix addition, multiplication and other algorithms. The operator graph is used for realizing a specific function, the operator graph may refer to a high-performance computing algorithm, and the operator graph may include, but is not limited to, an AI algorithm, a machine learning algorithm, and a general-purpose scientific computing algorithm, and more specifically, for example, the operator graph is a deep learning model, and as another example, the operator graph is a neural network. The operator graph operation needs resources, core resources are distributed for the operator graph to operate the operator graph, input data are calculated, output data are obtained, and therefore specific functions are achieved.
Optionally, the allocable core resources include storage resources and computing resources.
The storage resource is used for storing data associated with the operator graph, such as input data of the operator graph and/or output data obtained by operating the operator graph. Illustratively, the memory resources may include memory space in the chip, i.e. on-chip memory. The computing resources are used to run a computation graph. Illustratively, the computing resources may include threads.
It should be noted that, at the same time, the allocated core resources cannot overlap with each other, that is, the core resources corresponding to the operator graph are different from the core resources corresponding to other operator graphs.
By configuring the distributable core resources including the storage resources and the computing resources, the core resources can be divided in a fine granularity, the application scene of resource distribution is enriched, the diversity of resource distribution is increased, and the utilization rate of the core resources is improved.
Optionally, the operator graph includes: the neural network model or the neural network model comprises at least one network.
Wherein the operator graph may be a whole or a part of the neural network model. It is to be understood that the operator graph is used to implement a specific function in its entirety, or to implement some of the functions in a specific function. For example, the operator graph may be a neural network model or a network set formed by at least one network in a neural network model.
In some alternative embodiments, the operator graph may comprise a model formed by an image detection network and a speech recognition network, or the operator graph may comprise only an image detection network, or the operator graph may comprise only a speech recognition network. As another example, the operator graph may include a model formed by an image detection network and an object recognition network, or the operator graph may include only an image detection network, or the operator graph may include only an object recognition network.
By configuring the operator graph into the whole model or a part of network included by the model, the application scene of the operator graph executable by the chip can be enriched, the service mode of the operator graph can be enriched, and the utilization rate of core resources can be improved.
S120, whether a first operator graph group is included in the operator graphs is determined, the first operator graph group comprises a plurality of first operator graphs, each first operator graph is configured with operation requirement information, and a time sequence relation exists among the plurality of first operator graphs in the first operator graph group.
And each first operator graph in the first operator graph group has a time sequence relation with at least one first operator graph in the group, and each first operator graph configuration is configured with operation requirement information. The first operator graph group can be formed by a plurality of first operator graphs which have a time sequence relation and are all configured with operation requirement information.
The operation requirement information may refer to information of operation performance that the corresponding operator graph needs to achieve. The operational requirement information may be configurable by a user. Illustratively, the operation requirement information includes an operation speed minimum value and/or an operation accuracy minimum value of an operator graph configured with the operation requirement information, and the like. And the operator graph configured with the operation requirement information shows that the operation information of the operator graph which is distributed is matched with the operation requirement information. The operation performance of the algorithm graph which is not configured with the operation demand information has no limit and no requirement, and any core resource which is larger than zero can be allocated to operate.
The time sequence relation is used for describing the data dependency of two operator graphs, for example, the two first operator graphs with the time sequence relation have the dependency relation on input data and/or output data. The timing relationship includes a serial timing relationship and/or a parallel timing relationship. The at least two operator graphs having a serial time sequence relationship may refer to a chronological order of the dependence of the at least two operator graphs on data, for example, input data of a first operator graph is output data of a second operator graph, and the two operator graphs have a serial time sequence relationship. The at least two operator graphs with the parallel time sequence relationship may mean that the at least two operator graphs have dependency on the same data, one input data is respectively input into the two operator graphs for computation, and the two operator graphs have the parallel time sequence relationship. For an operator graph with a time sequence relation, data flows from front to back along the serial time sequence relation, and when the parallel time sequence relation is met, the data is handed to all the operator graphs with the parallel time sequence relation at the same time.
S130, when the first operator graph group is determined to exist, determining the operation time period of each first operator graph in the first operator graph group to be operated in the many-core system and the target core resources for operating each first operator graph in the first operator graph group in each operation time period according to the operation requirement information of each first operator graph in the first operator graph group.
The running time period refers to a time period in which the first algorithm graph runs in the many-core system. The period of operation is relative to a fraction of the time duration in the operating cycle of the many-core system. One operation cycle refers to the time that the many-core system needs to execute the computation tasks corresponding to all the operator graphs in the operator graph set once. The many-core system will cycle through the repeating operation cycle. The operation time period refers to a part of the operation period, and the duration of the operation time period is less than the operation period. The first operator graph is loaded into the many-core system to run in a running time period to be run, and is removed from the many-core system when the running time period is finished. The division of the running time period may be performed according to the number of the first algorithm graphs. For example, the number of the first algorithm graphs is 8, and the operation cycle may be divided into 4 operation time segments of the same duration, and each operation time segment operates two first algorithm graphs. The time periods allocated by the different first operator graphs can be the same or different.
The target core resource is the core resource which is allocated to the first algorithm graph in the running time period, and the many-core system runs the first algorithm graph by adopting the target core resource.
According to the method and the device, when the operator graph comprises the operation requirement and has a time sequence relation with other first operator graphs, the operation time period in which each first operator graph is to be operated is determined, and the target core resource for operating each first operator graph in each operation time period is determined, so that the problem that in the prior art, the core resource is wasted due to the fact that all resources are allocated for each operator graph is solved, the first operator graphs can be placed in different time periods to operate, the allocation mode of the time resource and the core resource is provided, the resources needed by the operator graphs can be reasonably allocated, the resources can be allocated in a targeted mode, the utilization rate of the resources is improved, and the waste of the resources is reduced.
Optionally, the operator map resource allocation method further includes: for any of the operating time periods, when determining that the residual core resources except the target core resources exist, determining a second operator graph from the operator graphs so as to determine the core resources for operating the second operator graph according to the residual core resources, wherein the second operator graph is different from the first operator graph.
The sum of the remaining core resources and the at least one target core resource is a core resource allocable by the many-core system. The target core resource is a core resource allocated by a first computer graph that is runnable during the runtime period. The number of target core resources is the same as the number of first operator graphs. And the existence of the residual core resources except the target core resources indicates that the first operator graph which can be operated in the operation time period is completely determined, and meanwhile, the residual core resources are not enough to be allocated to the first operator graph to meet the configured operation requirement information. The second operator graph is different from the first operator graph, and the second operator graph can be configured with no operation requirement information and/or has no time sequence relation with any one operator graph.
And preferentially determining a first operator graph which can be operated in the operation time period, and determining a second operator graph which can be operated in the operation time period when the rest first operator graphs cannot be operated in the operation time period and the rest core resources exist in the operation time period. In the matching process of the operation time period and the operator graph, the priority of the first operator graph is higher than that of the second operator graph. And if the residual core resources do not exist in the operation time period, not detecting the second algorithm graph which can be operated in the operation time period.
By distributing the core resources for the second operator graph and determining the second operator graph as the operator graph running on the running time period when the existence of the residual core resources is determined, a resource distribution mode for determining the running time period for the operator graph according to the priority of the operator graph is provided, the resource distribution flexibility is improved, and the diversified distribution requirements can be met.
Optionally, the operating time periods of at least two first operator graphs in the first operator graph group are different, and the operating time periods of two first operator graphs adjacent in time sequence are the same or adjacent.
If at least two operator graphs with the time sequence relationship operate in different operation time periods, intermediate data of the previous operation time period need to be reserved until the next operation time period or more operation time periods, which causes the need of storing a large amount of intermediate data, occupies too much storage resources, and causes storage resource waste. Therefore, the operator graphs with the time sequence relation are placed in the same operation time period or two adjacent operation time periods of the time sequence respectively, the storage time of the intermediate data can be reduced, the storage space is multiplexed, the storage resources of the intermediate data are released in time, and the utilization rate of the storage resources is improved.
It should be noted that the serial timing relationship of the two operator graphs having the serial timing relationship corresponds to the time sequence of the operation time period, for example, the operator graph with the previous time sequence operates in the operation time period with the previous time sequence, and the operator graph with the subsequent time sequence operates in the operation time period with the subsequent time sequence.
The operator graphs with the time sequence relation are placed in the same operation time period or two adjacent operation time periods of the time sequence respectively, so that the storage time of the intermediate data can be reduced, the storage resources of the intermediate data can be released in time, and the utilization rate of the storage resources is improved.
Optionally, the determining, according to the operation requirement information of each first operator graph in the first operator graph group, an operation time period in which each first operator graph in the first operator graph group is to be operated in the many-core system includes: aiming at the current processing running time period, selecting a current operator graph from each first operator graph to be distributed currently in the first operator graph group; if the operation data of the current operator graph in the current operation time period meets the performance condition, determining the current operation time period as the operation time period of the current operator graph to be operated in the many-core system; returning to execute the operation of selecting the current operator graph from the first operator graphs to be distributed currently in the first operator graph group; returning to execute the operation of selecting the current operator graph from the first operator graphs to be distributed currently in the first operator graph group until the operator graph with the previous time sequence is determined not to meet the performance condition; and if the algorithm graph with the time sequence before is determined not to meet the performance condition and/or the residual core resources except the target core resources are determined not to exist, finishing the verification of the first algorithm graph aiming at the current processing running time period.
The operation time period may be divided in the operation cycle, and when one operation time period is obtained by the division, the operation time period obtained by the division is determined as the operation time period of the current processing. Each first operator graph to be currently allocated in the first operator graph group refers to a first operator graph other than the first operator graph operated in the already-divided operation time period (including the currently-processed operation time period), that is, a first operator graph to which an operation time period is not allocated. Selecting the current operator graph may refer to selecting a first operator graph with the highest priority from the first operator graphs to be currently allocated. In the currently processed first operator graph group, the first operator graph (belonging to the currently processed first operator graph group) to which the running time period is allocated and the first operator graph (belonging to the currently processed first operator graph group) to be currently allocated have a time sequence relationship. Therefore, the current operator graph can be sequentially selected according to the time sequence among the first operator graphs in the first operator graph group.
The operation data is used for describing the operation performance of the current operator graph in the operation time period of the current process. The performance condition is used for judging whether the running data of the current algorithm graph meets the configured running demand information. And determining that the operation data of the current operator graph meets the performance condition, which indicates that the current operator graph can meet the configured operation requirement information in the current operation time period, so that the current operator graph can be placed in the current operation time period to operate. And determining that the current operator graph does not meet the performance condition, which indicates that the current operator graph does not meet the configured operation requirement information in the current operation time period, so that the current operator graph cannot be placed in the current operation time period for operation. And whether the current operator graph meets the performance condition or not, selecting the next current operator graph after the judgment is finished. The current operator graph does not meet the performance condition, which indicates that the current operator graph can not meet the configured operation requirement information in the current processing operation time period, the current processing operation time period is to verify the first operator graph according to the sequence and allocate resources, and when the first operator graph with high priority can not meet the configured operation requirement information, the first operator graph with low priority can not be verified and allocated with resources. And the absence of the residual core resources except the target core resources indicates that the residual core resources which are not allocated in the operation time period are insufficient to operate the residual first algorithm graph, and at the moment, the currently processed operation time period cannot bear the first algorithm graph. And if a plurality of first operator graph groups exist, the verification of the first operator graph in the currently processed first operator graph group is finished, and the verification of the first operator graph in the next first operator graph group can be carried out.
The first operator graph is selected in sequence according to the current processing operation time period, whether performance conditions can be met or not is detected, the first operator graph is placed as many as possible under the condition that operation requirement information is considered, resources are configured reasonably, and the resource utilization rate of the many-core system is improved.
Optionally, the selecting a current operator graph from the first operator graphs to be currently allocated in the first operator graph group includes: and sequentially selecting the first operator graph with the front time sequence according to the time sequence relation of each first operator graph to be distributed currently in the first operator graph group, and determining the first operator graph as the current operator graph.
In the serial time sequence relation, the output of a first operator graph is the input of another first operator graph, and at the moment, the first operator graph with the previous time sequence is the first operator graph for outputting a result. If two first operator graphs have dependence on the same data, the first operator graph with the previous time sequence is any one of the two first operator graphs.
It should be noted that, the aforementioned determining that the current operator graph does not satisfy the performance condition includes: and determining that the first operator graph with the previous time sequence does not meet the performance condition. In the first operator graph to be distributed currently, the first operator graph with the later time sequence depends on the output result of the first operator graph with the earlier time sequence. If the first operator graph with the later time sequence runs in the current processing operation time period, and the first operator graph with the earlier time sequence does not run in the current processing operation time period, the first operator graph with the later time sequence cannot obtain an output result, so that the first operator graph cannot run correctly. Thus, when it is determined that the first operator graph preceding the time sequence does not satisfy the performance condition, the verification of the first operator graph for the currently processed operation time period may be ended. In addition, in the parallel time sequence relationship, the number of the first algorithm graphs in the time sequence front comprises at least two, and correspondingly, the number of the current algorithm graphs comprises at least two.
By selecting the first operator graph with the front time sequence and preferentially distributing, the first operator graph with the rear time sequence can obtain the output result of the first operator graph with the front time sequence, the accurate operation of the first operator graph is improved, and the operation stability of the many-core system is improved.
Optionally, the determining target core resources used for operating each first operator graph in the first operator graph group in the operation time period includes: determining the residual core resources of the current processing operation time period according to the core resources which can be distributed by the many-core system and the core resources which are distributed in the current processing operation time period; and distributing the core resources for the current operator graph meeting the performance condition in the residual core resources of the current processing operation time period.
The allocable core resources are cores which can be allocated to the operator graph calculation by the many-core system. The allocated core resources in the current processing running time period refer to the sum of the target core resources of the first algorithm graph which is determined to run in the current processing running time period. The remaining core resources refer to core resources that may be allocated to the new first algorithm graph allocated for the currently processed runtime period. The remaining core resources are equal to the difference between the allocable core resources and the allocated core resources in the currently processed running time period. The current operator graph satisfying the performance condition refers to a new first operator graph operating in the operating time period of the current process. The core resource is allocated to the current operator graph, and the target sub-core resource corresponding to each operator graph in the operator graph group can be sequentially determined in the allocable core resources according to the resource allocation type. The resource allocation type may include a high performance type, an energy saving type, or an equalization type.
By calculating the residual core resources and distributing the core resources to the current operator graph meeting the performance conditions, the resources can be accurately distributed to the first operator graph newly distributed in the current processing operation time period, an accurate, flexible and controllable core resource distribution mode is provided, and time resources and core resources can be accurately distributed to the first operator graph.
Optionally, the operation data includes an operation speed, and the operation requirement information includes an operation requirement speed; the determining that the operating data of the current operator graph in the currently processed operating time period meets the performance condition includes: and if the running speed is greater than or equal to the running demand speed, determining that the current operator graph meets the performance condition.
The operation data is the average speed of the current operator graph in the allocated operation time period, and the operation requirement information is the operation requirement speed. And the average speed of the current operator graph is the speed of the operator graph for obtaining output data through calculation according to the received random data. The operation requirement information can be divided into operation requirement information of a single picture and operation requirement information of a plurality of pictures, the delay in the operation requirement information of the single picture cannot be ignored, the delay of the operation requirement information of the plurality of pictures can be ignored, and the operation requirement information in the scheme can be the operation requirement information in a period of time and is not single.
If the operation speed of the current operator graph is determined to be greater than or equal to the operation demand speed, determining that the current operator graph meets the performance condition, namely that the operation data in the operation time period meets the operation demand information, if the operation speed of the current operator graph is determined to be less than the operation demand speed, determining that the current operator graph does not meet the performance condition, namely that the operation data in the operation time period does not meet the operation demand information,
whether the current operator graph meets the performance condition is detected by combining the operation demand speed according to the actual operation speed of the current operator graph, the operation period of each operator graph can be finely controlled, time-sharing multiplexing core resources are flexibly configured, and the utilization rate of the core resources is improved.
Optionally, the allocating operator graph resources further includes: when a plurality of first operator graph groups are determined, the first operator graph groups are sequentially selected, and an operation time period is allocated to each operator graph in the selected first operator graph.
There is no time sequence relation between any first operator graph of different first operator graph groups. The first operator graphs of different first operator graph groups are independent from each other, and one first operator graph group can be sequentially selected to independently allocate the operation time period for the included first operator graph. And the first operator graph in the same first operator graph group has a time sequence relation with at least one first operator graph in the group. The operation time periods are preferentially allocated to the first operator graphs in the same group, so that the operation time periods of two first operator graphs adjacent in time sequence are the same or adjacent, and the storage resources and the time resources occupied by the intermediate results in the many-core system are reduced. By sequentially selecting the first operator graph groups and independently allocating the operation time periods for the included first operator graphs, the operation time periods can be accurately allocated for the first operator graphs according to the time sequence relationship, the carrying loss of intermediate results among the first operator graphs with the time sequence relationship can be reduced, the operation time periods are reasonably configured, and the operation efficiency of the many-core system is improved.
Optionally, one operation cycle includes a plurality of operation time periods, and at least two operation time periods have different durations.
The operation period can be divided into a plurality of operation time periods, so that the operator graph can be used for time division multiplexing of the many-core system. The time starting point of the operation cycle may be determined as the starting point of the first operation time period, the preset time duration may be determined as the time duration of the first operation time period, and the first operation time period may be determined in the operation cycle according to the starting point of the first operation time period and the time duration of the first operation time period. The preset time length may be determined according to the operation requirement information of each first operator graph, or may be determined according to an average operation period of the first operator graphs obtained through experimental statistics, or may be determined by calculating a ratio between the operation period and the number of groups formed by dividing each first operator graph to be currently allocated. The division of the operating periods, except for the first operating period, is determined by the time division length determined according to the number of groups and the remaining time length, and the end point of the last operating period of the time sequence. The number of groups is used to divide the remaining duration. The number of groups may be, according to the number of first operator graphs in a preset group, calculating a ratio between the number of first operator graphs to be currently allocated and the number of first operator graphs in the group. Illustratively, the number of first operator graphs in a group is 2, the number of first operator graphs to be currently allocated is 8, and the number of groups is 8/2=4. And calculating the difference value of the running period and the sum of the time lengths corresponding to the divided running time periods, and determining the difference value as the residual time length. And determining the ratio of the remaining time length to the number of the groups as the time division length. As in the previous example, if the number of groups is 4 and the remaining time period is 8 minutes, the minute time period is 8/4=2 minutes. And determining the operation time periods except the first time period in the operation cycle according to the time division length by taking the end point of the operation time period with the last time sequence in each divided operation time period as the starting point of the operation time periods except the first time period.
In general, the duration of the preceding operating period of the time sequence is greater than the duration of the following operating period of the time sequence, based on the determined operating periods. The first operating period is usually the longest, and the subsequent subdivision according to the number of the remaining operator graphs is usually smaller and smaller.
By configuring one operation cycle to comprise a plurality of operation time periods and configuring at least two operation time periods to have different durations, the operation time periods can be flexibly adjusted to adapt to the operation configuration requirements of the first algorithm graph.
Optionally, the determining a second operator graph from the operator graphs includes: in the operator graphs, acquiring the priority of the rest of operator graphs except the first operator graph included in each first operator graph group; and determining a second arithmetic graph in the rest of the arithmetic graphs according to the priority order.
The operator graph comprises other operator graphs besides the first operator graph. The operator graph can be selected in sequence according to the priority order, whether the operator graph is the second operator graph or not is judged, and the second operator graph is verified according to the currently processed running time period.
And sequentially selecting the operator graphs to judge whether the operator graphs are the second operator graphs or not according to the priority of the rest of the operator graphs, and verifying each operation time period of the rest of the core resources, so that the second operator graphs operated in the operation time period can be flexibly verified according to requirements, the number of the operator graphs operated in the operation time period is increased as much as possible, and the resource utilization rate is increased.
Optionally, the determining a second operator graph from the remaining operator graphs according to the priority order includes: when at least one third operator graph exists, sequentially judging whether the third operator graph is a second operator graph or not, wherein the third operator graph is configured with operation requirement information and has no time sequence relation with other operator graphs; when the third operator graph does not exist or the third operator graph is judged to be finished, the current residual core resources are not empty, and at least one fourth operator graph exists, determining that the fourth operator graph is the second operator graph, the fourth operator graph is not configured with operation requirement information, and at least a time sequence relation exists between the fourth operator graph and one operator graph; and when the fourth operator graph does not exist or is judged to be finished, the current residual core resources are not empty, and at least one fifth operator graph exists, determining that the fifth operator graph is the second operator graph, wherein the fifth operator graph is not configured with operation requirement information, and has no time sequence relation with other operator graphs.
And judging the sequence of the second algorithm graph as follows: the third operator graph, the fourth operator graph and the fifth operator graph are used for preferentially judging the operator graph configured with the operation requirement information and then judging the operator graph with the time sequence relationship, specifically, the third operator graph which is not configured with the operation requirement information and has the time sequence relationship, the third operator graph which is configured with the operation requirement information and has no time sequence relationship is preferentially judged, then the fourth operator graph which is not configured with the operation requirement information and has the time sequence relationship is judged, and finally the fifth operator graph which is not configured with the operation requirement information and has no time sequence relationship is judged. The second operator graph is an operator graph other than the first operator graph, which is operable for the currently processed operation time period.
And when the third operator graph exists, preferentially and sequentially judging whether each third operator graph is the second operator graph or not. And if the performance condition is determined to be met according to the running data obtained by running the third operator graph and the running demand information configured by the third operator graph by adopting the residual core resources of the currently processed running time period, determining the third operator graph as the second operator graph. And determining the core resource for running the third algorithm graph in the residual core resources, and updating the residual core resources. And when the residual core resources still exist, judging whether the next third operator graph is the second operator graph or not. And if the running data obtained by running the third operator graph and the running requirement information configured by the third operator graph are determined not to meet the performance condition according to the residual core resources in the current processing running time period, determining that the third operator graph is not the second operator graph.
And when the third operator graph does not exist and the verification of the second operator graph is completed on each third operator graph, the current residual core resources are not empty and a fourth operator graph exists, determining the fourth operator graph as the second operator graph. Because the fourth operator graph does not have the operation requirement information, as long as the currently processed operation time period has the residual core resources, the fourth operator graph can operate in the currently processed operation time period. Illustratively, the number of remaining core resources is at least one. And when the fourth operator graph does not exist or the current residual core resources are empty, the fourth operator graph is not the second operator graph. Determining the fourth operator graph as the second operator graph, which may be sequentially determining the fourth operator graph as the second operator graph, and it should be noted that a time sequence relationship exists between the fourth operator graphs, and the fourth operator graph may be sequentially selected according to the time sequence relationship to be determined as the second operator graph.
And when the fourth operator graph does not exist or the verification of the second operator graph is completed for each fourth operator graph, the current residual core resources are not empty, and at least one fifth operator graph exists, determining the fifth operator graph as the second operator graph. Because the fifth operator graph does not have the operation requirement information, the fifth operator graph can operate in the current operation time period as long as the current operation time period has the residual core resources. Illustratively, the number of remaining core resources is at least one. And when the fifth operator graph does not exist or the current residual core resources are empty, the fifth operator graph is not the second operator graph. And determining the fifth operator graph as the second operator graph, wherein the fifth operator graph is randomly selected as the second operator graph, and no time sequence relation exists between the fifth operator graphs, so that the fifth operator graph can be randomly selected.
The sequence of the second algorithm graphs is judged through configuration, whether the second algorithm graphs run in the currently processed running time period can be judged one by one according to the requirement information and the requirement of the time sequence relation, the running time period of each second algorithm graph can be finely controlled, the running time period of the many-core system is reasonably configured, the utilization rate and flexibility of time resources are improved, and the waste of the many-core system resources is reduced.
Optionally, the determining whether the third operator graph is the second operator graph includes: acquiring the residual core resources of the currently processed running time period; running the third operator graph by using the residual core resources, and acquiring running data of the third operator graph; and when the third operator graph is determined to meet the performance condition according to the operation data of the third operator graph and the corresponding operation demand information, determining the third operator graph as a second operator graph.
The remaining core resources are for allocation to the second operator graph. The third operator graph is configured with operation requirement information, and whether the third operator graph is the second operator graph or not can be judged by referring to whether the first operator graph meets the performance requirement or not. And adopting the residual core resources to operate the third algorithm graph, and judging whether the third algorithm graph meets the performance condition or not according to the obtained operation data and the configured operation demand information. If the third operator graph is determined to meet the performance condition, determining the third operator graph as a second operator graph; if it is determined that the third operator graph does not satisfy the performance condition, then it is determined that the third operator graph is not the second operator graph and a next third operator graph can be verified. It should be noted that the core resource finally allocated to the third operator graph may be determined to be different from the remaining core resources, and optionally, the core resource finally allocated to the third operator graph is less than or equal to the remaining core resources. And the residual core resources are used for determining whether the running third algorithm graph with the residual maximum capacity in the currently processed running time period can meet the running demand information of the third algorithm graph, and if the maximum capacity cannot be met, determining that the currently processed running time period cannot meet the running demand information of the third algorithm graph.
By adopting the remaining core resources of the currently processed running time period to run the third operator graph, the obtained running data and the configured running demand information, whether the third operator graph meets the performance condition is judged, whether the third operator graph is the second operator graph is judged, more operator graphs can be distributed for the running time period under the condition of meeting the running demand information of the third operator graph, and therefore the effective utilization rate of the resources of the many-core system in the same running time period is improved.
Optionally, the method for allocating operator map resources further includes: upon determining that the first operator graph group does not exist, determining whether the operator graph comprises a third operator graph; and when at least one third algorithm graph exists, determining the operation time period of each third algorithm graph to be operated in the many-core system and the target core resource for operating each third algorithm graph in each operation time period according to the operation requirement information of each third algorithm graph.
And when the first operator graph group does not exist, preferentially judging whether a third operator graph exists or not. And when the third algorithm graphs exist, determining the operation time periods of the third algorithm graphs to be operated in the many-core system and the target core resources for operating the third algorithm graphs in each operation time period according to the operation requirement information.
By configuring the configuration without the first operator graph group and performing operation time period and core resource allocation on the rest operator graphs, application scenes of operator graph resource allocation can be enriched, different application requirements can be adapted, diversified resource allocation requirements can be met, and resource allocation is more flexible.
Example two
Fig. 2 is a schematic diagram of an operator graph resource allocation apparatus according to a second embodiment of the present invention. The second embodiment is a corresponding apparatus for implementing the method for allocating operator graph resources provided in the foregoing embodiments of the present invention, and the apparatus may be implemented in a software and/or hardware manner, and may generally be integrated into a computer device, and specifically a many-core system.
An operator graph obtaining module 210, configured to obtain an operator graph to be run in the many-core system;
the first operator graph group judging module 220 is configured to determine whether the operator graph includes a first operator graph group, where the first operator graph group includes multiple first operator graphs, each first operator graph is configured with operation requirement information, and a time sequence relationship exists between the multiple first operator graphs in the first operator graph group;
the first operator graph resource allocation module 230 is configured to, when it is determined that the first operator graph group exists, determine, according to the operation requirement information of each first operator graph in the first operator graph group, an operation time period in which each first operator graph in the first operator graph group is to be operated in the many-core system, and a target core resource for operating each first operator graph in the first operator graph group in each operation time period.
According to the method and the device, when the operator graph comprises the operation requirement and has the time sequence relation with other first operator graphs, the operation time period to be operated of each first operator graph and the target core resource used for operating each first operator graph in each operation time period are determined, so that the problem that in the prior art, the core resource is wasted due to the fact that all resources are allocated for each operator graph is solved, the first operator graph can be placed in different time periods to operate, the allocation mode of the time resource and the core resource is provided, the resources needed by the operator graphs can be reasonably allocated, the resources can be allocated in a targeted mode, the utilization rate of the resources is improved, and the waste of the resources is reduced.
Further, the apparatus further comprises: and the second operator graph resource allocation module is used for determining a second operator graph from the operator graphs when determining that the residual core resources except the target core resources exist for any operation time period, so as to determine the core resources for operating the second operator graph according to the residual core resources, wherein the second operator graph is different from the first operator graph.
Furthermore, the running time periods of at least two first operator graphs in the first operator graph group are different, and the running time periods of two first operator graphs adjacent in time sequence are the same or adjacent.
Further, the first operator graph resource allocation module 230 includes: the time period matching unit is used for selecting a current operator graph from the first operator graphs to be distributed currently in the first operator graph group according to the currently processed running time period; if the operation data of the current operator graph in the current operation time period meets the performance condition, determining the current operation time period as the operation time period of the current operator graph to be operated in the many-core system; returning to execute the operation of selecting the current operator graph from the first operator graphs to be distributed currently in the first operator graph group until the current operator graph is determined not to meet the performance condition; and if the current operator graph is determined not to meet the performance condition and/or the residual core resources except the target core resources are determined not to exist, finishing the verification of the first operator graph aiming at the currently processed running time period.
Further, the time period matching unit includes: and the time sequence prior priority distribution subunit is used for sequentially selecting the first operator graph with the prior time sequence according to the time sequence relation of each first operator graph to be distributed currently in the first operator graph group and determining the first operator graph as the current operator graph.
Further, the first operator graph resource allocation module 230 includes: a residual core resource allocation unit, configured to determine a residual core resource in the currently processed operating time period according to the core resource allocable by the many-core system and the core resource allocated in the currently processed operating time period; and distributing the core resources for the current operator graph meeting the performance condition in the residual core resources of the current processing operation time period.
Further, the operation data includes an operation speed, and the operation requirement information includes an operation requirement speed; the time period matching unit includes: and the performance detection subunit is used for determining that the current operator graph meets the performance condition if the operation speed is greater than or equal to the operation demand speed.
Further, the apparatus further comprises: and the first operator graph group sequential distribution module is used for sequentially selecting the first operator graph groups when a plurality of first operator graph groups are determined, and distributing operation time periods for the operator graphs in the selected first operator graph.
Further, one operation cycle includes a plurality of operation time periods, and at least two operation time periods have different durations.
Further, the second operator graph resource allocation module includes: a second operator graph detection unit configured to acquire, in the operator graphs, priorities of remaining operator graphs other than the first operator graphs included in each of the first operator graph groups; and determining a second arithmetic graph in the rest of the arithmetic graphs according to the priority order.
Further, the second operator graph detection unit includes: the non-demand or non-time sequence operator graph allocation subunit is used for sequentially judging whether a third operator graph is a second operator graph or not when at least one third operator graph exists, and the third operator graph is configured with operation demand information and has no time sequence relation with other operator graphs; when the third operator graph does not exist or after the judgment of each third operator graph is finished, the current residual core resources are not empty, and at least one fourth operator graph exists, determining that the fourth operator graph is the second operator graph, the fourth operator graph is not configured with operation demand information, and a time sequence relationship exists between the fourth operator graph and at least one operator graph; and when the fourth operator graph does not exist or each fourth operator graph is judged to be finished, the current residual core resources are not empty, and at least one fifth operator graph exists, determining that the fifth operator graph is the second operator graph, wherein the fifth operator graph is not configured with operation demand information, and has no time sequence relation with other operator graphs.
Further, the no-demand or no-time sequence operator graph allocation subunit is specifically configured to: acquiring the residual core resources of the currently processed running time period; running the third operator graph by using the residual core resources, and acquiring running data of the third operator graph; and when the third operator graph is determined to meet the performance condition according to the operation data of the third operator graph and the corresponding operation demand information, determining the third operator graph as a second operator graph.
Further, the apparatus further comprises: a third operator graph allocation module for determining whether the operator graph comprises a third operator graph upon determining that the first operator graph group does not exist; and when at least one third algorithm graph exists, determining the operation time period of each third algorithm graph to be operated in the many-core system and the target core resource for operating each third algorithm graph in each operation time period according to the operation requirement information of each third algorithm graph.
The image generation device can execute the operator graph resource allocation method provided by any one of the embodiments of the present invention, and has the corresponding functional modules and beneficial effects of the executed image generation method.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a computer device according to a third embodiment of the present invention. FIG. 3 illustrates a block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present invention. The computer device 12 shown in FIG. 3 is only an example and should not impose any limitation on the scope of use or functionality of embodiments of the present invention.
As shown in FIG. 3, computer device 12 is in the form of a general purpose computing device. The components of computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16. The computer device 12 may be a device that is attached to a bus.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, an enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
Computer device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by computer device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The 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/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 3, and commonly referred to as a "hard disk mover"). Although not shown in FIG. 3, a disk mover for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk mover for reading from and writing to a removable, nonvolatile optical disk (e.g., a Compact disk Read-Only Memory (CD-ROM), digital Video disk (DVD-ROM), or other optical media) may be provided. In these cases, each mover 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 that are configured to carry out the functions of embodiments of the invention.
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 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
Computer device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with computer device 12, and/or with any devices (e.g., network card, modem, etc.) that enable computer device 12 to communicate with one or more other computing devices. Such communication may be through an Input/Output (I/O) interface 22. Also, computer device 12 may communicate with one or more networks (e.g., local Area Network (LAN), 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 not shown in FIG. 3, 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 motion Arrays, (Redundant Arrays of Inexplicit Disks) systems, tape movers, data backup storage systems, and the like.
The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, for example, implementing a method for allocating operator map resources provided by any of the embodiments of the present invention.
Example four
A fourth embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for allocating operator graph resources, provided in all the inventive embodiments of the present application:
that is, the program when executed by the processor implements: acquiring an operator graph to be operated in a many-core system; determining whether a first operator graph group is included in the operator graphs, wherein the first operator graph group comprises a plurality of first operator graphs, each first operator graph is configured with operation requirement information, and a time sequence relation exists among the plurality of first operator graphs in the first operator graph group; when the first operator graph group exists, determining an operation time period of each first operator graph in the first operator graph group to be operated in the many-core system and a target core resource for operating each first operator graph in the first operator graph group in each operation time period according to the operation requirement information of each first operator graph in the first operator graph group.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a RAM, a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a flash Memory, an optical fiber, a portable CD-ROM, an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, radio Frequency (RF), etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a LAN or a WAN, or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing description is only exemplary of the invention and that the principles of the technology may be employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (16)

1. An operator graph resource allocation method, the method comprising:
acquiring an operator graph to be operated in a many-core system;
determining whether a first operator graph group is included in the operator graphs, wherein the first operator graph group comprises a plurality of first operator graphs, each first operator graph is configured with operation requirement information, and a time sequence relation exists among the plurality of first operator graphs in the first operator graph group;
when the first operator graph group exists, determining an operation time period of each first operator graph in the first operator graph group to be operated in the many-core system and a target core resource for operating each first operator graph in the first operator graph group in each operation time period according to the operation requirement information of each first operator graph in the first operator graph group.
2. The method of claim 1, further comprising:
for any of the operating time periods, when determining that the residual core resources except the target core resources exist, determining a second operator graph from the operator graphs so as to determine the core resources for operating the second operator graph according to the residual core resources, wherein the second operator graph is different from the first operator graph.
3. The method according to claim 1, characterized in that the operating time periods of at least two first operator graphs in the first operator graph group are different, and the operating time periods of two temporally adjacent first operator graphs are the same or adjacent.
4. The method of claim 3, wherein the determining, according to the operation requirement information of each first operator graph in the first operator graph group, an operation time period in which each first operator graph in the first operator graph group is to be operated in the many-core system comprises:
aiming at the current processing running time period, selecting a current operator graph from each first operator graph to be distributed currently in the first operator graph group;
if the operation data of the current operator graph in the current operation time period meets the performance condition, determining the current operation time period as the operation time period of the current operator graph to be operated in the many-core system;
returning to execute the operation of selecting the current operator graph from the first operator graphs to be distributed currently in the first operator graph group until the current operator graph is determined not to meet the performance condition;
and if the current operator graph is determined not to meet the performance condition and/or the residual core resources except the target core resources are determined not to exist, finishing the verification of the first operator graph aiming at the currently processed running time period.
5. The method of claim 4, wherein selecting a current operator graph among the first operator graphs to be currently assigned in the first operator graph group comprises:
and sequentially selecting the first operator graph with the front time sequence according to the time sequence relation of each first operator graph to be distributed currently in the first operator graph group, and determining the first operator graph as the current operator graph.
6. The method of claim 4, wherein determining the target core resources for running each first operator graph of the first operator graph set during the running time period comprises:
determining the residual core resources of the current processing operation time period according to the core resources which can be distributed by the many-core system and the core resources which are distributed in the current processing operation time period;
and distributing the core resources for the current operator graph meeting the performance condition in the residual core resources of the current processing operation time period.
7. The method of claim 4, wherein the operational data includes an operational speed, and the operational demand information includes an operational demand speed;
the determining that the operating data of the current operator graph in the currently processed operating time period meets the performance condition includes:
and if the operation speed is greater than or equal to the operation demand speed, determining that the current operator graph meets the performance condition.
8. The method of claim 1, further comprising:
when a plurality of first operator graph groups are determined, the first operator graph groups are sequentially selected, and an operation time period is allocated to each operator graph in the selected first operator graph.
9. The method of claim 1, wherein an operating cycle comprises a plurality of operating time periods, at least two of the operating time periods being of different duration.
10. The method of claim 2, wherein determining the second operator graph from the operator graphs comprises:
in the operator graphs, acquiring the priority of the rest of operator graphs except the first operator graph included in each first operator graph group;
and determining a second arithmetic graph in the rest of the arithmetic graphs according to the priority order.
11. The method of claim 10, wherein determining the second of the remaining operator graphs in the order of priority comprises:
when at least one third operator graph exists, sequentially judging whether the third operator graph is a second operator graph or not, wherein the third operator graph is configured with operation requirement information and has no time sequence relation with other operator graphs;
when the third operator graph does not exist or after the judgment of each third operator graph is finished, the current residual core resources are not empty, and at least one fourth operator graph exists, determining that the fourth operator graph is the second operator graph, the fourth operator graph is not configured with operation demand information, and a time sequence relationship exists between the fourth operator graph and at least one operator graph;
and when the fourth operator graph does not exist or each fourth operator graph is judged to be finished, the current residual core resources are not empty, and at least one fifth operator graph exists, determining that the fifth operator graph is the second operator graph, wherein the fifth operator graph is not configured with operation demand information, and has no time sequence relation with other operator graphs.
12. The method of claim 11, wherein determining whether the third operator graph is the second operator graph comprises:
acquiring the residual core resources of the currently processed running time period;
operating the third operator graph by adopting the residual core resources, and acquiring operation data of the third operator graph;
and when the third operator graph is determined to meet the performance condition according to the operation data of the third operator graph and the corresponding operation requirement information, determining the third operator graph as a second operator graph.
13. The method of claim 1, further comprising:
upon determining that the first operator graph group does not exist, determining whether the operator graph comprises a third operator graph;
and when at least one third algorithm graph exists, determining the operation time period of each third algorithm graph to be operated in the many-core system and the target core resource for operating each third algorithm graph in each operation time period according to the operation requirement information of each third algorithm graph.
14. An apparatus for assigning operator graph resources, configured in a many-core system, the many-core system including assignable core resources, the apparatus comprising:
the operator graph acquisition module is used for acquiring an operator graph to be operated in the many-core system;
the first operator graph group judgment module is used for determining whether the operator graph comprises a first operator graph group or not, the first operator graph group comprises a plurality of first operator graphs, each first operator graph is configured with operation requirement information, and a time sequence relation exists among the plurality of first operator graphs in the first operator graph group;
and the first operator graph resource allocation module is used for determining an operation time period in which each first operator graph in the first operator graph group is to be operated in the many-core system and target core resources for operating each first operator graph in the first operator graph group in each operation time period according to the operation requirement information of each first operator graph in the first operator graph group when the first operator graph group is determined to exist.
15. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the operator graph resource allocation method according to any one of claims 1-13 when executing the program.
16. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the operator graph resource allocation method according to any one of claims 1-13.
CN202110476735.1A 2020-08-27 2021-04-29 Operator graph resource allocation method and device, computer equipment and storage medium Pending CN115269165A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110476735.1A CN115269165A (en) 2021-04-29 2021-04-29 Operator graph resource allocation method and device, computer equipment and storage medium
PCT/CN2021/114217 WO2022042519A1 (en) 2020-08-27 2021-08-24 Resource allocation method and apparatus, and computer device and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110476735.1A CN115269165A (en) 2021-04-29 2021-04-29 Operator graph resource allocation method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115269165A true CN115269165A (en) 2022-11-01

Family

ID=83745011

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110476735.1A Pending CN115269165A (en) 2020-08-27 2021-04-29 Operator graph resource allocation method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115269165A (en)

Similar Documents

Publication Publication Date Title
US10031775B2 (en) Backfill scheduling for embarrassingly parallel jobs
CN105808328B (en) The methods, devices and systems of task schedule
CN104123184B (en) A kind of method and system for being used to distribute resource for the task in building process
CN112068957B (en) Resource allocation method, device, computer equipment and storage medium
CN106919449B (en) Scheduling control method of computing task and electronic equipment
CN110413412B (en) GPU (graphics processing Unit) cluster resource allocation method and device
CN109886859B (en) Data processing method, system, electronic device and computer readable storage medium
US11055139B2 (en) Smart accelerator allocation and reclamation for deep learning jobs in a computing cluster
CN112380020A (en) Computing power resource allocation method, device, equipment and storage medium
CN110889439B (en) Image feature extraction method and device, electronic equipment and storage medium
CN114416352A (en) Computing resource allocation method and device, electronic equipment and storage medium
CN111190712A (en) Task scheduling method, device, equipment and medium
US20160210171A1 (en) Scheduling in job execution
CN112905317A (en) Task scheduling method and system under rapid reconfigurable signal processing heterogeneous platform
CN116467061A (en) Task execution method and device, storage medium and electronic equipment
CN109634714B (en) Intelligent scheduling method and device
CN110825502B (en) Neural network processor and task scheduling method for neural network processor
CN106844024B (en) GPU/CPU scheduling method and system of self-learning running time prediction model
CN116069480B (en) Processor and computing device
CN115269165A (en) Operator graph resource allocation method and device, computer equipment and storage medium
Kim et al. Cooperative scheduling schemes for explainable DNN acceleration in satellite image analysis and retraining
CN111767121A (en) Operation method, device and related product
CN115269166A (en) Time allocation method and device for computation graph, computer equipment and storage medium
CN115269163A (en) Resource allocation method and device for computer graph, computer equipment and storage medium
CN114764372A (en) Data processing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination