Instruction execution device and method, electronic equipment and storage medium

By introducing uniform instruction execution and register mapping technology into artificial intelligence chips, redundant calculations are reduced, and the problem of redundant operations in single-instruction multi-data technology is solved, and the performance and efficiency of the chip are improved.

CN119002999APending Publication Date: 2024-11-22KUNLUNXIN TECHNOLOGY (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411081788.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-07
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

In artificial intelligence chips, there are redundant computing operations in single-instruction and multi-data technology, resulting in limited performance improvement.

Method used

By introducing a dispatch unit in the instruction execution device, the instructions to be executed are dispatched to the calculation unit as uniform instructions, and uniform operation operations are performed in the calculation unit. As a result, multiple uniform registers are written to reduce redundant operations and improve execution efficiency.

Benefits of technology

It significantly improves the chip performance and computing efficiency, reduces the overhead of computing resources and storage resources, and achieves a smaller chip area overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119002999A_ABST
    Figure CN119002999A_ABST
Patent Text Reader

Abstract

The invention provides an instruction execution device, and relates to the technical field of artificial intelligence, in particular to the technical field of chips and the technical field of single instruction and multiple data. According to the specific implementation scheme, a dispatching unit is configured to respond to determining that at least one source register used for an instruction to be executed corresponds to at least one uniform register in a plurality of uniform registers, the instruction to be executed serves as a uniform instruction to be dispatched to a first computing unit, and the uniform instruction comprises a plurality of uniform computing operations; and the first calculation unit is configured to execute uniform calculation operation to obtain a uniform calculation result, and the uniform calculation result is written into at least one available uniform register in the plurality of uniform registers. The invention further provides an instruction execution method, electronic equipment and a storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, in particular to the field of chip technology and the field of single instruction multiple data (SIMD) technology. More specifically, the present disclosure provides an instruction execution device, method, electronic device and storage medium. Background Art

[0002] With the development of artificial intelligence technology, the application scenarios of artificial intelligence chips are constantly increasing. Artificial intelligence chips have strong parallel processing capabilities and can efficiently process large amounts of data. Summary of the invention

[0003] The present disclosure provides an instruction execution apparatus, method, device and storage medium.

[0004] According to one aspect of the present disclosure, an instruction execution device is provided, the device comprising: a dispatch unit, configured to: in response to determining that at least one source register for an instruction to be executed corresponds to at least one uniform register among a plurality of uniform registers, dispatch the instruction to be executed as a uniform instruction to a first computing unit, wherein the uniform instruction comprises a plurality of uniform operation operations; and the first computing unit, configured to: execute the uniform operation operation to obtain a uniform operation result, and the uniform operation result is written into at least one available uniform register among the plurality of uniform registers.

[0005] According to another aspect of the present disclosure, an electronic device is provided, comprising the device provided by the present disclosure.

[0006] According to another aspect of the present disclosure, an instruction execution method is provided, the method comprising: in response to determining that at least one source register for an instruction to be executed corresponds to at least one uniform register among a plurality of uniform registers, dispatching the instruction to be executed as a uniform instruction to a first computing unit, wherein the uniform instruction comprises a plurality of uniform operation operations; performing the uniform operation operation using the first computing unit to obtain a uniform operation result; and writing the uniform operation result into at least one available uniform register among the plurality of uniform registers.

[0007] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method provided according to the present disclosure.

[0008] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided. The computer instructions are used to cause a computer to execute the method provided according to the present disclosure.

[0009] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the method provided according to the present disclosure is implemented.

[0010] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0012] Figure 1 is a schematic block diagram of an instruction execution device according to an embodiment of the present disclosure;

[0013] Figure 2 is a schematic diagram of a detection unit according to an embodiment of the present disclosure;

[0014] Figure 3 is a schematic diagram of updating register mapping data according to an embodiment of the present disclosure;

[0015] Figure 4 is a schematic diagram of an instruction execution device according to an embodiment of the present disclosure;

[0016] Figure 5 is a schematic diagram of a plurality of computing units according to one embodiment of the present disclosure;

[0017] Figure 6 is a schematic block diagram of an electronic device according to an embodiment of the present disclosure;

[0018] Figure 7 is a flowchart of an instruction execution method according to an embodiment of the present disclosure; and

[0019] Figure 8 is a block diagram of an electronic device to which the instruction execution method can be applied according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0020] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0021] Artificial intelligence chips may include general purpose graphics processing units (GPGPU), tensor processing units (TPU), and neural network processing units (NPU). Taking a general purpose graphics processing unit as an example, a general purpose graphics processing unit can execute instructions in a single instruction multiple data manner to achieve high computing throughput and high energy efficiency. However, in the process of executing instructions in a single instruction multiple data manner, there may be many redundant calculations. For example, the same operation can be performed on different execution channels based on the same data. This operation can be called a uniform operation. For another example, the instructions to be executed may include a batch of operation operations. A batch of operation operations may include 16 operation operations. These 16 operation operations may involve 16 different data in the first source register and 16 different data in the second source register. In this case, the instruction to be executed may be a vector instruction, and there is no redundant operation in the 16 operation operations. For another example, if 16 operation operations all involve the same first data in the first source register and the same second data in the second source register, the 16 operation operations may be 16 identical operation operations, and 16 identical operation results will be obtained. In this case, the instruction to be executed may be a uniform instruction, and there are redundant operations in the 16 operation operations. Redundant operations may lead to unnecessary computing resource overhead, making it difficult to further improve the performance of the chip.

[0022] Therefore, in order to improve the performance of the chip, the present disclosure provides an instruction execution device, which will be described below.

[0023] Figure 1 is a schematic block diagram of an instruction execution device according to an embodiment of the present disclosure.

[0024] like Figure 1 As shown, the instruction execution device 100 may include a dispatch unit 110 and a first computing unit 120 .

[0025] The dispatch unit 110 may be configured to, in response to determining that at least one source register for the instruction to be executed corresponds to at least one uniform register of the plurality of uniform registers, dispatch the instruction to be executed as a uniform instruction to a target computing unit.

[0026] In an embodiment of the present disclosure, the apparatus 100 may include a storage space. The storage space stores a correspondence between a first register and a uniform register. The correspondence may be multiple. If the source register number of the instruction to be executed is the same as the number of a first register in the storage space, it can be determined that the source register for the instruction to be executed corresponds to the uniform register.

[0027] In the disclosed embodiment, the uniform register may be a newly added register or a scalar register. For example, the capacity of the vector register may be 512 bits. The capacity of the scalar register may be 32 bits. The capacity of the uniform register may be 32 bits. The first register may be a vector register. The scalar register may be used as the second register.

[0028] In the embodiment of the present disclosure, the source register for the instruction to be executed may be one or more. If there is one source register and it is determined that the source register corresponds to a uniform register, it can be determined that the instruction to be executed is a uniform instruction.

[0029] In the embodiment of the present disclosure, a uniform instruction may include multiple uniform operation operations. For example, a uniform instruction may include 16 uniform operation operations.

[0030] In the embodiment of the present disclosure, the dispatch unit may dispatch at least one of a control signal of the instruction to be executed and data to be processed to the first computing unit.

[0031] The first computing unit 120 may be configured to: perform a uniform computing operation to obtain a uniform computing result. For example, the target computing unit 120 may perform any computing operation among 16 uniform computing operations to obtain a uniform computing result.

[0032] In the embodiment of the present disclosure, the uniform operation result is written into at least one available uniform register among the multiple uniform registers. For example, an idle uniform register among the multiple uniform registers can be used as an available uniform register.

[0033] Through the disclosed embodiments, when the source register for the instruction corresponds to the uniform register, the execution result of the instruction can be obtained by executing one of the multiple operations of the instruction, which greatly reduces redundant operations, improves the execution efficiency of the instruction, and helps to improve the performance of the chip. In addition, the number of operations executed by the first computing unit is small, and the capacity of the uniform register is also small, which can achieve a significant improvement in chip performance with a small chip area overhead.

[0034] It can be understood that the above describes the device of the present disclosure. One or more corresponding relationships in the above storage space can be used as register mapping data. The above register mapping data will be further described below.

[0035] In an embodiment of the present disclosure, the register mapping data may indicate a first register and a uniform register corresponding to the first register. The register mapping data may include a correspondence between a plurality of first registers and a plurality of uniform registers. In the process of executing a plurality of instructions, the register mapping data is continuously updated. In the initial stage of the chip executing a plurality of instructions of different tasks, the register mapping data may be empty. For example, when executing the first instruction to be executed among a plurality of instructions to be executed, the register mapping data may be empty and does not include a correspondence between a vector register and a uniform register.

[0036] It can be understood that the register mapping data of the present disclosure is described above, and the device of the present disclosure will be further described below.

[0037] In some embodiments, the device may further include an instruction fetch unit, a decoding unit, a scheduling unit, and a transmitting unit. The instruction fetch unit may obtain an initial instruction. The decoding unit may decode the initial instruction to obtain an instruction to be executed. The scheduling unit may schedule hardware resources related to the instruction to be executed so as to execute the instruction to be executed. The transmitting unit may send a read request to one or more source registers for the instruction to be executed. The transmitting unit may transmit the instruction to be executed to the dispatch unit. For example, the transmitting unit may transmit the first instruction to be executed to the dispatch unit.

[0038] In some embodiments, the dispatch unit may also be configured to dispatch the instruction to be executed to the second computing unit in response to determining that at least one source register for the instruction to be executed includes a first register that does not correspond to any uniform register. For example, when executing the first instruction to be executed, the register mapping data does not include the correspondence between the vector register and the uniform register. The first instruction to be executed may be dispatched to the second computing unit. The second computing unit may be a vector computing unit. In this case, the first instruction to be executed may be used as a vector instruction. It is understood that the second computing unit may also be a matrix computing unit, which is not limited in the present disclosure.

[0039] In some embodiments, the second computing unit may be configured to: execute multiple computing operations of the instruction to be executed to obtain multiple initial computing results. For example, the second computing unit may execute multiple computing operations of the first instruction to be executed to obtain multiple initial computing results. Next, it may be determined whether the multiple initial computing results are the same.

[0040] In some embodiments, the above device may further include a detection unit. Figure 2 The detection unit will be described.

[0041] Figure 2 is a schematic diagram of a detection unit according to an embodiment of the present disclosure.

[0042] like Figure 2 As shown, the detection unit 240 may include multiple first detection modules. The multiple first detection modules may include a first detection module 2411, ... a first detection module 2412. The detection unit 240 may also include a second detection module 242. The detection unit 240 may determine whether N detection results are the same. N may be an integer greater than 1. For example, N may be 16.

[0043] In the embodiment of the present disclosure, the first detection module may include a bitwise XOR operator and a first bitwise OR operator. The bitwise XOR operator may be configured to perform a bitwise XOR operation on the two initial operation results to obtain an XOR operation result. The first bitwise OR operator is configured to perform a bitwise OR operation on the XOR operation results to obtain an OR operation result. Figure 2 As shown, the data amount of the initial operation result may be 32 bits. The first detection module 2411 may include a bitwise XOR operator xor2411 and a first bitwise OR operator bwor2411. According to the first initial operation result and the second initial operation result among the N initial operation results, the bitwise XOR operator xor2411 may determine the XOR operation result. The data amount of the XOR operation result may be 32 bits. According to the XOR operation result, the first bitwise OR operator bwor2411 may determine the OR operation result. The data amount of the OR operation result may be 1 bit. The first detection module 2412 may include a bitwise XOR operator xor2412 and a first bitwise OR operator bwor2412. According to the N-1th initial operation result and the Nth initial operation result among the N initial operation results, the bitwise XOR operator xor2412 may determine the XOR operation result. The data amount of the XOR operation result may be 32 bits. According to the XOR operation result, the first bitwise OR operator bwor2412 can determine the OR operation result. The data amount of the OR operation result can be 1 bit. According to multiple first detection modules, N OR operation results can be obtained.

[0044] In the embodiment of the present disclosure, the second detection module may include a second bitwise OR operator. The second bitwise OR operator is configured to: perform a bitwise OR operation on multiple OR operation results to obtain a detection result. The detection result may indicate whether multiple vector operation results are the same. Figure 2As shown, the second detection module 242 can perform a bitwise OR operation on N OR operation results to obtain a detection result. The data volume of the detection result can be 1 bit. If the detection result is 1, it can indicate that multiple initial operation results are the same as each other. If the detection result is 0, it can indicate that there are differences between multiple initial operation results. It can be understood that the detection unit can detect whether N operation results are the same. It can also be understood that after the instruction to be executed is executed, the number of initial operation results obtained can be less than N. In this case, if the number of initial operation results is K and K is an odd number, the K-1th initial operation result can be copied to be detected using the detection unit. Through the embodiment of the present disclosure, after the second computing unit executes multiple operations of the instruction, it can be efficiently determined whether the multiple operation results of the instruction are the same to improve the accuracy of the chip.

[0045] It can be understood that the above describes the manner in which the detection unit of the present disclosure determines the detection result, and the following describes the manner in which the detection unit performs corresponding operations according to the detection result.

[0046] In some embodiments, the detection unit may be further configured to: in response to determining that the multiple initial operation results are identical to each other, write the initial operation results to an idle uniform register. For example, if the detection result corresponding to the first instruction to be executed indicates that the multiple operation results are identical to each other, an idle uniform register may be determined from the multiple uniform registers. The idle uniform register may be a first uniform register. Any of the multiple initial operation results is written to the first uniform register. Next, the detection unit may update the register mapping data.

[0047] In the embodiment of the present disclosure, the detection unit may also be configured to perform the following operations to update the register mapping data: use the idle uniform register as the uniform register corresponding to the destination register of the instruction to be executed, and update the register mapping data using the identifier of the idle uniform register and the identifier of the destination register. For example, the first uniform register may correspond to the destination register for the first instruction to be executed. The register mapping data may be updated using the identifier (number) of the first uniform register and the identifier of the destination register. Through the embodiment of the present disclosure, the computing resources required for the uniform operation are reduced, and a uniform operation result is written into the uniform register, which also reduces the storage resource overhead required for the uniform instruction, and helps to further reduce the chip area overhead.

[0048] Thus, the instruction execution device completes the execution of the first instruction to be executed, and the second instruction to be executed can be executed next. The source register for the second instruction to be executed may also not correspond to any uniform register. Thus, the method of executing the second instruction to be executed is the same or similar to that of the first instruction to be executed, and the present disclosure will not repeat it here.

[0049] It can be understood that the above describes some ways to update register mapping data. In the case where multiple instructions to be executed are uniform instructions, the register mapping data may include multiple corresponding relationships. In this case, the register mapping data may be implemented as a register mapping table to efficiently determine the uniform register corresponding to the source register. Figure 3 Some ways in which the detection unit updates the register mapping table are further described.

[0050] Figure 3 is a schematic diagram of updating register mapping data according to an embodiment of the present disclosure.

[0051] like Figure 3 As shown, after the second computing unit executes the second instruction to be executed, multiple initial operation results corresponding to the second instruction to be executed can be obtained. According to the multiple initial operation results corresponding to the second instruction to be executed, the detection unit 340 can determine the detection result. The detection result can, for example, indicate that the multiple initial operation results are the same as each other.

[0052] In an embodiment of the present disclosure, a plurality of idle uniform registers may correspond to idle uniform register indication data. The idle uniform register indication data may be implemented as an idle uniform register indication table t30. The idle uniform register table t30 may include a plurality of uniform register numbers. The uniform registers corresponding to the uniform register numbers in the idle uniform register table t30 are in an idle state. According to the idle uniform register indication table t30, the detection unit 340 may, for example, obtain the uniform register u1 and write any initial operation result corresponding to the second instruction to be executed into the uniform register u1. The destination register for the second instruction to be executed may be the first register v3. The register mapping table t31 may be updated according to the number (v3) of the first register v3 and the number (u1) of the uniform register u1. It can be understood that the uniform register u1 may be used as the second uniform register. As Figure 3 As shown, after the register mapping table is updated at t31 , the free uniform register indication table does not include the number ( u1 ) of the uniform register u1 .

[0053] like Figure 3As shown, the register mapping table t31 includes a first register identification field and a uniform register identification field. The data in the first row of the register mapping table t31 may be written after the first instruction to be executed is executed. In the first row of the register mapping table t31, the value of the first register identification field is v1, and the value of the uniform register identification field is u0. The first register v1 may be a destination register for the first instruction to be executed. The uniform register u0 corresponds to the first register v1. The data in the second row of the register mapping table t31 may be written after the second instruction to be executed is executed. In the second row of the register mapping table t31, the value of the first register identification field is v3, and the value of the uniform register identification field is u1. As described above, the uniform register u1 corresponds to the first register v3.

[0054] It can be understood that the register mapping table of the present disclosure is described above. In the case where the register mapping table includes multiple rows of data, determining whether the source register for the instruction to be executed corresponds to the uniform register requires a large amount of time and resource overhead. Therefore, when writing the uniform register, the indication data of the register can also be updated, which will be explained below.

[0055] In some embodiments, the indication data of the register includes indication values ​​of each of the plurality of first registers. The indication value may be a first indication value or a second indication value. The first indication value may indicate that the first register corresponds to a uniform register. The second indication value may indicate that the first register does not correspond to any uniform register. For example, the first indication value may be 1, and the second indication value may be 0. Figure 3 As shown, the register indication data can be implemented as a register indication table t32. The register indication table includes the numbers of multiple first registers. The numbers of the multiple first registers include v0, v1, v2, v3, ..., v31.

[0056] In the embodiment of the present disclosure, the detection unit is further configured to perform the following operations to update the indication data of the register: the indication value of the first register corresponding to the destination register for the instruction to be executed in the indication data of the register is updated to the first indication value. For example, after the initial operation result corresponding to the second instruction to be executed is written into the uniform register u1, the indication value of the first register v3 can be updated to the first indication value. Figure 3 As shown, after the indication value of the first register v3 is updated to the first indication value, the indication value corresponding to the number v3 is 1, which can indicate that the first register v3 corresponds to a uniform register. In addition, the indication value corresponding to the number v1 is 1, which can indicate that the first register v1 corresponds to a uniform register. Through the embodiment of the present disclosure, the indication data of the register is set, and the time overhead required for determining whether the source register corresponds to the uniform register is reduced with a small storage resource overhead, which helps to further improve the performance of the chip.

[0057] It can be understood that the above description uses the example that the detection result indicates that multiple initial operation results are the same to explain the present disclosure. The following description uses the example that the detection result indicates that multiple initial operation results are different to explain the present disclosure.

[0058] In some embodiments, the detection unit is further configured to: in response to determining that there are differences between the multiple initial operation results, write the multiple initial operation results into at least one first register. For example, after executing the second instruction to be executed, the third instruction to be executed can be executed. The source register for the third instruction to be executed may also not correspond to any uniform register. Thus, the manner of executing the third instruction to be executed is the same or similar to that of executing the first instruction to be executed, and the present disclosure will not repeat them here. However, based on the fact that the third instruction to be executed corresponds to multiple initial operation results, the detection unit 340 can determine that there are differences between the multiple initial operation results, and the multiple initial operation results can be written into a first register.

[0059] It can be understood that the above description uses the example that the source register does not correspond to any uniform register to illustrate the present disclosure. The following description will use the example that the source register corresponds to the uniform register to illustrate the present disclosure.

[0060] Figure 4 is a schematic diagram of an instruction execution device according to an embodiment of the present disclosure.

[0061] like Figure 4 As shown, the apparatus 400 may include an instruction fetch unit 401, a decoding unit 402, a scheduling unit 403, an emission unit 404, a dispatch unit 410, multiple computing units, and a write-back unit 450. The multiple computing units may include a first computing unit 420 and a second computing unit 430. The apparatus 400 may further include a detection unit 440.

[0062] The instruction fetch unit 401 may obtain an initial instruction. The decoding unit 402 may decode the initial instruction to obtain a fourth instruction to be executed. The source registers for the fourth instruction to be executed may be the first register v1 and the first register v3. The scheduling unit 403 may schedule hardware resources related to the fourth instruction to be executed so as to execute the instruction to be executed.

[0063] In some embodiments, the transmitting unit may be configured to determine whether the indication value of the first register for the instruction to be executed is the first indication value. For example, using the above register indication table, the transmitting unit 404 may determine whether the indication value of the first register for the instruction to be executed is the first indication value.

[0064] In the disclosed embodiment, the emission unit may be configured to: in response to determining that the indication value of the first register for the instruction to be executed is the first indication value, determine the source uniform register corresponding to the first register using the register mapping data. For example, using the register indication table t42, it may be determined that the indication value of the first register v1 is 1, corresponding to a uniform register. It may also be determined that the indication value of the first register v3 is 1, corresponding to a uniform register. Next, the register mapping table t31 may be used to determine the uniform register u1 corresponding to the first register v3, and the uniform register u0 corresponding to the first register v1 may also be determined. It can be understood that the uniform register u1 and the uniform register u0 may be used as source uniform registers for the fourth instruction to be executed.

[0065] In the disclosed embodiment, the emission unit may also be configured to send a read request for a source uniform register. For example, a read request for uniform register u1 and a read request for uniform register u0 may be sent respectively. The to-be-processed data corresponding to the read request may be provided to the computing unit at the stage when the dispatch unit dispatches instructions.

[0066] In the embodiment of the present disclosure, the transmitting unit may also be configured to: transmit the instruction to be executed to the dispatching unit. For example, the fourth instruction to be executed may be transmitted to the dispatching unit 410.

[0067] In some embodiments, dispatch unit 410 may be configured to determine whether a plurality of source registers all correspond to uniform registers.

[0068] In the embodiment of the present disclosure, the dispatch unit may also be configured to: in response to determining that a plurality of source registers for the instruction to be executed correspond to a plurality of uniform registers respectively, provide the instruction to be executed as a uniform instruction to the first computing unit. For example, the first register v1 and the first register v3 for the fourth instruction to be executed correspond to the uniform register u0 and the uniform register u1 respectively, and the fourth instruction to be executed may be provided to the first computing unit 420. The first computing unit 420 may perform a uniform operation of the fourth instruction to be executed to obtain a uniform operation result of the fourth instruction to be executed. The write-back unit 450 or the first computing unit 420 may write the uniform operation result to an idle uniform register. The idle uniform register may be, for example, the uniform register u2.

[0069] It can be understood that the above description uses the example that multiple source registers correspond to a uniform register to illustrate the present disclosure, but the present disclosure is not limited thereto, and multiple source registers used for instructions may include source registers corresponding to the uniform register and source registers not corresponding to the uniform register, which will be described below.

[0070] like Figure 4As shown, the instruction fetch unit 401 can obtain another initial instruction. The decoding unit 402 decodes the initial instruction to obtain a fifth instruction to be executed. During decoding, multiple source registers for the fifth instruction to be executed can be determined. The multiple source registers can include a first source register and a second source register. The first source register for the fifth instruction to be executed can be a first register v1. The second source register for the fifth instruction to be executed can be a first register v31. The scheduling unit 403 can schedule hardware resources related to the fifth instruction to be executed so as to execute the instruction to be executed.

[0071] Next, using the register indication table, the emission unit 404 can determine whether the indication value of the first register for the instruction to be executed is the first indication value. For example, the indication value of the first register v1 is 1, which can correspond to a uniform register. The indication value of the first register v31 is 0, which does not correspond to any uniform register. Therefore, the first source register corresponds to the uniform register, and the second source register does not correspond to any uniform register.

[0072] In the disclosed embodiment, the emission unit may be configured to: in response to determining that the indication value of the first register for the instruction to be executed is the first indication value, determine the source uniform register corresponding to the first register using the register mapping data. For example, using the above-mentioned register indication table t32, it can be determined that the first register v1 corresponds to a uniform register. Next, using the register mapping table t31, it can be determined that the first register v1 corresponds to the uniform register u0. It can be understood that the uniform register u0 can be used as the source uniform register for the fifth instruction to be executed, and the first source register corresponds to the uniform register.

[0073] In the embodiment of the present disclosure, the transmitting unit may also be configured to: send a read request for the source uniform register. For example, a read request for the uniform register u0 may be sent.

[0074] In addition, in the embodiment of the present disclosure, the emission unit may be configured to: in response to determining that the indication value of the first register for the instruction to be executed is the second indication value, send a read request for the first register. For example, using the above register indication table t32, it can be determined that the indication value of the first register v31 is the second indication value, which does not correspond to any uniform register. The emission unit 404 may send a read request for the first register v31. It can be understood that the second source register does not correspond to the uniform register.

[0075] In the embodiment of the present disclosure, the transmitting unit may also be configured to: transmit the instruction to be executed to the dispatching unit. For example, the fifth instruction to be executed may be transmitted to the dispatching unit 410.

[0076] In some embodiments, dispatch unit 410 may be configured to determine whether a plurality of source registers all correspond to uniform registers.

[0077] In the embodiment of the present disclosure, the dispatch unit may also be configured to: in response to determining that at least one source register for the instruction to be executed includes a first register that does not correspond to any uniform register, dispatch the instruction to be executed to the second computing unit. For example, the first register v1 for the fifth instruction to be executed corresponds to the uniform register u0. The first register v31 for the fifth instruction to be executed does not correspond to any uniform register, and the fifth instruction to be executed may be provided to the second computing unit 430.

[0078] In the embodiment of the present disclosure, the second computing unit is further configured to perform the following operations to execute multiple computing operations of the instruction to be executed: according to multiple first data to be processed and multiple second data to be processed, multiple computing operations of the instruction to be executed are executed. The multiple first data to be processed are obtained by copying the data obtained from the uniform register multiple times, and the second data to be processed are obtained from the second source register. For example, taking the first register as a vector register as an example, the capacity of the first register can be 512 bits, which can store 16 32-bit data. The capacity of the uniform register can be 32 bits, which can store 1 32-bit data. Thus, the data in the uniform register u0 can be copied multiple times to obtain 16 first data to be processed. The 16 32-bit data in the first register v31 are used as 16 second data to be processed. The second computing unit 430 can execute multiple computing operations of the fifth instruction to be executed to obtain multiple initial computing results of the fifth instruction to be executed. Through the embodiment of the present disclosure, when the multiple source registers include uniform registers and non-uniform registers, the data in the uniform register can be copied, which helps the computing unit to perform corresponding operations according to the normal execution logic, thereby improving the stability and accuracy of the chip.

[0079] In some embodiments, the detection unit may determine whether multiple initial operation results are the same. In response to determining that multiple initial operation results are the same, one of the multiple initial operation results may be written to an idle uniform register. In response to determining that there are differences between multiple initial operation results, multiple initial transport results may be written to at least one first register. For example, as described above, the detection result may be 1 or 0. If the detection result is 1, an initial operation result may be written to an idle uniform register. If the detection result is 0, multiple initial transport results may be written to at least one first register. For another example, taking the difference between multiple initial operation results of the fifth instruction to be executed as an example, the detection unit 440 may write the multiple operation results to an idle first register. Alternatively, the detection unit 440 may also provide a control signal so that the write-back unit 450 writes the multiple operation results to an idle first register.

[0080] It is understandable that the above Figure 4 The overall device of the present disclosure has been further described, and the first computing unit of the present disclosure will be further described below.

[0081] Figure 5 is a schematic diagram of multiple computing units according to one embodiment of the present disclosure.

[0082] like Figure 5 As shown, the dispatch unit 510 can dispatch the instruction to be executed to the first computing unit 520 or the second computing unit 530. For example, the dispatch unit 510 dispatches the fourth instruction to be executed to the first computing unit 520 in one clock cycle. In the clock cycle or the next clock cycle of the clock cycle, the dispatch unit 520 can also dispatch the fifth instruction to be executed to the second computing unit 530. As a result, the first computing unit 510 and the second computing unit 520 can be in a busy state almost at the same time, thereby improving the utilization rate of computing resources.

[0083] In some embodiments, the first computing unit may include multiple computing subunits. Figure 5 As shown, the first computing unit 510 may include M computing subunits. The M computing subunits include: computing subunit 511, computing subunit 512, ... computing subunit 513. M is an integer greater than 1. For another example, the first computing unit may be a multiply-accumulate (MAC) array. The computing subunit may be a subarray of the multiply-accumulate array. It is understood that the first computing unit may also be other computing units, and the present disclosure does not limit this.

[0084] In some embodiments, the uniform operation operation may include multiple uniform sub-operations. Multiple computing sub-units are configured to: perform multiple uniform sub-operations to obtain uniform operation results. For example, the uniform operation operation may be: multiplying two 32-bit floating-point numbers. The uniform operation operation includes multiple uniform sub-operations including a first uniform sub-operation, a second uniform sub-operation, and a third uniform sub-operation. The first uniform sub-operation may include: multiplying the high-order components of the two 32-bit floating-point numbers to obtain a high-order operation result. The second uniform sub-operation may include: multiplying the low-order components of the two 32-bit floating-point numbers to obtain a low-order operation result. The third uniform sub-operation: determining the uniform operation result according to the high-order operation result and the low-order operation result. It can be understood that the uniform operation operation may be other operations, and the present disclosure is not limited to this. The high-order component may be the 32nd to 17th bit of the floating-point number. The low-order component may be the 16th to 1st bit of the floating-point number.

[0085] In the embodiment of the present disclosure, multiple computing subunits can be used as different levels of the pipeline. Computing subunit 511 can be used as the first level computing subunit of the pipeline. Computing subunit 512 can be used as the second level computing subunit of the pipeline. Computing subunit 513 can be used as the Mth level computing subunit of the pipeline. It can be understood that for different computing operations, multiple computing subunits of different levels can execute multiple computing sub-operations in series, or can execute at least two computing sub-operations in parallel.

[0086] In the embodiment of the present disclosure, the target computing subunit among the multiple computing subunits is configured to: execute the target uniform operator operation among the multiple uniform operator operations to obtain an intermediate operation result. In response to determining that the subsequent computing subunit corresponding to the subsequent uniform operator operation of the target operator operation is in an idle state, the intermediate operation result is provided to the subsequent computing subunit. For example, for the above-mentioned uniform operator operation of multiplying two 32-bit floating-point numbers, the first uniform operator operation, the second uniform operator operation and the third uniform operator operation correspond to the computing subunit 511, the computing subunit 512 and the computing subunit 513 respectively. The computing subunit 511 can be used as the target computing subunit to execute the above-mentioned first uniform operator operation to obtain a high-bit operation result as an intermediate operation result. The computing subunit 512 can also be used as the target computing subunit to execute the above-mentioned second uniform operator operation to obtain a low-bit operation result as an intermediate operation result. When the computing subunit 513 is idle, the high-bit operation result and the low-bit operation result can be provided to the computing subunit 513. It can be understood that for the uniform calculation operation, the calculation subunit 513 can serve as a subsequent calculation subunit.

[0087] In the embodiment of the present disclosure, the subsequent calculation subunits in the plurality of operators are configured to: perform a subsequent uniform operation sub-operation according to the intermediate operation result to obtain a subsequent operation result. For example, the calculation subunit 513 may perform the third uniform operation sub-operation to obtain a uniform operation result. The uniform operation result may be used as a subsequent operation result of the above-mentioned high-bit operation result or low-bit operation result.

[0088] In the disclosed embodiment, the target computing subunit is further configured to: perform an operator sub-operation of a subsequent computing operation of the uniform computing operation. For example, after executing the above-mentioned first uniform computing sub-operation, the computing subunit 511 is in an idle state and can perform an operator sub-operation of a subsequent computing operation. In this way, stream line cavitation can be reduced and instruction execution efficiency can be improved. When the computing subunit 513 performs an operator sub-operation, the computing subunit 511 can perform an operator sub-operation of another instruction, which helps to improve the execution parallelism, speed up the emission and dispatch efficiency of instructions, and achieve higher instruction execution efficiency.

[0089] It can be understood that the above description uses the example that the dispatch unit sequentially processes uniform instructions and non-uniform instructions to illustrate the present disclosure, but the present disclosure is not limited thereto, and the dispatch unit may also sequentially process multiple uniform instructions.

[0090] In the embodiment of the present disclosure, there may be multiple instructions to be executed. The dispatch unit may also be configured to dispatch the uniform instruction to the first computing unit according to a target clock cycle. The target clock cycle may be a clock cycle for determining that at least one source register for the instruction to be executed corresponds to at least one uniform register. For example, in order to determine whether one or more source registers are uniform registers, the dispatch unit may query the register indication table. The table query may require one or more clock cycles. The clock cycle in which it is determined that one or more source registers are uniform registers may be the target clock cycle. Based on the target clock cycle, the instruction to be executed may be dispatched to the first computing unit without delay.

[0091] In an embodiment of the present disclosure, the multiple uniform instructions received by the first computing unit may correspond to different delay parameters. For example, the delay parameter may correspond to one or more clock cycles. In the first clock cycle, the first computing unit may receive the sixth instruction to be executed. In the second clock cycle, the first computing unit may receive the seventh instruction to be executed. The delay parameter of the seventh instruction to be executed may enable the preceding computing subunit (such as the computing subunit 511 or computing subunit 512) of the pipeline of the first computing unit to execute an operator operation of the sixth instruction to be executed, and then the preceding computing subunit executes the operator operation of the seventh instruction to be executed.

[0092] It can be understood that the apparatus of the present disclosure is described above, and the equipment including the apparatus will be described below.

[0093] Figure 6 is a schematic block diagram of an electronic device according to an embodiment of the present disclosure.

[0094] like Figure 6 As shown, the device 6000 may include an instruction execution device 600. The device 600 may be the device 100 or 400 described above.

[0095] It can be understood that the above describes the device of the present disclosure, and the following will describe the method of the present disclosure.

[0096] Figure 7 is a flowchart of an instruction execution method according to an embodiment of the present disclosure.

[0097] like Figure 7 As shown, the method 700 may include operations S710 to S730.

[0098] In operation S710, in response to determining that at least one source register for the instruction to be executed corresponds to at least one uniform register among the plurality of uniform registers, the instruction to be executed is dispatched to the first computing unit as a uniform instruction. The uniform instruction includes a plurality of uniform operation operations. Operation S710 may be performed by the dispatch unit 110 described above.

[0099] In operation S720, a uniform operation is performed using a first computing unit to obtain a uniform operation result. The first computing unit in operation S720 may be the first computing unit 120 described above.

[0100] In operation S730 , the uniform operation result is written into at least one available uniform register among the plurality of uniform registers.

[0101] It can be understood that the method 700 can be executed by the above-mentioned device 100 or 400.

[0102] In some embodiments, the method 700 further includes: in response to determining that at least one source register for the instruction to be executed includes a first register that does not correspond to any uniform register, dispatching the instruction to be executed to a second computing unit, and performing multiple computing operations of the instruction to be executed using the second computing unit to obtain multiple initial computing results.

[0103] In some embodiments, the method 700 further includes: in response to determining that the plurality of initial operation results are identical to each other, writing the initial operation results into an idle uniform register.

[0104] In some embodiments, the method 700 further includes: in response to determining that there are differences between the plurality of initial operation results, writing the plurality of initial operation results into at least one first register.

[0105] In some embodiments, writing the initial operation result into the idle uniform register includes: updating at least one of the indication data and the register mapping data of the register. The indication data of the register includes the indication value of each of the plurality of first registers, the indication value is a first indication value or a second indication value, the first indication value is used to indicate that the first register corresponds to a uniform register, the second indication value is used to indicate that the first register does not correspond to any uniform register, and the register mapping data is used to indicate the first register and the uniform register corresponding to the first register.

[0106] In some embodiments, updating at least one of the indication data of the register and the register mapping data includes: updating the indication value of the first register corresponding to the destination register for the instruction to be executed in the indication data of the register to the first indication value, using an idle uniform register as the uniform register corresponding to the destination register for the instruction to be executed, and updating the register mapping data using the identifier of the idle uniform register and the identifier of the destination register.

[0107] In some embodiments, the method 700 further includes: in response to determining that the indication value of the first register for the instruction to be executed is the first indication value, determining a source uniform register corresponding to the first register using the register mapping data, sending a read request for the source uniform register, and transmitting the instruction to be executed to the dispatch unit.

[0108] In some embodiments, method 700 further includes: in response to determining that a plurality of source registers for the instruction to be executed respectively correspond to a plurality of uniform registers, providing the instruction to be executed as a uniform instruction to the first computing unit.

[0109] In some embodiments, the multiple source registers for the instruction to be executed include a first source register and a second source register, the first source register corresponds to the uniform register, and the second source register does not correspond to any uniform register. Using the second computing unit to perform multiple computing operations of the instruction to be executed includes: performing multiple computing operations of the instruction to be executed according to multiple first data to be processed and multiple second data to be processed. The multiple first data to be processed are obtained by copying the data obtained from the uniform register multiple times, and the second data to be processed are obtained from the second source register.

[0110] In some embodiments, there are multiple instructions to be executed. Method 700 further includes: dispatching the uniform instruction to the first computing unit according to a target clock cycle. The target clock cycle is a clock cycle that determines the correspondence between at least one source register for the instruction to be executed and at least one uniform register.

[0111] In some embodiments, the first computing unit includes a plurality of computing subunits, the uniform computing operation includes a plurality of uniform computing sub-operations, and using the first computing unit to perform the uniform computing operation to obtain a uniform computing result includes: using a plurality of computing subunits to perform a plurality of uniform computing sub-operations to obtain a uniform computing result.

[0112] In some embodiments, using multiple computing subunits to perform multiple uniform operator sub-operations to obtain uniform operation results includes: using a target computing subunit among the multiple computing subunits to perform a target uniform operator sub-operation among the multiple uniform operator sub-operations to obtain an intermediate operation result. In response to determining that a subsequent computing subunit corresponding to a subsequent uniform operator sub-operation of the target operator sub-operation is in an idle state, providing the intermediate operation result to the subsequent computing subunit. Based on the intermediate operation result, using the subsequent computing subunit to perform a subsequent uniform operator sub-operation to obtain a subsequent operation result.

[0113] In some embodiments, using multiple computing sub-units to perform multiple uniform operation sub-operations to obtain uniform operation results includes: using a target computing sub-unit to perform an operation sub-operation of a subsequent operation of the uniform operation.

[0114] In some embodiments, the method 700 further includes: performing a bitwise XOR operation on the two initial operation results to obtain an XOR operation result. Performing a bitwise OR operation on the XOR operation result to obtain an OR operation result. Performing a bitwise OR operation on multiple OR operation results to obtain a detection result. The detection result is used to indicate whether the multiple initial operation results are the same.

[0115] In some embodiments, method 700 further includes: updating register mapping data using at least one available uniform register to which the uniform operation result is written and at least one destination register for the instruction to be executed.

[0116] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0117] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0118] Figure 8A schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0119] like Figure 8 As shown, the device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 to a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0120] A number of components in the device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0121] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSP), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as the instruction execution method. For example, in some embodiments, the instruction execution method may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the instruction execution method described above may be executed. Alternatively, in other embodiments, the computing unit 801 may be configured to execute the instruction execution method in any other appropriate manner (eg, by means of firmware).

[0122] Various embodiments of the systems and techniques described above herein may be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard parts (ASSPs), system on chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0123] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0124] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories, read-only memories, erasable programmable read-only memories (EPROM) or flash memories, optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0125] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a cathode ray tube (CRT) display or a liquid crystal display (LCD)) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0126] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a Local Area Network (LAN), a Wide Area Network (WAN), and the Internet.

[0127] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.

[0128] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0129] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. An instruction execution device, include: a dispatch unit configured to: dispatch the instruction to be executed as a uniform instruction to the first computing unit in response to determining that at least one source register for the instruction to be executed corresponds to at least one uniform register of the plurality of uniform registers, wherein the uniform instruction includes a plurality of uniform operation operations; The first calculation unit is configured to: perform the uniform operation to obtain a uniform result, and the uniform result is written into at least one available uniform register among the plurality of uniform registers.

2. The device according to claim 1, in, The dispatch unit is further configured to: In response to determining that at least one source register for the instruction to be executed includes a first register that does not correspond to any of the uniform registers, dispatching the instruction to be executed to a second computing unit; The second computing unit is configured to: execute multiple computing operations of the to-be-executed instruction to obtain multiple initial computing results. 3 . The apparatus according to claim 2 , further comprising a detection unit, wherein the detection unit is configured to: in response to determining that a plurality of the initial operation results are identical to each other, write the initial operation results into an idle uniform register.

4. The device according to claim 3, in, The detection unit is further configured to: in response to determining that there are differences between the plurality of initial operation results, write the plurality of initial operation results into at least one first register.

5. The device according to claim 3, in, The detection unit is further configured to perform the following operations to write the initial operation result into an idle uniform register: At least one of the indication data and register mapping data of the update register is updated, wherein the indication data of the register includes indication values ​​of each of the plurality of the first registers, the indication value is a first indication value or a second indication value, the first indication value is used to indicate that the first register corresponds to one of the uniform registers, the second indication value is used to indicate that the first register does not correspond to any of the uniform registers, and the register mapping data is used to indicate the first register and the uniform register corresponding to the first register.

6. The device according to claim 5, in, The detection unit is further configured to perform the following operations to update at least one of the indication data and the register mapping data of the register: updating the indication value of the first register corresponding to the destination register for the instruction to be executed in the indication data of the register to the first indication value; The idle uniform register is used as a uniform register corresponding to a destination register for the instruction to be executed, and the register mapping data is updated using the identifier of the idle uniform register and the identifier of the destination register.

7. The apparatus according to claim 5, further comprising a transmitting unit, wherein the transmitting unit is configured to: In response to determining that the indication value of the first register for the instruction to be executed is the first indication value, determining a source uniform register corresponding to the first register using the register mapping data; Sending a read request for the source uniform register; The to-be-executed instruction is sent to the dispatch unit.

8. The device according to claim 1, in, The dispatch unit is further configured to: In response to determining that the plurality of source registers for the instruction to be executed respectively correspond to the plurality of uniform registers, the instruction to be executed is provided to the first computing unit as a uniform instruction.

9. The device according to claim 2, in, The plurality of source registers for the to-be-executed instruction include a first source register and a second source register, the first source register corresponds to the uniform register, and the second source register does not correspond to any of the uniform registers, The second computing unit is further configured to perform the following operations to execute the plurality of computing operations of the instruction to be executed: According to a plurality of first data to be processed and a plurality of second data to be processed, a plurality of operation operations of the instruction to be executed are performed, wherein the plurality of first data to be processed are obtained by copying the data obtained from the uniform register for multiple times, and the second data to be processed are obtained from the second source register.

10. The device according to claim 1, in, There are multiple instructions to be executed. The dispatch unit is further configured to dispatch the uniform instruction to the first computing unit according to a target clock cycle, wherein the target clock cycle is a clock cycle corresponding to at least one source register for the instruction to be executed and at least one uniform register.

11. The device according to claim 1, in, The first computing unit includes a plurality of computing sub-units, and the uniform computing operation includes a plurality of uniform computing sub-operations; The plurality of computing sub-units are configured to: execute a plurality of the uniform operation sub-operations to obtain the uniform operation results.

12. The device according to claim 11, in, The target computing subunit among the plurality of computing subunits is configured as follows: Executing a target uniform operator sub-operation among the plurality of uniform operator sub-operations to obtain an intermediate operation result; In response to determining that a subsequent calculation subunit corresponding to a subsequent uniform operation suboperation of the target operation suboperation is in an idle state, providing the intermediate operation result to the subsequent calculation subunit; The subsequent calculation sub-units in the plurality of operators are configured to: perform the subsequent uniform operation sub-operation according to the intermediate operation result to obtain the subsequent operation result.

13. The device according to claim 12, in, The target computing subunit is further configured to: execute a computing sub-operation of a subsequent computing operation of the uniform computing operation.

14. The device according to claim 3, in, The detection unit includes a plurality of first detection modules and second detection modules, wherein the first detection module includes a bitwise XOR operator and a first bitwise OR operator, and the second detection module includes a second bitwise OR operator. The bitwise XOR operator is configured to: perform a bitwise XOR operation on the two initial operation results to obtain an XOR operation result; The first bitwise OR operator is configured to: perform a bitwise OR operation on the XOR operation result to obtain an OR operation result; The second bitwise OR operator is configured to perform a bitwise OR operation on the plurality of OR operation results to obtain a detection result, wherein the detection result is used to indicate whether the plurality of initial operation results are the same.

15. An electronic device comprising the device according to any one of claims 1 to 14.

16. A method for executing an instruction, include: In response to determining that at least one source register for a to-be-executed instruction corresponds to at least one uniform register of a plurality of uniform registers, dispatching the to-be-executed instruction to a first computing unit as a uniform instruction, wherein the uniform instruction includes a plurality of uniform operation operations; Utilizing the first computing unit to perform the uniform operation to obtain a uniform result; and The uniform operation result is written into at least one available uniform register among the plurality of uniform registers.

17. The method according to claim 16, further comprising: include: In response to determining that at least one source register for the instruction to be executed includes a first register that does not correspond to any of the uniform registers, dispatching the instruction to be executed to a second computing unit; The second computing unit is used to execute a plurality of computing operations of the instruction to be executed to obtain a plurality of initial computing results.

18. The method according to claim 17, further comprising: include: In response to determining that the plurality of initial operation results are identical to each other, the initial operation results are written into an idle uniform register.

19. The method according to claim 17, further comprising: include: In response to determining that there are differences between the plurality of initial operation results, the plurality of initial operation results are written into at least one first register.

20. The method according to claim 18, in, Writing the initial operation result into an idle uniform register comprises: At least one of the indication data and register mapping data of the update register is updated, wherein the indication data of the register includes indication values ​​of each of the plurality of the first registers, the indication value is a first indication value or a second indication value, the first indication value is used to indicate that the first register corresponds to one of the uniform registers, the second indication value is used to indicate that the first register does not correspond to any of the uniform registers, and the register mapping data is used to indicate the first register and the uniform register corresponding to the first register.

21. The method according to claim 20, in, At least one of the indication data and the register mapping data of the update register comprises: updating the indication value of the first register corresponding to the destination register for the instruction to be executed in the indication data of the register to the first indication value; The idle uniform register is used as a uniform register corresponding to a destination register for the instruction to be executed, and the register mapping data is updated using the identifier of the idle uniform register and the identifier of the destination register.

22. The method according to claim 20, further comprising: include: In response to determining that the indication value of the first register for the instruction to be executed is the first indication value, determining a source uniform register corresponding to the first register using the register mapping data; Sending a read request for the source uniform register; The to-be-executed instruction is sent to the dispatch unit.

23. The method according to claim 16, further comprising: include: In response to determining that the plurality of source registers for the instruction to be executed respectively correspond to the plurality of uniform registers, the instruction to be executed is provided to the first computing unit as a uniform instruction.

24. The method according to claim 17, in, The plurality of source registers for the to-be-executed instruction include a first source register and a second source register, the first source register corresponds to the uniform register, and the second source register does not correspond to any of the uniform registers, The using the second computing unit to execute the multiple computing operations of the to-be-executed instruction includes: According to a plurality of first data to be processed and a plurality of second data to be processed, a plurality of operation operations of the instruction to be executed are performed, wherein the plurality of first data to be processed are obtained by copying the data obtained from the uniform register for multiple times, and the second data to be processed are obtained from the second source register.

25. The method according to claim 1, in, There are multiple instructions to be executed. The method further includes dispatching the uniform instruction to the first computing unit according to a target clock cycle, wherein the target clock cycle is a clock cycle corresponding to at least one source register of the instruction to be executed and at least one uniform register.

26. The method according to claim 16, in, The first computing unit includes a plurality of computing sub-units, and the uniform computing operation includes a plurality of uniform computing sub-operations; The using the first computing unit to perform the uniform operation to obtain a uniform operation result comprises: A plurality of the uniform operation sub-operations are performed by using the plurality of the plurality of computing sub-units to obtain the uniform operation result.

27. The method according to claim 16, in, The using the plurality of the plurality of computing sub-units to perform the plurality of the uniform operation sub-operations to obtain the uniform operation result comprises: Using a target computing subunit among the plurality of computing subunits to perform a target uniform operation sub-operation among the plurality of uniform operation sub-operations to obtain an intermediate operation result; In response to determining that a subsequent calculation subunit corresponding to a subsequent uniform operation suboperation of the target operation suboperation is in an idle state, providing the intermediate operation result to the subsequent calculation subunit; According to the intermediate operation result, the subsequent uniform operation sub-operation is performed by using the subsequent calculation sub-unit to obtain the subsequent operation result.

28. The method according to claim 27, in, The using the plurality of the plurality of computing sub-units to perform the plurality of the uniform operation sub-operations to obtain the uniform operation result comprises: The target computing sub-unit is used to perform a computing sub-operation of a subsequent computing operation of the uniform computing operation.

29. The method according to claim 18, further comprising: include: Performing a bitwise XOR operation on the two initial operation results to obtain an XOR operation result; Performing a bitwise OR operation on the XOR operation result to obtain an OR operation result; A bitwise OR operation is performed on the multiple OR operation results to obtain a detection result, wherein the detection result is used to indicate whether the multiple initial operation results are the same.

30. The method according to claim 20, further comprising: include: Register mapping data is updated using at least one of the available uniform registers to which the uniform operation result is written and at least one destination register for the instruction to be executed.

31. An electronic device, include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 16 to 30.

32. A non-transitory computer-readable storage medium storing computer instructions, in, The computer instructions are used to cause the computer to perform the method according to any one of claims 16 to 30.

33. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 16 to 30.