Computing resource scheduling method and device, electronic equipment and storage medium
By dynamically integrating computing unit mask parameters into GPU computing resource scheduling, the problems of high resource management overhead and low scheduling flexibility in existing technologies are solved, achieving more efficient resource utilization and scheduling flexibility.
Patent Information
- Application Number
- CN202511121561.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-12
- Publication Date
- 2025-11-21
AI Technical Summary
In existing technologies, computing resource scheduling schemes suffer from problems such as rapid growth in the number of task flows and their related resources, increased management costs, limited scheduling flexibility, and low command processing efficiency. In particular, in the use of GPU computing resources, the static binding of masks to task flows/queues leads to excessive system overhead.
By dynamically integrating the computation unit mask parameters into the scheduling instructions in the runtime system, instead of the static binding method, multiple tasks with different mask parameters can be supported in the same task flow, the scope of computing resource usage can be dynamically adjusted, and the creation of independent task flows and command queues for each mask combination can be avoided.
It significantly reduces system memory usage and resource management overhead, improves scheduling flexibility and resource utilization efficiency, and supports real-time adjustment of the scope of computing resource usage as needed without refactoring the task flow structure.
Smart Images

Figure CN120994386A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of artificial intelligence, and in particular, to a computing resource scheduling method and device, an electronic device, and a storage medium. BACKGROUND
[0002] With the development of parallel computing technology, a graphics processing unit (GPU) is widely used in high-performance computing fields such as scientific computing, artificial intelligence, and image processing. A modern GPU architecture usually integrates multiple compute units (CUs), which can cooperatively process a large number of concurrent tasks, thereby significantly improving overall computing performance.
[0003] In the existing GPU running mechanism, a user usually submits a computing task to a command processing engine (CE) of a GPU via a runtime through a task starting interface (such as a LaunchKernel interface). The command processing engine is responsible for decomposing the computing task into multiple subtasks and distributing them to each compute unit for execution according to a predetermined scheduling strategy. However, in this process, which compute units are specifically used is usually automatically determined by the internal strategy of the hardware module, and the user cannot explicitly specify the use mode of the computing resources during task execution.
[0004] To improve the user's control ability over the GPU computing resources, the existing technology introduces a compute unit mask (CU_MASK), which allows the user to bind a specific compute unit combination during the task stream creation stage, thereby restricting the available compute units during subsequent task execution. The specific implementation is as follows: a CU_MASK is configured during the process of creating a task stream (Stream) and a corresponding command queue (Queue). When a computing task is submitted to the command processing engine, the CE performs resource scheduling according to the bound CU_MASK and distributes the task to the corresponding compute unit for execution.
[0005] Although the above scheme provides the user with partial control ability over the computing resources, the following defects still exist in actual application:
[0006] 1) Each newly added CU_MASK combination requires the runtime to create a corresponding group of task streams and command queues, resulting in a rapid increase in the number of task streams and related resources, increasing management costs and system load;
[0007] 2) The CU_MASK is bound during the task stream creation stage and cannot be changed after creation, making it difficult to dynamically adjust according to the resource load during task execution, thereby limiting scheduling flexibility;
[0008] 3) The command processing engine frequently switches between processing task streams bound with different CU masks and common task streams, resulting in increased context switching overhead and reduced overall efficiency of command processing. SUMMARY
[0009] Embodiments of the present disclosure provide a computing resource scheduling method and device, electronic equipment and storage medium, which can effectively solve the system overhead problem caused by static binding of masks and task streams / queues in the prior art.
[0010] According to an aspect of the present disclosure, a computing resource scheduling method is provided, which includes: receiving a computing task request issued by a user, wherein the computing task request carries a mask parameter of a computing unit in real time; in response to the computing task request, integrating the mask parameter of the computing unit into a scheduling instruction, generating a scheduling instruction carrying the mask parameter and sending it to a command processing module; and parsing the mask parameter in the scheduling instruction by the command processing module, and distributing a computing task to a target computing unit set according to the parsing result.
[0011] Optionally, distributing the computing task to the target computing unit set according to the parsing result includes:
[0012] judging the validity of the mask parameter at the hardware execution layer; when the mask parameter is an invalid value, triggering a preset dynamic allocation strategy to distribute a subtask; and when the mask parameter is a valid value, distributing the subtask to a physical computing unit specified by the mask.
[0013] Optionally, the mask parameter is used to represent the enabled state of a plurality of computing units, wherein each mask bit corresponds to a computing unit and is used to indicate whether the computing unit is allowed to participate in task execution; when all mask bits are in the off state, a preset dynamic allocation strategy is executed; and when at least one mask bit is in the on state, a subtask is allocated to the computing unit in the on state.
[0014] Optionally, the preset dynamic allocation strategy is dynamically generated according to the real-time load state of the computing unit.
[0015] Optionally, generating the scheduling instruction carrying the mask parameter includes: acquiring a task stream identifier and a mask parameter in real time from the computing task request at runtime; generating a task scheduling descriptor containing an independent mask field; and adding the task scheduling descriptor to a corresponding software command queue according to the task stream identifier.
[0016] Optionally, in a plurality of task scheduling descriptors continuously distributed by a single task stream, each mask field has an independently variable value.
[0017] Optionally, the generating the scheduling instruction carrying the mask parameter further comprises converting the task scheduling descriptor in the software command queue into a hardware executable scheduling instruction in the queue order, wherein the task parameter remains in place and the mask field is written into a predefined hardware execution layer mask storage area.
[0018] According to an aspect of the present disclosure, a computing resource scheduling apparatus is provided, comprising: a request interface module configured to receive a computing task request issued by a user, wherein the computing task request carries a mask parameter of a computing unit in real time; an instruction generation module configured to integrate the mask parameter of the computing unit into a scheduling instruction in response to the computing task request, generate a scheduling instruction carrying the mask parameter, and send the scheduling instruction to a command processing module; and the command processing module configured to parse the mask parameter in the scheduling instruction, and distribute a computing task to a target computing unit set according to a parsing result.
[0019] According to an aspect of the present disclosure, an electronic device is provided, which comprises a memory, a processor, a program stored on the memory and executable on the processor, and a data bus for realizing connection communication between the processor and the memory, wherein the program, when executed by the processor, implements the computing resource scheduling method as described above.
[0020] According to an aspect of the present disclosure, a computer readable storage medium is provided, which stores one or more programs executable by one or more processors to implement the computing resource scheduling method as described above.
[0021] The present disclosure provides a computing resource scheduling method, apparatus, electronic device and storage medium, the method comprising: receiving a computing task request issued by a user, wherein the computing task request carries a mask parameter of a computing unit in real time; integrating the mask parameter of the computing unit into a scheduling instruction in response to the computing task request, generating a scheduling instruction carrying the mask parameter, and sending the scheduling instruction to a command processing module; and parsing the mask parameter in the scheduling instruction by the command processing module, and distributing a computing task to a target computing unit set according to a parsing result. The present disclosure dynamically integrates the mask parameter of the computing unit into the scheduling instruction in a runtime system, instead of the static binding mode of the mask parameter and the task flow / command queue in the prior art, thereby avoiding the creation of independent task flows and command queues for each mask combination, and significantly reducing system memory occupation and resource management overhead. Meanwhile, the present disclosure can support multiple tasks carrying different mask parameters in the same task flow, support on-demand real-time adjustment of the use range of computing resources, and does not need to reconstruct the task flow structure, thereby significantly improving scheduling flexibility and resource use efficiency.
[0022] Other features and advantages of the present disclosure will be set forth in the description that follows, and in part will be apparent from the description, or can be learned by practice of the present disclosure. The purposes and other advantages of the present disclosure will be realized and attained by the structure particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF DRAWINGS
[0023] The accompanying drawings are included to provide a further understanding of the technical solutions of the present disclosure, and constitute a part of the specification, and are used together with the embodiments of the present disclosure to explain the technical solutions of the present disclosure, and do not constitute a limitation on the technical solutions of the present disclosure.
[0024] Figure 1 is a schematic diagram of a computing task scheduling architecture in the prior art;
[0025] Figure 2 is a main flowchart of a computing resource scheduling method of one embodiment of the present disclosure;
[0026] Figure 3 is Figure 2 is a sub-flowchart of step S220 in
[0027] Figure 4 is a schematic diagram of a computing task scheduling architecture of one embodiment of the present disclosure;
[0028] Figure 5 is a structural schematic diagram of a computing resource scheduling device proposed by one embodiment of the present disclosure;
[0029] Figure 6 is a structural schematic diagram of an electronic device proposed by one embodiment of the present disclosure. DETAILED DESCRIPTION
[0030] In order to make the purposes, technical solutions and advantages of the present disclosure more clear, the present disclosure will be further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present disclosure, and do not limit the present disclosure.
[0031] Before the embodiments of the present disclosure are further described in detail, the terms and terms involved in the embodiments of the present disclosure are explained, and the terms and terms involved in the embodiments of the present disclosure are applicable to the following explanations:
[0032] Runtime (runtime system): The runtime system is deployed on the host side, as an intermediate control component between the upper layer application software and the lower layer hardware, mainly responsible for the creation, parameter configuration, command generation and task scheduling of the computing task. The runtime system is usually encapsulated as a driver module or API interface, used to shield the details of the underlying computing architecture, and provide a unified task scheduling entrance to the user.
[0033] CU(Compute Unit, computing unit): CU is the basic execution module in a graphics processor (GPU) or other parallel processor architecture, with independent instruction execution capability, suitable for parallel processing tasks. Each CU can contain multiple execution units or SIMD engines, and is the basic resource unit for task scheduling.
[0034] CU_MASK (Compute Unit Mask parameter): CU_MASK is used to indicate the set of computing units that can be used by the target computing task, usually represented in bit mask format. Each mask bit corresponds to a CU, and its state (on or off) indicates whether the corresponding computing unit participates in the execution of the current task. All mask bits in the off state indicate that the system does not specify the target computing resource; some mask bits in the on state indicate a restrictive resource binding. This parameter supports bitmaps, number sets, intervals or labels, and is suitable for different scheduling strategies.
[0035] CE (Command Engine, command processing module): CE is the scheduling control core inside the chip, responsible for parsing the scheduling instructions issued by the runtime, and selecting the appropriate set of computing units according to the mask parameters, scheduling priority and other information in the instructions, and distributing task sub-units to the target execution resources.
[0036] Stream (task stream): Task stream is a logical execution channel for organizing computing tasks, suitable for computing scenarios with dependency or sequence relationship. Each task stream can bind one or more command queues to achieve task isolation, concurrent scheduling or load balancing.
[0037] Queue (command queue): Command queue is used to cache and deliver scheduling instructions, and can be divided into software command queue (Software Command Queue, SCQ) and hardware command queue (Hardware Command Queue, HCQ) according to function. The software command queue is maintained by the runtime and stores the distribution commands that have not been converted; the hardware command queue is read by the underlying hardware and is used to store the data structure converted into executable instructions.
[0038] Figure 1 is a structural diagram of a computing task scheduling system in the prior art. As shown in Figure 1, the computing task scheduling system includes a user program 110, a runtime system 120 and a hardware execution unit 130.
[0039] The user program 110 submits a computing task request by calling an interface (such as LaunchKernel), which contains a kernel function entry, task parameters, and a memory address, but generally does not contain a resource limit parameter for the target computing resource. In some systems that support CU mask control, the user can pass in a computing unit mask CU_MASK when calling the interface, which is used to specify the set of target computing resources that can be used by the task during execution.
[0040] The runtime system 120 creates a task stream for each task request and allocates a dedicated software command queue SCQ. When the computing task request does not contain a CU_MASK, the task is assigned to the default task stream and the default command queue (such as Figure 1 the command queue corresponding to No CU_MASK in the above table); if the computing task request contains a CU_MASK, the runtime system needs to create a separate task stream and dedicated command queue (such as Figure 1 the command queue corresponding to CU_MASK in the above table) for different CU_MASK configurations, achieving resource binding and task isolation.
[0041] Each new CU_MASK configuration requires the runtime system to add a set of task streams and command queues, resulting in an exponential increase in the number of resources. For example, if CU_MASK1 and CUMASK2 are different, a set of corresponding task streams and command queues need to be configured for each CU_MASK. In addition, the CU_MASK is bound at the time of task stream creation and cannot be dynamically modified, making it difficult to adapt to real-time changes in resource status during task scheduling and limiting system flexibility.
[0042] In the command generation phase, the runtime system writes the task scheduling descriptor constructed from the computing task request into the software command queue, and the consumer thread is responsible for converting it into a standard format of hardware executable scheduling instructions and writing it into the hardware command queue HCQ.
[0043] The hardware execution unit 130 manages different types of tasks in parallel through the default queue pool and the mask-specific command queue. The command processing module (CE) extracts and parses the scheduling instructions from each queue and performs task scheduling according to the binding mask or the default strategy. However, since the task streams and command queues are divided according to the mask binding, the CE needs to frequently switch the command context between tasks with and without a mask, including flushing the pipeline, reloading the state register, updating the resource mapping, and other operations, which causes processing path delays.
[0044] Therefore, embodiments of this disclosure provide a computing resource scheduling method, apparatus, electronic device, and storage medium. By dynamically integrating computing unit mask parameters into scheduling instructions during runtime, this replaces the static binding method of mask parameters to task flows / command queues in the prior art. This avoids creating independent task flows and command queues for each mask combination, significantly reducing system memory usage and resource management overhead. Furthermore, embodiments of this disclosure can support multiple tasks carrying different mask parameters within the same task flow, supporting real-time adjustment of the scope of computing resource usage as needed without reconstructing the task flow structure, significantly improving scheduling flexibility and resource utilization efficiency.
[0045] Overall Implementation of the Computational Resource Scheduling Method in the Embodiments of this Disclosure
[0046] This disclosure provides a computing resource scheduling method applied to a parallel computing platform (such as a GPU chip) with multiple computing units, referring to... Figure 2 The computing resource scheduling method includes:
[0047] Step S210: Receive a computing task request sent by the user, wherein the computing task request includes computing unit mask parameters;
[0048] Step S220: Generate a scheduling instruction according to the computing task request, and send the scheduling instruction to the command processing module, wherein the scheduling instruction includes the computing unit mask parameter;
[0049] In step S230, the command processing module parses the computing unit mask parameter in the scheduling instruction and distributes the computing tasks to the target computing unit set according to the parsing result.
[0050] In step S210, the runtime system receives a computation task request from the user program through the task initiation interface. Unlike traditional interfaces, this computation task request includes, but is not limited to, task parameters, a task stream identifier (Stream ID), and a computation unit mask parameter CU_MASK. The task parameters describe the task's scheduling and resource requirements, including but not limited to kernel function entry points, thread block configurations, shared memory size, and input / output buffer addresses. The task stream identifier (Stream ID) identifies the execution context to which this task belongs. The computation unit mask parameter CU_MASK identifies the set of target computation units that the user expects this task to use. The computation unit mask parameter can be expressed in the form of a bitmap, segment numbers, or a set of tags, and is used to limit the set of computation units that can participate in task execution.
[0051] In some embodiments, the computing unit mask parameter is represented in a bit mask format, each mask bit corresponding to a CU, and its state (on or off) indicating whether the corresponding computing unit participates in the execution of the current task. For example, in a processor with 64 CUs, CU_MASK can be a 64-bit binary value, when the 3rd, 4th, and 6th bits are 1 and the rest are 0, it means that the task can only be scheduled to execute on CUs 2, 3, and 5 (counting from 0).
[0052] In some embodiments, CU_MASK can also be represented in the form of interval number or tag set. The interval number is suitable for continuous resource binding, such as CU[8-15]; the tag set is suitable for resource virtualization or multi-tenant environment.
[0053] In step S220, after receiving the computing task request, the runtime system first parses the computing task request to extract the task parameters, task stream identifier (Stream ID), and computing unit mask parameter CU_MASK. Based on the task stream identifier, the runtime system determines the available software command queue SCQ and establishes a binding relationship between the computing task and the software command queue SCQ. The binding process can be dynamically determined based on the preset mapping relationship, queue state information, or task attributes, to achieve reasonable allocation of command queue resources.
[0054] Subsequently, the runtime system constructs a task scheduling descriptor containing resource restriction information according to the scheduling requirements in the computing task request and the CU_MASK parameter. The task scheduling descriptor includes structured fields such as kernel function entry address, grid dimension, thread block dimension, shared memory requirement, register requirement, computing unit mask field, task priority parameter, and task stream identifier, which are used to completely describe the scheduling behavior and resource constraint conditions of the task. After the task scheduling descriptor is constructed, it is written into the software command queue.
[0055] The runtime system forms a one-to-one binding relationship with the software command queue SCQ through logical task stream (Stream). Each task stream corresponds to one SCQ, and multiple tasks with different CU_MASK configurations can coexist in the same SCQ, avoiding queue resource redundancy caused by mask changes. The software command queue is a logical structure maintained internally by the runtime system, used to cache multiple scheduling instructions and sequentially accessed by the command processing module.
[0056] The storage order of the task scheduling descriptor in the software command queue follows the first-in-first-out (FIFO) rule to ensure the order consistency of tasks in the same task stream. In the task scheduling process, the runtime system can also dynamically adjust the scheduling priority based on the task attributes to support differentiated scheduling of multiple types of tasks. Before task distribution, the command processing module can confirm or replace the combination of the calculation units corresponding to CU_MASK based on the current load state of the calculation unit, thereby realizing dynamic optimization of task scheduling.
[0057] In addition, to ensure the flexibility of instruction processing, the runtime system retains the original task parameters at their original address positions when processing the task scheduling descriptor, and writes the CU_MASK parameter into a predefined independent register area, so that the command processing module can obtain the resource limitation information without modifying the task data structure. Finally, the consumer thread converts the task scheduling descriptor into a scheduling instruction package recognizable by hardware, and supplements the instruction header information and completes the necessary data alignment in the conversion process to ensure the execution consistency and compatibility of the scheduling instruction package in the hardware path.
[0058] In some embodiments, referring to Figure 3 , the following steps are performed to generate the scheduling instruction carrying the mask parameter.
[0059] In step S221, the runtime obtains the task parameters, the task stream identifier, and the mask parameter in real time from the computing task request.
[0060] Specifically, after receiving the computing task request, the runtime system first parses the computing task request to extract the task parameters, the task stream identifier (Stream ID), and the calculation unit mask parameter CU_MASK.
[0061] In step S222, a task scheduling descriptor containing an independent mask field is constructed according to the task parameters and the mask parameter.
[0062] Specifically, when constructing the task scheduling descriptor, the runtime system not only includes the kernel function entry address, the grid dimension, the thread block dimension, the shared memory requirement, and the register requirement, but also independently generates a calculation unit mask field, and maps the mask parameter bit by bit in the field.
[0063] In step S223, the task scheduling descriptor is added to the corresponding software command queue according to the task stream identifier.
[0064] Specifically, the task scheduling descriptor is written into a corresponding software command queue SCQ according to a task flow identification. In a plurality of task scheduling descriptors continuously distributed by a single task flow, each mask field is independently variable, that is, each SCQ can support a plurality of task scheduling descriptors with different CU_MASK configurations, and the mask fields of each task scheduling descriptor do not interfere with each other, and can be changed in real time as needed.
[0065] In step S224, the task scheduling descriptor in the software command queue is converted into a hardware executable scheduling instruction according to a queue order, wherein the task parameters remain in place, and the mask field is written into a predefined hardware execution layer mask storage area.
[0066] Specifically, the consumer thread reads the task scheduling descriptor from the software command queue and converts the task scheduling descriptor into a hardware executable scheduling instruction (Dispatch Packet). In the conversion process, the task parameters remain in place, and the CU_MASK field is written into a predefined register area or encapsulated in the scheduling instruction to ensure that the command processing module can directly access in the scheduling stage.
[0067] In step S230, the command processing module receives the scheduling instruction from the runtime system, and performs target computing unit allocation and subtask scheduling based on the computing unit mask parameter CU_MASK. The command processing module can include a command decoding unit (Command Decoder) and a subtask scheduling unit (Subtask Dispatcher).
[0068] The command decoding unit decodes the CU_MASK field in the scheduling instruction, and determines a resource allocation strategy to distribute the computing task to the target computing unit set according to the decoding result. Specifically, the validity of the mask parameter is determined at the hardware execution layer; when the mask parameter is an invalid value, that is, the CU_MASK field represents a complete closed state (that is, each bit is 0), the command processing module triggers a preset dynamic scheduling strategy. This strategy dynamically selects a target computing unit in a globally available computing resource set based on the load state, execution efficiency and task priority of the current plurality of computing units; when the mask parameter is a valid value, that is, the CU_MASK field has an on identification bit, the command processing module selects a target computing unit for subtask distribution and concurrent execution in a limited resource range according to the computing unit set identified in the field.
[0069] In the task partitioning stage, the sub-task scheduling unit can partition the complete task into multiple sub-task blocks according to the thread block dimension of the kernel function, and map each sub-task to the allowed computing unit in combination with the CU_MASK restriction. The mapping process supports joint scheduling of the computing units in different block processor clusters, and can also realize cross-cluster resource binding and distribution under a supported architecture.
[0070] In some embodiments, the command processing module can execute a dynamic resource selection strategy in combination with a scheduling scoring mechanism. The scoring mechanism is constructed based on multiple factors, including the real-time load state of the computing unit, the historical execution delay, the data communication affinity between tasks, and the resource reuse situation within the same task stream, etc. The multiple candidate computing unit combinations are scored and sorted, and the resource set with the optimal score is finally selected for the current task scheduling.
[0071] Device and equipment description of embodiments of the present disclosure
[0072] Referring to Figure 4 Embodiments of the present disclosure also provide an architecture diagram of a computing resource scheduling method application. As shown in Figure 4 The computing resource scheduling system includes a user program 410, a runtime system 420, and a hardware execution unit 430.
[0073] The user program 410 submits a computing task request by calling an interface (such as LaunchKernel), and the computing task request includes but is not limited to task parameters, a task stream identifier (Stream ID), and a computing unit mask parameter CU_MASK.
[0074] The runtime system 420 parses the computing task request to obtain the task parameters, the task stream identifier, and the computing unit mask parameter CU_MASK; determines an available software command queue SCQ based on the task stream identifier and establishes a binding relationship between the computing task and the software command queue SCQ; then constructs a task scheduling descriptor according to the scheduling requirement and the CU_MASK parameter, the task scheduling descriptor having a computing unit mask field, and the CU_MASK parameter being written into the computing unit mask field; writes the task scheduling descriptor into the software command queue after the construction; and subsequently, a consumer thread reads the task scheduling descriptor and converts it into a hardware executable scheduling instruction, while keeping the task parameters in place and writing the mask field into a predefined hardware mask register region.
[0075] The hardware execution unit 430 parses the CU_MASK field in the scheduling instruction and determines a resource allocation strategy to distribute the computing task to a target computing unit set according to the parsing result.
[0076] Referring to Figure 5The embodiment of the present disclosure further provides a computing resource scheduling apparatus 500, comprising a request interface module 510, an instruction generation module 520 and a command processing module 530. The request interface module 510 and the instruction generation module 520 are located in a runtime system, and the command processing module 530 is located in a hardware execution unit.
[0077] The request interface module 510 is configured to receive a computing task request issued by a user, wherein the computing task request carries a mask parameter of a computing unit in real time.
[0078] The instruction generation module 520 is configured to integrate the mask parameter of the computing unit into a scheduling instruction in response to the computing task request, generate a scheduling instruction carrying the mask parameter and send the scheduling instruction to the command processing module.
[0079] The command processing module 530 is configured to analyze the mask parameter in the scheduling instruction, and distribute a computing task to a target computing unit set according to an analysis result.
[0080] The computing resource scheduling apparatus 500 of the present disclosure is configured to execute the computing resource scheduling method of the above-mentioned embodiment, and the specific processing process is the same as that of the computing resource scheduling method of the above-mentioned embodiment, which will not be repeated here.
[0081] The embodiment of the present disclosure further provides an electronic device 600, comprising:
[0082] at least one processor, and
[0083] a memory in communication connection with the at least one processor; wherein
[0084] The memory stores instructions, and the instructions are executed by the at least one processor, so that the at least one processor implements the method in any one of the above-mentioned embodiments of the present disclosure when executing the instructions.
[0085] The following will be described in detail Figure 6 The hardware structure of the electronic device will be described in detail. The electronic device comprises a processor 610, a memory 620, an input / output interface 630, a communication interface 640 and a bus 650.
[0086] The processor 610 can be implemented in the form of a general central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC) or one or more integrated circuits, and is configured to execute related programs to implement the technical solutions provided by the embodiments of the present disclosure.
[0087] The memory 620 can be implemented in the form of a Read Only Memory (ROM), a static storage device, a dynamic storage device, or a Random Access Memory (RAM), etc. The memory 620 can store an operating system and other application programs, and when the technical solutions provided by the embodiments of the present disclosure are implemented by software or firmware, the related program codes are stored in the memory 620 and are called and executed by the processor 610 to perform the computing resource scheduling method of the embodiments of the present disclosure.
[0088] The input / output interface 630 is configured to realize information input and output.
[0089] The communication interface 640 is configured to realize the communication interaction between the device and other devices, and the communication can be realized by a wired manner (for example, a USB, a network cable, etc.) or a wireless manner (for example, a mobile network, WIFI, Bluetooth, etc.).
[0090] The bus 650 is configured to transmit information between various components (for example, the processor 610, the memory 620, the input / output interface 630, and the communication interface 640) of the device.
[0091] The processor 610, the memory 620, the input / output interface 630, and the communication interface 640 are connected to each other through the bus 650 to realize the communication connection between the device.
[0092] The embodiments of the present disclosure also provide a computer readable storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement the computing resource scheduling method of the above-mentioned embodiments, which will not be described herein.
[0093] The terms "first", "second", "third", "fourth" and the like (if any) in the specification of the present disclosure and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present disclosure described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "contain" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device containing a series of steps or units does not necessarily limit to the clearly listed steps or units, but can include other steps or units that are not clearly listed or inherent to the process, method, product or device.
[0094] It should be understood that in the disclosure, "at least one" refers to one or more, and "multiple" refers to two or more. "And / or" is used to describe the association relationship of the associated objects, which means that there can be three relationships, for example, "A and / or B" can represent three cases of only A, only B and A and B existing at the same time, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after it. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c can mean a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0095] It should be understood that in the description of the embodiments of the disclosure, the meaning of multiple (or multiple) is two or more, greater than, less than, more than, etc. is not included in the number, and above, below, etc. is included in the number.
[0096] In several embodiments provided by the disclosure, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the unit is only a logical function division, and there can be another division manner in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.
[0097] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0098] In addition, each functional unit in each embodiment of the disclosure can be integrated into one processing unit, or each unit can exist physically independently, or two or more units can be integrated into one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0099] It should also be understood that the various embodiments provided by the embodiments of the disclosure can be combined in any way to achieve different technical effects.
[0100] The above is a specific explanation of the embodiments of the present disclosure, but the present disclosure is not limited to the above-described embodiments, and those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present disclosure, and these equivalent modifications or substitutions are included in the scope defined by the claims of the present disclosure.
Claims
1. A method for scheduling computing resources, characterized in that, The method comprises: receiving a computing task request issued by a user, wherein the computing task request carries a mask parameter of a computing unit in real time; in response to the computing task request, integrating the mask parameter of the computing unit into a scheduling instruction, generating a scheduling instruction carrying the mask parameter, and sending the scheduling instruction to a command processing module; parsing the mask parameter in the scheduling instruction by the command processing module, and distributing a computing task to a target computing unit set according to a parsing result.
2. The method of claim 1, wherein, Distributing the computing task to the target computing unit set according to the parsing result comprises: judging the validity of the mask parameter at a hardware execution layer; when the mask parameter is an invalid value, triggering a preset dynamic allocation strategy to distribute a subtask; when the mask parameter is a valid value, distributing the subtask to a physical computing unit specified by the mask.
3. The method of claim 2, wherein, The mask parameter is used to represent the enabled state of a plurality of computing units, wherein each mask bit corresponds to a computing unit, and is used to indicate whether the computing unit is allowed to participate in task execution; when all mask bits are in the off state, a preset dynamic allocation strategy is executed; when at least one mask bit is in the on state, a subtask is allocated to the computing unit in the on state.
4. The method of claim 2, wherein, The preset dynamic allocation strategy is dynamically generated according to the real-time load state of the computing unit.
5. The method of claim 1, wherein, Generating the scheduling instruction carrying the mask parameter comprises: obtaining a task flow identifier and a mask parameter in real time from the computing task request at runtime; generating a task scheduling descriptor containing an independent mask field; adding the task scheduling descriptor to a corresponding software command queue according to the task flow identifier.
6. The method of claim 5, wherein, In a plurality of task scheduling descriptors distributed continuously by a single task flow, each mask field has an independently variable value.
7. The method of claim 5, wherein, Generating the scheduling instruction carrying the mask parameter further comprises: converting the task scheduling descriptors in the software command queue into scheduling instructions executable by hardware in the order of the queue, wherein the task parameters remain in place, and the mask fields are written into a predefined mask storage area of the hardware execution layer.
8. A computing resource scheduling apparatus, characterized by comprising: The method comprises: a request interface module configured to receive a computing task request issued by a user, wherein the computing task request carries a mask parameter of a computing unit in real time; an instruction generation module configured to, in response to the computing task request, integrate the mask parameter of the computing unit into a scheduling instruction, generate a scheduling instruction carrying the mask parameter, and send the scheduling instruction to a command processing module; the command processing module is configured to parse the mask parameter in the scheduling instruction, and distribute a computing task to a target computing unit set according to a parsing result.
9. An electronic device, comprising: The electronic device comprises a memory, a processor, a program stored on the memory and executable on the processor, and a data bus for realizing connection communication between the processor and the memory, and the program, when executed by the processor, realizes the computing resource scheduling method of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores one or more programs executable by one or more processors to implement the computing resource scheduling method of any one of claims 1 to 7.
Citation Information
Cited By
Execution unit and computing device
CN121277714A
Data transmission method, broadcast engine, electronic equipment and storage medium
CN121530898A
Method for processing symmetric memory data of computing chip and related equipment
CN121919011A