A heterogeneous computing resource scheduling system based on a distributed computing cluster
By generating node resource profile data, constructing virtual instance partitioning strategies, and executing collaborative reservation with resource virtualization awareness, the resource boundaries are dynamically adjusted, solving the pipeline blockage problem caused by heterogeneous device reservation in edge computing clusters, improving cluster throughput, and reducing data migration overhead.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING GREEN ARMOR TECHNOLOGY CO LTD
- Filing Date
- 2026-04-16
- Publication Date
- 2026-07-21
AI Technical Summary
In edge computing clusters, because scarce heterogeneous devices on nodes are partially reserved by the preceding pipeline in an exclusive manner, subsequent pipelines cannot obtain the complete set of collaboratively reserved resources, resulting in a 'partial reservation' deadlock problem of permanent blocking and resource idleness.
The data acquisition module generates node resource profile data, the partitioning strategy construction module constructs the partitioning strategy for virtual instances, the dependency graph fusion module performs collaborative reservation for resource virtualization perception, and the dynamic adjustment module dynamically adjusts resource boundaries to achieve adaptive allocation and reclamation of resources.
It solves the problem of permanent pipeline blockage in heterogeneous computing resource scheduling, reduces resource starvation, improves cluster throughput, reduces data movement and communication overhead in the task dependency graph, and shortens pipeline execution latency.
Smart Images

Figure CN122431871A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of distributed computing technology, and more specifically to a heterogeneous computing resource scheduling system based on a distributed computing cluster. Background Technology
[0002] With the rapid development of artificial intelligence, big data processing, and high-performance computing tasks, distributed computing clusters have gradually integrated various types of computing devices, including central processing units (CPUs), graphics processing units (GPUs), field-programmable gate arrays (FPGAs), and neural network processors (NPUs), forming a typical heterogeneous computing environment. In deep learning and scientific computing scenarios, GPUs are widely deployed on cluster nodes due to their powerful parallel floating-point computing capabilities to accelerate matrix operations and convolutional neural network training.
[0003] In edge computing clusters, when multiple real-time video analytics pipelines with strong data dependencies are submitted concurrently, the scarce heterogeneous devices on the nodes are partially reserved by the preceding pipelines in an exclusive manner. This results in subsequent pipelines being unable to obtain the complete set of collaboratively reserved resources, and also being unable to utilize the acquired resources due to the execution dependencies between tasks. This leads to a "partial reservation" deadlock problem of permanent blocking and resource idleness. Summary of the Invention
[0004] The purpose of this invention is to provide a heterogeneous computing resource scheduling system based on a distributed computing cluster to solve the problems mentioned above.
[0005] The objective of this invention can be achieved through the following technical solutions: A heterogeneous computing power resource scheduling system based on a distributed computing cluster includes a data acquisition module, which is used to collect the model of heterogeneous devices, idle logical capacity, and task dependency graph data of pipelines to be scheduled on each computing node, and generate node resource profile data. The partitioning strategy construction module constructs a partitioning strategy that divides physical resources into virtual instances based on node resource profile data. The partitioning strategy includes dynamic segmentation parameters for physical logical regions and time slice quota parameters, and outputs a partitioning strategy parameter set. The dependency graph fusion module performs operator fusion and data path reconstruction on the task dependency graph based on the partitioning strategy parameter set to generate a fused dependency graph. The collaborative reservation module performs resource virtualization awareness collaborative reservation based on the fusion dependency graph and the partitioning strategy parameter set, allocates virtual instances to each task and sets the execution priority, and outputs a virtual instance allocation table. The dynamic adjustment module starts task execution according to the virtual instance allocation table, dynamically adjusts the resource boundaries of each virtual instance, reclaims the released resources to the idle pool, outputs updated node resource profile data and returns it to the input end.
[0006] As a further aspect of the present invention: the generation of node resource profile data specifically includes: The model of the heterogeneous device is obtained by reading the device identification code pre-programmed in the device firmware register on each computing node; Based on the model, the corresponding physical resource partition scanning program is invoked to traverse the status flag bits of each logical area within the device, accumulate the number of logical areas in an unoccupied state, and obtain the free logical capacity. Lexical analysis is performed on the submission scripts of the scheduling pipeline to extract explicit declarations of data flow between tasks, and directed edge connections are constructed to form a task dependency graph data.
[0007] As a further aspect of the present invention: the strategy for constructing a partitioning strategy that divides physical resources into virtual instances specifically includes: Extract the total physical logical area and the number of occupied virtual instances for each heterogeneous device from the node resource profile data, and calculate the remaining number of divisible logical areas. Based on the number of tasks at the same parallel level in the task dependency graph, the remaining number of divisible logical regions is divided into multiple region groups according to the load balancing rules. The size of each region group is a dynamic partitioning parameter of the physical logical region of a virtual instance. The historical execution duration distribution of each task is statistically analyzed. Based on the median execution duration, a weighted time slice length and quota period are allocated to each virtual instance to form the time slice quota parameter.
[0008] As a further aspect of the present invention: the output process of the dynamic segmentation parameters of the physical logic region is as follows: Extract the basic operation types and total number of operations contained in each task within the same parallel level from the task dependency graph. Multiply the preset weights corresponding to each operation type by the total number of operations and sum them to obtain the estimated computational load of each task. The number of all remaining divisible logical regions is initially allocated according to the estimated load of each task, resulting in the initial region size for each task. Based on the minimum divisible granularity of the physical logical region, the initial region size is rounded up for alignment, and the number of excess regions generated after alignment is counted. The excess regions are then added to the corresponding tasks in descending order of the estimated computational load to form the final region group segmentation result.
[0009] As a further aspect of the present invention: the generation of the fusion dependency graph specifically includes: Traverse all adjacent task pairs in the task dependency graph, and check whether the output data format of the upstream task in each adjacent task pair is consistent with the input data format of the downstream task. If they are consistent, mark them as fusionable pairs. Based on the time slice quota parameters in the partitioning strategy parameter set, determine whether the sum of the historical execution durations of the two tasks in the fusion pair is less than the length of a time slice. If it is less, the fusion pair is confirmed to meet the fusion conditions. Merge eligible pairs into a single fusion task, delete the data edges between the two tasks, and establish a one-way edge from the fusion task to the successor task of the original downstream task. At the same time, merge the data buffers originally used by the two tasks into a shared data area and output the fusion dependency graph.
[0010] As a further aspect of the present invention: the output virtual instance allocation table specifically includes: Extract the number and type of virtual instances required for each task from the fusion dependency graph, and dynamically segment the physical logical regions according to the physical logical region segmentation parameters in the partitioning strategy parameter set, and match the region group corresponding to the type from the current idle logical region pool; According to the topological order of the fusion dependency graph, the successfully matched region groups are assigned to the corresponding tasks one by one, and the assigned region groups are removed from the idle pool. The binding relationship between each region group and the task is recorded. Based on the number of successor tasks in the fusion dependency graph for each task, the initial priority value of each task is calculated. Then, the initial priority value is weighted by the time slice quota parameter in the partitioning strategy parameter set to obtain the execution priority of each task.
[0011] As a further aspect of the present invention: the step of assigning successfully matched region groups to corresponding tasks one by one according to the topological order of the fusion dependency graph specifically includes: Extract the longest path length from each task to the final task from the fusion dependency graph, and use the longest path length as the path weight value for each task. Sort all tasks in descending order of path weight and check whether the sorting result satisfies the dependency constraints. If there is a case where the path weight of a downstream task is not less than that of an upstream task, swap their sorting positions until all dependency constraints are satisfied, and obtain the topology assignment sequence. Each task is retrieved sequentially according to the topology allocation sequence. The currently matched region group is assigned to the task, and the identifier of the corresponding region group is written into the binding record of the task.
[0012] As a further aspect of the present invention: the step of starting task execution according to the virtual instance allocation table, dynamically adjusting the resource boundaries of each virtual instance, and reclaiming the released resources to the idle pool specifically includes: After each task is started according to the virtual instance allocation table, the occupancy rate of each virtual instance and the number of resource conflicts are collected periodically. When the occupancy rate of a virtual instance is lower than the preset occupancy threshold for two consecutive collection cycles, the resource boundary of the virtual instance is shrunk inward by a minimum division unit, and the logical area released by the shrinkage is returned to the idle pool. When the number of resource conflicts of a virtual instance exceeds the preset conflict limit threshold within a single quota period, a logical region that is adjacent to the current virtual instance and is not occupied is taken out from the idle pool and the resource boundary of the virtual instance is expanded outward by a minimum division unit. The updated idle logical capacity of each node is merged with the current virtual instance allocation table to generate updated node resource profile data, which is then returned to the input.
[0013] The step of retrieving an unoccupied logical region adjacent to the current virtual instance from the idle pool and extending the resource boundary of the virtual instance outward by a minimum granularity unit specifically includes: Read the start and end addresses of the physical logical region of the current virtual instance, scan the status flags of the next adjacent logical region along the address increment direction, and determine whether the adjacent logical region is in the free pool; If an adjacent logical region exists in the free pool, the record of the adjacent logical region is deleted from the free pool, and the end address of the current virtual instance is updated to the end address of the adjacent logical region, thus completing the expansion of the resource boundary outward by a minimum unit of granularity. Write the updated start and end addresses of the current virtual instance into the address range field of the corresponding entry in the virtual instance allocation table, and switch the device firmware mapping relationship corresponding to the original adjacent logical regions to the current virtual instance.
[0014] The beneficial effects of this invention are: (1) By introducing a collaborative reservation and dynamic resource boundary adjustment mechanism with resource virtualization awareness, the problem of permanent pipeline blockage caused by partial reservation of heterogeneous scarce resources (such as field-programmable gate arrays and neural network processors) in edge computing clusters is solved. When multiple homogeneous pipelines submit concurrently, this invention can dynamically divide a single physical device into multiple virtual instances, and adaptively shrink or expand the resource boundary according to the real-time occupancy rate and resource conflict frequency of each virtual instance, thereby reclaiming idle logical areas and redistributing them to blocked pipelines, reducing the frequency of resource starvation and improving the overall throughput of the cluster.
[0015] (2) By using operator fusion and a topology allocation strategy based on the longest path weight, the cross-task data movement and communication overhead in the task dependency graph are reduced. In the fusion dependency graph construction stage, this invention merges adjacent task pairs with consistent output data formats and a total execution time less than a weighted time slice length into a single fusion task and allocates a shared data area to it, eliminating data edge and buffer copying operations between the original task pairs. Simultaneously, a topology allocation sequence is generated according to the longest path length from each task to the final task, ensuring that tasks on the critical path receive virtual instance resources first. This scheme effectively shortens the end-to-end execution latency of the pipeline and reduces the control overhead in heterogeneous computing power scheduling. Attached Figure Description
[0016] The invention will now be further described with reference to the accompanying drawings.
[0017] Figure 1 This is a system block diagram of the present invention. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] Please see Figure 1 As shown, this invention is a heterogeneous computing resource scheduling system based on a distributed computing cluster, comprising: The data acquisition module is used to collect the model of heterogeneous devices, idle logical capacity, and task dependency graph data of pipelines to be scheduled on each computing node, and generate node resource profile data. The partitioning strategy construction module constructs a partitioning strategy that divides physical resources into virtual instances based on node resource profile data. The partitioning strategy includes dynamic segmentation parameters for physical logical regions and time slice quota parameters, and outputs a partitioning strategy parameter set. The dependency graph fusion module performs operator fusion and data path reconstruction on the task dependency graph based on the partitioning strategy parameter set to generate a fused dependency graph. The collaborative reservation module performs resource virtualization awareness collaborative reservation based on the fusion dependency graph and the partitioning strategy parameter set, allocates virtual instances to each task and sets the execution priority, and outputs a virtual instance allocation table. The dynamic adjustment module starts task execution according to the virtual instance allocation table, dynamically adjusts the resource boundaries of each virtual instance, reclaims the released resources to the idle pool, outputs updated node resource profile data and returns it to the input.
[0020] The data acquisition module collects data on the model of heterogeneous devices on each computing node, their idle logical capacity, and the task dependency graph data of pipelines to be scheduled, generating node resource profile data, specifically including: Upon startup of each compute node, a resource monitoring process running on the node reads the firmware registers of each heterogeneous device (including but not limited to FPGAs and neural network processors) connected to that node. These firmware registers are pre-programmed with a unique device identifier by the manufacturer at the time of device shipment. This identifier is hexadecimal encoded and 8 bytes long. The resource monitoring process reads 8 bytes of data consecutively from offset 0 of the target device's base address register by calling the device configuration space access interface provided by the operating system (e.g., using the "read configuration space" command in Linux). This yields the original identifier. Subsequently, this original identifier is compared one by one with entries in a pre-defined device model lookup table for this node. This lookup table pre-stores the mapping relationship between each known device identifier and its corresponding model name (e.g., "FPGA model A" or "neural network processor model B"). Upon successful matching, the matched model name is output as the model name of the heterogeneous device.
[0021] Based on the heterogeneous device models obtained in the first step, the resource monitoring process searches for the physical resource partition scanning program corresponding to that model in the local device capability description file. This scanning program is an executable binary code specifically designed to traverse the status flags of each independent logical region within the device of that model. The size of each logical region is fixed by the device hardware design (e.g., a configurable logic block of a field-programmable gate array, or a computing unit of a neural network processor). The resource monitoring process loads the scanning program into the node's memory and executes it. The scanning program sequentially reads the status register array maintained internally by the device. Each bit in this array corresponds to the occupancy status of a logical region, where "0" indicates unoccupied and "1" indicates occupied. Starting from address offset 0, the scanning program reads the values of all status registers in ascending order, accumulating the number of bits with a value of "0", and recording this accumulated value as the free logical capacity. For example, if a device has 256 logical regions, and the scan finds 80 bits with a value of "0" in the status registers, then the free logical capacity is 80.
[0022] The resource monitoring process receives user-submitted pipeline scripts to be scheduled. These scripts are written in a structured text format (such as JSON or YAML) and contain declarations of all tasks and data flow statements between tasks. The resource monitoring process first performs lexical analysis on the script, using regular expression matching rules to identify the task names following all "task" keywords, as well as the names of data queues referenced in the "input source" and "output target" fields within each task. For example, if the script contains two explicit declarations, "Task A's output target is queue Q1" and "Task B's input source is queue Q1," the parser extracts a data flow relationship from task A to task B. The parser treats all extracted tasks as nodes and each data flow relationship as a directed edge (the direction of the edge is from the output task to the input task), constructing a directed graph. If there exists a path in this directed graph that starts from a task, traverses several edges, and returns to itself, the parser reports an error and terminates; otherwise, it outputs the directed graph as a task dependency graph.
[0023] In the partitioning strategy construction module, based on the node resource profile data, a partitioning strategy is constructed to divide physical resources into virtual instances. The partitioning strategy includes dynamic segmentation parameters for physical logical regions and time slice quota parameters, and outputs a partitioning strategy parameter set, specifically including: From the received node resource profile data, the total physical logical regions contained in each heterogeneous device are extracted. This total is fixed by the device's hardware design; for example, a field-programmable gate array (FPGA) device contains 256 configurable logical blocks, each of which is a minimum physical logical region. Simultaneously, the number of currently occupied virtual instances on the device is extracted from the node resource profile data. Each virtual instance occupies an integer number of physical logical regions upon creation. Subtracting the total number of logical regions occupied by the virtual instances from the total number of physical logical regions yields the remaining number of divisible logical regions. For example, if a device has 256 logical regions, and three virtual instances occupy 32, 48, and 64 logical regions respectively, the total number of occupied logical regions is 144, leaving 112 remaining divisible logical regions.
[0024] The number of tasks at the same parallel level is extracted from the task dependency graph. The same parallel level refers to a group of tasks in the task dependency graph that have no data dependencies and can be executed simultaneously. To determine the number of logical regions allocated to each task, the estimated computational load of each task is first calculated: The basic operation types (e.g., addition, multiplication, data movement) and the total number of operands contained in each task within the same parallel level are extracted from the task dependency graph. Each basic operation type is pre-assigned a weight value (e.g., addition operation weight is 1, multiplication operation weight is 2, data movement operation weight is 1). The weights of each operation type in the task are multiplied by the corresponding total number of operands, and the sum is obtained to obtain the estimated computational load of the task. Then, the number of remaining divisible logical regions is initially allocated according to the proportion of the estimated computational load of each task: For each task, its estimated computational load is divided by the sum of the estimated computational loads of all tasks within the same parallel level to obtain a proportionality coefficient. This proportionality coefficient is multiplied by the number of remaining divisible logical regions, and the product is the initial region size of the task (if the product is not an integer, a decimal is retained). Next, based on the minimum divisible granularity of the device's physical logical region (this granularity is determined by the device hardware; for example, the minimum divisible granularity of a field-programmable gate array is one logic block), each initial region size is rounded up for alignment. That is, if the initial region size is a decimal, the smallest integer greater than that decimal is rounded down. After alignment, the difference between the sum of the aligned region sizes and the remaining number of divisible logical regions is recorded as the excess region number. Finally, all tasks are sorted from largest to smallest according to the estimated load, and one logical region is added to each task sequentially until the excess region number is exhausted. The final number of logical regions for each task is the dynamic partitioning parameter of the physical logical region for that virtual instance.
[0025] For each task, the execution time records of the most recent 100 executions are compiled. After removing the maximum and minimum values, the remaining durations are sorted in ascending order, and the median value is taken as the median execution time. Based on this median, a weighted time slice length is allocated to each virtual instance: the weighted time slice length equals the base time slice length (default 10 milliseconds) multiplied by the ratio of the median historical execution time of the task to the minimum median historical execution time of all tasks. Simultaneously, a quota period is set for each virtual instance, equal to the weighted time slice length of that virtual instance multiplied by the number of all virtual instances on the same physical device. The weighted time slice length and quota period of each virtual instance are combined into a tuple as the time slice quota parameter. The physical logical region dynamic partitioning parameters of each virtual instance obtained in the previous steps are merged with this time slice quota parameter to form a partitioning strategy parameter set.
[0026] In the dependency graph fusion module, based on the partitioning strategy parameter set, operator fusion and data path reconstruction are performed on the task dependency graph to generate a fused dependency graph, specifically including: The fusion processor iterates through all adjacent task pairs in the input task dependency graph. An adjacent task pair is defined as two tasks connected by a directed edge from the upstream task to the downstream task. For each adjacent task pair, the fusion processor reads the output data format description field of the upstream task, which records the dimensions (e.g., height, width, number of channels) and data type (e.g., fixed-point or floating-point). Simultaneously, it reads the input data format description field of the downstream task. The fusion processor compares the dimension values and data type identifiers in the two format description fields one by one. If all dimension values are equal and the data type identifiers are the same, the output data format is determined to be consistent with the input data format, and the adjacent task pair is marked as a fusionable pair; otherwise, it is not marked.
[0027] The fusion process extracts the weighted time slice length from the time slice quota parameters of each virtual instance in the partitioning strategy parameter set. Simultaneously, the fusion process queries the historical execution duration records for the median historical execution duration of the upstream and downstream tasks in the fusionable pair, and adds them together to obtain the sum of execution durations. This sum of execution durations is compared to a weighted time slice length. If the sum of execution durations is less than a weighted time slice length, the fusionable pair is confirmed to meet the fusion criteria; otherwise, it is confirmed that the fusion criteria are not met, and the original adjacent task pairs are retained unchanged.
[0028] For each fusion pair confirmed to meet the fusion criteria, the fusion process performs the following operations: Create a new fusion task, whose name is formed by connecting the upstream and downstream task names with an underscore; delete the directed edge between the upstream and downstream tasks in the original task dependency graph; then, identify all successor tasks of the original downstream task (i.e., tasks pointed to by the original downstream task through directed edges) and create unidirectional edges pointing to each successor task for the fusion task; next, merge the starting addresses of the data buffers originally used by the upstream and downstream tasks, allocate a new shared data area whose size is the sum of the sizes of the two original data buffers, and write the starting address of this shared data area into the output address field of the fusion task; finally, remove the upstream and downstream tasks from the task dependency graph, add the fusion task, and output the modified directed graph as the fusion dependency graph.
[0029] In the collaborative reservation module, based on the fusion dependency graph and the partitioning strategy parameter set, resource virtualization-aware collaborative reservation is performed. Virtual instances are allocated to each task, execution priorities are set, and a virtual instance allocation table is output, specifically including: The collaborative reservation process iterates through each task node in the input fusion dependency graph, reading the attribute fields of each task node. These fields pre-declare the number of virtual instances required for the task (e.g., 1 or 2) and the type of virtual instances (e.g., "Field-Programmable Gate Array type" or "Neural Network Processor type"). Simultaneously, the collaborative reservation process extracts dynamic partitioning parameters for physical logical regions from the partitioning strategy parameter set. These parameters record the size and type of each currently available logical region group in list form. Based on the virtual instance types required by the task, the collaborative reservation process filters out matching region groups from the available logical region pool. Then, it selects a region group whose size is not less than the number of logical regions required by the task as the matching result. If a match is successful, the region group is marked as pending allocation; if a match fails, the current task enters the waiting queue, pausing the subsequent allocation process until a new available region group is released.
[0030] The collaborative reservation process first calculates the longest path length from each task to the terminal task in the fusion dependency graph. A terminal task is a task in the fusion dependency graph that has no successor tasks. The specific calculation method is as follows: For each terminal task, its longest path length is set to 0. For other tasks, its longest path length is equal to the maximum of the longest path lengths of all its successor tasks plus 1. The above process is expressed using a recursive formula: ;in, Indicates task The longest path length to the final task. Indicates task The set of all subsequent tasks, Indicates the successor task The longest path length to the final task. The cooperative reservation handler iterates backwards from the final task, calculating the longest path length for each task in turn. The value is used as the path weight for each task.
[0031] Then, the collaborative reservation process sorts all tasks in descending order of path weight values to obtain an initial sequence. Next, it checks whether the sequence satisfies dependency constraints: for each directed edge in the fusion dependency graph pointing from task A to task B, task A must be positioned before task B in the sequence. If there exists a directed edge where the path weight value of the downstream task (the task being pointed to) is not less than the path weight value of the upstream task (the task being pointed to), then the positions of these two tasks in the sequence are swapped, and this check is repeated until all dependency constraints are satisfied. The final sequence is the topology allocation sequence.
[0032] The collaborative reservation process retrieves each task sequentially according to the topology allocation sequence and formally assigns the region group successfully matched for that task in the first step to that task. During allocation, the start address, end address, and type information of the region group are written into the binding record corresponding to the task, and the region group is removed from the idle logical region pool to avoid duplicate allocation. The binding record is stored in a table format, with each row containing the task name, region group identifier, region group start address, and region group end address. After all tasks are allocated, the collaborative reservation process outputs this binding record table as part of the virtual instance allocation table.
[0033] The collaborative reservation process calculates an initial priority value based on the number of successor tasks for each task in the fusion dependency graph. The number of successor tasks refers to the number of tasks directly reachable from this task via a directed edge. The initial priority value is set to the number of successor tasks for this task plus 1. Then, the weighted time slice length is extracted from the time slice quota parameters of the virtual instance corresponding to each task from the partitioning strategy parameter set, and this weighted time slice length is used as the weight coefficient. The formula for calculating the execution priority is: ;in, Indicates task The execution priority value. Indicates task The number of subsequent tasks, Indicates task The weighted time slice length (in milliseconds) of the allocated virtual instance. The co-reservation handler calculates this for each task. After setting the value, the value is written to the priority field of the corresponding task in the virtual instance allocation table. Finally, the collaborative reservation handler outputs a complete table containing region group binding relationships and execution priorities as the virtual instance allocation table.
[0034] In the dynamic adjustment module, tasks are initiated according to the virtual instance allocation table, the resource boundaries of each virtual instance are dynamically adjusted, released resources are reclaimed to the idle pool, and updated node resource profile data is output and returned to the input. Specifically, this includes: The dynamic adjustment process starts each task on the corresponding physical device according to the start address, end address, and priority of each virtual instance recorded in the virtual instance allocation table. After startup, the dynamic adjustment process monitors each virtual instance at a fixed collection period (e.g., once every 10 milliseconds). For each virtual instance, the occupancy rate is collected by reading the number of effective working clock cycles of the physical logical region corresponding to the virtual instance in the current period, dividing it by the total number of clock cycles in the period, multiplying the resulting ratio by 100, and taking the integer part as the occupancy rate (e.g., 75 represents a occupancy rate of 75%). The resource conflict occurrence count is collected by reading the conflict counter maintained internally by the device. This counter records the number of times two virtual instances simultaneously request the same physical resource (e.g., the same memory port or the same data bus) and are rejected by the hardware arbitration unit. The dynamic adjustment process reads the current value of this counter in each collection period and subtracts the value read in the previous period to obtain the number of new resource conflicts occurring in the current period.
[0035] The dynamic adjustment process maintains the historical occupancy rate of each virtual instance, retaining the occupancy rate values from the two most recent collection periods. When the occupancy rate of a virtual instance falls below a preset lower occupancy threshold for two consecutive collection periods, a shrinkage operation is triggered. The preset lower occupancy threshold is set to 20%. The specific process of the shrinkage operation is as follows: the dynamic adjustment process shrinks the resource boundary of the virtual instance inward by a minimum partitioning unit. The minimum partitioning unit is determined by the device hardware; for example, for a field-programmable gate array (FPGA) device, a minimum partitioning unit is a configurable logical block. During inward shrinkage, the starting address of the virtual instance remains unchanged, and the ending address is reduced by the address offset corresponding to the minimum partitioning unit. After shrinkage, the logical region that was originally located after the original ending address and before the new ending address is released. The dynamic adjustment process records the starting and ending addresses of this logical region as idle and returns it to the idle pool.
[0036] The dynamic adjustment process counts the number of resource conflicts for each virtual instance within a single quota period. The length of the quota period is equal to the weighted time slice length of the virtual instance multiplied by the number of virtual instances on the same physical device. When the number of resource conflicts for a virtual instance exceeds a preset conflict limit threshold within a single quota period, an expansion operation is triggered. The preset conflict limit threshold is set to 5 times. The specific process of the expansion operation is as follows: The dynamic adjustment process first reads the start and end addresses of the physical logical region of the current virtual instance. Then, it scans the status flags of the next adjacent logical region along the address increment direction (i.e., from the start address to the direction of increasing address value). The status flags are stored in the index table of the free pool, with each logical region corresponding to a flag bit, the value of which is "free" or "occupied". If the status flag of an adjacent logical region is "free", it means that the logical region is located in the free pool. The dynamic adjustment process deletes the record of the adjacent logical region from the free pool and updates the end address of the current virtual instance to the end address of the adjacent logical region, completing the expansion of the resource boundary outward by a minimum unit of granularity. After expansion, the starting address of the virtual instance (which remains unchanged) and the updated ending address are written into the address range field of the corresponding entry in the virtual instance allocation table. Simultaneously, the address remapping interface provided by the device firmware is called to switch the device firmware mapping relationship corresponding to the original adjacent logical regions to the current virtual instance, making the newly added logical region part of the current virtual instance.
[0037] After each shrink or expand operation, the dynamic adjustment process collects the current idle logical capacity (i.e., the number of logical regions contained in the idle pool on each device) of all heterogeneous devices on each compute node. This idle logical capacity is then merged with the current virtual instance allocation table (containing the start address, end address, and priority of each virtual instance) to generate a new node resource profile. The format of this data is completely consistent with the node resource profile generated during the initial data acquisition phase. The dynamic adjustment process then returns this data to the input of the data acquisition step, triggering a new round of scheduling decisions.
[0038] The working principle of this invention is as follows: First, data on the model of heterogeneous devices, idle logical capacity, and task dependency graphs of pipelines to be scheduled are collected on each computing node to generate node resource profile data. Then, based on this profile data, a partitioning strategy is constructed to divide physical resources into virtual instances, resulting in a partitioning strategy parameter set containing dynamic partitioning parameters for physical logical regions and time slice quota parameters. Next, based on this parameter set, operator fusion and data path reconstruction are performed on the task dependency graph to generate a fused dependency graph. Then, based on the fused dependency graph and the partitioning strategy parameter set, collaborative reservation for resource virtualization awareness is performed. Virtual instances are allocated to each task according to the topology allocation sequence sorted by the longest path weight, and execution priorities are set, outputting a virtual instance allocation table. Finally, task execution is started according to the virtual instance allocation table, dynamically monitoring the occupancy rate and resource conflict count of each virtual instance. When the occupancy rate is continuously lower than the lower threshold, the resource boundary is shrunk inward and the released logical regions are recycled to the idle pool. When the number of conflicts exceeds the upper threshold, adjacent idle logical regions are taken from the idle pool to expand the resource boundary outward, the node resource profile data is updated, and the cycle scheduling is returned.
[0039] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the claims of this invention should still fall within the patent coverage of this invention.
Claims
1. A heterogeneous computing resource scheduling system based on a distributed computing cluster, characterized in that, include: The data acquisition module is used to collect the model of heterogeneous devices, idle logical capacity, and task dependency graph data of pipelines to be scheduled on each computing node, and generate node resource profile data. The partitioning strategy construction module constructs a partitioning strategy that divides physical resources into virtual instances based on node resource profile data. The partitioning strategy includes dynamic segmentation parameters for physical logical regions and time slice quota parameters, and outputs a partitioning strategy parameter set. The dependency graph fusion module performs operator fusion and data path reconstruction on the task dependency graph based on the partitioning strategy parameter set to generate a fused dependency graph. The collaborative reservation module performs resource virtualization awareness collaborative reservation based on the fusion dependency graph and the partitioning strategy parameter set, allocates virtual instances to each task and sets the execution priority, and outputs a virtual instance allocation table. The dynamic adjustment module starts task execution according to the virtual instance allocation table, dynamically adjusts the resource boundaries of each virtual instance, reclaims the released resources to the idle pool, outputs updated node resource profile data and returns it to the input end.
2. The heterogeneous computing resource scheduling system based on a distributed computing cluster according to claim 1, characterized in that, The generated node resource profile data specifically includes: The model of the heterogeneous device is obtained by reading the device identification code pre-programmed in the device firmware register on each computing node; Based on the model, the corresponding physical resource partition scanning program is invoked to traverse the status flag bits of each logical area within the device, accumulate the number of logical areas in an unoccupied state, and obtain the free logical capacity. Lexical analysis is performed on the submission scripts of the scheduling pipeline to extract explicit declarations of data flow between tasks, and directed edge connections are constructed to form a task dependency graph data.
3. The heterogeneous computing resource scheduling system based on a distributed computing cluster according to claim 1, characterized in that, The strategy for dividing physical resources into virtual instances includes: Extract the total physical logical area and the number of occupied virtual instances for each heterogeneous device from the node resource profile data, and calculate the remaining number of divisible logical areas. Based on the number of tasks at the same parallel level in the task dependency graph, the remaining number of divisible logical regions is divided into multiple region groups according to the load balancing rules. The size of each region group is a dynamic partitioning parameter of the physical logical region of a virtual instance. The historical execution duration distribution of each task is statistically analyzed. Based on the median execution duration, a weighted time slice length and quota period are allocated to each virtual instance to form the time slice quota parameter.
4. A heterogeneous computing resource scheduling system based on a distributed computing cluster according to claim 3, characterized in that, The output process of the dynamic segmentation parameters of the physical logical region is as follows: Extract the basic operation types and total number of operations contained in each task within the same parallel level from the task dependency graph. Multiply the preset weights corresponding to each operation type by the total number of operations and sum them to obtain the estimated computational load of each task. The number of all remaining divisible logical regions is initially allocated according to the estimated load of each task, resulting in the initial region size for each task. Based on the minimum divisible granularity of the physical logical region, the initial region size is rounded up for alignment, and the number of excess regions generated after alignment is counted. The excess regions are then added to the corresponding tasks in descending order of the estimated computational load to form the final region group segmentation result.
5. A heterogeneous computing resource scheduling system based on a distributed computing cluster according to claim 1, characterized in that, The generation of the fusion dependency graph specifically includes: Traverse all adjacent task pairs in the task dependency graph, and check whether the output data format of the upstream task in each adjacent task pair is consistent with the input data format of the downstream task. If they are consistent, mark them as fusionable pairs. Based on the time slice quota parameters in the partitioning strategy parameter set, determine whether the sum of the historical execution durations of the two tasks in the fusion pair is less than the length of a time slice. If it is less, the fusion pair is confirmed to meet the fusion conditions. Merge eligible pairs into a single fusion task, delete the data edges between the two tasks, and establish a one-way edge from the fusion task to the successor task of the original downstream task. At the same time, merge the data buffers originally used by the two tasks into a shared data area and output the fusion dependency graph.
6. A heterogeneous computing resource scheduling system based on a distributed computing cluster according to claim 1, characterized in that, The output virtual instance allocation table specifically includes: Extract the number and type of virtual instances required for each task from the fusion dependency graph, and dynamically segment the physical logical regions according to the physical logical region segmentation parameters in the partitioning strategy parameter set, and match the region group corresponding to the type from the current idle logical region pool; According to the topological order of the fusion dependency graph, the successfully matched region groups are assigned to the corresponding tasks one by one, and the assigned region groups are removed from the idle pool. The binding relationship between each region group and the task is recorded. Based on the number of successor tasks in the fusion dependency graph for each task, the initial priority value of each task is calculated. Then, the initial priority value is weighted by the time slice quota parameter in the partitioning strategy parameter set to obtain the execution priority of each task.
7. A heterogeneous computing resource scheduling system based on a distributed computing cluster according to claim 6, characterized in that, The step of assigning successfully matched region groups to corresponding tasks one by one according to the topological order of the fusion dependency graph specifically includes: Extract the longest path length from each task to the final task from the fusion dependency graph, and use the longest path length as the path weight value for each task. Sort all tasks in descending order of path weight and check whether the sorting result satisfies the dependency constraints. If there is a case where the path weight of a downstream task is not less than that of an upstream task, swap their sorting positions until all dependency constraints are satisfied, and obtain the topology assignment sequence. Each task is retrieved sequentially according to the topology allocation sequence. The currently matched region group is assigned to the task, and the identifier of the corresponding region group is written into the binding record of the task.
8. A heterogeneous computing resource scheduling system based on a distributed computing cluster according to claim 1, characterized in that, The process of initiating task execution according to the virtual instance allocation table, dynamically adjusting the resource boundaries of each virtual instance, and reclaiming released resources to the idle pool specifically includes: After each task is started according to the virtual instance allocation table, the occupancy rate of each virtual instance and the number of resource conflicts are collected periodically. When the occupancy rate of a virtual instance is lower than the preset occupancy threshold for two consecutive collection cycles, the resource boundary of the virtual instance is shrunk inward by a minimum division unit, and the logical area released by the shrinkage is returned to the idle pool. When the number of resource conflicts of a virtual instance exceeds the preset conflict limit threshold within a single quota period, a logical region that is adjacent to the current virtual instance and is not occupied is taken out from the idle pool and the resource boundary of the virtual instance is expanded outward by a minimum division unit. The updated idle logical capacity of each node is merged with the current virtual instance allocation table to generate updated node resource profile data, which is then returned to the input.
9. A heterogeneous computing resource scheduling system based on a distributed computing cluster according to claim 8, characterized in that, The step of retrieving an unoccupied logical region adjacent to the current virtual instance from the idle pool and extending the resource boundary of the virtual instance outward by a minimum granularity unit specifically includes: Read the start and end addresses of the physical logical region of the current virtual instance, scan the status flags of the next adjacent logical region along the address increment direction, and determine whether the adjacent logical region is in the free pool; If an adjacent logical region exists in the free pool, the record of the adjacent logical region is deleted from the free pool, and the end address of the current virtual instance is updated to the end address of the adjacent logical region, thus completing the expansion of the resource boundary outward by a minimum unit of granularity. Write the updated start and end addresses of the current virtual instance into the address range field of the corresponding entry in the virtual instance allocation table, and switch the device firmware mapping relationship corresponding to the original adjacent logical regions to the current virtual instance.