Distributed computing task dynamic allocation system based on multi-graphics card collaboration
By collecting graphics card status data in real time and generating spatial and temporal vectors, and combining this with a multi-dimensional computing module for refined management of graphics card resources, the problems of memory fragmentation and timing deviation in multi-graphics card collaborative systems are solved, achieving efficient task allocation and improved system stability.
Patent Information
- Application Number
- CN202511131648.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-13
- Publication Date
- 2025-11-25
AI Technical Summary
Existing multi-GPU collaborative systems suffer from coarse spatiotemporal state acquisition in the dynamic allocation of computing tasks, failing to monitor key parameters in real time. This leads to memory fragmentation and timing deviations, resulting in computing latency and performance degradation.
By integrating multiple sets of sensors to collect real-time hardware status data of the graphics card, performing feature extraction, generating spatial and temporal vectors, and combining a multi-dimensional computing module to perform refined modeling of the graphics card's capabilities and task requirements, the dynamic scheduling decision module performs optimized allocation, including resource adaptation, timing synchronization, and fragmentation risk analysis.
It achieves precise perception of graphics card resources and efficient allocation of tasks, reduces task failure rate, improves system stability and overall computing efficiency, and significantly reduces computing latency, especially in high-concurrency and high-real-time scenarios.
Smart Images

Figure CN121008893A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the field of graphic card cooperation technology, and particularly relates to a distributed computing task dynamic allocation system based on multi-graphic card cooperation. BACKGROUND
[0002] In the field of computer distributed computing, multi-graphic card cooperation computing has become a core technology path for improving computing power and is widely used in high-performance computing scenarios such as artificial intelligence training, scientific simulation and graphic rendering. With the increase of task complexity, the multi-graphic card cooperation scene has increasingly high requirements for the refinement of resource scheduling - not only the space resources such as the computing power and the video memory of multiple graphic cards need to be coordinated, but also the time dimension constraints such as the task time window and the time sequence synchronization need to be coped with. The key of the computing task dynamic allocation as a key link of the multi-graphic card cooperation lies in accurately matching the resources and the tasks in the time and space dimensions according to the real-time state of the graphic card and the task demand, for example, dynamically allocating different graphic cards to process the neural network layer computing in deep learning training, or allocating the most suitable rendering node for a video frame in real-time rendering to ensure that the task is efficiently executed under the multi-dimensional constraints such as the computing power, the video memory and the time window.
[0003] However, the existing multi-graphic card cooperation system has significant defects in the computing task dynamic allocation. Firstly, the time and space state acquisition is extensive, only the basic indexes such as the graphic card computing power load and the video memory total amount can be obtained, and the real-time monitoring of the key parameters such as the continuous video memory capacity, the video memory fragmentation rate and the time sequence dispersion is lacked, which leads to the fact that large tasks cannot be scheduled due to too much fragmentation or computing delay is caused due to time sequence deviation. Secondly, the scheduling strategy is single-dimensional and does not comprehensively consider indexes such as the space adaptation degree, the time adaptation degree and the fragmentation risk, which easily causes a chain reaction of “uneven load-fragment accumulation-synchronization failure”, for example, a graphic card is continuously allocated new tasks due to the fragmentation of the video memory caused by long-term processing of small tasks, and finally the overall performance of the system is reduced.
[0004] The root cause of the above problems lies in that the dynamic nature of the resource state and the task demand in the distributed environment is not effectively modeled: the heterogeneity of the graphic card hardware, such as the clock accuracy difference of different models of graphic cards, and the diversity of the tasks, such as the time sequence sensitivity of real-time tasks and the fragmentation sensitivity of batch processing tasks, make it difficult for the traditional static allocation strategy to cope with them. For example, the video memory fragmentation is usually caused by long-term residence of small tasks, if the system cannot identify the fragmentation risk and trigger the pre-reorganization, the continuous video memory space will be gradually exhausted, leading to the failure of the subsequent large task scheduling; again, the cross-graphic card task fragmentation may be difficult to maintain the time sequence synchronization, and the multi-factor model distributed in different graphic cards, such as scene deployment, satellite monitoring and radar tracking, is difficult to maintain the global time sequence consistency, leading to the break of the deduction rhythm. SUMMARY
[0005] To address the shortcomings of existing technologies, this invention provides a distributed computing task dynamic allocation system based on multi-GPU collaboration, which solves the problems mentioned in the background technology.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a distributed computing task dynamic allocation system based on multi-GPU collaboration, comprising,
[0007] The spatiotemporal state detection module uses multiple sets of sensors to acquire graphics card hardware state data and perform feature extraction.
[0008] The task feature parsing module parses the task descriptions from the external task queue to obtain spatial and temporal vectors;
[0009] The multidimensional computing module performs multidimensional analysis on the graphics card based on the graphics card hardware status data, spatial vector, and temporal vector, including spatial resource dimension, temporal dimension, cross-graphics card timing synchronization, and fragmentation risk analysis, in order to update the list of candidate graphics cards.
[0010] The dynamic scheduling decision module, based on the multidimensional computing module, analyzes the eligibility of each graphics card to be assigned corresponding tasks.
[0011] Preferably, the spatiotemporal state detection module includes a data acquisition unit and a data extraction unit;
[0012] The data acquisition unit is used to integrate multiple sets of sensors on the graphics card hardware in advance to collect graphics card hardware status data in real time. The graphics card hardware status data includes the free video memory blocks in each graphics card, the capacity of each free video memory block in the corresponding graphics card, the time step of each graphics card, the continuous video memory capacity of each graphics card, the total video memory capacity of each graphics card, the video memory capacity occupied by each task in each graphics card, the dwell time of the corresponding task in the graphics card, the computing load of each graphics card, and the total number of graphics cards participating in the task.
[0013] The data extraction unit is used to extract and calculate dimensional data in the spatial and temporal dimensions based on the graphics card hardware status data. The dimensional data includes memory fragmentation rate and temporal dispersion. The memory fragmentation rate is calculated by the ratio of the sum of the squares of all free blocks to the square of the total free capacity, which is used to quantify the degree of fragmentation. The temporal dispersion is calculated in the form of standard deviation, which is used to quantify the degree of fluctuation of the time step when the graphics card is executing a task.
[0014] Preferably, the task feature parsing module includes a spatial parsing unit and a temporal parsing unit;
[0015] The spatial resolution unit determines the resolution method based on the task description type of the external task queue. During the resolution process, it extracts the computing power requirement, memory requirement, and data localization rate from the task description of the external task queue to generate a spatial vector. The specific expression of the spatial vector is: Rreq =[C req M req L req ], where R req C is a spatial vector. req To meet computing power requirements, M req To meet video memory requirements, L req For data localization rate;
[0016] The time resolution unit is used to extract time windows and timing error tolerances from the task descriptions of the external task queue during the resolution process to generate a time vector. The specific expression for the time vector is: T req =[T start T end ΔT tol ], where T req Let T be the time vector. start T is the start time. end Let ΔT be the end time. tol This represents the timing error tolerance; the time window includes the start and end times.
[0017] Preferably, the multidimensional computing module includes a resource adaptation analysis unit, a global timing synchronization unit, and a video memory fragmentation pre-control unit;
[0018] The resource adaptation analysis unit includes a priority verification subunit and an analysis subunit;
[0019] The priority verification subunit is used to determine whether the corresponding graphics card will be judged as space infeasible based on the space vector and graphics card hardware status data. If the video memory requirement is greater than the contiguous video memory capacity, the corresponding graphics card will be judged as space infeasible. At this time, the corresponding graphics card will be removed from the list of candidate graphics cards. After traversal, the updated list of candidate graphics cards is obtained.
[0020] The analysis subunit is used to quantify the impact of data transfer costs on the task by multiplying the data localization rate in the space vector with the data localization rate of the corresponding graphics card in the updated list of candidate graphics cards, calculating the effective localization rate, and calculating the computing power adaptation factor based on the relationship between the computing power demand in the space vector and the computing power load of the corresponding graphics card. This factor is used to penalize overloaded graphics cards. Specifically: Where Sz is the computing power adaptation factor of the corresponding graphics card, and C load The computational load of the corresponding graphics card is determined; combined with the graphics card hardware status data, the spatial adaptability of each graphics card to the task is analyzed to obtain the spatial adaptability, specifically: RAS i For the space adaptation of the i-th graphics card, M con,i L represents the continuous video memory capacity of the i-th graphics card. eff,iSz represents the effective localization rate of the i-th graphics card. i For the i-th graphics card, C load,i is the computing power adaptation factor for the i-th graphics card.
[0021] Preferably, the analysis subunit is also used to quantify the startup latency and timing error in the updated list of candidate graphics cards based on the time vector and the timing dispersion of each graphics card, and to analyze the time adaptability of each graphics card to the task based on the quantified startup latency and timing error, thereby obtaining the time adaptability, specifically:
[0022] E i For the time adaptation of the i-th graphics card, T now For the current time, TSD i Let be the temporal dispersion of the i-th graphics card, where α and β are both weight values;
[0023] By amplifying the impact of temporal adaptability through an exponential function and combining it with spatial adaptability, a spatiotemporal adaptability score is calculated. This score is used to comprehensively evaluate the adaptability of the corresponding graphics card to the task in both temporal and spatial dimensions. Specifically: Among them, S i Let exp(*) be the spatiotemporal adaptation score of the i-th graphics card, and let exp(*) be an exponential function with base e.
[0024] Preferably, the global timing synchronization unit includes a reference standard subunit, an alignment subunit, and a degree analysis subunit;
[0025] The reference standard subunit is used to extract the time step and memory fragmentation rate of each graphics card in the candidate graphics card list from the graphics card hardware status data when multiple graphics cards are processing tasks in parallel. It then uses the memory fragmentation rate as an inverse weight to weight and sum the time steps of each graphics card to calculate a global reference time step, which is used to establish a unified time base across graphics cards. Specifically: Among them, GTS ref This is the global reference time step, floor[*] is the floor function, q is the graphics card number in the candidate graphics card list, Q is the total number of graphics cards in the candidate graphics card list, and GTS. i For the i-th graphics card time step
[0026] Preferably, the alignment subunit is used to obtain the time offset based on the difference between the global reference time step and the time steps of each graphics card in the candidate graphics card list, compare the time offset with the timing error tolerance, and determine whether to start the forced alignment time step mechanism to achieve cross-graphics card timing synchronization. Specifically:
[0027] S100: If the time offset is greater than the timing error tolerance, there is an abnormal deviation between the time step of the corresponding graphics card and the global reference time step, and the forced time step alignment mechanism is activated; otherwise, the forced time step alignment mechanism is not activated.
[0028] S200: Abnormal deviations include minor and severe deviations; the forced alignment time step mechanism includes soft and hard adjustment mechanisms; if the absolute value of the time offset is ≤ If the timing error tolerance is small, it is considered a slight deviation and triggers a soft adjustment mechanism; otherwise, it is considered a severe deviation and triggers a hard adjustment mechanism.
[0029] S300: When the soft adjustment mechanism is triggered, it adjusts thread priority, dynamically allocates computing resources, and sets time window compensation. When the hard adjustment mechanism is triggered, it prioritizes the execution of synchronization correction tasks and enables backup graphics card nodes.
[0030] S400: Recalculate the time offset to confirm whether the time offset ≤ timing error tolerance is met. If it is still not met, repeat S100 to S300. If the adjustment fails 3 times in a row, trigger an alarm and mark the corresponding graphics card as a timing abnormal node.
[0031] The degree analysis subunit is used to remove timing anomaly nodes from the candidate graphics card list, update the candidate graphics card list, and analyze the degree of fit between each graphics card and the cross-graphics card unified time base in the updated candidate graphics card list, and calculate the timing synchronization quality score, specifically: GCS i The timing synchronization quality score for the i-th graphics card is given, where Δt is the time offset.
[0032] Preferably, the memory fragmentation pre-control unit is used to analyze the spatial fragmentation density and time accumulation effect through graphics card hardware status data, based on the updated candidate graphics card list. Based on the spatial fragmentation density and time accumulation effect, it quantitatively analyzes the memory fragmentation risk level of each graphics card and calculates a fragmentation risk score. Specifically: FRI q Let p be the fragmentation risk score for the qth graphics card, p be the task number within the corresponding graphics card, P be the number of tasks within the corresponding graphics card, and B be the fragmentation risk score for the qth graphics card. qp M represents the video memory capacity occupied by the p-th task within the q-th graphics card. q TL represents the total video memory capacity of the qth graphics card. qp T is the dwell time of the p-th task within the q-th graphics card. total This represents the total duration of the statistical period.
[0033] Preferably, the dynamic scheduling decision module extracts the spatiotemporal adaptation score, timing synchronization quality score, and fragmentation risk score of each graphics card from the updated candidate graphics card list. After linear normalization, it outputs the final scheduling score, specifically: Sf q =S q *GCS q *(1-FRI q ), where Sf q S is the final scheduling score for the qth graphics card. q GCS scores the spatiotemporal adaptation of the qth graphics card. q The timing synchronization quality score for the qth graphics card, FRI q The fragmentation risk score is assigned to the qth graphics card. If the final scheduling score exceeds the preset score range, the corresponding graphics card is retained in the updated list of candidate graphics cards. If the final scheduling score falls within the preset score range, the pre-restructuring mechanism is triggered and the system returns to the memory fragmentation pre-control unit to recalculate the fragmentation risk score and the final scheduling score. If the final scheduling score is lower than the lower limit of the preset score range, the corresponding graphics card is removed from the updated list of candidate graphics cards, and the graphics card with the highest final scheduling score is selected from the updated list of candidate graphics cards to assign the corresponding task.
[0034] This invention provides a distributed computing task dynamic allocation system based on multi-GPU collaboration, which has the following advantages:
[0035] (1) By integrating multiple sets of sensors to collect real-time hardware status data of the graphics card, covering key indicators such as memory fragmentation, timing stability, and computing load, and parsing task requirements into spatial and temporal vectors, a refined model of the graphics card's capabilities and task requirements is achieved. Compared with traditional systems that rely only on coarse indicators such as total memory and computing utilization, this mechanism can identify hidden risks in advance, such as sufficient total memory but insufficient contiguous space, and low load but high timing deviation, thereby improving the accuracy of task allocation.
[0036] (2) The multidimensional computing module constructs a closed-loop decision chain of screening-evaluation-optimization through multidimensional indicators such as spatial adaptability, temporal adaptability, timing synchronization quality score and fragmentation risk score. It prioritizes the elimination of spatially infeasible graphics cards, synchronizes the timing of multiple cards through software and hardware adjustment mechanisms, and releases continuous video memory by triggering pre-reorganization operation based on fragmentation risk score. This mechanism can improve the fragmentation rate of video memory. By considering the timing deviation of multiple cards, it avoids task failure caused by fragmentation or timing inconsistency. It is especially suitable for scenarios with high requirements for spatiotemporal consistency, such as real-time rendering and multi-card training.
[0037] (3) The dynamic scheduling decision module integrates multi-dimensional scores through linear normalization to generate a final scheduling score, realizing a hierarchical scheduling strategy that prioritizes the allocation of high-quality resources, optimizes and reuses medium-quality resources, and quickly eliminates inefficient resources. For graphics cards with scores falling into the medium range, pre-restructuring or timing adjustment is automatically triggered to convert usable but suboptimal resources into effective production capacity; low-scoring graphics cards are directly removed to shorten scheduling latency. This mechanism can shorten the average scheduling time of tasks, and at the same time, through cross-graphics card collaborative global time base and load balancing, it can improve the overall stability and task execution efficiency of the distributed system. Attached Figure Description
[0038] Figure 1 This is a block diagram of the overall modules of the present invention;
[0039] Figure 2 This is a block diagram of the spatiotemporal state detection module of the present invention;
[0040] Figure 3 This is a block diagram of the task feature parsing module of the present invention;
[0041] Figure 4 This is a block diagram of the multidimensional calculation module of the present invention. Detailed Implementation
[0042] 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.
[0043] Example 1
[0044] Please see Figure 1 and Figure 2 This invention provides a distributed computing task dynamic allocation system based on multi-GPU collaboration, comprising:
[0045] The spatiotemporal state detection module uses multiple sets of sensors to acquire graphics card hardware state data and perform feature extraction.
[0046] Specifically, the spatiotemporal state detection module includes a data acquisition unit and a data extraction unit;
[0047] The data acquisition unit is used to integrate multiple sets of sensors on the graphics card hardware in advance to collect graphics card hardware status data in real time. The graphics card hardware status data includes the free video memory blocks in each graphics card, the capacity of each free video memory block in the corresponding graphics card, the time step of each graphics card, the continuous video memory capacity of each graphics card, the total video memory capacity of each graphics card, the video memory capacity occupied by each task in each graphics card, the dwell time of the corresponding task in the graphics card, the computing load of each graphics card, and the total number of graphics cards participating in the task.
[0048] The data extraction unit is used to extract and calculate dimensional data in the spatial and temporal dimensions based on the graphics card hardware status data. The dimensional data includes memory fragmentation rate and temporal dispersion. The memory fragmentation rate is calculated by the ratio of the sum of the squares of all free blocks to the square of the total free capacity, which is used to quantify the degree of fragmentation. The temporal dispersion is calculated in the form of standard deviation, which is used to quantify the degree of fluctuation of the time step when the graphics card is executing a task.
[0049] Specifically, the method for calculating the video memory fragmentation rate is as follows: Among them, MFR i Let be the memory fragmentation rate of the i-th graphics card, j be the number of the free memory block in the corresponding graphics card, J be the total number of free memory blocks in the corresponding graphics card, and b be the fragmentation rate of the i-th graphics card. ij Let i be the capacity of the j-th free video memory block within the i-th graphics card, where i is the graphics card number;
[0050] The method for calculating the time series dispersion is as follows: Among them, TSD i Let be the temporal dispersion of the i-th graphics card, n be the number of time steps within the statistical period, and Δt be the time series dispersion. k The actual time taken at time step k. This represents the average time taken.
[0051] In this embodiment, by integrating multiple sets of sensors, real-time data on the graphics card hardware status is collected, covering key indicators in both spatial and temporal dimensions. This helps to overcome the limitations of traditional systems that only collect computing load and total video memory, enabling a more refined description of the graphics card status and providing a reliable basis for subsequent scheduling. The spatial dimension will collect data such as free video memory block capacity, contiguous video memory capacity, and total video memory capacity to assess the degree of video memory fragmentation and available resources.
[0052] For example, in deep learning training, if a graphics card has a total of 16GB of video memory, but only 2GB of contiguous video memory is available (far less than the 8GB required by the model), the system can preemptively determine that the graphics card's space is not feasible, preventing crashes due to insufficient video memory after task allocation. The time dimension will collect data such as time steps and computational load to analyze timing stability and load pressure. For example, real-time rendering tasks require time steps to be stable within 16ms. If a graphics card's timing dispersion is calculated to be 2ms (standard deviation), it indicates that its time step fluctuations are small, making it suitable for assigning the task; if the dispersion reaches 5ms, it may cause screen stuttering, and the system will prioritize excluding it.
[0053] The raw data is transformed into memory fragmentation rate and temporal dispersion using mathematical formulas, quantifying the risks in both spatial and temporal dimensions. In the memory fragmentation rate calculation formula, the numerator... The sum of squares of the free block capacity, denominator The ratio is the square of the total free capacity; a larger ratio indicates more dispersed fragmentation. Timing dispersion is calculated by measuring time step fluctuations using the standard deviation; a smaller value indicates more stable timing. Effect: This transforms abstract hardware states into comparable quantitative indicators, facilitating rapid system identification of high-risk graphics cards and triggering pre-restructuring or scheduling strategy adjustments.
[0054] In summary, by constructing a closed loop from data to decision-making, and a "detection-analysis-optimization" loop, we can proactively avoid task failures caused by memory fragmentation and computational delays caused by timing deviations, thereby improving system stability and resource utilization. The spatiotemporal state detection module, through multi-dimensional data collection and quantitative analysis, achieves precise perception of the spatiotemporal state of the graphics card, providing a scientific basis for the dynamic allocation of distributed computing tasks. Especially in high-concurrency, high-real-time scenarios, it can significantly reduce task failure rates and improve overall computational efficiency.
[0055] A task refers to various computational tasks that require the use of graphics card resources, especially complex computational scenarios with high requirements for continuous video memory and cross-graphics card timing synchronization. These include large-scale simulation tasks and multi-factor collaborative computation tasks. Tasks such as military tactical simulation, industrial process simulation, and climate simulation typically require large amounts of contiguous video memory to store model parameters and intermediate data, and also have certain requirements for timing synchronization; otherwise, the accuracy of the simulation results will be affected. For example, when satellite monitoring and radar tracking are used to collaboratively monitor a target, the data from both need to be fused and analyzed at the same time reference to accurately determine the target's trajectory and status.
[0056] Example 2
[0057] Please see Figure 1 and Figure 3 The task feature parsing module parses the task descriptions from the external task queue to obtain spatial and temporal vectors.
[0058] Specifically, the task feature parsing module includes a spatial parsing unit and a temporal parsing unit;
[0059] The spatial resolution unit determines the resolution method based on the task description type of the external task queue. During the resolution process, it extracts the computing power requirement, memory requirement, and data localization rate from the task description of the external task queue to generate a spatial vector. The specific expression of the spatial vector is: R req =[C req M req L req ], where R req C is a spatial vector. req To meet computing power requirements, M req To meet video memory requirements, L req For data localization rate;
[0060] Computing power requirement refers to the proportion of computing power a task needs to utilize during execution. For example, a task might require 50% of the computing power resources of a graphics card (GPU); this describes the task's computing power requirement.
[0061] The video memory requirement indicates the amount of video memory needed for a task to run. For example, a deep learning training task may require 8GB of video memory to store model parameters, intermediate calculation results, and other data due to the large number of model parameters. This 8GB is the video memory requirement for the task.
[0062] Data locality rate reflects the proportion of data that a task expects to obtain locally during execution, such as from local storage devices or local video memory. If a task requires a data locality rate of 80%, it means that it expects 80% of the data to be obtained directly from the local machine, without having to obtain it remotely through the network or other means, in order to reduce data transmission overhead and improve computing efficiency.
[0063] The specific steps and methods for breaking down the original task requirements into feature vectors include:
[0064] Parse the task description: If the task description is structured data (such as JSON), directly read the corresponding fields; if it is natural language text (such as requiring 3GB of video memory to run for 1 hour, allowing 2ms error), extract key information through natural language processing (NLP) technology.
[0065] Classification mapping: The extracted information is classified and mapped to spatial or temporal dimensions. For example, video memory, computing power, and data localization rate are classified as spatial dimensions; time windows and error tolerance are classified as temporal dimensions.
[0066] Technical methods: Structured data parsing: Directly extract field values using JSON parsers, XML parsers, etc. Natural language processing: Match numbers and units (e.g., 3GB, 2ms) using regular expressions, combined with semantic analysis to determine the requirement type (video memory, time, etc.). For example, use Python's `re` module to extract numbers, and use NLP libraries (e.g., NLTK) to identify requirement keywords. Metadata extraction: If the task includes metadata (e.g., task type tags), directly read the relevant configurations, such as the default ΔT for real-time tasks. tol (smaller)
[0067] The time resolution unit is used to extract time windows and timing error tolerances from the task descriptions of the external task queue during the resolution process to generate a time vector. The specific expression for the time vector is: T req =[T start T end ΔT tol ], where T req Let T be the time vector. start T is the start time. end Let ΔT be the end time. tol This represents the timing error tolerance; the time window includes the start and end times.
[0068] T start T end Used to evaluate the task's time-bound suitability, prioritizing the allocation of GPUs with sufficient remaining time within the time window to prevent task failure due to insufficient time. ΔT tol Timing precision is used to control task execution. For time-sensitive tasks, such as real-time simulation, it is achieved through ΔT. tol Strictly select the graphics card (GPU) to avoid task failure due to timing issues.
[0069] Outputting spatial and temporal vectors transforms the original task requirements into quantifiable metrics that the computer can process. This provides standardized input for subsequent computational modules, such as resource suitability calculations and timing synchronization strategy formulation. These vectors allow the system to automatically assess the matching degree between the task and graphics card resources, avoiding scheduling chaos caused by ambiguous requirements. Through this decomposition, the original task requirements are transformed from vague descriptions into precise quantifiable characteristics, enabling the system to perform resource scheduling and task allocation efficiently and accurately, improving overall computational efficiency and stability.
[0070] In this embodiment, by classifying and parsing task descriptions, unstructured task requirements are transformed into computable spatial and temporal vectors, establishing a mapping bridge between tasks and resources. This helps to transform vague task requirements into quantifiable indicators, solving the problem of traditional systems relying on experience to match task descriptions with resources. For example, it avoids misassigning tasks requiring 16GB of video memory to graphics cards with only 8GB of contiguous video memory.
[0071] The spatial resolution unit will identify the task type and extract computing power requirements, video memory requirements, and data localization rate from the task description. For example, if an image generation task is described as "requiring 8GB of video memory to run the Stable Diffusion model, prioritizing local storage for data retrieval," the resolved spatial vector will be R. req = [70%, 8GB, 0.9] indicates that 70% of computing power, 8GB of continuous video memory, and 90% of the data need to be obtained locally.
[0072] Time parsing unit extracts time window (T) start T end and timing error tolerance ΔT tol For example, a certain autonomous driving perception task requires "to be completed within 10:00-10:05, with a time step fluctuation of no more than 5ms". After parsing, the time vector is T. req =10:00, 10:05, 5ms], used to evaluate the graphics card startup latency and timing stability.
[0073] By using the three elements of a spatial vector, we construct spatial dimension filtering conditions for tasks on the graphics card. The computing power requirement defines the percentage of computing power needed for the task, which is compared with the graphics card's computing power load to assess whether the remaining resources are sufficient. Logical formula: If C req >(1-C load (Insufficient remaining computing power) means the graphics card space is not feasible. Memory requirements clearly define the contiguous memory needs, directly comparing them to the graphics card's contiguous memory capacity; data localization rate quantifies the local data acquisition needs, multiplying it by the graphics card's data localization rate to obtain the effective localization rate. For example, C... req =0.8, and the corresponding graphics card's data localization rate =0.6, then the effective localization rate =0.48, indicating a decreased compatibility. The system prioritizes the graphics card with the higher data localization rate. Through three-dimensional constraints, precise matching between "task requirements and graphics card capabilities" is achieved. For example, tasks with high data localization requirements are assigned to graphics cards with high local storage bandwidth to reduce network latency. Time-dimensional filtering conditions for tasks are established through time windows and timing error tolerance.
[0074] By establishing time-dimensional filtering conditions for tasks using time windows and timing error tolerance, the timeliness of tasks is ensured. Specifically, the time window is used to calculate the startup delay |T. now -T start The percentage of time window time is used to assess whether a task faces the risk of timeout; for example, if a task's time window is 60 minutes, and 40 minutes have already passed (66.7% of the startup delay has occurred), the system will increase the task's scheduling priority to avoid missing the scheduled time. end By comparing timing error tolerance with graphics card timing dispersion, graphics cards with stable timings are selected; if If the value is greater than 1, the graphics card time adaptation will decrease significantly.
[0075] This ensures that time-sensitive tasks (such as high-frequency trading instructions and real-time video stream processing) are executed under strict time constraints, preventing task failures due to startup delays or timing fluctuations. In summary, the task feature parsing module transforms task requirements into calculable and comparable vector metrics through structured parsing and quantification. This enables distributed systems to allocate tasks based on data rather than experience, significantly improving matching efficiency and task success rates, especially in complex mixed task scheduling scenarios.
[0076] Example 3
[0077] Please see Figure 1 and Figure 4 The multidimensional computing module performs multidimensional analysis on the graphics card based on the graphics card hardware status data, spatial vector, and temporal vector, including spatial resource dimension, temporal dimension, cross-graphics card timing synchronization, and fragmentation risk analysis, in order to update the list of candidate graphics cards.
[0078] Specifically, the multidimensional computing module includes a resource adaptation and analysis unit, a global timing synchronization unit, and a video memory fragmentation pre-control unit;
[0079] The resource adaptation analysis unit includes a priority verification subunit and an analysis subunit;
[0080] The priority verification subunit is used to determine whether the corresponding graphics card will be judged as space infeasible based on the space vector and graphics card hardware status data. If the video memory requirement is greater than the contiguous video memory capacity, that is, the video memory required by the task is greater than the GPU's contiguous video memory, the corresponding graphics card will be judged as space infeasible. At this time, the corresponding graphics card will be removed from the list of candidate graphics cards. After traversal, the updated list of candidate graphics cards will be obtained.
[0081] The purpose of video memory requirements is to quickly filter out GPUs with insufficient memory, thus avoiding unnecessary calculations.
[0082] The analysis subunit is used to quantify the impact of data transfer costs on the task by multiplying the data locality rate in the spatial vector with the data locality rate of the corresponding graphics card in the updated list of candidate graphics cards, and to calculate the effective locality rate.
[0083] The purpose of data locality rate requirements is to ensure the efficiency of task data acquisition and reduce data transmission time. Graphics cards with high data locality rates can load task data faster and improve computing efficiency. By correlating the data locality rate in the spatial vector with the data locality rate of the corresponding graphics card, the graphics card GPU with high data acquisition efficiency is selected first.
[0084] Data locality rate is the ratio of the amount of data retrieved from local storage to the total amount of data retrieved. Local storage usually refers to the high-speed memory directly connected to the GPU. The total amount of data retrieved includes the sum of data retrieved from local storage and remote storage (such as network shared storage and other nodes).
[0085] Based on the relationship between the computing power demand in the spatial vector and the computing power load of the corresponding graphics card, a computing power adaptation factor is calculated to penalize overloaded graphics cards. Specifically: Where Sz is the computing power adaptation factor of the corresponding graphics card, and C load The computational load of the corresponding graphics card is determined; combined with the graphics card hardware status data, the spatial adaptability of each graphics card to the task is analyzed to obtain the spatial adaptability, specifically: RAS i For the space adaptation of the i-th graphics card, M con,i L represents the continuous video memory capacity of the i-th graphics card. eff,i Sz represents the effective localization rate of the i-th graphics card. i For the i-th graphics card, C load,i is the computing power adaptation factor for the i-th graphics card.
[0086] (1-C load ) reflects the remaining computing power; when C req ≤(1-C load When C is sufficient, the remaining computing power is sufficient, and the fit is at its maximum value of 1 (no penalty); when C req >(1-C load When this occurs, an overload situation exists;
[0087] In the formula for spatial fitness, the numerator, M con,i This reflects the maximum amount of contiguous video memory (VRAM) that the GPU can provide. The larger the contiguous VRAM, the better the adaptability to the task; within (1-MFR) i ), MFR i The lower the value, i.e. (1-MFR) i The larger the value of C, the lower the degree of fragmentation and the more efficient the resource utilization; load A higher value indicates a stronger local data acquisition capability of the GPU, lower data transfer overhead, and higher task execution efficiency. The denominator C... load,i In +1, C load,iThis indicates the current computing power usage of the GPU. Higher loads result in a larger denominator, which reduces the spatial fit value. This is because a GPU under high computing load may have limited performance when processing the current task. The overall formula achieves a dynamic balance between memory continuity, fragmentation rate, data locality rate, and computing load by multiplying the terms in the numerator and adjusting the denominator. It quantitatively evaluates the GPU's suitability for the task from a spatial perspective, determining whether the GPU is suitable for executing the task in terms of memory resources and data acquisition.
[0088] The analysis subunit is also used to quantify startup latency and timing error in the updated list of candidate graphics cards based on the time vector and the timing dispersion of each graphics card. Based on the quantified startup latency and timing error, it analyzes the time adaptability of each graphics card to the task, obtaining the time adaptability score. Specifically: E i For the time adaptation of the i-th graphics card, TSD i Let T be the temporal discreteness of the i-th graphics card, where α and β are weight values; now The current time refers to the moment when the system executes a scheduling decision, that is, the point in time when the scheduling algorithm is evaluating whether the task is suitable to be assigned to a certain GPU.
[0089] This reflects the task startup delay, |T now -T start The larger the value of α, the later the task starts, the closer it is to the end of the time window, and the worse its adaptability in the time dimension. The reason for analyzing task start-up latency is to prevent tasks from missing their execution window, as many tasks (such as real-time rendering, financial trading, and industrial control) have strict time window constraints. For example, video frame rendering must be completed within 16ms (60fps), otherwise it will cause stuttering; high-frequency trading orders must be executed before market changes, otherwise it may result in losses. By quantifying start-up latency, tasks with tight time windows can be prioritized, preventing resources from being occupied by low-priority tasks for extended periods. The system can dynamically control the strictness of the time window by adjusting the weight α: for real-time tasks (such as autonomous driving), α can be increased to make the penalty for start-up latency more significant; for batch processing tasks (such as data cleaning), α can be decreased to allow a certain degree of start-up latency, with a value ranging from 0 to 1, the specific value of which is set by the user according to the situation; by adjusting the ratio of α and β, the optimal balance between on-time start-up and time synchronization can be found.
[0090] This reflects the timing error situation. TSD i The larger it is, the greater it is than ΔT tolThe higher the degree of α, the greater the timing issues of the GPU. α and β are weighting factors that control the importance of startup latency and timing error in the time fit calculation, respectively. A higher β indicates that time-sensitive tasks are given higher priority. By quantitatively evaluating the GPU's task fit from a time dimension, the performance of the GPU in terms of task startup time and timing synchronization is measured.
[0091] By amplifying the impact of temporal adaptability through an exponential function and combining it with spatial adaptability, a spatiotemporal adaptability score is calculated. This score is used to comprehensively evaluate the adaptability of the corresponding graphics card to the task in both temporal and spatial dimensions. Specifically: Among them, S i Let exp(*) be the spatiotemporal adaptation score of the i-th graphics card, where exp(*) is an exponential function with base e, where e represents the Euler number and its value is approximately 2.71828.
[0092] As time fit increases, exp(E) i ) will increase rapidly, causing S i Rapidly reducing the negative impact of poor temporal fit on the overall fit score through an exponential function is crucial. By combining both spatial and temporal dimensions, a comprehensive score for evaluating the GPU's task adaptability is obtained, achieving a comprehensive quantitative assessment of GPU resources across the spatiotemporal dimensions.
[0093] The calculated empty fit score serves as the base score, which, together with other indicators, determines the final allocation priority. This provides a core comprehensive evaluation basis for subsequent modules, enabling scheduling decisions to allocate tasks to suitable GPUs more scientifically and rationally.
[0094] In this embodiment, the multi-dimensional computing module is the intelligent brain of the distributed system. By integrating graphics card status, task requirements, and global resources, it upgrades from "coarse screening" to "multi-dimensional precise evaluation." Its core components and functions are as follows: Based on a hard comparison between the video memory requirements in the space vector and the graphics card's contiguous video memory capacity, it eliminates graphics cards with infeasible space. If the video memory requirements in the space vector are greater than the graphics card's contiguous video memory capacity, it is directly marked as infeasible space, avoiding task failure due to video memory fragmentation. For example, if a task requires 6GB of contiguous video memory, and graphics card A has a contiguous video memory capacity of 5GB, the priority verification subunit removes it from the candidate list. By eliminating infeasible graphics cards in advance through the priority verification subunit, it solves the hidden problem of traditional systems having sufficient total video memory but insufficient contiguous space. For example, if a graphics card has a total of 16GB but only 3GB of contiguous space, it cannot run a 3D rendering task that requires 4GB of contiguous video memory. The system can avoid such allocations in advance.
[0095] By combining the effective localization rate and the computing power adaptation factor (penalizing overloaded GPUs), spatial adaptability is obtained. The time adaptability formula quantifies startup latency and timing errors into calculable indicators, ensuring that time-sensitive tasks (such as real-time perception in autonomous driving) are preferentially assigned to GPUs with low startup latency and stable timing. For example, if a task requires frame rendering to be completed within 30ms, and a certain GPU has an average time step of 28ms but a dispersion of 5ms (over-tolerance of 3ms), its time adaptability is low. The system will then lower its priority and select a GPU with a dispersion of 2ms.
[0096] The spatiotemporal adaptation score amplifies the impact of the time dimension through an exponential function, enabling the system to prioritize the selection of graphics cards with high time efficiency based on spatial feasibility.
[0097] Space infeasibility indicates a hard constraint between video memory requirements and contiguous video memory, ensuring the physical feasibility of task allocation;
[0098] Effective localization rate represents the product of task requirements and graphics card capabilities, quantifying the impact of data transfer efficiency on tasks;
[0099] The computing power matching factor penalizes overloaded GPUs by comparing load and demand, avoiding "assignment with defects". The core purpose of calculating the effective localization rate and computing power matching factor is to accurately match the specific requirements of the task with the real-time status of the GPU, solve the problem of one-size-fits-all in traditional scheduling algorithms, and achieve fine-grained resource allocation.
[0100] The spatiotemporal adaptation score will integrate spatial and temporal dimensions to provide a comprehensive basis for scheduling decisions.
[0101] In summary, the multidimensional computing module achieves refined management of graphics card resources through hierarchical verification, quantitative evaluation, and comprehensive scoring. Especially in complex task scheduling scenarios, it can improve task allocation accuracy by more than 30% while reducing task failure rate caused by spatiotemporal mismatch, significantly optimizing the overall efficiency of the distributed system.
[0102] Specifically, the global timing synchronization unit includes a reference standard subunit, an alignment subunit, and a degree analysis subunit; it is used to solve the problem of time step deviation caused by differences in the execution speed of tasks on different graphics cards (such as uneven computing load and different data dependencies), and the inability of multi-factor models (such as troop deployment + satellite monitoring) to advance synchronously.
[0103] The reference standard subunit is used to extract the time step and memory fragmentation rate of each graphics card in the candidate graphics card list from the graphics card hardware status data when multiple graphics cards are processing tasks in parallel. It then uses the memory fragmentation rate as an inverse weight to weight and sum the time steps of each graphics card to calculate a global reference time step, which is used to establish a unified time base across graphics cards. Specifically: Among them, GTS refThis is the global reference time step, floor[*] is the floor function, q is the graphics card number in the candidate graphics card list, Q is the total number of graphics cards in the candidate graphics card list, and GTS. i This is the time step for the i-th graphics card.
[0104] The global reference time step is a unified time benchmark that all GPUs in a distributed system must follow. It is used to coordinate the timing of task execution. For example, in synchronous distributed training, all GPUs must complete forward and backward propagation within the same time step in order to perform gradient aggregation. In a real-time rendering pipeline, each GPU needs to generate frame data at the same time step to ensure smoothness of the image.
[0105] The function of rounding down is to round the calculated result down to the nearest integer. In this formula, the main purpose of using the rounding down function is to obtain a specific, discrete time step value as a global reference time step, which facilitates time synchronization operations among different graphics cards. For example, if the calculated result is 100.8, after processing by the floor function, it becomes 100, which serves as a unified time base.
[0106] (1-MFR i This can be understood as the health of video memory or the availability of continuous video memory.
[0107] The alignment subunit is used to obtain the time offset based on the difference between the global reference time step and the time steps of each graphics card in the candidate graphics card list, compare the time offset with the timing error tolerance, and determine whether to start the forced alignment time step mechanism to achieve cross-graphics card timing synchronization. This ensures that the task execution time of each graphics card GPU is consistent with the global time base.
[0108] The specific content is as follows:
[0109] S100: If the time offset is greater than the timing error tolerance, there is an abnormal deviation between the time step of the corresponding graphics card and the global reference time step, and the forced time step alignment mechanism is activated; otherwise, the forced time step alignment mechanism is not activated.
[0110] S200: Abnormal deviations include minor and severe deviations; the forced alignment time step mechanism includes soft and hard adjustment mechanisms; if the time offset... If the timing error tolerance is small, it is considered a slight deviation and triggers a soft adjustment mechanism; otherwise, it is considered a severe deviation and triggers a hard adjustment mechanism.
[0111] S300: When the soft adjustment mechanism is triggered, it adjusts thread priority, dynamically allocates computing resources, and sets time window compensation. When the hard adjustment mechanism is triggered, it prioritizes the execution of synchronization correction tasks and enables backup graphics card nodes.
[0112] Adjusting thread priority is done through operating system or framework interfaces, modifying the execution priority of task threads in the GPU, and controlling the order and proportion of computing resources they acquire.
[0113] Dynamic allocation of computing resources involves dynamically adjusting the computing power allocation strategy of the graphics card based on real-time load and timing deviations, including limiting the computing power usage of specific tasks or migrating tasks to other devices.
[0114] Setting up time window compensation injects elastic time within the task time window, allowing some graphics cards to match the global time base by extending or compressing their execution time.
[0115] Prioritizing synchronization correction tasks involves pausing normal computing tasks and forcibly performing clock synchronization, data alignment, and other correction operations when a severe timing deviation is detected. This is achieved by using PTP (Precision Time Protocol) or GPU hardware timers to force multi-card clock alignment, with errors controlled at the microsecond level.
[0116] Enabling a backup graphics card node means migrating tasks to a pre-configured backup graphics card when the primary graphics card cannot restore timing synchronization or the risk of memory fragmentation is too high even after software adjustments.
[0117] S400: Recalculate the time offset to confirm whether the time offset ≤ timing error tolerance is met. If it is still not met, repeat S100 to S300. If the adjustment fails 3 times in a row, trigger an alarm and mark the corresponding graphics card as a timing abnormal node to avoid subsequent tasks being assigned to it.
[0118] The degree analysis subunit is used to remove timing anomaly nodes from the candidate graphics card list, update the candidate graphics card list, and analyze the degree of fit between each graphics card and the cross-graphics card unified time base in the updated candidate graphics card list, and calculate the timing synchronization quality score, specifically: GCS i The timing synchronization quality score for the i-th graphics card is given, where Δt is the time offset.
[0119] The timing synchronization quality score ranges from 0 to 1 and is used to reflect how close the corresponding graphics card's time step is to the global reference time step. The higher the value, the more accurate the timing of the corresponding graphics card.
[0120] The memory fragmentation pre-control unit is used to analyze the spatial fragmentation density and time accumulation effect based on the updated candidate graphics card list and graphics card hardware status data. Based on the spatial fragmentation density and time accumulation effect, it quantifies the memory fragmentation risk level of each graphics card and calculates a fragmentation risk score. Specifically: FRI q Let p be the fragmentation risk score for the qth graphics card, p be the task number within the corresponding graphics card, P be the number of tasks within the corresponding graphics card, and B be the fragmentation risk score for the qth graphics card.qp M represents the video memory capacity occupied by the p-th task within the q-th graphics card. q TL represents the total video memory capacity of the qth graphics card, used to measure the proportion of video memory used by small tasks within the total video memory of the graphics card. qp T represents the residency time of the p-th task within the q-th graphics card, reflecting the duration of video memory usage by smaller tasks. total The total duration of the statistical period is used to calculate the percentage of time spent by small tasks within that period, serving as a benchmark for measuring the cumulative effect of time.
[0121] This reflects the space fragmentation density, which is the proportion of task video memory occupied in the total video memory of the graphics card; This reflects the cumulative effect of time, i.e., the proportion of time a task spends within the statistical period. The fragmentation risk index, obtained by multiplying spatial fragmentation density and the cumulative effect of time, comprehensively considers factors from both spatial and temporal dimensions to fully assess the risk of graphics card memory fragmentation.
[0122] In this embodiment, the global timing synchronization unit establishes a precise time base across graphics cards to ensure the consistency of time steps for parallel tasks across multiple graphics cards, avoiding calculation errors or efficiency degradation due to timing deviations. The reference standard subunit uses memory fragmentation rate as an inverse weight to calculate the global reference time step, prioritizing the use of time steps from graphics cards with low fragmentation rates and stable states as the benchmark. The inverse weighting logic is: the lower the memory fragmentation rate, the higher the timing stability of the graphics card, and the greater its contribution to the global benchmark.
[0123] The alignment subunit eliminates the deviation between the graphics card time step and the global benchmark through soft and hard adjustment mechanisms, which are divided into soft adjustment mechanism and hard adjustment mechanism. For example, if the graphics card C time step is 15ms and the global benchmark is 10ms, the deviation of 5ms exceeds the tolerance of 3ms (severe deviation). The system enables hard adjustment and replaces C with the backup graphics card D to ensure that multiple cards execute synchronously.
[0124] The degree analysis subunit quantifies the timing synchronization quality of the graphics cards, eliminates abnormal nodes that have failed consecutive adjustments, and updates the candidate list. For example, if graphics card A still has a deviation of 4ms after three consecutive adjustments, it is marked as a timing anomaly, and subsequent tasks automatically skip it to avoid affecting the overall synchronization efficiency. By controlling the timing deviation of multiple cards within the task's tolerance range (e.g., automatic driving requires a deviation of <2ms), the accuracy of parallel computing is improved, avoiding gradient update errors or screen tearing caused by timing asynchrony.
[0125] The memory fragmentation pre-control unit, through joint analysis of spatial and temporal dimensions, identifies high-fragmentation-risk graphics cards in advance and triggers pre-reorganization operations to ensure continuous memory requirements for large tasks. Spatial fragmentation density and temporal accumulation effect: Spatial fragmentation density reflects the dispersion of task memory usage; the higher the proportion of small tasks, the greater the density. The temporal accumulation effect reflects the "solidification" effect of long-term task residency on fragmentation; the longer the residency time, the more difficult it is for fragments to be automatically released. This explains that even with the same total memory usage, if the graphics card has many small tasks and long residency times, the fragmentation risk remains high.
[0126] Inverse weighting: GPUs with low fragmentation rates have a higher weighting in global time base calculations, ensuring base stability;
[0127] Soft / hard tuning mechanism: Soft tuning uses software strategies to quickly respond to minor deviations, while hard tuning uses hardware intervention to resolve severe deviations, balancing efficiency and reliability;
[0128] Space fragmentation density: quantifies the degree of fragmentation in memory usage; the higher the proportion of small tasks, the greater the density.
[0129] Cumulative effect over time: Long-term stationary missions make it difficult to recover fragments, requiring proactive intervention.
[0130] In summary, the global timing synchronization unit ensures the time consistency of multi-GPU collaboration through dynamic benchmark establishment and deviation correction; the memory fragmentation pre-control unit mitigates fragmentation risks in advance from both spatial and temporal dimensions. Together, they improve the stability and resource utilization of the distributed system, making it particularly suitable for time-sensitive scenarios such as real-time rendering and multi-GPU training.
[0131] Example 4
[0132] The dynamic scheduling decision module, based on the multidimensional computing module, analyzes the eligibility of each graphics card to be assigned corresponding tasks.
[0133] Specifically, the dynamic scheduling decision module extracts the spatiotemporal adaptation score, timing synchronization quality score, and fragmentation risk score of each graphics card from the updated candidate graphics card list. After linear normalization, it outputs the final scheduling score, specifically: Sf q =S q *GCS q *(1-FRI q ), where Sf q S is the final scheduling score for the qth graphics card. q GCS scores the spatiotemporal adaptation of the qth graphics card. q The timing synchronization quality score for the qth graphics card, FRI q Score the fragmentation risk of the qth graphics card;
[0134] The final scheduling score is the result of a comprehensive evaluation, used to determine whether a task is assigned to the corresponding graphics card (GPU) and the priority of the assignment.
[0135] Fragmentation Risk Score measures the degree of fragmentation risk of a corresponding graphics card's GPU memory. The value typically ranges from 0 to 1, with higher values indicating a greater fragmentation risk. This is determined by (1-FRI) q This serves to punish the risk of fragmentation.
[0136] If the final scheduling score exceeds the preset score range, the corresponding graphics card will be retained in the updated list of candidate graphics cards. If the final scheduling score falls within the preset score range, the pre-restructuring mechanism will be triggered and the system will return to the memory fragmentation pre-control unit to recalculate the fragmentation risk score and the final scheduling score. If the final scheduling score is lower than the lower limit of the preset score range, the corresponding graphics card will be removed from the updated list of candidate graphics cards, and the graphics card with the highest final scheduling score will be selected from the updated list of candidate graphics cards to be assigned the corresponding task.
[0137] In this embodiment, the dynamic scheduling decision module is the decision-making center of the distributed system. Its core function is to achieve optimal matching between tasks and graphics cards based on the graphics card status (spatiotemporal adaptation score, timing synchronization quality score, and fragmentation risk score) output by the multi-dimensional computing module, through linear normalization and threshold judgment. The specific process is as follows: the spatiotemporal adaptation score, timing synchronization quality score, and fragmentation risk score are unified to the [0, 1] interval through linear transformation to eliminate the differences in the dimensions of different scoring dimensions and ensure the fairness of the comprehensive evaluation.
[0138] Decision branch: For example, retain (score > 0.8): The graphics card fully meets the task requirements and is directly included in the allocation candidate;
[0139] Pre-restructuring (0.6≤score≤0.8): If the graphics card has fragmentation risk or timing deviation, memory restructuring or timing adjustment is triggered and re-evaluated. The degree of memory fragmentation is reduced by migrating small tasks, and then the final scheduling score is recalculated to re-evaluate whether the corresponding graphics card GPU is suitable for executing tasks.
[0140] The pre-reorganization operation specifically includes: migrating small tasks, which involves migrating small but scattered tasks to other GPUs to free up contiguous memory space; memory compaction / compacting, which merges adjacent free memory blocks through memory copying or address remapping; and task pause and restart, which temporarily suspends some tasks and optimizes the layout when reallocating memory.
[0141] Remove (score < 0.6): The graphics card is clearly unsuitable for the task and has been removed from the shortlist.
[0142] A comprehensive evaluation system drives efficient resource utilization by integrating three dimensions of scoring: spatiotemporal adaptation, timing synchronization, and fragmentation risk. This addresses the problem of traditional scheduling prioritizing computational power over fragmentation or time over space. For example, graphics card A might have a spatiotemporal adaptation score of 0.9 (sufficient space, suitable timing) but a fragmentation risk score of 0.4 (high risk), falling into the pre-reorganization range. The system triggers memory pre-reorganization, and after migrating smaller tasks, the fragmentation risk score drops to 0.2, improving the overall score and ultimately leading to its retention. For moderately adapted graphics cards, pre-reorganization or timing adjustments are performed to transform usable but suboptimal resources into high-quality resources, improving overall utilization. Low-scoring graphics cards are directly removed to prevent them from consuming scheduling resources and shorten decision-making time.
[0143] Pre-restructuring mechanism: For graphics cards with high fragmentation risk, it improves contiguous video memory by migrating small tasks and merging video memory blocks, which is a resource self-rescue strategy.
[0144] In summary, the dynamic scheduling decision-making module achieves intelligent transformation from data to decision through a logical chain of "score normalization - threshold judgment - dynamic optimization". Its core value lies in:
[0145] Accuracy: Comprehensive scoring across three dimensions avoids the shortcomings of a single indicator;
[0146] Dynamism: Revitalize moderately adaptable resources through pre-restructuring and adjustment mechanisms;
[0147] High efficiency: Quickly filters out invalid graphics cards and reduces scheduling latency.
[0148] This module is particularly suitable for distributed scenarios with complex task requirements and variable resource status, such as AI training clusters and film rendering farms, which can shorten the average task scheduling time and improve resource utilization.
[0149] Each graphics card typically contains multiple small tasks. In practical applications, GPUs are designed to process multiple tasks in parallel to fully utilize their powerful computing capabilities. These tasks can be different computational subtasks. For example, in deep learning training, a single graphics card may simultaneously process the computational tasks of multiple neural network layers; in graphics rendering, a single graphics card may simultaneously process the image rendering tasks of different regions. These small tasks can be executed in parallel on different computing units of the GPU (such as stream processors, CUDA cores, etc.) to improve overall computational efficiency.
[0150] Some of the data in the above formulas are numerically calculated after removing their dimensions, especially the weighted summation algorithm. In addition, the contents not described in detail in this specification are all prior art known to those skilled in the art.
[0151] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A distributed computing task dynamic allocation system based on multi-GPU collaboration, characterized in that: include, The spatiotemporal state detection module uses multiple sets of sensors to acquire graphics card hardware state data and perform feature extraction. The task feature parsing module parses the task descriptions from the external task queue to obtain spatial and temporal vectors; The multidimensional computing module performs multidimensional analysis on the graphics card based on the graphics card hardware status data, spatial vector, and temporal vector, including spatial resource dimension, temporal dimension, cross-graphics card timing synchronization, and fragmentation risk analysis, in order to update the list of candidate graphics cards. The dynamic scheduling decision module, based on the multidimensional computing module, analyzes the eligibility of each graphics card to be assigned corresponding tasks.
2. The distributed computing task dynamic allocation system based on multi-GPU collaboration according to claim 1, characterized in that: The spatiotemporal state detection module includes a data acquisition unit and a data extraction unit; The data acquisition unit is used to integrate multiple sets of sensors on the graphics card hardware in advance to collect graphics card hardware status data in real time. The graphics card hardware status data includes the free video memory blocks in each graphics card, the capacity of each free video memory block in the corresponding graphics card, the time step of each graphics card, the continuous video memory capacity of each graphics card, the total video memory capacity of each graphics card, the video memory capacity occupied by each task in each graphics card, the dwell time of the corresponding task in the graphics card, the computing load of each graphics card, and the total number of graphics cards participating in the task. The data extraction unit is used to extract and calculate dimensional data in the spatial and temporal dimensions based on the graphics card hardware status data. The dimensional data includes memory fragmentation rate and temporal dispersion. The memory fragmentation rate is calculated by the ratio of the sum of the squares of all free blocks to the square of the total free capacity, which is used to quantify the degree of fragmentation. The temporal dispersion is calculated in the form of standard deviation, which is used to quantify the degree of fluctuation of the time step when the graphics card is executing a task.
3. The distributed computing task dynamic allocation system based on multi-GPU collaboration according to claim 2, characterized in that: The task feature parsing module includes a spatial parsing unit and a temporal parsing unit; The spatial resolution unit determines the resolution method based on the task description type of the external task queue. During the resolution process, it extracts the computing power requirement, memory requirement, and data locality rate from the task description of the external task queue to generate a spatial vector. The specific expression of the spatial vector is: R req =[C req M req L req ], where R req C is a spatial vector. req To meet computing power requirements, M req To meet video memory requirements, L req For data localization rate; The time resolution unit is used to extract time windows and timing error tolerances from the task descriptions of the external task queue during the resolution process to generate a time vector. The specific expression for the time vector is: T req =[T start T end ΔT tol ], where T req Let T be the time vector. start T is the start time. end Let ΔT be the end time. tol This represents the timing error tolerance; the time window includes the start and end times.
4. The distributed computing task dynamic allocation system based on multi-GPU collaboration according to claim 3, characterized in that: The multidimensional computing module includes a resource adaptation and analysis unit, a global timing synchronization unit, and a video memory fragmentation pre-control unit; The resource adaptation analysis unit includes a priority verification subunit and an analysis subunit; The priority verification subunit is used to determine whether the corresponding graphics card will be judged as space infeasible based on the space vector and graphics card hardware status data. If the video memory requirement is greater than the contiguous video memory capacity, the corresponding graphics card will be judged as space infeasible. At this time, the corresponding graphics card will be removed from the list of candidate graphics cards. After traversal, the updated list of candidate graphics cards is obtained. The analysis subunit is used to quantify the impact of data transfer costs on the task by multiplying the data localization rate in the space vector with the data localization rate of the corresponding graphics card in the updated list of candidate graphics cards, calculating the effective localization rate, and calculating the computing power adaptation factor based on the relationship between the computing power demand in the space vector and the computing power load of the corresponding graphics card. This factor is used to penalize overloaded graphics cards. Specifically: Where Sz is the computing power adaptation factor of the corresponding graphics card, and C load The computational load of the corresponding graphics card is determined; combined with the graphics card hardware status data, the spatial adaptability of each graphics card to the task is analyzed to obtain the spatial adaptability, specifically: RAS i For the space adaptation of the i-th graphics card, M con,i L represents the continuous video memory capacity of the i-th graphics card. eff,i Sz represents the effective localization rate of the i-th graphics card. i For the i-th graphics card, C load,i is the computing power adaptation factor for the i-th graphics card.
5. A distributed computing task dynamic allocation system based on multi-GPU collaboration according to claim 4, characterized in that: The analysis subunit is also used to quantify startup latency and timing error in the updated list of candidate graphics cards based on the time vector and the timing dispersion of each graphics card. Based on the quantified startup latency and timing error, it analyzes the time adaptability of each graphics card to the task, obtaining the time adaptability score. Specifically: E i For the time adaptation of the i-th graphics card, T now For the current time, TSD i Let be the temporal dispersion of the i-th graphics card, where α and β are both weight values; By amplifying the impact of temporal adaptability through an exponential function and combining it with spatial adaptability, a spatiotemporal adaptability score is calculated. This score is used to comprehensively evaluate the adaptability of the corresponding graphics card to the task in both temporal and spatial dimensions. Specifically: Among them, S i Let exp(*) be the spatiotemporal adaptation score of the i-th graphics card, and let exp(*) be an exponential function with base e.
6. A distributed computing task dynamic allocation system based on multi-GPU collaboration as described in claim 5, characterized in that: The global timing synchronization unit includes a reference standard subunit, an alignment subunit, and a degree analysis subunit; The reference standard subunit is used to extract the time step and memory fragmentation rate of each graphics card in the candidate graphics card list from the graphics card hardware status data when multiple graphics cards are processing tasks in parallel. It then uses the memory fragmentation rate as an inverse weight to weight and sum the time steps of each graphics card to calculate a global reference time step, which is used to establish a unified time base across graphics cards. Specifically: Among them, GTS ref This is the global reference time step, floor[*] is the floor function, q is the graphics card number in the candidate graphics card list, Q is the total number of graphics cards in the candidate graphics card list, and GTS. i This is the time step for the i-th graphics card.
7. A distributed computing task dynamic allocation system based on multi-GPU collaboration as described in claim 6, characterized in that: The alignment subunit is used to obtain the time offset based on the difference between the global reference time step and the time steps of each graphics card in the candidate graphics card list. It then compares the time offset with the timing error tolerance to determine whether to activate the forced time step alignment mechanism to achieve cross-graphics card timing synchronization. Specifically: S100: If the time offset is greater than the timing error tolerance, there is an abnormal deviation between the time step of the corresponding graphics card and the global reference time step, and the forced time step alignment mechanism is activated; otherwise, the forced time step alignment mechanism is not activated. S200: Abnormal deviations include minor and severe deviations; the forced alignment time step mechanism includes soft and hard adjustment mechanisms; if the absolute value of the time offset is ≤ If the timing error tolerance is small, it is considered a slight deviation, triggering a soft adjustment mechanism; otherwise, it is considered a severe deviation, triggering a hard adjustment mechanism. S300: When the soft adjustment mechanism is triggered, it adjusts thread priority, dynamically allocates computing resources, and sets time window compensation. When the hard adjustment mechanism is triggered, it prioritizes the execution of synchronization correction tasks and enables backup graphics card nodes. S400: Recalculate the time offset to confirm whether the time offset ≤ timing error tolerance. If it still does not meet the requirement, repeat S100 to S300. If the adjustment fails 3 times in a row, trigger an alarm and mark the corresponding graphics card as a timing abnormal node. The degree analysis subunit is used to remove timing anomaly nodes from the candidate graphics card list, update the candidate graphics card list, and analyze the degree of fit between each graphics card and the cross-graphics card unified time base in the updated candidate graphics card list, and calculate the timing synchronization quality score, specifically: GCS i The timing synchronization quality score for the i-th graphics card is given, where Δt is the time offset.
8. A distributed computing task dynamic allocation system based on multi-GPU collaboration according to claim 7, characterized in that: The memory fragmentation pre-control unit is used to analyze the spatial fragmentation density and time accumulation effect based on the updated candidate graphics card list and graphics card hardware status data. Based on the spatial fragmentation density and time accumulation effect, it quantifies the memory fragmentation risk level of each graphics card and calculates a fragmentation risk score. Specifically: FRI q Let p be the fragmentation risk score for the qth graphics card, p be the task number within the corresponding graphics card, P be the number of tasks within the corresponding graphics card, and B be the fragmentation risk score for the qth graphics card. qp M represents the video memory capacity occupied by the p-th task within the q-th graphics card. q TL represents the total video memory capacity of the qth graphics card. qp T is the dwell time of the p-th task within the q-th graphics card. total This represents the total duration of the statistical period.
9. A distributed computing task dynamic allocation system based on multi-GPU collaboration as described in claim 8, characterized in that: The dynamic scheduling decision module extracts the spatiotemporal adaptation score, timing synchronization quality score, and fragmentation risk score for each graphics card from the updated candidate graphics card list. After linear normalization, it outputs the final scheduling score, specifically: Sf q =S q *GCS q *(1-FRI q ), where Sf q S is the final scheduling score for the qth graphics card. q GCS scores the spatiotemporal adaptation of the qth graphics card. q The timing synchronization quality score for the qth graphics card, FRI q The fragmentation risk score is assigned to the qth graphics card. If the final scheduling score exceeds the preset score range, the corresponding graphics card is retained in the updated list of candidate graphics cards. If the final scheduling score falls within the preset score range, the pre-restructuring mechanism is triggered and the system returns to the memory fragmentation pre-control unit to recalculate the fragmentation risk score and the final scheduling score. If the final scheduling score is lower than the lower limit of the preset score range, the corresponding graphics card is removed from the updated list of candidate graphics cards, and the graphics card with the highest final scheduling score is selected from the updated list of candidate graphics cards to assign the corresponding task.
