Command packet splitting component, method, electronic device, and storage medium
By dividing virtual function regions in the top-level module and upstream module of the command package scheduling, parallel task splitting is achieved, which solves the problems of slow task issuance and resource waste in the multi-virtual function mode and improves the running efficiency of the artificial intelligence processor.
Patent Information
- Application Number
- CN202511651734.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-12
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2045-11-12
AI Technical Summary
In the multi-virtual-function mode, the task deployment speed is low and hardware resources are wasted in the existing technology, which affects the running speed of artificial intelligence processors.
By partitioning hardware resources based on virtual function regions, the top-level module and upstream module of the command packet scheduling are authorized to perform parallel splitting of upstream modules in different virtual function regions. Independent splitting is achieved by using an arbitration module and a target mask, thus avoiding mutual waiting and blocking.
It improves the task dispatch speed in multi-virtual-function mode, enhances hardware resource utilization, and strengthens the task processing capabilities of the artificial intelligence processor.
Smart Images

Figure CN121116557B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, and in particular to a command packet splitting component, method, electronic device and storage medium. BACKGROUND
[0002] CPD (Command Packet Dispatch) is used to split the command packet (cmd pkt) issued by software into tasks that can be recognized by artificial intelligence processor cores, and distribute the tasks to downstream artificial intelligence processor cores, and is a transformation communication bridge between the artificial intelligence processor operation center and software. When the running speed of the downstream artificial intelligence processor core is fast, the speed of distributing tasks directly determines the overall running rate of the current artificial intelligence processor.
[0003] In the prior art, in a multi-VF (Virtual Function) mode, the VF area is not distinguished in the CPD top module in the CPD, and the task issuing request of each pipe (PIPE) is received in turn according to a polling mode, that is, in the multi-VF mode, the hardware resources in different VF areas upstream are independent, but when the CPD top module receives the task issuing request upstream, a single task issuing request occupies the receiving port of the entire CPD top module, blocking the task issuing request of the remaining VF area, resulting in a low task issuing speed in the multi-VF mode, and at the same time, the hardware resources of the VF area not selected in the CPD top module are idle, causing waste of hardware resources, thereby affecting the running rate of the artificial intelligence processor. SUMMARY
[0004] The present application provides a command packet splitting component, method, electronic device and storage medium to solve the defects of low task issuing speed in the multi-VF mode, waste of hardware resources, and thus affecting the running rate of the artificial intelligence processor in the prior art.
[0005] The present application provides a command packet splitting component, comprising an upstream module and a command packet dispatch top module, the upstream module and the command packet dispatch top module are both based on at least one virtual function area for hardware resource division, wherein:
[0006] The command packet dispatch top module is configured to authorize the upstream modules of different virtual function areas to perform parallel splitting on the command packet when receiving the task issuing request sent by the upstream modules of different virtual function areas.
[0007] The command packet splitting component provided by the application, the command packet scheduling top module is used for enabling at least two arbitration modules based on a virtual function mode parameter, and the at least two enabled arbitration modules correspond to at least one virtual function area one by one; the virtual function mode parameter is used for representing the number of virtual function areas and the identification of each virtual function area;
[0008] Each enabled arbitration module is used for authorizing the upstream module of the virtual function area where each arbitration module is located to independently split the command packet in the case that a task issuing request sent by the upstream module of the virtual function area where each arbitration module is located is received.
[0009] The command packet splitting component provided by the application, the upstream module includes a pipeline in each virtual function area; the number of pipelines in each virtual function area is equal;
[0010] Each pipeline is used for sending a task issuing request to the arbitration module of the virtual function area where each pipeline is located in the case that a command packet is received; and each pipeline is used for independently splitting the command packet in the case that authorization of the arbitration module of the virtual function area where each pipeline is located is obtained.
[0011] The command packet splitting component provided by the application, each enabled arbitration module is used for obtaining a target mask; the target mask is used for representing the limited pipeline identification range of the virtual function area where each arbitration module is located; and each enabled arbitration module is also used for receiving a task issuing request sent by a pipeline in the limited pipeline identification range.
[0012] The command packet splitting component provided by the application, each pipeline includes a segmentation unit; each segmentation unit is used for independently splitting the command packet to obtain at least two tasks recognizable by an artificial intelligence processor in the case that authorization of the arbitration module of the virtual function area where each segmentation unit is located is obtained.
[0013] The application further provides a command packet splitting method applied to the command packet splitting component.
[0014] Receiving a task issuing request sent by an upstream module of a different virtual function area.
[0015] Authorizing the upstream module of the different virtual function area to perform parallel splitting on the command packet.
[0016] The command packet splitting method provided by the application, before receiving a task issuing request sent by an upstream module of a different virtual function area, the method includes:
[0017] The at least two arbitration modules are enabled based on a virtual function mode parameter, and the at least two enabled arbitration modules correspond to at least one virtual function area one by one; the virtual function mode parameter is used to represent the number of virtual function areas and the identification of each virtual function area.
[0018] According to the command packet splitting method provided in the application, the task issuing request sent by the upstream module in the different virtual function areas is received, and the method comprises the following steps:
[0019] A target mask is obtained; the target mask is used to represent the limited pipe identification range of the upstream module in the different virtual function areas;
[0020] The task issuing request sent by the pipe in the limited pipe identification range is received.
[0021] The application further provides an electronic device, which comprises a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and the processor implements the command packet splitting method according to any one of the above when executing the computer program.
[0022] The application further provides a non-transitory computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the command packet splitting method according to any one of the above.
[0023] The application further provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the command packet splitting method according to any one of the above.
[0024] The command packet splitting component, method, electronic device and storage medium provided in the application divide the hardware resources corresponding to the upstream module and the command packet scheduling top-level module according to at least one virtual function area respectively, and the upstream module in the different virtual function areas can send a task issuing request to the command packet scheduling top-level module in the virtual function area after the division, and the command packet scheduling top-level module in the different virtual function areas authorizes the upstream module in the corresponding virtual function area to perform parallel splitting on the command packet. In the application, the command packet scheduling top-level module in the different virtual function areas can simultaneously receive the task issuing request sent by the upstream module in the virtual function area, the request receiving does not interfere with each other, and the mutual waiting and mutual blocking behaviors between the different virtual function areas are avoided, the task issuing speed of the CPD in the multi-virtual function mode is greatly improved, the hardware resources of each virtual function area can work simultaneously, the hardware resource utilization is improved, and the task processing capability of the artificial intelligence processor in the multi-virtual function mode is improved. BRIEF DESCRIPTION OF DRAWINGS
[0025] In order to more clearly illustrate the technical solutions of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.
[0026] Figure 1 is a flowchart of the command packet splitting provided by the prior art.
[0027] Figure 2 is one of the structural diagrams of the command packet splitting component provided by the embodiments of the present application.
[0028] Figure 3 is the second structural diagram of the command packet splitting component provided by the embodiments of the present application.
[0029] Figure 4 is a flowchart of the command packet splitting method provided by the embodiments of the present application.
[0030] Figure 5 is a structural diagram of the command packet splitting device provided by the embodiments of the present application.
[0031] Figure 6 is a structural diagram of the electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solutions and advantages of the present application more clear, the technical solutions in the present application will be described clearly and completely in the following with reference to the drawings in the present application. Obviously, the described embodiments are some of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor belong to the scope of protection of the present application.
[0033] Figure 1 is a flowchart of the command packet splitting provided by the prior art, such as Figure 1As shown, in the prior art, in the multi-virtual function (Virtual Function, VF) mode, the hardware resources upstream are divided according to the VF area, but only one arbitration module rr0 is provided in the Command Packet Dispatch (CPD) top module (namely Cpd_TOP), and the CPD top module is not divided according to the VF area. In the multi-VF mode, the CPD top module receives the task issuing requests of each pipeline, which are received in a polling manner and are not distinguished according to the VF area. For example, after the splitting unit SPLIT0 in the pipeline PIPE0 in the VF0 area sends a task issuing request to the arbitration module rr0 in the CPD top module, the arbitration module rr0 authorizes the splitting unit SPLIT0 to issue the task. At this time, the CPD top module is occupied by the splitting unit SPLIT0 in the VF0 area, causing the task issuing requests in other VF areas to be blocked. Only after the splitting unit SPLIT0 in the VF0 area completes the task splitting and issuing, the arbitration module rr0 authorizes the next splitting unit to issue the task. At the same time, when the CPD top module is occupied by the splitting unit SPLIT0 in the VF0 area, the hardware resources in the CPD top module in other VF areas are idle, causing the waste of hardware resources.
[0034] Therefore, in view of the low task issuing speed and the waste of hardware resources in the multi-virtual function mode in the prior art, thereby affecting the running speed of the artificial intelligence processor, the embodiment of the present application provides a command packet splitting assembly. Figure 2 is one of the structure diagrams of the command packet splitting assembly provided by the embodiment of the present application, as Figure 2 As shown, the command packet splitting assembly comprises an upstream module and a command packet dispatch top module, and the upstream module and the command packet dispatch top module are both divided according to at least one virtual function area.
[0035] The command packet dispatch top module is configured to authorize the upstream modules in different virtual function areas to perform parallel splitting on the command packet when receiving the task issuing requests sent by the upstream modules in different virtual function areas.
[0036] It should be noted that the VF area refers to a part of the hardware resource set divided according to the hardware virtualization technology. The number of divided VF areas is determined in advance in response to user operations.
[0037] The upstream module is a hardware module in the CPD module before the CPD top module. The hardware resources in the upstream module are divided according to the number of VF areas.
[0038] The hardware resources in the CPD top-level module are also divided according to the number of VF areas, so that the upstream modules in the same VF area correspond to the CPD top-level module.
[0039] Specifically, the upstream module is configured to obtain a command package issued by upper-layer software, which cannot be recognized by the artificial intelligence processor core. Therefore, after the upstream modules in each VF area obtain the respective corresponding command package, the upstream modules send a task issuing request to the CPD top-level module in the same VF area. The task issuing request is used to represent that the upstream modules in the VF area request to issue the task to the downstream artificial intelligence processor core, which can be directly recognized and has smaller granularity after being split. After receiving the task issuing request, the CPD top-level module in the same VF area authorizes the issuing authority in the VF area to the upstream modules in the same VF area. Then, after splitting the command package, the upstream modules in the VF area can issue the split task to the artificial intelligence processor core by using the hardware resources in the VF area. The upstream modules in the same VF area work cooperatively with the CPD top-level module, and the hardware resources of the upstream modules and the CPD top-level module in different VF areas are independent of each other and can work in parallel without interference.
[0040] Optionally, the artificial intelligence processor can be any one of a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), a TPU (Tensor Processing Unit), a NPU (Neural network Processing Unit), a DPU (Deep learning Processing Unit), an APU (Accelerated Processing Unit), and a GPGPU (General-Purpose Graphics Processing Unit), and the embodiments of the present application do not limit the artificial intelligence processor.
[0041] The command packet splitting component provided by the embodiment of the application divides the hardware resources corresponding to the upstream module and the command packet scheduling top-level module according to at least one virtual function area, and after the division, the upstream module in different virtual function areas can send a task issuing request to the command packet scheduling top-level module in the virtual function area to which the upstream module belongs, and the command packet scheduling top-level module in different virtual function areas authorizes the upstream module in the corresponding virtual function area to perform parallel splitting on the command packet. In the embodiment of the application, the command packet scheduling top-level module in different virtual function areas can simultaneously receive the task issuing request sent by the upstream module in the virtual function area, the request receiving does not interfere with each other, and the mutual waiting and mutual blocking behavior between different virtual function areas is avoided, which greatly improves the task issuing speed of the CPD in the multi-virtual function mode, and the hardware resources of each virtual function area can work simultaneously, the hardware resource utilization is improved, and the task processing capability of the artificial intelligence processor in the multi-virtual function mode is improved.
[0042] In one embodiment, the command packet scheduling top-level module is configured to enable at least two arbitration modules based on a virtual function mode parameter, and the at least two enabled arbitration modules correspond to at least one virtual function area in a one-to-one manner; the virtual function mode parameter is used to represent the number of virtual function areas and the identification of each virtual function area.
[0043] Each of the enabled arbitration modules is configured to authorize the upstream module in the virtual function area where each of the arbitration modules is located to independently split the command packet in a case where a task issuing request sent by the upstream module in the virtual function area where each of the arbitration modules is located is received.
[0044] Specifically, before obtaining the command packet issued by the upper-layer software, the number of VF areas and the identification of each VF area are determined in response to the VF mode parameter pre-configured by the user. The number of VF areas can be represented as n=2 Vfmode-1wherein n represents the number of VF regions after division, and Vfmode represents a VF mode parameter. For example, when the VF mode parameter is 1, the number of VF regions is determined as 1, i.e., the entire hardware resource is determined as a VF region, and the identifier corresponding to the VF region is VF0. When the VF mode parameter is 2, the number of VF regions is determined as 2, i.e., the entire hardware resource is divided into two VF regions, and the identifiers corresponding to the two VF regions are VF0 and VF1, respectively. When the VF mode parameter is 3, the number of VF regions is determined as 4, i.e., the entire hardware resource is divided into four VF regions, and the identifiers corresponding to the four VF regions are VF0, VF1, VF2, and VF3, respectively. When the VF mode parameter is 4, the number of VF regions is determined as 8, i.e., the entire hardware resource is divided into eight VF regions, and the identifiers corresponding to the eight VF regions are VF0, VF1, VF2, VF3, VF4, VF5, VF6, and VF7, respectively.
[0045] Figure 3 is a structural diagram of the command packet splitting component provided by an embodiment of the application. Figure 3 As shown in the figure, after obtaining the VF mode parameter, the CPD top-level module enables the same number of arbitration modules as the number of VF regions, i.e., controls the arbitration modules in the same number as the number of VF regions to be in a working state. Each arbitration module in the working state receives a task issuing request sent by an upstream module in the same VF region, and authorizes the issuing right to the upstream module in the same VF region, so as to independently split the command packet.
[0046] In one embodiment, the upstream module includes a pipeline in each of the virtual function regions; the number of pipelines in each of the virtual function regions is equal.
[0047] Each pipeline is configured to, in a case where a command packet is received, send a task issuing request to an arbitration module of a virtual function region where the pipeline is located; and in a case where the arbitration module of the virtual function region where the pipeline is located authorizes, independently split the command packet.
[0048] Specifically, as shown in the figure, Figure 3As shown, a plurality of pipes are also included in the upstream module, each pipe being configured to obtain a command package issued by the upper-layer software. The upstream module evenly distributes all pipes according to the number of VF regions, so that the number of pipes included in each VF region is equal. That is, each VF region includes at least one pipe. For example, the total number of pipes is 8, and when the number of VF regions is 2, all pipes are divided into two groups, VF region VF0 includes pipes PIPE0, PIPE1, PIPE2 and PIPE3, and pipes PIPE0 to PIPE3 correspond to arbitration module rr0; VF region VF1 includes pipes PIPE4, PIPE5, PIPE6 and PIPE7, and pipes PIPE4 to PIPE7 correspond to arbitration module rr1. After each pipe obtains a command package, pipe PIPE0 sends a task issuance request to arbitration module rr0 in VF region VF0 in the CPD top-level module, and arbitration module rr0 authorizes the issuance right to pipe PIPE0, so that pipe PIPE0 can issue to the artificial intelligence processor core after splitting the command package. At the same time, pipe PIPE4 sends a task issuance request to arbitration module rr1 in VF region VF1 in the CPD top-level module, and arbitration module rr1 authorizes the issuance right to pipe PIPE4, so that pipe PIPE4 can issue to the artificial intelligence processor core after splitting the command package. The command package is split in two parallel ways. However, during the entire process of pipe PIPE0 sending a task issuance request to arbitration module rr0, pipes PIPE1, PIPE2 and PIPE3 are in a waiting state, and only after pipe PIPE0 issues a task to the artificial intelligence processor core, pipe PIPE1, PIPE2 or PIPE3 is switched in sequence. Similarly, during the entire process of pipe PIPE4 sending a task issuance request to arbitration module rr1, pipes PIPE5, PIPE6 and PIPE7 are in a waiting state, and only after pipe PIPE4 issues a task to the artificial intelligence processor core, pipe PIPE5, PIPE6 or PIPE7 is switched in sequence.
[0049] Preferably, when each VF region includes only one pipe, and the pipe in each VF region and the arbitration module correspond one-to-one, the task issuance speed is the highest, and the running performance of the artificial intelligence processor is the highest.
[0050] In one embodiment, each enabled arbitration module is configured to obtain a target mask, the target mask being configured to represent a limited pipe identifier range of a virtual function region in which the arbitration module is located, and each enabled arbitration module is further configured to receive a task issuance request sent by a pipe in the limited pipe identifier range.
[0051] Specifically, after grouping all pipes according to the number of VF regions in the upstream module, the target mask corresponding to the pipes in each VF region is determined. The target mask uses a bit to represent the limited pipe identifier range in the arbitration module perspective that can determine each VF region, and the number of bits is the total number of all pipes. Each bit represents a pipe. When the bit is 1, it means that the arbitration module includes the pipe corresponding to the identifier. When the bit is 0, it means that the arbitration module does not include the pipe corresponding to the identifier.
[0052] For example, when the number of VF regions is 1, the target mask obtained by the arbitration module rr0 is 'hff', where 'h' represents hexadecimal, and 'ff' represents binary 11111111. Binary 11111111 indicates that the limited pipe identifier range corresponding to the arbitration module rr0 includes eight pipes, i.e., pipes PIPE0 to PIPE7.
[0053] For another example, when the number of VF regions is 2, the target mask obtained by the arbitration module rr0 is 'hf', i.e., 'h0f', and '0f' represents binary 00001111. That is, the limited pipe identifier range corresponding to the arbitration module rr0 is pipes PIPE0 to PIPE3. The target mask obtained by the arbitration module rr1 is 'hf0', and 'f0' represents binary 11110000. That is, the limited pipe identifier range corresponding to the arbitration module rr1 is pipes PIPE4 to PIPE7.
[0054] For another example, when the number of VF regions is 4, the target mask obtained by the arbitration module rr0 is 'h3', i.e., 'h03', and '03' represents binary 00000011. That is, the limited pipe identifier range corresponding to the arbitration module rr0 is pipes PIPE0 and PIPE1. The target mask obtained by the arbitration module rr1 is 'hc', i.e., 'h0c', and '0c' represents binary 00001100. That is, the limited pipe identifier range corresponding to the arbitration module rr1 is pipes PIPE2 and PIPE3. The target mask obtained by the arbitration module rr2 is 'h30', and '30' represents binary 00110000. That is, the limited pipe identifier range corresponding to the arbitration module rr2 is pipes PIPE4 and PIPE5. The target mask obtained by the arbitration module rr3 is 'hc0', and 'c0' represents binary 11000000. That is, the limited pipe identifier range corresponding to the arbitration module rr3 is pipes PIPE6 and PIPE7.
[0055] For example, when the number of VF regions is 8, the target mask obtained by the arbitration module rr0 is 'h1', which is 'h01', and '01' represents binary 00000001, that is, the arbitration module rr0 corresponds to the limited pipe identification range of pipe PIPE0; the target mask obtained by the arbitration module rr1 is 'h2', which is 'h02', and '02' represents binary 00000010, that is, the arbitration module rr1 corresponds to the limited pipe identification range of pipe PIPE1; the target mask obtained by the arbitration module rr2 is 'h4', which is 'h04', and '04' represents binary 00000100, that is, the arbitration module rr2 corresponds to the limited pipe identification range of pipe PIPE2; the target mask obtained by the arbitration module rr3 is 'h8', which is 'h08', and '08' represents binary 00001000, that is, the arbitration module rr3 corresponds to the limited pipe identification range of pipe PIPE3; the target mask obtained by the arbitration module rr4 is 'h10', and '10' represents binary 00010000, that is, the arbitration module rr4 corresponds to the limited pipe identification range of pipe PIPE4; the target mask obtained by the arbitration module rr5 is 'h20', and '20' represents binary 00100000, that is, the arbitration module rr5 corresponds to the limited pipe identification range of pipe PIPE5; the target mask obtained by the arbitration module rr6 is 'h40', and '40' represents binary 01000000, that is, the arbitration module rr6 corresponds to the limited pipe identification range of pipe PIPE6; and the target mask obtained by the arbitration module rr7 is 'h80', and '80' represents binary 10000000, that is, the arbitration module rr7 corresponds to the limited pipe identification range of pipe PIPE7.
[0056] After the enabled arbitration module receives the task issuing request sent by the pipe, it can determine whether the identification of the pipe is in the limited pipe identification range represented by the target mask. If it is in the limited pipe identification range, the issuing authority is authorized to the pipe.
[0057] In one embodiment, each of the pipes includes a splitting unit; each of the splitting units is configured to independently split the command package to obtain at least two tasks recognizable by the artificial intelligence processor, under the condition that the arbitration module of the virtual function region where the splitting unit is located authorizes the splitting unit.
[0058] Specifically, each pipe includes a splitting unit, which is configured to send a task issuing request to the arbitration module in the VF region after obtaining the command package, and split the obtained command package to obtain at least two tasks with smaller granularity that can be recognized by the artificial intelligence processor core after obtaining the issuing authority authorized by the arbitration module, and issue the tasks to the downstream artificial intelligence processor core.
[0059] The embodiment of the present application also provides a command packet splitting method, which is applied to the command packet splitting component in any of the above embodiments, Figure 4 is a flowchart of the command packet splitting method provided by the embodiment of the present application, as shown in the figure, the method comprises the following steps 410 and 420. Figure 4
[0060] Step 410, receiving a task issuing request sent by an upstream module in a different virtual function area.
[0061] Step 420, authorizing the upstream module in the different virtual function area to perform parallel splitting on the command packet.
[0062] The specific process of steps 410 and 420 can refer to the specific process of the corresponding command packet splitting component, and the embodiment of the present application will not be described here.
[0063] The command packet splitting method provided by the embodiment of the present application divides the hardware resources corresponding to the upstream module and the command packet scheduling top-level module according to at least one virtual function area, and after the division, the upstream module in different virtual function areas can send a task issuing request to the command packet scheduling top-level module in the virtual function area to which the upstream module belongs, and the command packet scheduling top-level module in different virtual function areas authorizes the upstream module in the corresponding virtual function area to perform parallel splitting on the command packet. In the embodiment of the present application, the command packet scheduling top-level module in different virtual function areas can simultaneously receive the task issuing request sent by the upstream module in the virtual function area, the request receiving does not interfere with each other, and the mutual waiting and mutual blocking behavior between different virtual function areas is avoided, which greatly improves the task issuing speed of CPD in the multi-virtual function mode, and the hardware resources of each virtual function area can work simultaneously, improving the hardware resource utilization, and further improving the task processing capability of the artificial intelligence processor in the multi-virtual function mode.
[0064] In one embodiment, before receiving the task issuing request sent by the upstream module in the different virtual function area, the method comprises:
[0065] Based on the virtual function mode parameter, at least two arbitration modules are enabled, and the at least two enabled arbitration modules correspond to at least one virtual function area one by one; the virtual function mode parameter is used to represent the number of virtual function areas and the identification of each virtual function area.
[0066] In one embodiment, the receiving of the task issuing request sent by the upstream module in the different virtual function area comprises:
[0067] Obtaining a target mask; the target mask is used to represent the limited pipe identification range of the upstream module in the different virtual function area;
[0068] Receive the task assignment request sent by the pipeline in the defined pipeline identification range.
[0069] The command packet splitting device provided by the embodiment of the application is described below. The command packet splitting device described below can be referred to in correspondence with the command packet splitting method described above.
[0070] The embodiment of the application further provides a command packet splitting device, Figure 5 is a structural schematic diagram of the command packet splitting device provided by the embodiment of the application, as Figure 5 indicated, the command packet splitting device 500 comprises a receiving module 510 and an authorization module 520.
[0071] The receiving module 510 is configured to receive the task assignment request sent by the upstream module of the different virtual function areas.
[0072] The authorization module 520 is configured to authorize the upstream module of the different virtual function areas to perform parallel splitting on the command packet.
[0073] The command packet splitting device provided by the embodiment of the application divides the hardware resources corresponding to the upstream module and the command packet scheduling top-level module according to at least one virtual function area, respectively. After the division, the upstream module of the different virtual function areas can send a task assignment request to the command packet scheduling top-level module in the virtual function area to which the upstream module belongs. After the division, the command packet scheduling top-level module in the different virtual function areas authorizes the upstream module in the corresponding virtual function area to perform parallel splitting on the command packet. In the embodiment of the application, the command packet scheduling top-level module in the different virtual function areas can simultaneously receive the task assignment request sent by the upstream module in the virtual function area. The request receiving does not interfere with each other, and the mutual waiting and mutual blocking behaviors between the different virtual function areas are avoided. The task assignment speed of the CPD in the multi-virtual function mode is greatly improved. The hardware resources of each virtual function area can work simultaneously, the hardware resource utilization is improved, and the task processing capability of the artificial intelligence processor in the multi-virtual function mode is improved.
[0074] Optionally, the command packet splitting device 500 further comprises an enabling module, which is specifically configured to:
[0075] enable at least two arbitration modules based on a virtual function mode parameter, and the enabled at least two arbitration modules correspond to at least one virtual function area in one-to-one correspondence; the virtual function mode parameter is used to represent the number of virtual function areas and the identification of each virtual function area.
[0076] Optionally, the receiving module 510 is specifically configured to:
[0077] obtain a target mask; the target mask is used to represent the limited pipeline identification range of the upstream module in the different virtual function areas.
[0078] Receive task assignment requests sent by pipelines within the defined pipeline identifier range.
[0079] Figure 6 This is a schematic diagram of the structure of the electronic device provided in the embodiment of the present invention, such as... Figure 6 As shown, the electronic device may include a processor 610, a communications interface 620, a memory 630, and a communication bus 640. The processor 610, communications interface 620, and memory 630 communicate with each other via the communication bus 640. The processor 610 can call logical instructions in the memory 630 to execute a command packet splitting method. This method includes: receiving task delivery requests from upstream modules in different virtual function regions; and authorizing upstream modules in different virtual function regions to perform parallel splitting of command packets.
[0080] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0081] On the other hand, the present invention also provides a computer program product, the computer program product including a computer program, the computer program being stored on a non-transitory computer-readable storage medium, the computer program being executed by a processor, the computer being able to execute the command packet splitting method provided by the above methods, the method including: receiving task distribution requests sent by upstream modules of different virtual function regions; authorizing upstream modules of different virtual function regions to split the command packets in parallel.
[0082] In yet another aspect, the present application also provides a non-transitory computer readable storage medium having stored thereon a computer program, which, when executed by a processor, implements a command packet splitting method provided by each of the above methods, and the method comprises: receiving a task issuing request sent by an upstream module of a different virtual function region; and authorizing the upstream module of the different virtual function region to perform parallel splitting on the command packet.
[0083] The device embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e., can be located in one place or distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the embodiment scheme according to actual needs. Those skilled in the art can understand and implement without creative labor.
[0084] From the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be realized by means of software and the necessary general hardware platform, and of course, can also be realized by hardware. Based on such understanding, the above technical solutions, essentially or in terms of contribution to the prior art, can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0085] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for some technical features; and these modifications or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A command package splitting component, characterized in that, This includes an upstream module and a command packet scheduling top-level module. Both the upstream module and the command packet scheduling top-level module are based on hardware resource partitioning within at least two virtual function regions, ensuring a one-to-one correspondence between the upstream module and the command packet scheduling top-level module located within the same virtual function region. The top-level module for scheduling each of the divided command packets is used to authorize the upstream module in the same virtual function region to perform parallel splitting of the command packet when it receives a task distribution request from the upstream module in the same virtual function region.
2. The command packet splitting component according to claim 1, characterized in that, The command packet scheduling top-level module is used to enable at least two arbitration modules based on virtual function mode parameters, and the enabled at least two arbitration modules correspond one-to-one with at least two virtual function regions; the virtual function mode parameters are used to characterize the number of virtual function regions and the identifier of each virtual function region; Each of the enabled arbitration modules is used to authorize the upstream module of the virtual function region where each arbitration module is located to independently split the command packet when it receives a task delivery request sent by the upstream module of the virtual function region where each arbitration module is located.
3. The command packet splitting component according to claim 2, characterized in that, The upstream module includes pipes located within each of the virtual function regions; the number of pipes within each of the virtual function regions is equal; Each of the aforementioned pipes is used to send a task delivery request to the arbitration module of the virtual function region where the pipe is located upon receiving a command packet; and to independently split the command packet upon obtaining authorization from the arbitration module of the virtual function region where the pipe is located.
4. The command packet splitting component according to claim 3, characterized in that, Each of the enabled arbitration modules is used to obtain a target mask; the target mask is used to characterize the limited pipe identifier range of the virtual function region in which each of the arbitration modules is located; each of the enabled arbitration modules is also used to receive task delivery requests sent by pipes within the limited pipe identifier range.
5. The command packet splitting component according to claim 3, characterized in that, Each of the pipelines includes a segmentation unit; each of the segmentation units is used to independently split the command package, obtaining at least two tasks that can be recognized by the artificial intelligence processor, upon obtaining authorization from the arbitration module of the virtual function region where each of the segmentation units is located.
6. A method for splitting command packets, characterized in that, Applied to the command packet splitting component according to any one of claims 1-5, the method comprises: Receive task assignment requests from upstream modules in different virtual function regions; Authorize upstream modules in different virtual function regions to perform parallel splitting of command packages.
7. The command packet splitting method according to claim 6, characterized in that, Before receiving task delivery requests from upstream modules in different virtual function regions, the method includes: At least two arbitration modules are enabled based on virtual function mode parameters, and the enabled at least two arbitration modules correspond one-to-one with at least two virtual function regions; the virtual function mode parameters are used to characterize the number of virtual function regions and the identifier of each virtual function region.
8. The command packet splitting method according to claim 6, characterized in that, The receiving of task distribution requests from upstream modules in different virtual function regions includes: Obtain the target mask; the target mask is used to characterize the limited pipe identifier range of upstream modules located in different virtual function regions; Receive task assignment requests sent by pipelines within the defined pipeline identifier range.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the command packet splitting method as described in any one of claims 6 to 8.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the command packet splitting method as described in any one of claims 6 to 8.
Citation Information
Patent Citations
Apparatus and method for memory management in graphics processing environment
CN108776949A
Method for constructing trusted execution environment, computing device, medium and program product
CN119003098A