WO2022199483A1 - Compiling method and apparatus, electronic device, and computer-readable storage medium - Google Patents

Compiling method and apparatus, electronic device, and computer-readable storage medium Download PDF

Info

Publication number
WO2022199483A1
WO2022199483A1 PCT/CN2022/081695 CN2022081695W WO2022199483A1 WO 2022199483 A1 WO2022199483 A1 WO 2022199483A1 CN 2022081695 W CN2022081695 W CN 2022081695W WO 2022199483 A1 WO2022199483 A1 WO 2022199483A1
Authority
WO
WIPO (PCT)
Prior art keywords
target chip
result
algorithm
cores
compilation
Prior art date
Application number
PCT/CN2022/081695
Other languages
French (fr)
Chinese (zh)
Inventor
沈杨书
何伟
祝夭龙
华宝洪
Original Assignee
北京灵汐科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from CN202110325748.9A external-priority patent/CN112882722A/en
Priority claimed from CN202110326147.XA external-priority patent/CN112925525A/en
Application filed by 北京灵汐科技有限公司 filed Critical 北京灵汐科技有限公司
Publication of WO2022199483A1 publication Critical patent/WO2022199483A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation

Definitions

  • the embodiments of the present disclosure relate to the field of computer technologies, and in particular, to a compilation method and apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
  • a chip (such as an artificial intelligence chip) can be composed of one or more processors, and a processor usually integrates multiple complete computing engines (or processing cores), and the multiple processing cores in a processor are combined.
  • the processing cores of different processors can cooperate with each other to complete tasks together.
  • a multi-chip architecture such as a cloud computing center
  • the chip may not be used, and even the entire multi-chip architecture chip needs to be discarded. manufacturing cost.
  • Embodiments of the present disclosure provide a compilation method and apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
  • an embodiment of the present disclosure provides a compilation method, including:
  • the target chip includes multiple processing cores, and the multiple processing cores include normal cores and/or faulty cores;
  • the target chip meets the regrouping condition, based on the fault processing core information, perform grouping processing on the algorithm compilation result corresponding to the target chip to obtain the current grouping result, so that the normal core of the target chip can be processed into groups.
  • the algorithm compilation result includes an executable file corresponding to the algorithm prepared to be carried by the target chip.
  • the method further includes:
  • the preset grouping result is used as the current grouping result, so that the normal core of the target chip implements a preparatory bearer based on the current grouping result and the algorithm compilation result algorithm.
  • the fault handling core information includes an actual number of faulty cores;
  • the preset fault information includes a preset number of faulty cores;
  • the steps to describe whether the target chip meets the regrouping conditions include:
  • the target chip meets the regrouping condition.
  • the fault processing core information includes the actual number of faulty cores; the step of performing grouping processing on the algorithm compilation result corresponding to the target chip based on the fault processing core information to obtain the current grouping result ,include:
  • the algorithm compilation results corresponding to the target chips Based on the target number of the normal cores, grouping the algorithm compilation results corresponding to the target chips to obtain the current grouping result; the current grouping result includes the target number of compilation result groups, each of the The compilation result group is used to indicate the executable file to be mapped to a normal core execution.
  • the step of acquiring the fault handling core information of the target chip includes:
  • the one-time programmable memory of the target chip is read to obtain fault processing core information of the target chip.
  • the method is applied to a target chip; the fault processing core information further includes absolute coordinates of the faulty core; the algorithm compilation result corresponding to the target chip is performed based on the target number of the normal cores After the grouping process to obtain the current grouping result, it also includes:
  • the target number of the compilation result groups included in the current grouping result are mapped to the normal cores, wherein the absolute coordinates of the normal cores mapped by any two of the compilation result groups are The coordinates are different from each other.
  • the step of grouping a target number of the compilation results included in the current grouping result to the normal kernel based on the absolute coordinates of the normal kernel includes:
  • a target number of the compilation result groups included in the current grouping result are grouped and mapped to the normal cores.
  • the method is applied to a target chip; the method further includes:
  • the algorithm compilation result sent by the electronic device outside the target chip is received.
  • the method is applied to an electronic device external to the target chip, and the method further includes:
  • the method is applied to an electronic device outside the target chip, and the algorithm compilation result corresponding to the target chip is grouped based on the fault processing core information, so as to obtain the current grouping result, the The method also includes:
  • the current grouping result and the algorithm compilation result are sent to the target chip, so that the normal core of the target chip implements the algorithm for preparing the bearer based on the current grouping result and the algorithm compilation result.
  • the method is applied to an electronic device external to the target chip, and the method further includes:
  • the method After performing grouping processing on the algorithm compilation result corresponding to the target chip based on the fault processing core information to obtain the current grouping result, the method further includes:
  • the current grouping result is used as the current grouping result corresponding to the same chip of the target chip.
  • the method is applied to an electronic device outside the target chip, the fault processing core information includes absolute coordinates of the faulty core; the algorithm corresponding to the target chip based on the target number of the normal cores After the compilation results are grouped to obtain the current grouping results, the method further includes:
  • route compilation is performed on the route of the target chip, and the route compilation result is obtained;
  • an embodiment of the present disclosure provides a compiling apparatus, including:
  • an acquisition module configured to acquire fault processing core information of a target chip;
  • the target chip includes multiple processing cores, and the multiple processing cores include normal cores and/or faulty cores;
  • a decision-making module configured to determine whether the target chip meets the regrouping condition based on the fault processing core information and the preset fault information
  • the processing module is configured to perform grouping processing on the algorithm compilation result corresponding to the target chip based on the fault processing core information under the condition that the target chip meets the regrouping condition, so as to obtain a current grouping result, so that the The normal core of the target chip implements the algorithm to be carried by the current grouping result and the algorithm compilation result; wherein the algorithm compilation result includes an executable file corresponding to the algorithm to be carried by the target chip.
  • an embodiment of the present disclosure provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the embodiment of the present disclosure when executing the computer program Either compilation method.
  • an embodiment of the present disclosure provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements any one of the compilation methods in the embodiment of the present disclosure.
  • the compilation method provided by the embodiments of the present disclosure can improve the flexibility of the chip usage process, ensure that the faulty core of the target chip does not need to process the algorithm compilation result, and thus effectively avoid the situation that the target chip cannot implement the algorithm prepared for carrying due to the faulty core. Effectively improve the utilization of chip resources and reduce the manufacturing cost of chips.
  • FIG. 1 is a flowchart of a compilation method provided by an embodiment of the present disclosure.
  • FIG. 2 is a flowchart of a grouping processing method provided by an embodiment of the present disclosure.
  • FIG. 3 is a flowchart of a compilation method provided by an embodiment of the present disclosure.
  • FIG. 4 is a flowchart of a compilation method applied to a target chip according to an embodiment of the present disclosure.
  • FIG. 5 is a flowchart of a compiling method applied to a target chip according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic diagram of a compilation method applied to a target chip according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic diagram of a compilation method applied to a target chip according to an embodiment of the present disclosure.
  • FIG. 8 is a flowchart of a compilation method applied to an electronic device outside a target chip according to an embodiment of the present disclosure.
  • FIG. 9 is a flowchart of a compilation method applied to an electronic device outside a target chip according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic diagram of a compilation method applied to an electronic device outside a target chip according to an embodiment of the present disclosure.
  • FIG. 11 is a schematic diagram of a compilation method applied to an electronic device outside a target chip according to an embodiment of the present disclosure.
  • FIG. 12 is a schematic diagram of a compilation method applied to an electronic device outside a target chip according to an embodiment of the present disclosure.
  • FIG. 13 is a flowchart of a compilation method applied to an electronic device outside a target chip according to an embodiment of the present disclosure.
  • FIG. 14 is a schematic diagram of a compiling apparatus in an embodiment of the disclosure.
  • FIG. 15 is a block diagram of an electronic device according to an embodiment of the present disclosure.
  • an embodiment of the present disclosure provides a compilation method.
  • the compiling method in the embodiment of the present disclosure may be executed by a corresponding compiling apparatus, which may be implemented in software and/or hardware, and may generally be integrated into an electronic device.
  • the electronic device may be an electronic device where the target chip is located, or may be an electronic device outside the target chip, which is not limited in the present disclosure.
  • FIG. 1 is a flowchart of a compilation method provided by an embodiment of the present disclosure.
  • the compiling method according to the embodiment of the present disclosure includes the following steps S101-S103.
  • Step S101 acquiring fault processing core information of the target chip.
  • the target chip is a chip including multiple processing cores, such as a many-core chip or a multi-core chip.
  • the multiple processing cores of the target chip include normal cores and/or faulty cores.
  • the faulty core is a processing core in the target chip that is faulty or temporarily unavailable due to various reasons.
  • the faulty core is, for example, a processing core that fails due to manufacturing reasons, a processing core that fails during the use of the chip, or a processing core that fails due to overheating or errors.
  • a processing core that cannot be used temporarily; a normal core is a processing core in the target chip that can normally perform computing tasks.
  • the processing core routing of the chip is not prone to failure, although the faulty core does not have the computing power, such as the ability to run the executable file corresponding to the algorithm, the faulty core usually still has the routing function, that is, the faulty core still has the routing function. information can be delivered.
  • the fault processing core information of the target chip refers to the information of the fault core in the target chip.
  • the fault handling core information includes: the actual number of faulty cores, the absolute coordinates of the faulty core in the target chip, the identity document (ID) of the faulty core and other information.
  • the processing core information such as the total number of processing cores included in the target chip, the absolute coordinates and identification of each processing core have been determined, and these information will be written into the memory of the target chip. For example, write into one-time programmable memory (efuse).
  • Basic information of the target chip is also stored in the memory of the target chip, for example, information such as power supply voltage, version number, production date, etc. that can be used by the target chip.
  • the target chip after the target chip is fabricated, the target chip usually needs to be tested. Through the testing process of the target chip, it is possible to determine the fault processing core information of the target chip (such as the actual number of faulty cores, the absolute coordinates of the faulty core in the target chip, the ID of the faulty core, etc.), the fault processing of the target chip The core information is written into the memory of the target chip, eg, into the efuse of the target chip.
  • the step of acquiring the fault handling core information of the target chip includes: reading the one-time programmable memory of the target chip to obtain the fault handling core information of the target chip.
  • Step S102 based on the fault processing core information and the preset fault information, determine whether the target chip meets the regrouping condition.
  • the preset fault information is preset information of faulty cores of the target chip.
  • the preset failure information includes one or more kinds of information, such as a processing core failure rate, a preset number of faulty cores, and preset coordinates of the faulty cores.
  • the preset fault information can be set based on the characteristics of the target chip.
  • the characteristics of the target chip are, for example, whether a processing core failure is likely to occur in the process of manufacturing the target chip, whether the manufacturing process for manufacturing the target chip is complicated, and the like.
  • the manufacturing process of manufacturing the target chip Take the manufacturing process of manufacturing the target chip as an example to illustrate: in the case of a simple manufacturing process for manufacturing the target chip, the parameter values such as the processing core failure rate or the preset number of faulty cores in the preset fault information can be set to a small value.
  • the processing core failure rate can be set to 5%, or, in the case that the target chip includes 100 processing cores, the preset number of faulty cores can be 5; in the case of complex manufacturing processes for the target chip, Parameter values such as the preset proportion of faulty cores or the preset number of faulty cores in the preset fault information can be set larger, for example, the processing core fault rate can be set to 10%, or, if the target chip includes 100 processing cores In this case, the preset number of faulty cores can be 10.
  • the algorithm compilation result corresponding to the target chip may be grouped based on the preset fault information to obtain the preset grouping result.
  • the algorithm compilation result includes an executable file (eg, a binary executable file) corresponding to the algorithm prepared to be carried by the target chip.
  • the algorithm to be carried by the target chip refers to the algorithm to be implemented on the target chip.
  • the algorithm is a method and process for solving a problem, and it is a piece of logic, while the target chip is a physical device that actually implements the method and process for solving the problem.
  • the process of converting the pre-hosted algorithm into an executable file is the process of compiling the pre-hosted algorithm.
  • the target chip can implement the pre-carried algorithm by running the executable file corresponding to the pre-carried algorithm. Since the target chip is a chip including multiple processing cores, it is the multiple processing cores of the target chip that finally execute the executable file corresponding to the algorithm.
  • the algorithm compilation result is divided into multiple compilation result groups, and each compilation result group is used to indicate the executable file to be mapped to a normal core for execution, which can facilitate the preset normal cores in the multiple processing cores of the target chip based on the preset grouping
  • the result and the algorithm compilation result implement the algorithm for preparatory bearing, and ensure that in the case of certain faults in the multiple processing cores of the target chip, the preset grouping results of the algorithm compilation result corresponding to the target chip can still be used, which can improve the performance of the target chip.
  • the utilization rate is reduced, the waste of target chip resources is reduced, and the cost of chip manufacturing is also reduced.
  • the regrouping condition includes whether it is necessary to perform grouping processing on the algorithm compilation result corresponding to the target chip again. It should be noted that, since the preset number of fault processing cores is determined according to the characteristics of the target chip, that is to say, for multiple target chips manufactured in batches, the actual number of fault cores of most target chips may be The preset number, that is, the preset grouping result can be used as the grouping result of most target chips, which greatly reduces the compilation workload of the chip and saves the computing resources of the chip. However, in an actual application process, there may be differences between the preset fault information and the fault processing core information of the target chip.
  • the target chip cannot implement the pre-loading algorithm based on the preset grouping results and algorithm compilation results, and the target chip may be discarded, which will still cause a waste of chip resources. Therefore, in order to further improve the utilization rate of the target chip, reduce the waste of target chip resources, and reduce the manufacturing cost of the target chip, it is necessary to regroup the algorithm compilation results.
  • the above-mentioned step of determining whether the target chip meets the regrouping condition based on the fault processing core information and the preset fault information includes:
  • the actual number of faulty cores in the fault processing core information is greater than the preset number of faulty cores in the preset fault information, indicating that the failure rate of the processing cores in the target chip is higher than expected, and the target chip cannot be based on the preset grouping results and algorithms.
  • the compilation result implements the algorithm for preparing the bearer. Therefore, when the actual number of faulty cores is greater than the preset number of faulty cores, it is determined that the target chip meets the regrouping condition.
  • the actual number of faulty cores in the fault processing core information is less than or equal to the preset number of faulty cores in the preset fault information, indicating that the failure rate of the processing cores in the target chip is not higher than expected, and the target chip can be based on the preset grouping results and algorithms.
  • the compilation result implements the algorithm for preparing the bearer. Therefore, it is not necessary to regroup the algorithm compilation result, that is, it is determined that the target chip does not meet the regrouping condition.
  • the target chip has 100 processing cores, and the estimated processing core failure rate of the target chip is 5%, that is, it is estimated that among the 100 processing cores of the target chip, 5 processing cores are faulty and 95 are normal. nuclear.
  • the actual number of faulty cores in the target chip is less than or equal to 5
  • the actual number of normal cores in the target chip is greater than or equal to 95
  • the 95 normal cores in the target chip can still be compiled based on the preset grouping results and algorithm results
  • the target chip can still be used continuously, that is, it is determined that the target chip does not meet the regrouping conditions.
  • the pre-loading algorithm cannot be implemented based on the preset grouping results and algorithm compilation results, and the target chip cannot continue For use, the algorithm compilation result corresponding to the target chip needs to be regrouped, that is, it is determined that the target chip meets the regrouping condition.
  • the above-mentioned step of determining whether the target chip meets the regrouping condition based on the fault processing core information and the preset fault information includes:
  • the actual number of faulty cores is inconsistent with the preset number of faulty cores, which indicates that there is a difference between the fault situation in the multiple processing cores of the target chip and the preset fault situation.
  • the algorithm compilation results corresponding to the target chip can be regrouped deal with.
  • the algorithm for preparing the bearer is implemented based on the preset grouping result and the algorithm compilation result.
  • the target chip has 100 processing cores, and the estimated processing core failure rate of the target chip is 5%, that is, it is estimated that among the 100 processing cores of the target chip, 5 processing cores are faulty and 95 are normal. nuclear. Since the preset grouping result is obtained based on the preset fault information, in fact, only 95 normal cores in the target chip are needed to implement the algorithm for preparing the bearer based on the preset grouping result and the algorithm compilation result.
  • the algorithm compilation results corresponding to the target chip can be regrouped.
  • the advantages of the two methods for determining whether the target chip meets the regrouping condition provided by this embodiment are different.
  • the method of determining whether the target chip meets the regrouping conditions according to the relationship between the actual number of faulty cores and the preset number is compared with the method of determining whether the target chip meets the regrouping conditions by whether the actual number of faulty cores is consistent with the preset number. In this way, the compilation workload of the chip can be further reduced, and the computing resources of the chip can be saved.
  • the method of determining whether the target chip meets the regrouping conditions by whether the actual number of faulty cores is consistent with the preset number is compared with the method of determining whether the target chip meets the regrouping conditions through the relationship between the actual number of faulty cores and the preset number. In this way, the utilization rate of the processing cores in the target chip can be improved. Therefore, in the actual application process, an appropriate method for determining whether the target chip meets the regrouping condition can be selected based on a specific scenario.
  • Step S103 in the case that the target chip meets the regrouping condition, based on the fault processing core information, perform grouping processing on the algorithm compilation result corresponding to the target chip to obtain the current grouping result, so that the normal core of the target chip is based on the current grouping result and
  • the algorithm compilation result implements the algorithm for preparing the bearer.
  • the fault processing core information includes: the actual number of faulty cores, the absolute coordinates of the faulty core in the target chip, the identity document (ID) of the faulty core and other information.
  • the algorithm compilation result includes executable files (eg, binary executable files) corresponding to the algorithms prepared to be carried by the target chip.
  • the grouping processing of the algorithm compilation results is to divide the algorithm compilation results into multiple compilation result groups, and the current grouping result is the grouping result of grouping the algorithm compilation results.
  • the current grouping result corresponding to the target chip is the compilation result of the algorithm corresponding to the target chip divided into the compilation result that can be executed by the normal core of the target chip.
  • the algorithm to be carried by the target chip refers to the algorithm to be implemented on the target chip.
  • the algorithm is a method and process for solving a problem, and it is a piece of logic, while the target chip is a physical device that actually implements the method and process for solving the problem.
  • the process of converting the pre-hosted algorithm into an executable file is the process of compiling the pre-hosted algorithm.
  • FIG. 2 is a flowchart of a grouping processing method provided by an embodiment of the present disclosure.
  • the above-mentioned steps of performing grouping processing on the algorithm compilation result corresponding to the target chip to obtain the current grouping result include the following steps S201-S202.
  • Step S201 Determine the target number of normal cores based on the actual number of faulty cores.
  • the target number of normal cores is the difference between the total number of processing cores in the target chip and the actual number of faulty cores.
  • Step S202 Based on the target number of normal cores, perform grouping processing on the algorithm compilation result corresponding to the target chip to obtain the current grouping result.
  • the current grouping result includes a target number of compilation result groups, and each compilation result group is used to indicate an executable file to be mapped to a normal core for execution.
  • the algorithm compilation result includes an executable file corresponding to the algorithm prepared to be carried by the target chip, and the target chip can implement the algorithm to be carried by running the executable file corresponding to the algorithm prepared to be carried. Since the target chip is a chip including multiple processing cores, the executable file corresponding to the algorithm is finally executed by a normal processing core among the multiple processing cores of the target chip. Therefore, in this embodiment, performing grouping processing (or folding processing) on the algorithm compilation results corresponding to the target chip is to divide the algorithm compilation results into compilation result groups for execution by the target number of normal cores.
  • the algorithm compilation results may include compilation results performed by a plurality of numbers (eg, a first number) of processing cores.
  • the first number is greater than the target number of the above-mentioned normal cores
  • the grouping process may group the compilation results performed by a plurality of (for example, the first number) processing cores, and the compilation results that are grouped into the same group are determined by the target A normal core of the chip to execute.
  • the algorithm compilation result corresponding to the target chip includes executable files for execution by 500 processing cores, and the target chip has 100 processing cores, including 6 faulty processing cores and 94 non-faulty processing cores. Then, the algorithm compilation result is grouped and divided into 94 compilation result groups, and the executable file corresponding to each compilation result group is executed by a normal core.
  • the compilation method provided by the embodiment of the present disclosure firstly acquires fault processing core information of a target chip, where the target chip includes multiple processing cores, and the multiple processing cores include normal cores and/or faulty cores; then, based on the fault processing core information and a preset The fault information is used to determine whether the target chip meets the regrouping conditions; if the target chip meets the regrouping conditions, based on the fault processing core information, the algorithm compilation results corresponding to the target chip are grouped to obtain the current grouping results, so that the target chip Based on the current grouping results and algorithm compilation results, the normal core implements the algorithm for preparing the bearer, which can improve the flexibility of the chip usage process and ensure that the faulty core of the target chip does not need to process the algorithm compilation result, thereby effectively avoiding the target chip.
  • the implementation of the algorithm for pre-loading can effectively improve the utilization rate of chip resources and reduce the manufacturing cost of the chip.
  • FIG. 3 is a flowchart of a compilation method provided by an embodiment of the present disclosure.
  • the compiling method further includes the following step S104.
  • Step S104 in the case that the target chip does not meet the regrouping conditions, use the preset grouping result as the current grouping result, so that the normal core of the target chip implements the algorithm for preparing the bearer based on the current grouping result and the algorithm compilation result.
  • the target chip does not meet the regrouping conditions, which means that the normal core of the target chip can implement the algorithm for preparing the bearer based on the preset grouping result and the algorithm compilation result. Therefore, it is not necessary to regroup the algorithm compilation results, but directly use the preset grouping results as the current grouping results, so that the normal core of the target chip can implement the preparatory bearer algorithm based on the current grouping results and the algorithm compilation results, and speed up the implementation of the algorithm in the target The implementation process on the chip.
  • the preset number of faulty cores is determined according to the characteristics of the target chip, that is to say, in the batch-manufactured multiple target chips, the number of faulty cores of most of the target chips may be the predetermined number. Set the number, that is, most of the target chips do not meet the regrouping conditions. The preset grouping result can be used as the current grouping result of most target chips, which can greatly reduce the compilation workload of the chip.
  • a variety of different preset fault information can be set, for example, preset fault information with different preset numbers of multiple fault cores can be set.
  • the algorithm compilation result corresponding to the target chip is grouped to obtain multiple preset grouping results.
  • step of determining whether the target chip meets the regrouping condition based on the fault processing core information and the preset fault information if the target chip does not meet the regrouping condition for a certain preset fault information among a variety of different preset fault information , it is determined that the target chip does not meet the regrouping condition, and if the target chip meets the regrouping condition for all preset fault information, it is determined that the target chip meets the regrouping condition.
  • the step of determining whether the target chip meets the regrouping condition may refer to the foregoing embodiments, which will not be repeated here.
  • the target chip when the target chip does not meet the regrouping condition for the first preset fault information, extracts the first preset grouping result corresponding to the first preset fault information from a plurality of preset grouping results, and assigns the first preset fault information to the Set the grouping result as the current grouping result of the target chip.
  • the preset grouping of the algorithm compilation results corresponding to the target chip
  • the result can still be used, which can improve the utilization rate of the target chip, reduce the waste of target chip resources, and also reduce the cost of chip manufacturing.
  • FIG. 4 is a flowchart of a compilation method applied to a target chip according to an embodiment of the present disclosure.
  • the method is applied to a target chip, and based on the target number of the normal cores, the algorithm compilation result corresponding to the target chip is grouped to obtain the current grouping result (step After S103), the compiling method further includes: the following steps S401-S402.
  • Step S401 according to the absolute coordinates of the faulty core, determine the absolute coordinates of the normal core.
  • the fault processing core information further includes the absolute coordinates of the fault core.
  • a unit with computing capability in the target chip such as the chip's ARM (Advanced RISC Machine) or APU (Accelerated Processing Unit, accelerated processor), extracts the information from the fault processing core
  • the absolute coordinates of the faulty core are determined, and the absolute coordinates of the normal cores are determined according to the absolute coordinates of each processing core of the target chip, wherein the absolute coordinates of each processing core of the target chip are stored in the efuse of the target chip.
  • Step S402 based on the absolute coordinates of the normal cores, group-map the target number of compilation results included in the current grouping result to the normal cores, wherein the absolute coordinates of the normal cores mapped by any two compilation result groups are different from each other.
  • the current grouping result is a grouping result of grouping the algorithm compilation results, and grouping the algorithm compilation results corresponding to the target chip is to divide the algorithm compilation results into compilation results that can be executed by multiple normal cores of the target chip. Since the target chip is a chip that integrates multiple processing cores, the final execution algorithm compilation result (that is, the executable file) is the processing core of the target chip. Therefore, after obtaining the current grouping result, the target number included in the current grouping result needs to be The compilation results are grouped and mapped to normal cores. However, in the current grouping result, each compilation result grouping indicates that the group of executable files is to be mapped to which normal core for execution is not determined. Therefore, after obtaining the current grouping result, the ARM or APU of the target chip can be based on the normal core. The absolute coordinates determine to which normal core execution each compilation result grouping in the current grouping result is mapped to.
  • the target chip has 100 processing cores, including 6 faulty cores and 94 normal cores, then the current grouping result
  • the current grouping result includes 94 compilation result groups, and each compilation result group is used to indicate to be mapped to An executable file for normal kernel execution.
  • the above-mentioned process of mapping the target number of compilation result groups included in the current grouping result to the normal kernel based on the absolute coordinates of the normal kernel is to assign a normal kernel corresponding to a certain absolute coordinate to each compilation result group in the current grouping result, for example , assign the normal core with absolute coordinates (1,1) to the first compilation result group, then the first compilation result group is used to indicate the executable to be mapped to the normal core execution with absolute coordinates (1,1) file; assign a normal core with absolute coordinates (1,2) to the second compilation result group, then the second compilation result group is used to indicate the executable to be mapped to the normal core with absolute coordinates (1,2). executable file.
  • the mapping process of each compilation result grouping can be implemented.
  • the normal core whose absolute coordinate is (1,1) first executes the executable file corresponding to the first compilation result grouping, and executes the executable file corresponding to the first compilation result grouping.
  • the result is sent to other normal cores according to the routing file, such as the normal core with absolute coordinates (1,2), and the processing core with absolute coordinates (1,2) that receives the execution result, and executes the second compilation result according to the execution result.
  • the corresponding executable files are grouped, and so on, until all normal cores have finished executing the executable files corresponding to the grouping of compilation results mapped to them, and the algorithm to be prepared is implemented.
  • the routing file may be the execution result transmission path file that is simultaneously determined by the target chip in the above-mentioned mapping process.
  • the step of grouping and mapping the target number of compilation results included in the current grouping result to the normal cores includes: based on the absolute coordinates of the normal cores and the computing capability of the normal cores parameter, which maps the target number of compilation result groups included in the current grouping result to normal cores.
  • the ARM or APU of the target chip respectively obtains the computing capability parameter of the normal core according to the absolute coordinates of the normal core.
  • the multiple processing cores of the target chip cooperate with each other, in the process of grouping and mapping the target number of compilation results included in the current grouping result to the normal cores, it is necessary to consider not only the rationality of the calculation amount of each normal core, but also the normal The efficiency of cooperation between cores, such as data transmission and information transfer efficiency.
  • the rationality of the calculation amount of the normal core can be obtained according to the calculation capability parameter of the normal core, and the calculation amount divided into each normal core should match the standard calculation amount that the normal core can provide.
  • the standard calculation amount that a normal core can provide is A (MB).
  • the actual calculation amount of the normal core is 70%-80% of the standard calculation amount. If it is too small, the performance of the target chip will be wasted, and if the actual calculation amount is too large, it will cause an excessive computational load of the target chip. Therefore, with reference to the standard calculation amount of the normal core, the target number of compilation result groups included in the current grouping result can be reasonably mapped to the normal core.
  • the data transmission efficiency between any two normal cores can be obtained according to the absolute coordinates of the normal cores. The farther the two normal cores are, the longer it takes to transmit data and the lower the transmission efficiency. In the process of mapping the target number of compiling result groups included in the grouping result to normal cores, two compiling result groups that require data transmission should be mapped to two normal cores that are close to each other as much as possible.
  • FIG. 5 is a flowchart of a compiling method applied to a target chip according to an embodiment of the present disclosure.
  • the compiling method includes the following steps S501-S506.
  • Step S501 Receive an algorithm compilation result sent by an electronic device outside the target chip.
  • the target chip is a chip including multiple processing cores, such as a many-core chip or a multi-core chip.
  • the electronic device outside the target chip is an external electronic device that has a connection relationship with the target chip, such as a device connected to the target chip with one or more functions of compiling, chip testing, reading and writing, etc.
  • the external electronic device may be a server or a terminal.
  • the algorithm compilation result includes executable files (eg, binary executable files) corresponding to the algorithms prepared to be carried by the target chip.
  • the algorithm to be carried by the target chip refers to the algorithm to be implemented on the target chip.
  • the algorithm is a method and process for solving a problem, and it is a piece of logic, while the target chip is a physical device that actually implements the method and process for solving the problem.
  • the electronic device outside the target chip is used to convert the algorithm prepared to be carried by the target chip into an executable file executable by the target chip. compilation process.
  • Step S502 acquiring fault processing core information of the target chip.
  • the fault processing core information of the target chip refers to the information of the fault core in the target chip.
  • the fault handling core information includes: the actual number of faulty cores, the absolute coordinates of the faulty core in the target chip, the identity document (ID) of the faulty core and other information.
  • the ARM or APU of the target chip can read the one-time programmable memory of the target chip to obtain fault processing core information of the target chip.
  • the processing core information such as the total number of processing cores included in the target chip, the absolute coordinates and identification of each processing core have been determined, and these information will be written into the memory of the target chip. For example, writing into one-time programmable memory.
  • Basic information of the target chip is also stored in the memory of the target chip, for example, information such as power supply voltage, version number, production date, etc. that can be used by the target chip.
  • the target chip After the target chip is fabricated, the target chip usually needs to be tested. Through the testing process of the target chip, it is possible to determine the fault processing core information of the target chip (such as the actual number of faulty cores, the absolute coordinates of the faulty core in the target chip, the ID of the faulty core, etc.), the fault processing of the target chip The core information is written into the memory of the target chip, eg, into the efuse of the target chip.
  • Step S503 based on the fault processing core information and the preset fault information, determine whether the target chip meets the regrouping condition.
  • the preset fault information is preset information of faulty cores of the target chip.
  • the preset failure information includes one or more kinds of information, such as a processing core failure rate, a preset number of faulty cores, and preset coordinates of the faulty cores.
  • the preset fault information can be set based on the characteristics of the target chip.
  • the characteristics of the target chip are, for example, whether a processing core failure is likely to occur in the process of manufacturing the target chip, whether the manufacturing process for manufacturing the target chip is complicated, and the like.
  • the electronic device outside the target chip sends the preset fault information to the target chip; after the target chip receives the preset fault information sent by the external electronic device , the algorithm compilation result corresponding to the target chip can be grouped based on the preset fault information to obtain the preset grouping result.
  • the electronic device outside the target chip may also, after determining the preset fault information of the target chip, perform grouping processing on the algorithm compilation result corresponding to the target chip based on the preset fault information, and obtain the preset grouping result , and send the preset grouping result to the target chip.
  • the algorithm compilation result includes an executable file (eg, a binary executable file) corresponding to the algorithm prepared to be carried by the target chip.
  • the algorithm to be carried by the target chip refers to the algorithm to be implemented on the target chip.
  • the algorithm is a method and process for solving a problem, and it is a piece of logic, while the target chip is a physical device that actually implements the method and process for solving the problem.
  • the process of converting the pre-hosted algorithm into an executable file is the process of compiling the pre-hosted algorithm.
  • the target chip may implement the pre-carried algorithm by running the executable file corresponding to the pre-carried algorithm. Since the target chip is a chip including multiple processing cores, it is the multiple processing cores of the target chip that finally execute the executable file corresponding to the algorithm. Therefore, in this embodiment, by estimating a certain processing core failure rate or a preset number of faulty cores, and then based on the preset failure information, the algorithm compilation results including the executable file are grouped and processed, and the algorithm compilation results are divided into groups.
  • each compilation result group is used to indicate an executable file to be mapped to a normal core for execution, which can facilitate the compilation of the preset normal cores in the multiple processing cores of the target chip based on the preset grouping results and algorithms As a result, the algorithm for pre-loading is implemented, and in the case of certain failures in the multiple processing cores of the target chip, the preset grouping results of the algorithm compilation results corresponding to the target chip can still be used, which can improve the utilization rate of the target chip and reduce the The waste of target chip resources also reduces the cost of chip manufacturing.
  • the regrouping condition includes whether it is necessary to perform grouping processing on the algorithm compilation result corresponding to the target chip again.
  • the steps of how to determine whether the target chip meets the regrouping condition can be found in the foregoing embodiments, which will not be repeated here.
  • the target chip cannot implement the pre-loading algorithm based on the preset grouping results and algorithm compilation results, and the target chip may be discarded, which will still cause a waste of chip resources. Therefore, in order to further improve the utilization rate of the target chip, reduce the waste of target chip resources, and reduce the manufacturing cost of the target chip, it is necessary to regroup the algorithm compilation results.
  • Step S504 in the case that the target chip meets the regrouping condition, based on the fault processing core information, perform grouping processing on the algorithm compilation result corresponding to the target chip to obtain the current grouping result.
  • Step S505 in the case that the target chip does not meet the regrouping condition, use the preset grouping result as the current grouping result.
  • the preset number of faulty cores is determined according to the characteristics of the target chip, that is to say, among multiple target chips manufactured in batches, the number of faulty cores of most of the target chips may be the predetermined number. Set the number, that is, most of the target chips do not meet the regrouping conditions.
  • the preset grouping result can be used as the current grouping result of most target chips, which can greatly reduce the compilation workload of the chip and save the computing resources of the target chip.
  • Step S506 grouping and mapping the target number of compilation results included in the current grouping result to normal cores.
  • the compiling method provided by the embodiment of the present disclosure can improve the flexibility of the chip usage process, ensure that the faulty core of the target chip does not need to process the algorithm compilation result, and thus effectively avoid the situation that the target chip cannot implement the algorithm prepared for carrying due to the faulty core. It can effectively improve the utilization rate of chip resources and reduce the manufacturing cost of the chip.
  • FIG. 6 is a schematic diagram of a compilation method applied to a target chip according to an embodiment of the present disclosure.
  • the target chip 61 includes a plurality of processing cores 62, the target chip 61 performs grouping processing on the algorithm compilation result, obtains the current grouping result, and maps the current grouping result to the normal core of the target chip.
  • FIG. 7 is a schematic diagram of a compilation method applied to a target chip according to an embodiment of the present disclosure.
  • the ARM or APU of the target chip obtains the algorithm compilation result, groups the algorithm compilation results according to the actual number of faulty cores, obtains the current grouping result, and maps the current grouping result to the normal cores of the target chip.
  • the current grouping results and algorithm compilation results can be stored in the storage space of the target chip, such as Double Data Rate Synchronous Dynamic Random Access Memory (DDR, Double Data Rate Synchronous Dynamic Random Access Memory).
  • DDR Double Data Rate Synchronous Dynamic Random Access Memory
  • FIG. 8 is a flowchart of a compilation method applied to an electronic device outside a target chip according to an embodiment of the present disclosure.
  • the compiling method further includes: the following steps S801-S802.
  • Step S801 compiling the algorithm to be carried by the target chip to obtain an algorithm compilation result.
  • the algorithm to be carried by the target chip refers to the algorithm to be implemented on the target chip.
  • the algorithm is the method and process of solving the problem, and it is a piece of logic
  • the target chip is the physical device that actually implements the method and process of solving the problem.
  • the target chip implements the pre-carried algorithm by running an executable file (eg, a binary executable file) that corresponds to the pre-carried algorithm and is executable by the target chip.
  • the process of converting the pre-loaded algorithm into an executable file is the process of compiling the pre-loaded algorithm, and the executable file executable by the target chip is the algorithm compilation result.
  • the electronic device outside the target chip may obtain the current grouping result based on the above steps S101-S103.
  • the electronic device outside the target chip After obtaining the current grouping result, further includes the following step S802.
  • Step S802 Send the current grouping result and the algorithm compilation result to the target chip, so that the normal core of the target chip implements the algorithm for preparing the bearer based on the current grouping result and the algorithm compilation result.
  • the current grouping result includes multiple compilation result groups, and each compilation result group is used to indicate an executable file to be mapped to a normal core for execution.
  • the algorithm compilation result includes an executable file corresponding to the algorithm prepared to be carried by the target chip.
  • each compilation result group in the current grouping result is used to indicate an executable file to be mapped to a normal core for execution
  • the chip can group the compilation result after receiving the current grouping result and the algorithm compilation result
  • the corresponding executable file is mapped to the normal core, but not to the faulty core, which can ensure that the faulty core of the target chip does not need to process the compilation result of the algorithm, thereby effectively avoiding the situation that the target chip cannot implement the algorithm prepared for carrying due to the faulty core. , which can effectively improve the utilization rate of chip resources and reduce the manufacturing cost of chips.
  • FIG. 9 is a flowchart of a compilation method applied to an electronic device outside a target chip according to an embodiment of the present disclosure.
  • the compilation method further includes the following steps S901-S903.
  • Step S901 based on the fault processing core information of each target chip in the plurality of target chips and the respective corresponding algorithm compilation results, determine the same type of chips.
  • the target chips whose fault processing core information is consistent and the corresponding algorithm compilation results are consistent are called similar chips.
  • an electronic device outside the target chip may acquire information on fault processing cores of each target chip in the multiple target chips, where the fault processing core information includes a processing core failure rate, a fault processing core One or more kinds of information, such as the preset number and the preset coordinates of the fault core.
  • the fault processing core information includes a processing core failure rate, a fault processing core
  • One or more kinds of information such as the preset number and the preset coordinates of the fault core.
  • a target chip whose actual number of fault processing cores included in the fault processing core information in the multiple target chips is the same and whose corresponding algorithm compilation results are the same may also be referred to as the same type of chip.
  • Step S902 in the case that the target chip meets the regrouping condition, based on the fault processing core information, perform grouping processing on the algorithm compilation result corresponding to the target chip to obtain the current grouping result.
  • the current grouping result is a grouping result of grouping the algorithm compilation results, and the grouping processing of the algorithm compilation results is that the algorithm compilation results are divided into compilation results that can be executed by a plurality of normal cores.
  • the current grouping result of the target chip is to divide the algorithm compilation result into compilation results that can be executed by the normal core of the target chip.
  • Step S903 taking the current grouping result as the current grouping result corresponding to chips of the same type of the target chip.
  • the electronic device outside the target chip can, for each target chip, The core information is processed, the algorithm compilation result corresponding to the target chip is grouped, and the current grouping result corresponding to the target chip is obtained.
  • the compiling method of this embodiment it is not necessary to perform the grouping processing of the algorithm compilation results once for each target chip, but only need to perform the grouping processing of the algorithm compilation results once for the same type of chips.
  • the electronic device outside the target chip can determine the same type of chip of the target chip from multiple chips.
  • the same type of chip is the target chip with the same actual number of fault processing cores and the same corresponding algorithm compilation results, therefore, in the When a target chip meets the regrouping conditions, the same chips of the target chip also meet the regrouping conditions.
  • the electronic device outside the target chip only needs to perform a grouping process on the algorithm compilation result according to the fault processing core information of the target chip.
  • the compilation workload of the chip can be greatly reduced, the computing resources of external electronic devices can be saved, and the manufacturing cost of the chip can be reduced.
  • FIG. 10 , FIG. 11 , and FIG. 12 are schematic diagrams of a compilation method applied to an electronic device outside a target chip provided by an embodiment of the present disclosure.
  • the multi-chip architecture 1001 includes a plurality of target chips 1002 that are prepared to carry the same algorithm.
  • the electronic device outside the target chip performs grouping processing on the algorithm compilation result corresponding to each target chip 1002 according to the fault processing core information of each target chip 1002, and obtains the current grouping result corresponding to each target chip 1002, as shown in Figure 10 and Figure 10. 11 and ID1, ID2, ID3...IDn in Figure 12.
  • the electronic device outside the target chip sends each current grouping result to the corresponding target chip 1002 .
  • the target chip 1002 After receiving the current grouping result corresponding to itself, the target chip 1002 stores the current grouping result in its own DDR.
  • an electronic device outside the target chip may, after obtaining the current grouping result corresponding to a target chip, send the obtained current grouping result to the target chip, and then obtain the next target The current grouping result corresponding to the chip.
  • the electronic device outside the target chip may, after obtaining the current grouping results corresponding to all target chips, send the obtained current grouping results to the corresponding target chips respectively.
  • the normal core of each target chip is an algorithm that implements a preparatory bearer based on its corresponding current grouping result and algorithm compilation result, so it can ensure the failure of the target chip.
  • the core does not need to process the algorithm compilation result, thereby effectively avoiding the situation that the target chip cannot implement the algorithm prepared for carrying due to the faulty core, effectively improving the utilization of chip resources, reducing the manufacturing cost of the chip, and ensuring the stability of the multi-target chip architecture.
  • an electronic device outside the target chip can send all the current grouping results to each target chip after acquiring the current grouping results corresponding to all target chips, and each Each target chip can select its own corresponding current grouping result from all the current grouping results.
  • the electronic device outside the target chip sends all the current grouping results to each chip, the electronic device sends the current grouping result to each target chip.
  • the contents are the same, so after obtaining all the current grouping results, the electronic device can send the current grouping results to all target chips after one memory read.
  • the ARM or APU of the target chip has a computing capability, from all the current grouping results.
  • the current grouping result corresponding to the own fault handling core information is extracted from the grouping result, and the algorithm for preparing the bearer is implemented based on the current grouping result and the algorithm compilation result.
  • the ARM or APU of the target chip can also save all the current grouping results.
  • the target chip has other failures during subsequent use (for example, a normal core becomes a faulty core)
  • the ARM or APU of the target chip can directly
  • An appropriate current grouping result is selected from a plurality of saved current grouping results, and an algorithm for preparatory bearer is implemented based on the re-selected current grouping result and the algorithm compilation result, which further improves the utilization of chip resources and reduces the cost of chip manufacturing.
  • the storage space of the target chip is insufficient, all the remaining current grouping results can also be directly discarded.
  • FIG. 13 is a flowchart of a compilation method applied to an electronic device outside a target chip according to an embodiment of the present disclosure.
  • grouping processing is performed on the algorithm compilation results corresponding to the target chips to obtain the current grouping results (step S202 ).
  • the compilation method further includes: the following step S1301 - Step S1304.
  • Step S1301 Acquire the absolute coordinates of the normal core according to the absolute coordinates of the faulty core.
  • the one-time programmable memory of the target chip is read to obtain the fault handling core information of the target chip.
  • the fault processing core information includes: the actual number of faulty cores, the absolute coordinates of the faulty core in the target chip, and the identity of the faulty core.
  • the electronic device outside the target chip can also obtain the absolute coordinates of all processing cores of the target chip from the one-time programmable memory of the target chip, and then obtain the absolute coordinates of the normal core based on the absolute coordinates of all the processing cores and the absolute coordinates of the faulty core. .
  • Step S1302 make a one-to-one correspondence between the compilation result group and the absolute coordinates of the normal core, and obtain the corresponding relationship between the compilation result group and the absolute coordinates of the normal core.
  • each compilation result group is used to indicate an executable file to be mapped to a normal core for execution.
  • the correspondence between the compilation result group and the absolute coordinates of the normal core is used to indicate which normal core executes the executable file corresponding to the compilation result group.
  • the current grouping result obtained after the algorithm compilation result is grouped includes multiple compilation result groups. It can be known from the foregoing description of grouping the algorithm compilation results that the number of compilation result groups included in the current grouping result is less than or equal to the target number of normal cores. Therefore, the same number of absolute coordinates as the number of compilation result groups can be selected from the target number of absolute coordinates, and an absolute coordinate of a normal core can be assigned to each compilation result group, so as to realize the combination of the compilation result group and the absolute coordinates of the normal core. One-to-one correspondence.
  • the target chip has 100 processing cores, including 6 faulty cores and 94 normal cores, then the current grouping result The current grouping result includes 94 compilation result groups, and each compilation result group is used to indicate to be mapped to An executable for normal kernel execution.
  • the first compilation result can be grouped to correspond to absolute coordinates (1, 1); the second compilation result can be grouped to absolute coordinates (1, 2) ... until the compilation result is grouped with the normal.
  • the absolute coordinates of the cores are in one-to-one correspondence, and the corresponding relationship between the compilation result group and the absolute coordinates of the normal core is obtained.
  • the corresponding relationship between the compilation result group and the absolute coordinates of the normal core is used to indicate which normal core executes the executable file corresponding to the compilation result group. 1,1) for normal kernel execution.
  • Step S1303 based on the corresponding relationship between the compilation result group and the absolute coordinates of the normal core, perform route compilation on the route of the target chip, and obtain a route compilation result.
  • the process of routing and compiling the route of the target chip is the process of determining the order in which the normal core of the target chip executes the executable file and determining the execution result transmission path and other information.
  • the routing compilation result includes information such as the order in which the normal core of the target chip executes the executable file and the execution result transmission path.
  • Step S1304 Send the current grouping result, the routing compilation result and the algorithm compilation result to the target chip, so that the target chip can implement the algorithm for preparing the bearer based on the current grouping result, the routing compilation result and the algorithm compilation result.
  • the normal core whose absolute coordinate is (1,1) first executes the first compilation result corresponding to the grouping. Executable file, and send the execution result to the next normal core according to the routing compilation result (the route of the faulty core is generally not damaged, so the execution result can be transferred through the faulty core in the process of sending it to the next normal core), such as A normal kernel with absolute coordinates (1,2).
  • the compilation method provided by the embodiment of the present disclosure sends the current grouping result, the routing compilation result, and the algorithm compilation result to the target chip, so that the target chip can realize the pre-bearing algorithm based on the current grouping result, the routing compilation result and the algorithm compilation result, which can effectively
  • the efficiency of the process of implementing the preparatory bearing algorithm for the target chip is improved, and the manufacturing cost of the chip is reduced.
  • an embodiment of the present disclosure provides a compiling apparatus, which is a corresponding apparatus for implementing the compiling method provided by the above-mentioned embodiments of the present disclosure.
  • the apparatus can be implemented in software and/or hardware, and can generally be integrated into electronic equipment. middle.
  • FIG. 14 is a schematic diagram of a compiling apparatus in an embodiment of the disclosure.
  • a compilation apparatus provided by an embodiment of the present disclosure includes: an acquisition module 1401 , a decision module 1402 , and a processing module 1403 .
  • the obtaining module 1401 is used for obtaining the fault processing core information of the target chip.
  • the target chip is a chip including multiple processing cores, such as a many-core chip or a multi-core chip.
  • the multiple processing cores of the target chip include normal cores and/or faulty cores.
  • the faulty core is a processing core in the target chip that is faulty or temporarily unavailable due to various reasons.
  • the faulty core is, for example, a processing core that fails due to manufacturing reasons, a processing core that fails during the use of the chip, or a processing core that fails due to overheating or errors.
  • a processing core that cannot be used temporarily; a normal core is a processing core in the target chip that can normally perform computing tasks.
  • the faulty core since the routing of the processing core of the chip is not easy to fail, although the faulty core does not have the computing ability, such as the ability to run the executable file corresponding to the algorithm, the faulty core usually still has the routing function, that is, the faulty core can still Send message.
  • the fault processing core information of the target chip refers to the information of the fault core in the target chip.
  • the fault handling core information includes: the actual number of faulty cores, the absolute coordinates of the faulty core in the target chip, the identity document (ID) of the faulty core and other information.
  • the processing core information such as the total number of processing cores included in the target chip, the absolute coordinates and identification of each processing core have been determined, and these information will be written into the memory of the target chip. For example, write into one-time programmable memory (efuse).
  • Basic information of the target chip is also stored in the memory of the target chip, for example, information such as power supply voltage, version number, production date, etc. that can be used by the target chip.
  • the target chip after the target chip is fabricated, the target chip usually needs to be tested. Through the testing process of the target chip, it is possible to determine the fault processing core information of the target chip (such as the actual number of faulty cores, the absolute coordinates of the faulty core in the target chip, the ID of the faulty core, etc.), the fault processing of the target chip The core information is written into the memory of the target chip, eg, into the efuse of the target chip.
  • the obtaining module 1401 reads the one-time programmable memory of the target chip to obtain the fault handling core information of the target chip.
  • the decision module 1402 is configured to determine whether the target chip meets the regrouping condition based on the fault processing core information and the preset fault information.
  • the preset fault information is preset information of faulty cores of the target chip.
  • the preset failure information includes one or more kinds of information, such as a processing core failure rate, a preset number of faulty cores, and preset coordinates of the faulty cores.
  • the steps of determining whether the target chip meets the regrouping condition may refer to the foregoing embodiment, and details are not repeated here.
  • the processing module 1403 is configured to perform grouping processing on the algorithm compilation result corresponding to the target chip based on the fault processing core information under the condition that the target chip meets the regrouping condition, so as to obtain the current grouping result, so that the normal core of the target chip is based on the current
  • the grouping result and the algorithm compilation result implement the algorithm for preparing the bearer.
  • the algorithm compilation result includes an executable file corresponding to the algorithm prepared to be carried by the target chip.
  • the processing module 1403 is further configured to perform grouping processing on the algorithm compilation results corresponding to the target chip based on the preset fault information, so as to obtain the preset fault information. Set the grouping result.
  • the algorithm compilation result includes an executable file (eg, a binary executable file) corresponding to the algorithm prepared to be carried by the target chip.
  • the algorithm to be carried by the target chip refers to the algorithm to be implemented on the target chip.
  • the algorithm is a method and process for solving a problem, and it is a piece of logic, while the target chip is a physical device that actually implements the method and process for solving the problem.
  • the process of converting the pre-hosted algorithm into an executable file is the process of compiling the pre-hosted algorithm.
  • the target chip may implement the pre-carried algorithm by running the executable file corresponding to the pre-carried algorithm. Since the target chip is a chip including multiple processing cores, it is the multiple processing cores of the target chip that finally execute the executable file corresponding to the algorithm.
  • the algorithm compilation result is divided into multiple compilation result groups, and each compilation result group is used to indicate the executable file to be mapped to a normal core for execution, which can facilitate the preset normal cores in the multiple processing cores of the target chip based on the preset grouping
  • the result and the algorithm compilation result implement the algorithm for preparatory bearing, and ensure that in the case of certain faults in the multiple processing cores of the target chip, the preset grouping results of the algorithm compilation result corresponding to the target chip can still be used, which can improve the performance of the target chip.
  • the utilization rate is reduced, the waste of target chip resources is reduced, and the cost of chip manufacturing is also reduced.
  • the regrouping condition includes whether it is necessary to perform grouping processing on the algorithm compilation result corresponding to the target chip again.
  • the preset number of fault processing cores is determined according to the characteristics of the target chip, that is to say, for multiple target chips manufactured in batches, the actual number of fault cores of most target chips may be The preset number, that is, the preset grouping result can be used as the grouping result of most target chips, which greatly reduces the compilation workload of the chip and saves the computing resources of the chip.
  • the preset fault information may be differences between the preset fault information and the fault processing core information of the target chip.
  • the target chip cannot implement the pre-loading algorithm based on the preset grouping results and algorithm compilation results, and the target chip may be discarded, which will still cause a waste of chip resources. Therefore, in order to further improve the utilization rate of the target chip, reduce the waste of target chip resources, and reduce the manufacturing cost of the target chip, it is necessary to regroup the algorithm compilation results.
  • the processing module 1403 is further configured to use the preset grouping result as the current grouping result in the case that the target chip does not meet the regrouping condition, so that the normal core of the target chip can realize the realization based on the current grouping result and the algorithm compilation result Algorithms for preparing bearers.
  • the acquisition module is used to acquire fault processing core information of a target chip, where the target chip includes multiple processing cores, and the multiple processing cores include normal cores and/or faulty cores;
  • the decision module is used for fault-based processing Processing core information and preset fault information to determine whether the target chip meets the regrouping conditions;
  • the processing module is used to perform grouping processing on the algorithm compilation results corresponding to the target chip based on the fault processing core information when the target chip meets the regrouping conditions , to obtain the current grouping result, so that the normal core of the target chip can realize the preparatory bearing algorithm based on the current grouping result and the algorithm compilation result, which can improve the flexibility of the chip usage process and ensure that the faulty core of the target chip does not need to process the algorithm compilation result, and then It can effectively avoid the situation that the target chip cannot implement the algorithm of the preparatory load due to the faulty core, effectively improve the utilization rate of chip resources, and reduce the manufacturing cost of the chip.
  • FIG. 15 is a block diagram of an electronic device according to an embodiment of the present disclosure.
  • an embodiment of the present disclosure provides an electronic device, the electronic device includes: at least one processor 1501 ; at least one memory 1502 , and one or more I/O interfaces 1503 connected between the processor 1501 and the memory 1502 wherein, the memory 1502 stores one or more computer programs executable by the at least one processor 1501, and the one or more computer programs are executed by the at least one processor 1501, so that the at least one processor 1501 can execute the above-mentioned compile method.
  • Embodiments of the present disclosure also provide a computer-readable storage medium on which a computer program is stored, wherein the computer program implements the above-mentioned compiling method when executed by a processor.
  • Computer-readable storage media can be volatile or non-volatile computer-readable storage media.
  • Embodiments of the present disclosure also provide a computer program product, including computer-readable codes, or a non-volatile computer-readable storage medium carrying computer-readable codes, when the computer-readable codes are stored in a processor of an electronic device When running in the electronic device, the processor in the electronic device executes the above compiling method.
  • Computer storage media includes both volatile and non-volatile memory media implemented in any method or technology for storage of information, such as computer readable program instructions, data structures, program modules or other data. volatile, removable and non-removable media.
  • Computer storage media include, but are not limited to, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM), static random access memory (SRAM), flash memory or other memory technologies, portable Compact Disc Read Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical disk storage, magnetic cartridge, magnetic tape, magnetic disk storage or other magnetic storage device, or which can be used to store desired information and which can be accessed by a computer any other medium.
  • communication media typically embodies computer readable program instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and can include any information delivery, as is well known to those of ordinary skill in the art medium.
  • the computer readable program instructions described herein may be downloaded to various computing/processing devices from a computer readable storage medium, or to an external computer or external storage device over a network, such as the Internet, a local area network, a wide area network, and/or a wireless network.
  • the network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • a network adapter card or network interface in each computing/processing device receives computer-readable program instructions from a network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
  • Computer program instructions for carrying out operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or instructions in one or more programming languages.
  • Source or object code written in any combination, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as the "C" language or similar programming languages.
  • the computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement.
  • the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider through the Internet connect).
  • LAN local area network
  • WAN wide area network
  • custom electronic circuits such as programmable logic circuits, field programmable gate arrays (FPGAs), or programmable logic arrays (PLAs) can be personalized by utilizing state information of computer readable program instructions.
  • Computer readable program instructions are executed to implement various aspects of the present disclosure.
  • the computer program product described herein may be embodied in hardware, software, or a combination thereof.
  • the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK), etc. Wait.
  • a software development kit Software Development Kit, SDK
  • These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer or other programmable data processing apparatus to produce a machine that causes the instructions when executed by the processor of the computer or other programmable data processing apparatus , resulting in means for implementing the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.
  • These computer readable program instructions can also be stored in a computer readable storage medium, these instructions cause a computer, programmable data processing apparatus and/or other equipment to operate in a specific manner, so that the computer readable medium storing the instructions includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.
  • Computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other equipment to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , thereby causing instructions executing on a computer, other programmable data processing apparatus, or other device to implement the functions/acts specified in one or more blocks of the flowcharts and/or block diagrams.
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more functions for implementing the specified logical function(s) executable instructions.
  • the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented in dedicated hardware-based systems that perform the specified functions or actions , or can be implemented in a combination of dedicated hardware and computer instructions.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

A compiling method and apparatus, an electronic device, and a computer-readable storage medium. The method comprises: acquiring fault processing core information of a target chip (S101), wherein the target chip comprises a plurality of processing cores, the plurality of processing cores comprising normal cores and/or fault cores; on the basis of the fault processing core information and preset fault information, determining whether the target chip meets a regrouping condition (S102); and when the target chip meets the regrouping condition, grouping, on the basis of the fault processing core information, an algorithm compiling result corresponding to the target chip, so as to obtain a current grouping result, such that the normal cores of the target chip implement, on the basis of the current grouping result and the algorithm compiling result, an algorithm that is prepared to be borne (S103). By means of the method, the utilization rate of chip resources can be effectively improved, and the manufacturing costs of a chip can be reduced.

Description

编译方法及装置、电子设备、计算机可读存储介质Compiling method and apparatus, electronic device, computer-readable storage medium 技术领域technical field
本公开实施例涉及计算机技术领域,尤其涉及一种编译方法及装置、电子设备、计算机可读存储介质和计算机程序产品。The embodiments of the present disclosure relate to the field of computer technologies, and in particular, to a compilation method and apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
背景技术Background technique
芯片(如人工智能芯片)可以由一枚或多枚处理器组成,且一枚处理器中通常集成多个完整的计算引擎(或者说处理核),一枚处理器内的多个处理核之间以及不同处理器的处理核之间都可以相互协作,共同完成任务。A chip (such as an artificial intelligence chip) can be composed of one or more processors, and a processor usually integrates multiple complete computing engines (or processing cores), and the multiple processing cores in a processor are combined. The processing cores of different processors can cooperate with each other to complete tasks together.
在实际的生产过程中,芯片的某些处理核由于制造等原因故障,这些故障的处理核不能执行算法(或者说不能将算法映射至这些故障的处理核)。In an actual production process, some processing cores of a chip fail due to manufacturing and other reasons, and these faulty processing cores cannot execute algorithms (or cannot map algorithms to these faulty processing cores).
在使用多芯片架构的场景中(如云计算中心),当多芯片架构中存在处理核故障的芯片,则芯片可能就不能被使用,甚至整个多芯片架构的芯片也需要全部抛弃,提升了芯片的制造成本。In a scenario where a multi-chip architecture is used (such as a cloud computing center), when there is a chip that handles core failures in the multi-chip architecture, the chip may not be used, and even the entire multi-chip architecture chip needs to be discarded. manufacturing cost.
发明内容SUMMARY OF THE INVENTION
本公开实施例提供一种编译方法及装置、电子设备、计算机可读存储介质和计算机程序产品。Embodiments of the present disclosure provide a compilation method and apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
第一方面,本公开实施例提供一种编译方法,包括:In a first aspect, an embodiment of the present disclosure provides a compilation method, including:
获取目标芯片的故障处理核信息;所述目标芯片包括多个处理核,所述多个处理核包括正常核和/或故障核;Acquire fault processing core information of the target chip; the target chip includes multiple processing cores, and the multiple processing cores include normal cores and/or faulty cores;
基于所述故障处理核信息和预设故障信息,确定所述目标芯片是否符合重分组条件;determining whether the target chip meets the regrouping condition based on the fault processing core information and the preset fault information;
在所述目标芯片符合重分组条件的情况下,基于所述故障处理核信息,对所述目标芯片对应的算法编译结果进行分组处理,以获得当前分组结果,以使所述目标芯片的正常核基于所述当前分组结果和所述算法编译结果实现预备承载的算法;In the case that the target chip meets the regrouping condition, based on the fault processing core information, perform grouping processing on the algorithm compilation result corresponding to the target chip to obtain the current grouping result, so that the normal core of the target chip can be processed into groups. An algorithm for implementing a preparatory bearer based on the current grouping result and the algorithm compilation result;
其中,所述算法编译结果包括与所述目标芯片预备承载的算法所对应的可执行文件。The algorithm compilation result includes an executable file corresponding to the algorithm prepared to be carried by the target chip.
在一些实施例中,所述方法还包括:In some embodiments, the method further includes:
基于预设故障信息,对所述目标芯片对应的算法编译结果进行所述分组处理,以获得预设分组结果;Based on the preset fault information, perform the grouping process on the algorithm compilation result corresponding to the target chip to obtain a preset grouping result;
在所述目标芯片不符合重分组条件的情况下,将所述预设分组结果作为当前分组结果,以使所述目标芯片的正常核基于所述当前分组结果和所述算法编译结果实现预备承载的算法。In the case that the target chip does not meet the regrouping condition, the preset grouping result is used as the current grouping result, so that the normal core of the target chip implements a preparatory bearer based on the current grouping result and the algorithm compilation result algorithm.
在一些实施例中,所述故障处理核信息包括故障核的实际数量;所述预设故障信息包括故障核的预设数量;所述基于所述故障处理核信息和预设故障信息,确定所述目标芯片是否符合重分组条件的步骤,包括:In some embodiments, the fault handling core information includes an actual number of faulty cores; the preset fault information includes a preset number of faulty cores; the The steps to describe whether the target chip meets the regrouping conditions include:
在所述故障核的实际数量与所述故障核的预设数量不一致的情况下,确定所述目标芯片符合重分组条件;In the case that the actual number of the faulty cores is inconsistent with the preset number of the faulty cores, determining that the target chip meets the regrouping condition;
或者,在所述故障核的实际数量大于所述故障核的预设数量的情况下,确定所述目标芯片符合重分组条件。Alternatively, in the case that the actual number of the faulty cores is greater than the preset number of the faulty cores, it is determined that the target chip meets the regrouping condition.
在一些实施例中,所述故障处理核信息包括故障核的实际数量;所述基于所述故障处理核信息,对所述目标芯片对应的算法编译结果进行分组处理,以获得当前分组结果的步骤,包括:In some embodiments, the fault processing core information includes the actual number of faulty cores; the step of performing grouping processing on the algorithm compilation result corresponding to the target chip based on the fault processing core information to obtain the current grouping result ,include:
基于所述故障核的实际数量,确定所述正常核的目标数量;determining the target number of the normal cores based on the actual number of the faulty cores;
基于所述正常核的目标数量,对所述目标芯片对应的算法编译结果进行分组处理,以获得所述当前分组结果;所述当前分组结果包括所述目标数量个编译结果分组,每个所述编译结果分组用于指示待映射到一个正常核执行的可执行文件。Based on the target number of the normal cores, grouping the algorithm compilation results corresponding to the target chips to obtain the current grouping result; the current grouping result includes the target number of compilation result groups, each of the The compilation result group is used to indicate the executable file to be mapped to a normal core execution.
在一些实施例中,所述获取目标芯片的故障处理核信息的步骤,包括:In some embodiments, the step of acquiring the fault handling core information of the target chip includes:
对所述目标芯片的一次性可编程存储器进行读取,得到所述目标芯片的故障处理核信息。The one-time programmable memory of the target chip is read to obtain fault processing core information of the target chip.
在一些实施例中,所述方法应用于目标芯片;所述故障处理核信息还包括故障核的绝对坐标;所述基于所述正常核的目标数量,对所述目标芯片对应的算法编译结果进行分组处理,以获得所述当前分组结果之后,还包括:In some embodiments, the method is applied to a target chip; the fault processing core information further includes absolute coordinates of the faulty core; the algorithm compilation result corresponding to the target chip is performed based on the target number of the normal cores After the grouping process to obtain the current grouping result, it also includes:
根据所述故障核的绝对坐标,确定所述正常核的绝对坐标;According to the absolute coordinates of the faulty core, determine the absolute coordinates of the normal core;
基于所述正常核的绝对坐标,将所述当前分组结果包括的目标数量个所述编译结果分组映射到所述正常核,其中,任意两个所述编译结果分组映射的所述正常核的绝对坐标互不相同。Based on the absolute coordinates of the normal cores, the target number of the compilation result groups included in the current grouping result are mapped to the normal cores, wherein the absolute coordinates of the normal cores mapped by any two of the compilation result groups are The coordinates are different from each other.
在一些实施例中,所述基于所述正常核的绝对坐标,将所述当前分组结果包括的目标数量个所述编译结果分组映射到所述正常核的步骤,包括:In some embodiments, the step of grouping a target number of the compilation results included in the current grouping result to the normal kernel based on the absolute coordinates of the normal kernel includes:
基于所述正常核的绝对坐标和所述正常核的计算能力参数,将所述当前分组结果包括的目标数量个所述编译结果分组映射到所述正常核。Based on the absolute coordinates of the normal cores and the computing capability parameter of the normal cores, a target number of the compilation result groups included in the current grouping result are grouped and mapped to the normal cores.
在一些实施例中,所述方法应用于目标芯片;所述方法还包括:In some embodiments, the method is applied to a target chip; the method further includes:
接收目标芯片外部的电子设备发送的所述算法编译结果。The algorithm compilation result sent by the electronic device outside the target chip is received.
在一些实施例中,所述方法应用于所述目标芯片外部的电子设备,所述方法还包括:In some embodiments, the method is applied to an electronic device external to the target chip, and the method further includes:
对所述目标芯片预备承载的算法进行编译,获得所述算法编译结果。Compile the algorithm to be carried by the target chip to obtain the algorithm compilation result.
在一些实施例中,所述方法应用于目标芯片外部的电子设备,所述基于所述故障处理核信息,对所述目标芯片对应的算法编译结果进行分组处理,以获得当前分组结果之后,所述方法还包括:In some embodiments, the method is applied to an electronic device outside the target chip, and the algorithm compilation result corresponding to the target chip is grouped based on the fault processing core information, so as to obtain the current grouping result, the The method also includes:
将所述当前分组结果和所述算法编译结果发送至所述目标芯片,以供所述目标芯片的正常核基于所述当前分组结果和所述算法编译结果实现预备承载的算法。The current grouping result and the algorithm compilation result are sent to the target chip, so that the normal core of the target chip implements the algorithm for preparing the bearer based on the current grouping result and the algorithm compilation result.
在一些实施例中,所述方法应用于目标芯片外部的电子设备,所述方法还包括:In some embodiments, the method is applied to an electronic device external to the target chip, and the method further includes:
基于多个目标芯片中每个目标芯片的故障处理核信息和各自对应的算法编译结果, 确定同类芯片;其中,多个目标芯片中故障处理核信息一致、且对应的算法编译结果一致的目标芯片称为同类芯片;Based on the fault processing core information of each target chip in the multiple target chips and the respective corresponding algorithm compilation results, determine the same type of chips; wherein, the fault processing core information in the multiple target chips is consistent and the corresponding algorithm compilation results are consistent. called the same chip;
所述基于所述故障处理核信息,对所述目标芯片对应的算法编译结果进行分组处理,以获得当前分组结果之后,所述方法还包括:After performing grouping processing on the algorithm compilation result corresponding to the target chip based on the fault processing core information to obtain the current grouping result, the method further includes:
将所述当前分组结果作为所述目标芯片的同类芯片所对应的当前分组结果。The current grouping result is used as the current grouping result corresponding to the same chip of the target chip.
在一些实施例中,所述方法应用于目标芯片外部的电子设备,所述故障处理核信息包括故障核的绝对坐标;所述基于所述正常核的目标数量,对所述目标芯片对应的算法编译结果进行分组处理,以获得所述当前分组结果之后,所述方法还包括:In some embodiments, the method is applied to an electronic device outside the target chip, the fault processing core information includes absolute coordinates of the faulty core; the algorithm corresponding to the target chip based on the target number of the normal cores After the compilation results are grouped to obtain the current grouping results, the method further includes:
根据所述故障核的绝对坐标,获取所述正常核的绝对坐标;Obtain the absolute coordinates of the normal core according to the absolute coordinates of the faulty core;
将编译结果分组与正常核的绝对坐标之间一一对应,得到编译结果分组与正常核的绝对坐标的对应关系;One-to-one correspondence between the compilation result grouping and the absolute coordinates of the normal core is obtained, and the corresponding relationship between the compilation result grouping and the absolute coordinates of the normal core is obtained;
基于编译结果分组与正常核的绝对坐标的对应关系,对所述目标芯片的路由进行路由编译,获得路由编译结果;Based on the corresponding relationship between the compilation result grouping and the absolute coordinates of the normal core, route compilation is performed on the route of the target chip, and the route compilation result is obtained;
将所述当前分组结果、所述路由编译结果和所述算法编译结果发送至所述目标芯片。Sending the current grouping result, the routing compilation result and the algorithm compilation result to the target chip.
第二方面,本公开实施例提供一种编译装置,包括:In a second aspect, an embodiment of the present disclosure provides a compiling apparatus, including:
获取模块,用于获取目标芯片的故障处理核信息;所述目标芯片包括多个处理核,所述多个处理核包括正常核和/或故障核;an acquisition module, configured to acquire fault processing core information of a target chip; the target chip includes multiple processing cores, and the multiple processing cores include normal cores and/or faulty cores;
决策模块,用于基于所述故障处理核信息和预设故障信息,确定所述目标芯片是否符合重分组条件;a decision-making module, configured to determine whether the target chip meets the regrouping condition based on the fault processing core information and the preset fault information;
处理模块,用于在所述目标芯片符合重分组条件的情况下,基于所述故障处理核信息,对所述目标芯片对应的算法编译结果进行分组处理,以获得当前分组结果,以使所述目标芯片的正常核基于所述当前分组结果和所述算法编译结果实现预备承载的算法;其中,所述算法编译结果包括与所述目标芯片预备承载的算法所对应的可执行文件。The processing module is configured to perform grouping processing on the algorithm compilation result corresponding to the target chip based on the fault processing core information under the condition that the target chip meets the regrouping condition, so as to obtain a current grouping result, so that the The normal core of the target chip implements the algorithm to be carried by the current grouping result and the algorithm compilation result; wherein the algorithm compilation result includes an executable file corresponding to the algorithm to be carried by the target chip.
第三方面,本公开实施例提供一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现本公开实施例任意一种编译方法。In a third aspect, an embodiment of the present disclosure provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the embodiment of the present disclosure when executing the computer program Either compilation method.
第四方面,本公开实施例提供一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现本公开实施例任意一种编译方法。In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements any one of the compilation methods in the embodiment of the present disclosure.
本公开实施例提供的编译方法能够提高芯片使用过程的灵活性,保证目标芯片的故障核不需要处理算法编译结果,进而有效避免出现目标芯片因为故障核而无法实现预备承载的算法的情况,能够有效提升芯片资源的利用率,降低芯片的制造成本。The compilation method provided by the embodiments of the present disclosure can improve the flexibility of the chip usage process, ensure that the faulty core of the target chip does not need to process the algorithm compilation result, and thus effectively avoid the situation that the target chip cannot implement the algorithm prepared for carrying due to the faulty core. Effectively improve the utilization of chip resources and reduce the manufacturing cost of chips.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。根据下面参考附图对示例性实施例的详细说明,本公开的其它特征及方面将变得清楚。It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the accompanying drawings.
附图说明Description of drawings
图1为本公开实施例提供的一种编译方法的流程图。FIG. 1 is a flowchart of a compilation method provided by an embodiment of the present disclosure.
图2为本公开实施例提供的一种分组处理方法的流程图。FIG. 2 is a flowchart of a grouping processing method provided by an embodiment of the present disclosure.
图3为本公开实施例提供的一种编译方法的流程图。FIG. 3 is a flowchart of a compilation method provided by an embodiment of the present disclosure.
图4为本公开实施例提供的一种应用于目标芯片的编译方法的流程图。FIG. 4 is a flowchart of a compilation method applied to a target chip according to an embodiment of the present disclosure.
图5为本公开实施例提供的一种应用于目标芯片的编译方法的流程图。FIG. 5 is a flowchart of a compiling method applied to a target chip according to an embodiment of the present disclosure.
图6为本公开实施例提供的一种应用于目标芯片的编译方法的示意图。FIG. 6 is a schematic diagram of a compilation method applied to a target chip according to an embodiment of the present disclosure.
图7为本公开实施例提供的一种应用于目标芯片的编译方法的示意图。FIG. 7 is a schematic diagram of a compilation method applied to a target chip according to an embodiment of the present disclosure.
图8为本公开实施例提供的一种应用于目标芯片外部的电子设备的编译方法的流程图。FIG. 8 is a flowchart of a compilation method applied to an electronic device outside a target chip according to an embodiment of the present disclosure.
图9为本公开实施例提供的一种应用于目标芯片外部的电子设备的编译方法的流程图。FIG. 9 is a flowchart of a compilation method applied to an electronic device outside a target chip according to an embodiment of the present disclosure.
图10为本公开实施例提供的应用于目标芯片外部的电子设备的编译方法的示意图。FIG. 10 is a schematic diagram of a compilation method applied to an electronic device outside a target chip according to an embodiment of the present disclosure.
图11为本公开实施例提供的应用于目标芯片外部的电子设备的编译方法的示意图。FIG. 11 is a schematic diagram of a compilation method applied to an electronic device outside a target chip according to an embodiment of the present disclosure.
图12为本公开实施例提供的应用于目标芯片外部的电子设备的编译方法的示意图。FIG. 12 is a schematic diagram of a compilation method applied to an electronic device outside a target chip according to an embodiment of the present disclosure.
图13为本公开实施例提供的一种应用于目标芯片外部的电子设备的编译方法的流程图。FIG. 13 is a flowchart of a compilation method applied to an electronic device outside a target chip according to an embodiment of the present disclosure.
图14为本公开实施例中的一种编译装置的示意图。FIG. 14 is a schematic diagram of a compiling apparatus in an embodiment of the disclosure.
图15为本公开实施例提供的一种电子设备的框图。FIG. 15 is a block diagram of an electronic device according to an embodiment of the present disclosure.
具体实施方式Detailed ways
下面结合附图和实施例对本公开作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本公开,而非对本公开的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本公开相关的部分而非全部结构。The present disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present disclosure, but not to limit the present disclosure. In addition, it should be noted that, for the convenience of description, the drawings only show some but not all structures related to the present disclosure.
第一方面,本公开实施例提供一种编译方法。In a first aspect, an embodiment of the present disclosure provides a compilation method.
本公开实施例的编译方法可由相应的编译装置执行,该装置可采用软件和/或硬件的方式实现,并一般可集成于电子设备中。该电子设备可以为目标芯片所在的电子设备,也可以为目标芯片外部的电子设备,本公开对此不作限制。The compiling method in the embodiment of the present disclosure may be executed by a corresponding compiling apparatus, which may be implemented in software and/or hardware, and may generally be integrated into an electronic device. The electronic device may be an electronic device where the target chip is located, or may be an electronic device outside the target chip, which is not limited in the present disclosure.
图1为本公开实施例提供的一种编译方法的流程图。参照图1,本公开实施例的编译方法包括:下述步骤S101-步骤S103。FIG. 1 is a flowchart of a compilation method provided by an embodiment of the present disclosure. Referring to FIG. 1 , the compiling method according to the embodiment of the present disclosure includes the following steps S101-S103.
步骤S101、获取目标芯片的故障处理核信息。Step S101 , acquiring fault processing core information of the target chip.
其中,目标芯片是包括多个处理核的芯片,例如众核芯片或多核芯片。目标芯片的多个处理核包括正常核和/或故障核。其中,故障核是目标芯片中由于各种原因故障或者暂时不能使用的处理核,该故障核例如:由于制造原因故障的处理核、在芯片使用过程中故障的处理核、由于过热或出错等原因暂时不能使用的处理核等;正常核是目标芯片中能够正常执行计算任务的处理核。需要说明的是,由于芯片的处理核路由不容易发生故障,因此,故障核虽然不具有计算能力,例如运行算法对应的可执行文件的能力,但 是故障核通常仍旧具有路由功能,即故障核仍旧可以传递信息。The target chip is a chip including multiple processing cores, such as a many-core chip or a multi-core chip. The multiple processing cores of the target chip include normal cores and/or faulty cores. The faulty core is a processing core in the target chip that is faulty or temporarily unavailable due to various reasons. The faulty core is, for example, a processing core that fails due to manufacturing reasons, a processing core that fails during the use of the chip, or a processing core that fails due to overheating or errors. A processing core that cannot be used temporarily; a normal core is a processing core in the target chip that can normally perform computing tasks. It should be noted that, since the processing core routing of the chip is not prone to failure, although the faulty core does not have the computing power, such as the ability to run the executable file corresponding to the algorithm, the faulty core usually still has the routing function, that is, the faulty core still has the routing function. information can be delivered.
目标芯片的故障处理核信息是指目标芯片中故障核的信息。该故障处理核信息包括:故障核的实际数量、故障核在目标芯片中的绝对坐标、故障核的身份标识(Identity Document,ID)等信息。The fault processing core information of the target chip refers to the information of the fault core in the target chip. The fault handling core information includes: the actual number of faulty cores, the absolute coordinates of the faulty core in the target chip, the identity document (ID) of the faulty core and other information.
目标芯片在制造生产完成后,该目标芯片包括的处理核的总数量、各个处理核的绝对坐标和身份标识等处理核信息均已经确定,并且,这些信息会被写入目标芯片的存储器中,例如写入一次性可编程存储器(efuse)中。目标芯片的存储器中还存储有该目标芯片的基本信息,例如目标芯片可使用电源电压、版本号、生产日期等信息。After the target chip is manufactured and produced, the processing core information such as the total number of processing cores included in the target chip, the absolute coordinates and identification of each processing core have been determined, and these information will be written into the memory of the target chip. For example, write into one-time programmable memory (efuse). Basic information of the target chip is also stored in the memory of the target chip, for example, information such as power supply voltage, version number, production date, etc. that can be used by the target chip.
在一些实施例中,目标芯片在制造完成后,通常还需要对目标芯片进行测试。通过对目标芯片的测试过程,能够确定出该目标芯片的故障处理核信息(例如故障核的实际数量、故障核在目标芯片中的绝对坐标、故障核的ID等),该目标芯片的故障处理核信息被写入该目标芯片的存储器中,例如写入目标芯片的efuse中。In some embodiments, after the target chip is fabricated, the target chip usually needs to be tested. Through the testing process of the target chip, it is possible to determine the fault processing core information of the target chip (such as the actual number of faulty cores, the absolute coordinates of the faulty core in the target chip, the ID of the faulty core, etc.), the fault processing of the target chip The core information is written into the memory of the target chip, eg, into the efuse of the target chip.
在一个实施方式中,获取目标芯片的故障处理核信息的步骤(上述步骤S101),包括:对目标芯片的一次性可编程存储器进行读取,得到该目标芯片的故障处理核信息。In one embodiment, the step of acquiring the fault handling core information of the target chip (step S101 above) includes: reading the one-time programmable memory of the target chip to obtain the fault handling core information of the target chip.
步骤S102、基于故障处理核信息和预设故障信息,确定目标芯片是否符合重分组条件。Step S102 , based on the fault processing core information and the preset fault information, determine whether the target chip meets the regrouping condition.
其中,预设故障信息是预设的目标芯片的故障核的信息。该预设故障信息包括处理核故障率、故障核的预设数量、故障核的预设坐标等一种或多种信息。Wherein, the preset fault information is preset information of faulty cores of the target chip. The preset failure information includes one or more kinds of information, such as a processing core failure rate, a preset number of faulty cores, and preset coordinates of the faulty cores.
在一些实施例中,可以基于目标芯片的特点设置该预设故障信息。该目标芯片的特点例如制造该目标芯片的过程中是否容易出现处理核故障、制造目标芯片的制造工艺是否复杂等。以制造目标芯片的制造工艺是否复杂为例进行说明:在制造目标芯片的制造工艺简单的情况下,该预设故障信息中处理核故障率或者故障核的预设数量等参数值可以设置的小一些,如处理核故障率可以设置为5%,或者,在目标芯片包括100个处理核的情况下,故障核的预设数量可以为5个;在制造目标芯片的制造工艺复杂的情况下,该预设故障信息中故障核预设占比或者故障核的预设数量等参数值可以设置的大一些,如处理核故障率可以设置为10%,或者,在目标芯片包括100个处理核的情况下,故障核的预设数量可以为10个。In some embodiments, the preset fault information can be set based on the characteristics of the target chip. The characteristics of the target chip are, for example, whether a processing core failure is likely to occur in the process of manufacturing the target chip, whether the manufacturing process for manufacturing the target chip is complicated, and the like. Take the manufacturing process of manufacturing the target chip as an example to illustrate: in the case of a simple manufacturing process for manufacturing the target chip, the parameter values such as the processing core failure rate or the preset number of faulty cores in the preset fault information can be set to a small value. Some, such as the processing core failure rate can be set to 5%, or, in the case that the target chip includes 100 processing cores, the preset number of faulty cores can be 5; in the case of complex manufacturing processes for the target chip, Parameter values such as the preset proportion of faulty cores or the preset number of faulty cores in the preset fault information can be set larger, for example, the processing core fault rate can be set to 10%, or, if the target chip includes 100 processing cores In this case, the preset number of faulty cores can be 10.
在一个实施方式中,在目标芯片的设计阶段确定该目标芯片的预设故障信息之后,可以基于预设故障信息,对目标芯片对应的算法编译结果进行分组处理,以获得预设分组结果。In one embodiment, after the preset fault information of the target chip is determined in the design stage of the target chip, the algorithm compilation result corresponding to the target chip may be grouped based on the preset fault information to obtain the preset grouping result.
其中,算法编译结果包括与目标芯片预备承载的算法所对应的可执行文件(如二进制可执行文件)。目标芯片预备承载的算法是指预备在该目标芯片上实现的算法,该算法是解决问题的方法及流程,是一段逻辑,而目标芯片则是实际执行解决问题的方法与流程的物理设备。将该预备承载的算法变为可执行文件的过程就是对该预备承载的算法进行编译的过程。The algorithm compilation result includes an executable file (eg, a binary executable file) corresponding to the algorithm prepared to be carried by the target chip. The algorithm to be carried by the target chip refers to the algorithm to be implemented on the target chip. The algorithm is a method and process for solving a problem, and it is a piece of logic, while the target chip is a physical device that actually implements the method and process for solving the problem. The process of converting the pre-hosted algorithm into an executable file is the process of compiling the pre-hosted algorithm.
目标芯片可以通过运行预备承载的算法所对应的可执行文件来实现该预备承载的 算法。由于目标芯片是包括多个处理核的芯片,最终执行算法所对应的可执行文件的是目标芯片的多个处理核。因此,本实施方式中,通过在芯片设计阶段预估一定的处理核故障率或者故障核预设数量,然后基于预设故障信息,对包括该可执行文件的算法编译结果进行分组处理,将该算法编译结果分为多个编译结果分组,每个编译结果分组用于指示待映射到一个正常核执行的可执行文件,能够便于目标芯片的多个处理核中预设的正常核基于预设分组结果和算法编译结果实现预备承载的算法,保证目标芯片的多个处理核中存在一定故障的情况下,针对该目标芯片对应的算法编译结果的预设分组结果依然可以使用,能够提升目标芯片的使用率,减少目标芯片资源的浪费,同时也减少芯片制造的成本。The target chip can implement the pre-carried algorithm by running the executable file corresponding to the pre-carried algorithm. Since the target chip is a chip including multiple processing cores, it is the multiple processing cores of the target chip that finally execute the executable file corresponding to the algorithm. Therefore, in this embodiment, by estimating a certain processing core failure rate or a preset number of faulty cores in the chip design stage, and then grouping the algorithm compilation results including the executable file based on the preset failure information, the The algorithm compilation result is divided into multiple compilation result groups, and each compilation result group is used to indicate the executable file to be mapped to a normal core for execution, which can facilitate the preset normal cores in the multiple processing cores of the target chip based on the preset grouping The result and the algorithm compilation result implement the algorithm for preparatory bearing, and ensure that in the case of certain faults in the multiple processing cores of the target chip, the preset grouping results of the algorithm compilation result corresponding to the target chip can still be used, which can improve the performance of the target chip. The utilization rate is reduced, the waste of target chip resources is reduced, and the cost of chip manufacturing is also reduced.
重分组条件包括是否需要再次对目标芯片对应的算法编译结果进行分组处理的条件。需要说明的是,由于故障处理核的预设数量是根据目标芯片的特点来确定的,也就是说,对于批量制造的多个目标芯片,大部分的目标芯片的故障核的实际数量都可能为预设数量,即预设分组结果可以作为大部分目标芯片的分组结果,大大减少了芯片的编译工作量,节省了芯片的计算资源。但是,在实际的应用过程中,预设故障信息与目标芯片的故障处理核信息也可能存在差异。在很多预设故障信息与故障处理核信息存在差异情况中,目标芯片无法基于预设分组结果和算法编译结果实现预备承载的算法,目标芯片可能会被抛弃,依旧会造成芯片资源的浪费。因此,为了进一步提升目标芯片的使用率,减少目标芯片资源的浪费,降低目标芯片制造成本,需要对算法编译结果重新进行分组处理。The regrouping condition includes whether it is necessary to perform grouping processing on the algorithm compilation result corresponding to the target chip again. It should be noted that, since the preset number of fault processing cores is determined according to the characteristics of the target chip, that is to say, for multiple target chips manufactured in batches, the actual number of fault cores of most target chips may be The preset number, that is, the preset grouping result can be used as the grouping result of most target chips, which greatly reduces the compilation workload of the chip and saves the computing resources of the chip. However, in an actual application process, there may be differences between the preset fault information and the fault processing core information of the target chip. In many cases where there is a difference between the preset fault information and the fault processing core information, the target chip cannot implement the pre-loading algorithm based on the preset grouping results and algorithm compilation results, and the target chip may be discarded, which will still cause a waste of chip resources. Therefore, in order to further improve the utilization rate of the target chip, reduce the waste of target chip resources, and reduce the manufacturing cost of the target chip, it is necessary to regroup the algorithm compilation results.
在一个实施方式中,上述基于故障处理核信息和预设故障信息,确定目标芯片是否符合重分组条件的步骤(上述步骤S102),包括:In one embodiment, the above-mentioned step of determining whether the target chip meets the regrouping condition based on the fault processing core information and the preset fault information (the above-mentioned step S102 ) includes:
确定故障处理核信息中故障核的实际数量是否大于预设故障信息中故障核的预设数量。在故障核的实际数量大于故障核的预设数量的情况下,确定目标芯片符合重分组条件;在故障核的实际数量小于或等于故障核的预设数量的情况下,确定目标芯片不符合重分组条件。Determine whether the actual number of faulty cores in the fault handling core information is greater than the preset number of faulty cores in the preset fault information. When the actual number of faulty cores is greater than the preset number of faulty cores, it is determined that the target chip meets the regrouping condition; when the actual number of faulty cores is less than or equal to the preset number of faulty cores, it is determined that the target chip does not meet the regrouping condition. grouping conditions.
其中,故障处理核信息中故障核的实际数量大于预设故障信息中故障核的预设数量,说明目标芯片中处理核的故障率要高于预期情况,目标芯片无法基于预设分组结果和算法编译结果实现预备承载的算法。因此,故障核的实际数量大于故障核的预设数量的情况下,确定目标芯片符合重分组条件。Among them, the actual number of faulty cores in the fault processing core information is greater than the preset number of faulty cores in the preset fault information, indicating that the failure rate of the processing cores in the target chip is higher than expected, and the target chip cannot be based on the preset grouping results and algorithms. The compilation result implements the algorithm for preparing the bearer. Therefore, when the actual number of faulty cores is greater than the preset number of faulty cores, it is determined that the target chip meets the regrouping condition.
故障处理核信息中故障核的实际数量小于或等于预设故障信息中故障核的预设数量,说明目标芯片中处理核的故障率不高于预期情况,目标芯片能够基于预设分组结果和算法编译结果实现预备承载的算法,因此,无需对算法编译结果重新进行分组,即确定目标芯片不符合重分组条件。The actual number of faulty cores in the fault processing core information is less than or equal to the preset number of faulty cores in the preset fault information, indicating that the failure rate of the processing cores in the target chip is not higher than expected, and the target chip can be based on the preset grouping results and algorithms. The compilation result implements the algorithm for preparing the bearer. Therefore, it is not necessary to regroup the algorithm compilation result, that is, it is determined that the target chip does not meet the regrouping condition.
在一个实施场景中,目标芯片有100个处理核,预估该目标芯片的处理核故障率为5%,即预估目标芯片100个处理核中预估有5个处理核故障,95个正常核。在目标芯片的故障核的实际数量小于或等于5个的情况下,目标芯片中正常核的实际数量大于或 等于95个,目标芯片中95个正常核依旧能基于预设分组结果和算法编译结果实现预备承载的算法,该目标芯片依旧可以继续使用,即确定目标芯片不符合重分组条件。在目标芯片的故障核的实际数量大于5个的情况下,目标芯片中正常核的实际数量小于95个,无法基于预设分组结果和算法编译结果实现预备承载的算法,该目标芯片当前无法继续使用,需要对目标芯片对应的算法编译结果进行重新分组,即确定目标芯片符合重分组条件。In an implementation scenario, the target chip has 100 processing cores, and the estimated processing core failure rate of the target chip is 5%, that is, it is estimated that among the 100 processing cores of the target chip, 5 processing cores are faulty and 95 are normal. nuclear. When the actual number of faulty cores in the target chip is less than or equal to 5, the actual number of normal cores in the target chip is greater than or equal to 95, and the 95 normal cores in the target chip can still be compiled based on the preset grouping results and algorithm results After implementing the algorithm for preparing the bearer, the target chip can still be used continuously, that is, it is determined that the target chip does not meet the regrouping conditions. When the actual number of faulty cores in the target chip is greater than 5, and the actual number of normal cores in the target chip is less than 95, the pre-loading algorithm cannot be implemented based on the preset grouping results and algorithm compilation results, and the target chip cannot continue For use, the algorithm compilation result corresponding to the target chip needs to be regrouped, that is, it is determined that the target chip meets the regrouping condition.
在另一个实施方式中,上述基于故障处理核信息和预设故障信息,确定目标芯片是否符合重分组条件的步骤(上述步骤S102),包括:In another embodiment, the above-mentioned step of determining whether the target chip meets the regrouping condition based on the fault processing core information and the preset fault information (the above-mentioned step S102 ) includes:
确定故障处理核信息中故障核的实际数量与预设故障信息中故障核的预设数量是否一致。在故障核的实际数量与故障核的预设数量不一致的情况下,确定目标芯片符合重分组条件;在故障核的实际数量与故障核的预设数量一致的情况下,确定目标芯片不符合重分组条件。Determine whether the actual number of fault cores in the fault handling core information is consistent with the preset number of fault cores in the preset fault information. When the actual number of faulty cores is inconsistent with the preset number of faulty cores, it is determined that the target chip meets the regrouping conditions; when the actual number of faulty cores is consistent with the preset number of faulty cores, it is determined that the target chip does not meet the regrouping conditions. grouping conditions.
其中,故障核的实际数量与故障核的预设数量不一致,说明目标芯片的多个处理核中出现故障的情况与预设的故障情况出现差异。为提高目标芯片中处理核的使用率,在目标芯片的多个处理核中出现故障的情况与预设的故障情况出现差异的情况下,即可对该目标芯片对应的算法编译结果重新进行分组处理。在故障核的实际数量与故障核的预设数量一致的情况下,说明目标芯片的多个处理核中出现故障的情况与预设的故障情况没有任何差异,能够在保证处理核的使用率的情况下,基于预设分组结果和算法编译结果实现预备承载的算法。Wherein, the actual number of faulty cores is inconsistent with the preset number of faulty cores, which indicates that there is a difference between the fault situation in the multiple processing cores of the target chip and the preset fault situation. In order to improve the utilization rate of the processing cores in the target chip, in the case where there is a difference between the fault conditions in the multiple processing cores of the target chip and the preset fault conditions, the algorithm compilation results corresponding to the target chip can be regrouped deal with. In the case where the actual number of faulty cores is consistent with the preset number of faulty cores, it means that there is no difference between the faults in the multiple processing cores of the target chip and the preset faults, and the utilization rate of the processing cores can be ensured. In this case, the algorithm for preparing the bearer is implemented based on the preset grouping result and the algorithm compilation result.
在一个实施场景中,目标芯片有100个处理核,预估该目标芯片的处理核故障率为5%,即预估目标芯片100个处理核中预估有5个处理核故障,95个正常核。由于预设分组结果是基于预设故障信息获得的,因此,实际上只需要目标芯片中的95个正常核就能基于预设分组结果和算法编译结果实现预备承载的算法。在故障核的实际数量与故障核的预设数量不一致的情况下,例如,在目标芯片的故障核的实际数量为2的情况下,此时目标芯片中正常核的实际数量为98个,但实现目标芯片预备承载的算法只需要用到其中95个正常核。因此,为了提高处理核的使用率,可以重新对目标芯片对应的算法编译结果进行重新分组。In an implementation scenario, the target chip has 100 processing cores, and the estimated processing core failure rate of the target chip is 5%, that is, it is estimated that among the 100 processing cores of the target chip, 5 processing cores are faulty and 95 are normal. nuclear. Since the preset grouping result is obtained based on the preset fault information, in fact, only 95 normal cores in the target chip are needed to implement the algorithm for preparing the bearer based on the preset grouping result and the algorithm compilation result. When the actual number of faulty cores is inconsistent with the preset number of faulty cores, for example, when the actual number of faulty cores in the target chip is 2, the actual number of normal cores in the target chip is 98, but Only 95 normal cores need to be used to realize the algorithm that the target chip is ready to carry. Therefore, in order to improve the utilization rate of the processing cores, the algorithm compilation results corresponding to the target chip can be regrouped.
本实施例提供的确定目标芯片是否符合重分组条件的两种的方式优点不同。通过故障核的实际数量与预设数量的大小关系来确定目标芯片是否符合重分组条件的方式,相比于通过故障核的实际数量与预设数量是否一致来确定目标芯片是否符合重分组条件的方式,能够进一步减少芯片的编译工作量,节省芯片的计算资源。通过故障核的实际数量与预设数量是否一致来确定目标芯片是否符合重分组条件的方式,相比于通过故障核的实际数量与预设数量的大小关系来确定目标芯片是否符合重分组条件的方式,能够提高目标芯片中处理核的使用率。因此,实际应用过程中,可以基于具体场景选择合适的确定目标芯片是否符合重分组条件的方式。The advantages of the two methods for determining whether the target chip meets the regrouping condition provided by this embodiment are different. The method of determining whether the target chip meets the regrouping conditions according to the relationship between the actual number of faulty cores and the preset number is compared with the method of determining whether the target chip meets the regrouping conditions by whether the actual number of faulty cores is consistent with the preset number. In this way, the compilation workload of the chip can be further reduced, and the computing resources of the chip can be saved. The method of determining whether the target chip meets the regrouping conditions by whether the actual number of faulty cores is consistent with the preset number is compared with the method of determining whether the target chip meets the regrouping conditions through the relationship between the actual number of faulty cores and the preset number. In this way, the utilization rate of the processing cores in the target chip can be improved. Therefore, in the actual application process, an appropriate method for determining whether the target chip meets the regrouping condition can be selected based on a specific scenario.
步骤S103、在目标芯片符合重分组条件的情况下,基于故障处理核信息,对目标 芯片对应的算法编译结果进行分组处理,以获得当前分组结果,以使目标芯片的正常核基于当前分组结果和算法编译结果实现预备承载的算法。Step S103, in the case that the target chip meets the regrouping condition, based on the fault processing core information, perform grouping processing on the algorithm compilation result corresponding to the target chip to obtain the current grouping result, so that the normal core of the target chip is based on the current grouping result and The algorithm compilation result implements the algorithm for preparing the bearer.
其中,该故障处理核信息包括:故障核的实际数量、故障核在目标芯片中的绝对坐标、故障核的身份标识(Identity Document,ID)等信息。The fault processing core information includes: the actual number of faulty cores, the absolute coordinates of the faulty core in the target chip, the identity document (ID) of the faulty core and other information.
算法编译结果包括与目标芯片预备承载的算法所对应的可执行文件(如二进制可执行文件)。The algorithm compilation result includes executable files (eg, binary executable files) corresponding to the algorithms prepared to be carried by the target chip.
对算法编译结果进行分组处理就是将算法编译结果分为多个编译结果分组,当前分组结果是对算法编译结果进行分组的分组结果。目标芯片对应的当前分组结果就是将该目标芯片对应的算法编译结果分为该目标芯片的正常核可以执行的编译结果。The grouping processing of the algorithm compilation results is to divide the algorithm compilation results into multiple compilation result groups, and the current grouping result is the grouping result of grouping the algorithm compilation results. The current grouping result corresponding to the target chip is the compilation result of the algorithm corresponding to the target chip divided into the compilation result that can be executed by the normal core of the target chip.
目标芯片预备承载的算法是指预备在该目标芯片上实现的算法,该算法是解决问题的方法及流程,是一段逻辑,而目标芯片则是实际执行解决问题的方法与流程的物理设备。将该预备承载的算法变为可执行文件的过程就是对该预备承载的算法进行编译的过程。The algorithm to be carried by the target chip refers to the algorithm to be implemented on the target chip. The algorithm is a method and process for solving a problem, and it is a piece of logic, while the target chip is a physical device that actually implements the method and process for solving the problem. The process of converting the pre-hosted algorithm into an executable file is the process of compiling the pre-hosted algorithm.
图2为本公开实施例提供的一种分组处理方法的流程图。在一个实施方式中,参照图2,上述对目标芯片对应的算法编译结果进行分组处理,以获得当前分组结果的步骤,包括:下述步骤S201-步骤S202。FIG. 2 is a flowchart of a grouping processing method provided by an embodiment of the present disclosure. In one embodiment, referring to FIG. 2 , the above-mentioned steps of performing grouping processing on the algorithm compilation result corresponding to the target chip to obtain the current grouping result include the following steps S201-S202.
步骤S201、基于故障核的实际数量,确定正常核的目标数量。Step S201: Determine the target number of normal cores based on the actual number of faulty cores.
其中,正常核的目标数量为目标芯片中处理核的总数量与故障核的实际数量之差。The target number of normal cores is the difference between the total number of processing cores in the target chip and the actual number of faulty cores.
步骤S202、基于正常核的目标数量,对目标芯片对应的算法编译结果进行分组处理,以获得当前分组结果。Step S202: Based on the target number of normal cores, perform grouping processing on the algorithm compilation result corresponding to the target chip to obtain the current grouping result.
其中,当前分组结果包括目标数量个编译结果分组,每个编译结果分组用于指示待映射到一个正常核执行的可执行文件。The current grouping result includes a target number of compilation result groups, and each compilation result group is used to indicate an executable file to be mapped to a normal core for execution.
在本实施方式中,算法编译结果包括与目标芯片预备承载的算法所对应的可执行文件,目标芯片可以通过运行预备承载的算法所对应的可执行文件来实现该预备承载的算法。由于目标芯片是包括多个处理核的芯片,最终执行算法所对应的可执行文件的是目标芯片的多个处理核中的正常处理核。因此,在本实施方式中,对目标芯片对应的算法编译结果进行分组处理(或者说折叠处理)就是将算法编译结果划分为供目标数量的正常核执行的编译结果分组。In this embodiment, the algorithm compilation result includes an executable file corresponding to the algorithm prepared to be carried by the target chip, and the target chip can implement the algorithm to be carried by running the executable file corresponding to the algorithm prepared to be carried. Since the target chip is a chip including multiple processing cores, the executable file corresponding to the algorithm is finally executed by a normal processing core among the multiple processing cores of the target chip. Therefore, in this embodiment, performing grouping processing (or folding processing) on the algorithm compilation results corresponding to the target chip is to divide the algorithm compilation results into compilation result groups for execution by the target number of normal cores.
在一些实施例中,算法编译结果可以包括多个数量(例如第一数量)的处理核执行的编译结果。在一般情况下,该第一数量大于上述正常核的目标数量,分组处理可以将多个数量(例如第一数量)的处理核执行的编译结果进行分组,被分为同一组的编译结果由目标芯片的一个正常核来执行。例如,目标芯片对应的算法编译结果包括供500个处理核执行的可执行文件,目标芯片有100个处理核,包括6个故障的处理核和94个未故障的处理核。则对算法编译结果进行分组处理,将其分为94个编译结果分组,每个编译结果分组对应的可执行文件由一个正常核来执行。In some embodiments, the algorithm compilation results may include compilation results performed by a plurality of numbers (eg, a first number) of processing cores. In general, the first number is greater than the target number of the above-mentioned normal cores, and the grouping process may group the compilation results performed by a plurality of (for example, the first number) processing cores, and the compilation results that are grouped into the same group are determined by the target A normal core of the chip to execute. For example, the algorithm compilation result corresponding to the target chip includes executable files for execution by 500 processing cores, and the target chip has 100 processing cores, including 6 faulty processing cores and 94 non-faulty processing cores. Then, the algorithm compilation result is grouped and divided into 94 compilation result groups, and the executable file corresponding to each compilation result group is executed by a normal core.
本公开实施例提供的编译方法,首先获取目标芯片的故障处理核信息,该目标芯片 包括多个处理核,多个处理核包括正常核和/或故障核;然后基于故障处理核信息和预设故障信息,确定目标芯片是否符合重分组条件;在目标芯片符合重分组条件的情况下,基于故障处理核信息,对目标芯片对应的算法编译结果进行分组处理,获得当前分组结果,以使目标芯片的正常核基于当前分组结果和算法编译结果实现预备承载的算法,能够提高芯片使用过程的灵活性,保证目标芯片的故障核不需要处理算法编译结果,进而有效避免出现目标芯片因为故障核而无法实现预备承载的算法的情况,有效提升芯片资源的利用率,降低芯片的制造成本。The compilation method provided by the embodiment of the present disclosure firstly acquires fault processing core information of a target chip, where the target chip includes multiple processing cores, and the multiple processing cores include normal cores and/or faulty cores; then, based on the fault processing core information and a preset The fault information is used to determine whether the target chip meets the regrouping conditions; if the target chip meets the regrouping conditions, based on the fault processing core information, the algorithm compilation results corresponding to the target chip are grouped to obtain the current grouping results, so that the target chip Based on the current grouping results and algorithm compilation results, the normal core implements the algorithm for preparing the bearer, which can improve the flexibility of the chip usage process and ensure that the faulty core of the target chip does not need to process the algorithm compilation result, thereby effectively avoiding the target chip. The implementation of the algorithm for pre-loading can effectively improve the utilization rate of chip resources and reduce the manufacturing cost of the chip.
图3为本公开实施例提供的一种编译方法的流程图。在一个实施方式中,参照图3,该编译方法还包括下述步骤S104。FIG. 3 is a flowchart of a compilation method provided by an embodiment of the present disclosure. In one embodiment, referring to FIG. 3 , the compiling method further includes the following step S104.
步骤S104、在目标芯片不符合重分组条件的情况下,将预设分组结果作为当前分组结果,以使目标芯片的正常核基于当前分组结果和算法编译结果实现预备承载的算法。Step S104 , in the case that the target chip does not meet the regrouping conditions, use the preset grouping result as the current grouping result, so that the normal core of the target chip implements the algorithm for preparing the bearer based on the current grouping result and the algorithm compilation result.
其中,目标芯片不符合重分组条件,说明目标芯片的正常核能够基于预设分组结果和算法编译结果实现预备承载的算法。因此,可以不对算法编译结果进行重新分组,而是直接将预设分组结果作为当前分组结果,以使目标芯片的正常核基于当前分组结果和算法编译结果实现预备承载的算法,加快该算法在目标芯片上的实现过程。Wherein, the target chip does not meet the regrouping conditions, which means that the normal core of the target chip can implement the algorithm for preparing the bearer based on the preset grouping result and the algorithm compilation result. Therefore, it is not necessary to regroup the algorithm compilation results, but directly use the preset grouping results as the current grouping results, so that the normal core of the target chip can implement the preparatory bearer algorithm based on the current grouping results and the algorithm compilation results, and speed up the implementation of the algorithm in the target The implementation process on the chip.
需要说明的是,由于故障核的预设数量是根据目标芯片的特点来确定的,也就是说,在批量制造的多个目标芯片中,大部分的目标芯片的故障核的数量都可能为预设数量,即大部分的目标芯片不符合重分组条件。预设分组结果可以作为大部分目标芯片的当前分组结果,能够大大减少芯片的编译工作量。It should be noted that, since the preset number of faulty cores is determined according to the characteristics of the target chip, that is to say, in the batch-manufactured multiple target chips, the number of faulty cores of most of the target chips may be the predetermined number. Set the number, that is, most of the target chips do not meet the regrouping conditions. The preset grouping result can be used as the current grouping result of most target chips, which can greatly reduce the compilation workload of the chip.
在一个实施方式中,在设置预设故障信息的过程中,可以设置多种不同的预设故障信息,例如设置多种故障核的预设数量不同的预设故障信息。In one embodiment, in the process of setting the preset fault information, a variety of different preset fault information can be set, for example, preset fault information with different preset numbers of multiple fault cores can be set.
基于每一种预设故障信息,对目标芯片对应的算法编译结果进行分组处理,获得多种预设分组结果。Based on each preset fault information, the algorithm compilation result corresponding to the target chip is grouped to obtain multiple preset grouping results.
在上述基于故障处理核信息和预设故障信息,确定目标芯片是否符合重分组条件的步骤中,若目标芯片针对多种不同的预设故障信息中某一种预设故障信息不符合重分组条件,则确定该目标芯片不符合重分组条件,若目标芯片针对全部预设故障信息均符合重分组条件,则确定该目标芯片符合重分组条件。其中,确定目标芯片是否符合重分组条件的步骤参见前述实施例,此处不再赘述。In the above step of determining whether the target chip meets the regrouping condition based on the fault processing core information and the preset fault information, if the target chip does not meet the regrouping condition for a certain preset fault information among a variety of different preset fault information , it is determined that the target chip does not meet the regrouping condition, and if the target chip meets the regrouping condition for all preset fault information, it is determined that the target chip meets the regrouping condition. The step of determining whether the target chip meets the regrouping condition may refer to the foregoing embodiments, which will not be repeated here.
其中,在目标芯片针对第一预设故障信息不符合重分组条件时,从多个预设分组结果中提取该第一预设故障信息对应的第一预设分组结果,并将该第一预设分组结果作为目标芯片的当前分组结果。Wherein, when the target chip does not meet the regrouping condition for the first preset fault information, extracts the first preset grouping result corresponding to the first preset fault information from a plurality of preset grouping results, and assigns the first preset fault information to the Set the grouping result as the current grouping result of the target chip.
本实施方式中,通过在芯片设计阶段预估多种不同的预设故障信息,保证目标芯片的多个处理核中存在一定故障的情况下,针对该目标芯片对应的算法编译结果的预设分组结果依然可以使用,能够提升目标芯片的使用率,减少目标芯片资源的浪费,同时也减少芯片制造的成本。In this embodiment, by estimating a variety of different preset fault information in the chip design stage, it is ensured that in the case of a certain fault in the multiple processing cores of the target chip, the preset grouping of the algorithm compilation results corresponding to the target chip The result can still be used, which can improve the utilization rate of the target chip, reduce the waste of target chip resources, and also reduce the cost of chip manufacturing.
图4为本公开实施例提供的一种应用于目标芯片的编译方法的流程图。在一个实施 方式中,参照图4,该方法应用于目标芯片,上述基于所述正常核的目标数量,对所述目标芯片对应的算法编译结果进行分组处理,以获得所述当前分组结果(步骤S103)之后,该编译方法还包括:下述步骤S401-步骤S402。FIG. 4 is a flowchart of a compilation method applied to a target chip according to an embodiment of the present disclosure. In one embodiment, referring to FIG. 4 , the method is applied to a target chip, and based on the target number of the normal cores, the algorithm compilation result corresponding to the target chip is grouped to obtain the current grouping result (step After S103), the compiling method further includes: the following steps S401-S402.
步骤S401、根据故障核的绝对坐标,确定正常核的绝对坐标。Step S401 , according to the absolute coordinates of the faulty core, determine the absolute coordinates of the normal core.
其中,故障处理核信息还包括故障核的绝对坐标。The fault processing core information further includes the absolute coordinates of the fault core.
在一些实施例中,目标芯片中具有计算能力的单元,如芯片的ARM(Advanced RISC Machine,进阶精简指令集机器)或APU(Accelerated Processing Unit,加速处理器),从故障处理核信息中提取故障核的绝对坐标,并根据该目标芯片各个处理核的绝对坐标,确定出正常核的绝对坐标,其中,目标芯片各个处理核的绝对坐标存储在目标芯片的efuse中。In some embodiments, a unit with computing capability in the target chip, such as the chip's ARM (Advanced RISC Machine) or APU (Accelerated Processing Unit, accelerated processor), extracts the information from the fault processing core The absolute coordinates of the faulty core are determined, and the absolute coordinates of the normal cores are determined according to the absolute coordinates of each processing core of the target chip, wherein the absolute coordinates of each processing core of the target chip are stored in the efuse of the target chip.
步骤S402、基于正常核的绝对坐标,将当前分组结果包括的目标数量个编译结果分组映射到正常核,其中,任意两个编译结果分组映射的正常核的绝对坐标互不相同。Step S402 , based on the absolute coordinates of the normal cores, group-map the target number of compilation results included in the current grouping result to the normal cores, wherein the absolute coordinates of the normal cores mapped by any two compilation result groups are different from each other.
其中,当前分组结果是对算法编译结果进行分组的分组结果,对目标芯片对应的算法编译结果进行分组处理就是将算法编译结果分为目标芯片的多个正常核可以执行的编译结果。由于目标芯片是集成了多个处理核的芯片,最终执行算法编译结果(即可执行文件)的是目标芯片的处理核,因此在获取当前分组结果之后,需要将当前分组结果包括的目标数量个编译结果分组映射到正常核。但是在该当前分组结果中,每一个编译结果分组指示该组可执行文件待映射到哪一个正常核执行并没有确定,因此,获得当前分组结果之后,目标芯片的ARM或APU可以基于正常核的绝对坐标确定将当前分组结果中每个编译结果分组分别映射到哪一个正常核执行。The current grouping result is a grouping result of grouping the algorithm compilation results, and grouping the algorithm compilation results corresponding to the target chip is to divide the algorithm compilation results into compilation results that can be executed by multiple normal cores of the target chip. Since the target chip is a chip that integrates multiple processing cores, the final execution algorithm compilation result (that is, the executable file) is the processing core of the target chip. Therefore, after obtaining the current grouping result, the target number included in the current grouping result needs to be The compilation results are grouped and mapped to normal cores. However, in the current grouping result, each compilation result grouping indicates that the group of executable files is to be mapped to which normal core for execution is not determined. Therefore, after obtaining the current grouping result, the ARM or APU of the target chip can be based on the normal core. The absolute coordinates determine to which normal core execution each compilation result grouping in the current grouping result is mapped to.
在一个实施场景中,目标芯片有100个处理核,包括6个故障核和94个正常核,则当前分组结果当前分组结果包括94个编译结果分组,每个编译结果分组用于指示待映射到一个正常核执行的可执行文件。上述基于正常核的绝对坐标,将当前分组结果包括的目标数量个编译结果分组映射到正常核的过程,就是为当前分组结果中每个编译结果分组分配一个确定的绝对坐标对应的正常核,例如,为第一个编译结果分组分配绝对坐标为(1,1)的正常核,则该第一个编译结果分组用于指示待映射到绝对坐标为(1,1)的正常核执行的可执行文件;为第二个编译结果分组分配绝对坐标为(1,2)的正常核,则该第二个编译结果分组用于指示待映射到绝对坐标为(1,2)的正常核执行的可执行文件。以此类推,可实现各个编译结果分组的映射过程。In an implementation scenario, the target chip has 100 processing cores, including 6 faulty cores and 94 normal cores, then the current grouping result The current grouping result includes 94 compilation result groups, and each compilation result group is used to indicate to be mapped to An executable file for normal kernel execution. The above-mentioned process of mapping the target number of compilation result groups included in the current grouping result to the normal kernel based on the absolute coordinates of the normal kernel is to assign a normal kernel corresponding to a certain absolute coordinate to each compilation result group in the current grouping result, for example , assign the normal core with absolute coordinates (1,1) to the first compilation result group, then the first compilation result group is used to indicate the executable to be mapped to the normal core execution with absolute coordinates (1,1) file; assign a normal core with absolute coordinates (1,2) to the second compilation result group, then the second compilation result group is used to indicate the executable to be mapped to the normal core with absolute coordinates (1,2). executable file. By analogy, the mapping process of each compilation result grouping can be implemented.
该实施场景中,目标芯片在实际执行编译结果分组对应的可执行文件的过程中,绝对坐标为(1,1)的正常核先执行第一个编译结果分组对应的可执行文件,并将执行结果根据路由文件发送至其他正常核,如绝对坐标为(1,2)的正常核,接收到执行结果的绝对坐标为(1,2)的处理核,根据该执行结果执行第二个编译结果分组对应的可执行文件,以此类推,直至所有正常核执行完映射至其的编译结果分组对应的可执行文件,将预备承载的算法实现。需要说明的是,路由文件可以是目标芯片在上述映射过程中同时确定的执行结果传输路径文件。In this implementation scenario, when the target chip actually executes the executable file corresponding to the compilation result grouping, the normal core whose absolute coordinate is (1,1) first executes the executable file corresponding to the first compilation result grouping, and executes the executable file corresponding to the first compilation result grouping. The result is sent to other normal cores according to the routing file, such as the normal core with absolute coordinates (1,2), and the processing core with absolute coordinates (1,2) that receives the execution result, and executes the second compilation result according to the execution result The corresponding executable files are grouped, and so on, until all normal cores have finished executing the executable files corresponding to the grouping of compilation results mapped to them, and the algorithm to be prepared is implemented. It should be noted that the routing file may be the execution result transmission path file that is simultaneously determined by the target chip in the above-mentioned mapping process.
在一个实施方式中,基于正常核的绝对坐标,将当前分组结果包括的目标数量个编译结果分组映射到正常核的步骤(步骤S402),包括:基于正常核的绝对坐标和正常核的计算能力参数,将当前分组结果包括的目标数量个编译结果分组映射到正常核。In one embodiment, based on the absolute coordinates of the normal cores, the step of grouping and mapping the target number of compilation results included in the current grouping result to the normal cores (step S402 ) includes: based on the absolute coordinates of the normal cores and the computing capability of the normal cores parameter, which maps the target number of compilation result groups included in the current grouping result to normal cores.
其中,目标芯片的ARM或APU根据正常核的绝对坐标分别获取正常核的计算能力参数,该计算能力参数例如标准计算量,即该正常核在一次计算时所能提供的最大计算量。The ARM or APU of the target chip respectively obtains the computing capability parameter of the normal core according to the absolute coordinates of the normal core.
由于目标芯片的多个处理核协同合作,因此在将当前分组结果包括的目标数量个编译结果分组映射到正常核的过程中,既需要考虑每个正常核计算量的合理性,也需要考虑正常核之间的协同合作效率,如数据传输以及信息传递效率。根据正常核的计算能力参数可以获取正常核计算量的合理性,划分至每个正常核的计算量,应该和该正常核能够提供的标准计算量匹配。Since the multiple processing cores of the target chip cooperate with each other, in the process of grouping and mapping the target number of compilation results included in the current grouping result to the normal cores, it is necessary to consider not only the rationality of the calculation amount of each normal core, but also the normal The efficiency of cooperation between cores, such as data transmission and information transfer efficiency. The rationality of the calculation amount of the normal core can be obtained according to the calculation capability parameter of the normal core, and the calculation amount divided into each normal core should match the standard calculation amount that the normal core can provide.
例如,一个正常核能够提供的标准计算量为A(MB),根据实际使用经验推算,该正常核实际运行的计算量为该标准计算量的70%-80%为宜,实际运行的计算量太小会造成目标芯片性能的浪费,实际运行的计算量太大会造成目标芯片过大的计算负荷。因此可以参考正常核的标准计算量,将当前分组结果包括的目标数量个编译结果分组合理映射到正常核中。另外,根据正常核的绝对坐标可以获取任意两个正常核间的数据传输效率,两个正常核距离越远,其传输数据所需要的时间越长,传输效率也就越低,因此在将当前分组结果包括的目标数量个编译结果分组映射到正常核的过程中,应尽可能将需要数据传输的两个编译结果分组映射至距离较近的两个正常核。For example, the standard calculation amount that a normal core can provide is A (MB). According to actual use experience, the actual calculation amount of the normal core is 70%-80% of the standard calculation amount. If it is too small, the performance of the target chip will be wasted, and if the actual calculation amount is too large, it will cause an excessive computational load of the target chip. Therefore, with reference to the standard calculation amount of the normal core, the target number of compilation result groups included in the current grouping result can be reasonably mapped to the normal core. In addition, the data transmission efficiency between any two normal cores can be obtained according to the absolute coordinates of the normal cores. The farther the two normal cores are, the longer it takes to transmit data and the lower the transmission efficiency. In the process of mapping the target number of compiling result groups included in the grouping result to normal cores, two compiling result groups that require data transmission should be mapped to two normal cores that are close to each other as much as possible.
图5为本公开实施例提供的一种应用于目标芯片的编译方法的流程图。在一个实施方式中,参照图5,该编译方法包括下述步骤S501-步骤S506。FIG. 5 is a flowchart of a compiling method applied to a target chip according to an embodiment of the present disclosure. In one embodiment, referring to FIG. 5 , the compiling method includes the following steps S501-S506.
步骤S501、接收目标芯片外部的电子设备发送的算法编译结果。Step S501: Receive an algorithm compilation result sent by an electronic device outside the target chip.
其中,目标芯片是包括多个处理核的芯片,例如众核芯片或多核芯片。目标芯片外部的电子设备是与该目标芯片具有连接关系的外部电子设备,例如与目标芯片连接的具有编译功能、芯片测试功能、读取与写入等功能中的一种或多种功能的设备,该外部的电子设备可以是服务器或终端。The target chip is a chip including multiple processing cores, such as a many-core chip or a multi-core chip. The electronic device outside the target chip is an external electronic device that has a connection relationship with the target chip, such as a device connected to the target chip with one or more functions of compiling, chip testing, reading and writing, etc. , the external electronic device may be a server or a terminal.
算法编译结果包括与目标芯片预备承载的算法所对应的可执行文件(如二进制可执行文件)。目标芯片预备承载的算法是指预备在该目标芯片上实现的算法,该算法是解决问题的方法及流程,是一段逻辑,而目标芯片则是实际执行解决问题的方法与流程的物理设备。目标芯片外部的电子设备用于将该目标芯片预备承载的算法变为目标芯片可执行的可执行文件,其中,将该预备承载的算法变为可执行文件的过程就是对该预备承载的算法进行编译的过程。The algorithm compilation result includes executable files (eg, binary executable files) corresponding to the algorithms prepared to be carried by the target chip. The algorithm to be carried by the target chip refers to the algorithm to be implemented on the target chip. The algorithm is a method and process for solving a problem, and it is a piece of logic, while the target chip is a physical device that actually implements the method and process for solving the problem. The electronic device outside the target chip is used to convert the algorithm prepared to be carried by the target chip into an executable file executable by the target chip. compilation process.
步骤S502、获取目标芯片的故障处理核信息。Step S502 , acquiring fault processing core information of the target chip.
其中,目标芯片的故障处理核信息是指目标芯片中故障核的信息。该故障处理核信息包括:故障核的实际数量、故障核在目标芯片中的绝对坐标、故障核的身份标识(Identity Document,ID)等信息。Wherein, the fault processing core information of the target chip refers to the information of the fault core in the target chip. The fault handling core information includes: the actual number of faulty cores, the absolute coordinates of the faulty core in the target chip, the identity document (ID) of the faulty core and other information.
在一些实施例中,目标芯片的ARM或APU可以对目标芯片的一次性可编程存储器进行读取,得到该目标芯片的故障处理核信息。In some embodiments, the ARM or APU of the target chip can read the one-time programmable memory of the target chip to obtain fault processing core information of the target chip.
目标芯片在制造生产完成后,该目标芯片包括的处理核的总数量、各个处理核的绝对坐标和身份标识等处理核信息均已经确定,并且,这些信息会被写入目标芯片的存储器中,例如写入一次性可编程存储器中。目标芯片的存储器中还存储有该目标芯片的基本信息,例如目标芯片可使用电源电压、版本号、生产日期等信息。After the target chip is manufactured and produced, the processing core information such as the total number of processing cores included in the target chip, the absolute coordinates and identification of each processing core have been determined, and these information will be written into the memory of the target chip. For example, writing into one-time programmable memory. Basic information of the target chip is also stored in the memory of the target chip, for example, information such as power supply voltage, version number, production date, etc. that can be used by the target chip.
目标芯片在制造完成后,通常还需要对目标芯片进行测试。通过对目标芯片的测试过程,能够确定出该目标芯片的故障处理核信息(例如故障核的实际数量、故障核在目标芯片中的绝对坐标、故障核的ID等),该目标芯片的故障处理核信息被写入该目标芯片的存储器中,例如写入目标芯片的efuse中。After the target chip is fabricated, the target chip usually needs to be tested. Through the testing process of the target chip, it is possible to determine the fault processing core information of the target chip (such as the actual number of faulty cores, the absolute coordinates of the faulty core in the target chip, the ID of the faulty core, etc.), the fault processing of the target chip The core information is written into the memory of the target chip, eg, into the efuse of the target chip.
步骤S503、基于故障处理核信息和预设故障信息,确定目标芯片是否符合重分组条件。Step S503 , based on the fault processing core information and the preset fault information, determine whether the target chip meets the regrouping condition.
其中,预设故障信息是预设的目标芯片的故障核的信息。该预设故障信息包括处理核故障率、故障核的预设数量、故障核的预设坐标等一种或多种信息。Wherein, the preset fault information is preset information of faulty cores of the target chip. The preset failure information includes one or more kinds of information, such as a processing core failure rate, a preset number of faulty cores, and preset coordinates of the faulty cores.
在一些实施例中,可以基于目标芯片的特点设置该预设故障信息。该目标芯片的特点例如制造该目标芯片的过程中是否容易出现处理核故障、制造目标芯片的制造工艺是否复杂等。In some embodiments, the preset fault information can be set based on the characteristics of the target chip. The characteristics of the target chip are, for example, whether a processing core failure is likely to occur in the process of manufacturing the target chip, whether the manufacturing process for manufacturing the target chip is complicated, and the like.
在一些实施例中,目标芯片外部的电子设备在确定该目标芯片的预设故障信息之后,将该预设故障信息发送至目标芯片;目标芯片在接收外部的电子设备发送的预设故障信息之后,可以基于预设故障信息,对目标芯片对应的算法编译结果进行分组处理,以获得预设分组结果。In some embodiments, after determining the preset fault information of the target chip, the electronic device outside the target chip sends the preset fault information to the target chip; after the target chip receives the preset fault information sent by the external electronic device , the algorithm compilation result corresponding to the target chip can be grouped based on the preset fault information to obtain the preset grouping result.
在另一些实施例中,目标芯片外部的电子设备也可以在确定该目标芯片的预设故障信息之后,基于预设故障信息,对目标芯片对应的算法编译结果进行分组处理,获得预设分组结果,并将该预设分组结果发送给目标芯片。In other embodiments, the electronic device outside the target chip may also, after determining the preset fault information of the target chip, perform grouping processing on the algorithm compilation result corresponding to the target chip based on the preset fault information, and obtain the preset grouping result , and send the preset grouping result to the target chip.
其中,算法编译结果包括与目标芯片预备承载的算法所对应的可执行文件(如二进制可执行文件)。目标芯片预备承载的算法是指预备在该目标芯片上实现的算法,该算法是解决问题的方法及流程,是一段逻辑,而目标芯片则是实际执行解决问题的方法与流程的物理设备。将该预备承载的算法变为可执行文件的过程就是对该预备承载的算法进行编译的过程。The algorithm compilation result includes an executable file (eg, a binary executable file) corresponding to the algorithm prepared to be carried by the target chip. The algorithm to be carried by the target chip refers to the algorithm to be implemented on the target chip. The algorithm is a method and process for solving a problem, and it is a piece of logic, while the target chip is a physical device that actually implements the method and process for solving the problem. The process of converting the pre-hosted algorithm into an executable file is the process of compiling the pre-hosted algorithm.
目标芯片可以通过运行预备承载的算法所对应的可执行文件来实现该预备承载的算法。由于目标芯片是包括多个处理核的芯片,最终执行算法所对应的可执行文件的是目标芯片的多个处理核。因此,本实施方式中,通过预估一定的处理核故障率或者故障核预设数量,然后基于预设故障信息,对包括该可执行文件的算法编译结果进行分组处理,将该算法编译结果分为多个编译结果分组,每个编译结果分组用于指示待映射到一个正常核执行的可执行文件,能够便于目标芯片的多个处理核中预设的正常核基于预设分组结果和算法编译结果实现预备承载的算法,保证目标芯片的多个处理核中存在一定 故障的情况下,针对该目标芯片对应的算法编译结果的预设分组结果依然可以使用,能够提升目标芯片的使用率,减少目标芯片资源的浪费,同时也减少芯片制造的成本。The target chip may implement the pre-carried algorithm by running the executable file corresponding to the pre-carried algorithm. Since the target chip is a chip including multiple processing cores, it is the multiple processing cores of the target chip that finally execute the executable file corresponding to the algorithm. Therefore, in this embodiment, by estimating a certain processing core failure rate or a preset number of faulty cores, and then based on the preset failure information, the algorithm compilation results including the executable file are grouped and processed, and the algorithm compilation results are divided into groups. Grouping multiple compilation results, each compilation result group is used to indicate an executable file to be mapped to a normal core for execution, which can facilitate the compilation of the preset normal cores in the multiple processing cores of the target chip based on the preset grouping results and algorithms As a result, the algorithm for pre-loading is implemented, and in the case of certain failures in the multiple processing cores of the target chip, the preset grouping results of the algorithm compilation results corresponding to the target chip can still be used, which can improve the utilization rate of the target chip and reduce the The waste of target chip resources also reduces the cost of chip manufacturing.
重分组条件包括是否需要再次对目标芯片对应的算法编译结果进行分组处理的条件。其中,如何确定目标芯片是否符合重分组条件的步骤可参见前述实施例,此处不再赘述。在实际的应用过程中,预设故障信息与目标芯片的故障处理核信息可能存在差异。在很多预设故障信息与故障处理核信息存在差异情况中,目标芯片无法基于预设分组结果和算法编译结果实现预备承载的算法,目标芯片可能会被抛弃,依旧会造成芯片资源的浪费。因此,为了进一步提升目标芯片的使用率,减少目标芯片资源的浪费,降低目标芯片制造成本,需要对算法编译结果重新进行分组处理。The regrouping condition includes whether it is necessary to perform grouping processing on the algorithm compilation result corresponding to the target chip again. The steps of how to determine whether the target chip meets the regrouping condition can be found in the foregoing embodiments, which will not be repeated here. In the actual application process, there may be differences between the preset fault information and the fault processing core information of the target chip. In many cases where there is a difference between the preset fault information and the fault processing core information, the target chip cannot implement the pre-loading algorithm based on the preset grouping results and algorithm compilation results, and the target chip may be discarded, which will still cause a waste of chip resources. Therefore, in order to further improve the utilization rate of the target chip, reduce the waste of target chip resources, and reduce the manufacturing cost of the target chip, it is necessary to regroup the algorithm compilation results.
步骤S504、在目标芯片符合重分组条件的情况下,基于故障处理核信息,对目标芯片对应的算法编译结果进行分组处理,以获得当前分组结果。Step S504 , in the case that the target chip meets the regrouping condition, based on the fault processing core information, perform grouping processing on the algorithm compilation result corresponding to the target chip to obtain the current grouping result.
步骤S505、在目标芯片不符合重分组条件的情况下,将预设分组结果作为当前分组结果。Step S505 , in the case that the target chip does not meet the regrouping condition, use the preset grouping result as the current grouping result.
本实施例中,由于故障核的预设数量是根据目标芯片的特点来确定的,也就是说,在批量制造的多个目标芯片中,大部分的目标芯片的故障核的数量都可能为预设数量,即大部分的目标芯片不符合重分组条件。预设分组结果可以作为大部分目标芯片的当前分组结果,能够大大减少芯片的编译工作量,节省目标芯片的计算资源。In this embodiment, since the preset number of faulty cores is determined according to the characteristics of the target chip, that is to say, among multiple target chips manufactured in batches, the number of faulty cores of most of the target chips may be the predetermined number. Set the number, that is, most of the target chips do not meet the regrouping conditions. The preset grouping result can be used as the current grouping result of most target chips, which can greatly reduce the compilation workload of the chip and save the computing resources of the target chip.
步骤S506、将当前分组结果包括的目标数量个编译结果分组映射到正常核。Step S506 , grouping and mapping the target number of compilation results included in the current grouping result to normal cores.
其中,任意两个编译结果分组映射的正常核的绝对坐标互不相同。Among them, the absolute coordinates of the normal kernels mapped by any two compilation result groups are different from each other.
其中,将当前分组结果包括的目标数量个编译结果分组映射到正常核的步骤可参见前述实施例,此处不再赘述。The steps of grouping and mapping the target number of compilation results included in the current grouping result to normal cores may refer to the foregoing embodiments, which will not be repeated here.
本公开实施例提供的编译方法,能够提高芯片使用过程的灵活性,保证目标芯片的故障核不需要处理算法编译结果,进而有效避免出现目标芯片因为故障核而无法实现预备承载的算法的情况,能够有效提升芯片资源的利用率,降低芯片的制造成本。The compiling method provided by the embodiment of the present disclosure can improve the flexibility of the chip usage process, ensure that the faulty core of the target chip does not need to process the algorithm compilation result, and thus effectively avoid the situation that the target chip cannot implement the algorithm prepared for carrying due to the faulty core. It can effectively improve the utilization rate of chip resources and reduce the manufacturing cost of the chip.
图6为本公开实施例提供的一种应用于目标芯片的编译方法的示意图。参照图6,目标芯片61包括多个处理核62,目标芯片61对算法编译结果进行分组处理,获取当前分组结果,并将当前分组结果映射到目标芯片的正常核。FIG. 6 is a schematic diagram of a compilation method applied to a target chip according to an embodiment of the present disclosure. 6, the target chip 61 includes a plurality of processing cores 62, the target chip 61 performs grouping processing on the algorithm compilation result, obtains the current grouping result, and maps the current grouping result to the normal core of the target chip.
图7为本公开实施例提供的一种应用于目标芯片的编译方法的示意图。参照图7,目标芯片的ARM或APU获取算法编译结果,根据故障核的实际数量对算法编译结果进行分组处理,获取当前分组结果,并将该当前分组结果映射到目标芯片的正常核。其中,当前分组结果和算法编译结果可以保存在目标芯片的存储空间中,例如双倍速率同步动态随机存储器(DDR,Double Data Rate Synchronous Dynamic Random Access Memory)中。FIG. 7 is a schematic diagram of a compilation method applied to a target chip according to an embodiment of the present disclosure. 7, the ARM or APU of the target chip obtains the algorithm compilation result, groups the algorithm compilation results according to the actual number of faulty cores, obtains the current grouping result, and maps the current grouping result to the normal cores of the target chip. Among them, the current grouping results and algorithm compilation results can be stored in the storage space of the target chip, such as Double Data Rate Synchronous Dynamic Random Access Memory (DDR, Double Data Rate Synchronous Dynamic Random Access Memory).
图8为本公开实施例提供的一种应用于目标芯片外部的电子设备的编译方法的流程图。在一个实施方式中,参照图8,该编译方法还包括:下述步骤S801-步骤S802。FIG. 8 is a flowchart of a compilation method applied to an electronic device outside a target chip according to an embodiment of the present disclosure. In one embodiment, referring to FIG. 8 , the compiling method further includes: the following steps S801-S802.
步骤S801、对目标芯片预备承载的算法进行编译,获得算法编译结果。Step S801 , compiling the algorithm to be carried by the target chip to obtain an algorithm compilation result.
其中,目标芯片预备承载的算法是指预备在该目标芯片上实现的算法,该算法是解决问题的方法及流程,是一段逻辑,而目标芯片则是实际执行解决问题的方法与流程的物理设备。目标芯片通过运行与预备承载的算法对应的、目标芯片可执行的可执行文件(如二进制可执行文件)来实现该预备承载的算法。将该预备承载的算法变为可执行文件的过程就是对该预备承载的算法进行编译的过程,目标芯片可执行的可执行文件即为算法编译结果。Among them, the algorithm to be carried by the target chip refers to the algorithm to be implemented on the target chip. The algorithm is the method and process of solving the problem, and it is a piece of logic, and the target chip is the physical device that actually implements the method and process of solving the problem. . The target chip implements the pre-carried algorithm by running an executable file (eg, a binary executable file) that corresponds to the pre-carried algorithm and is executable by the target chip. The process of converting the pre-loaded algorithm into an executable file is the process of compiling the pre-loaded algorithm, and the executable file executable by the target chip is the algorithm compilation result.
在一个实施方式中,目标芯片外部的电子设备在获得算法编译结果后,可以基于上述步骤S101-步骤S103,获得当前分组结果。获得当前分组结果的过程可参见前述实施例,此处不再赘述。目标芯片外部的电子设备在获得当前分组结果之后,还包括下述步骤S802。In one embodiment, after obtaining the algorithm compilation result, the electronic device outside the target chip may obtain the current grouping result based on the above steps S101-S103. For the process of obtaining the current grouping result, reference may be made to the foregoing embodiments, and details are not described herein again. After obtaining the current grouping result, the electronic device outside the target chip further includes the following step S802.
步骤S802、将当前分组结果和算法编译结果发送至目标芯片,以供目标芯片的正常核基于当前分组结果和算法编译结果实现预备承载的算法。Step S802: Send the current grouping result and the algorithm compilation result to the target chip, so that the normal core of the target chip implements the algorithm for preparing the bearer based on the current grouping result and the algorithm compilation result.
其中,当前分组结果包括多个编译结果分组,每个编译结果分组用于指示待映射到一个正常核执行的可执行文件。算法编译结果包括与目标芯片预备承载的算法所对应的可执行文件。The current grouping result includes multiple compilation result groups, and each compilation result group is used to indicate an executable file to be mapped to a normal core for execution. The algorithm compilation result includes an executable file corresponding to the algorithm prepared to be carried by the target chip.
其中,目标芯片的正常核基于当前分组结果和算法编译结果实现预备承载的算法的过程可参见前述实施例,此处不再赘述。The process for the normal core of the target chip to implement the algorithm for preparing the bearer based on the current grouping result and the algorithm compiling result may refer to the foregoing embodiments, which will not be repeated here.
本实施例中,由于当前分组结果中每个编译结果分组用于指示待映射到一个正常核执行的可执行文件,因此,芯片在接收到当前分组结果和算法编译结果之后,可以将编译结果分组对应的可执行文件映射至正常核,而不映射至故障核,能够保证目标芯片的故障核不需要处理该算法编译结果,进而有效避免出现目标芯片因为故障核而无法实现预备承载的算法的情况,能够有效提升芯片资源的利用率,降低芯片的制造成本。In this embodiment, since each compilation result group in the current grouping result is used to indicate an executable file to be mapped to a normal core for execution, the chip can group the compilation result after receiving the current grouping result and the algorithm compilation result The corresponding executable file is mapped to the normal core, but not to the faulty core, which can ensure that the faulty core of the target chip does not need to process the compilation result of the algorithm, thereby effectively avoiding the situation that the target chip cannot implement the algorithm prepared for carrying due to the faulty core. , which can effectively improve the utilization rate of chip resources and reduce the manufacturing cost of chips.
图9为本公开实施例提供的一种应用于目标芯片外部的电子设备的编译方法的流程图。在一个实施场景中,针对多目标芯片架构,参照图9,该编译方法还包括下述步骤S901-步骤S903。FIG. 9 is a flowchart of a compilation method applied to an electronic device outside a target chip according to an embodiment of the present disclosure. In an implementation scenario, for a multi-target chip architecture, referring to FIG. 9 , the compilation method further includes the following steps S901-S903.
步骤S901、基于多个目标芯片中每个目标芯片的故障处理核信息和各自对应的算法编译结果,确定同类芯片。Step S901 , based on the fault processing core information of each target chip in the plurality of target chips and the respective corresponding algorithm compilation results, determine the same type of chips.
其中,多个目标芯片中故障处理核信息一致、且对应的算法编译结果一致的目标芯片称为同类芯片。Among them, among the multiple target chips, the target chips whose fault processing core information is consistent and the corresponding algorithm compilation results are consistent are called similar chips.
在一些实施例中,针对多目标芯片架构,目标芯片外部的电子设备可以获取多个目标芯片中每个目标芯片的故障处理核信息,其中,故障处理核信息包括处理核故障率、故障核的预设数量、故障核的预设坐标等一种或多种信息。在该实施例中,多个目标芯片中故障处理核信息所包括的故障处理核的实际数量一致、且对应的算法编译结果一致的目标芯片也可以称为同类芯片。In some embodiments, for a multi-target chip architecture, an electronic device outside the target chip may acquire information on fault processing cores of each target chip in the multiple target chips, where the fault processing core information includes a processing core failure rate, a fault processing core One or more kinds of information, such as the preset number and the preset coordinates of the fault core. In this embodiment, a target chip whose actual number of fault processing cores included in the fault processing core information in the multiple target chips is the same and whose corresponding algorithm compilation results are the same may also be referred to as the same type of chip.
步骤S902、在目标芯片符合重分组条件的情况下,基于故障处理核信息,对目标芯片对应的算法编译结果进行分组处理,以获得当前分组结果。Step S902 , in the case that the target chip meets the regrouping condition, based on the fault processing core information, perform grouping processing on the algorithm compilation result corresponding to the target chip to obtain the current grouping result.
其中,当前分组结果是对算法编译结果进行分组的分组结果,对算法编译结果进行分组处理是将算法编译结果分为多个正常核可以执行的编译结果。目标芯片的当前分组结果就是将算法编译结果分为该目标芯片的正常核可以执行的编译结果。The current grouping result is a grouping result of grouping the algorithm compilation results, and the grouping processing of the algorithm compilation results is that the algorithm compilation results are divided into compilation results that can be executed by a plurality of normal cores. The current grouping result of the target chip is to divide the algorithm compilation result into compilation results that can be executed by the normal core of the target chip.
步骤S903、将当前分组结果作为目标芯片的同类芯片所对应的当前分组结果。Step S903, taking the current grouping result as the current grouping result corresponding to chips of the same type of the target chip.
在一些实施场景中,针对包括多个目标芯片的结构,目标芯片外部的电子设备在获取一个或多个目标芯片的故障处理核信息后,对于每一个目标芯片,都可以根据该目标芯片的故障处理核信息,对目标芯片对应的算法编译结果进行分组处理,获得该目标芯片对应的当前分组结果。而通过本实施例的编译方法,无需针对每一个目标芯片都执行一次算法编译结果的分组处理,而是对于同类芯片,只需要执行一次对算法编译结果的分组处理的即可。本实施例中,目标芯片外部的电子设备可以从多个芯片中确定目标芯片的同类芯片,由于同类芯片是故障处理核的实际数量一致、且对应的算法编译结果一致的目标芯片,因此,在一个目标芯片符合重分组条件的情况下,该目标芯片的同类芯片同样符合重分组条件。目标芯片外部的电子设备只需根据该目标芯片的故障处理核信息对算法编译结果进行一次分组处理,该次分组处理获取的当前分组结果可以作为目标芯片的同类芯片所对应的当前分组结果。针对多目标芯片的结构的场景,能能够大大减少芯片的编译工作量,节省外部的电子设备的计算资源,降低芯片的制造成本。In some implementation scenarios, for a structure including multiple target chips, after acquiring the fault handling core information of one or more target chips, the electronic device outside the target chip can, for each target chip, The core information is processed, the algorithm compilation result corresponding to the target chip is grouped, and the current grouping result corresponding to the target chip is obtained. With the compiling method of this embodiment, it is not necessary to perform the grouping processing of the algorithm compilation results once for each target chip, but only need to perform the grouping processing of the algorithm compilation results once for the same type of chips. In this embodiment, the electronic device outside the target chip can determine the same type of chip of the target chip from multiple chips. Since the same type of chip is the target chip with the same actual number of fault processing cores and the same corresponding algorithm compilation results, therefore, in the When a target chip meets the regrouping conditions, the same chips of the target chip also meet the regrouping conditions. The electronic device outside the target chip only needs to perform a grouping process on the algorithm compilation result according to the fault processing core information of the target chip. For the multi-target chip structure scenario, the compilation workload of the chip can be greatly reduced, the computing resources of external electronic devices can be saved, and the manufacturing cost of the chip can be reduced.
图10、图11、图12均为本公开实施例提供的应用于目标芯片外部的电子设备的编译方法的示意图。参照图10、图11、图12,多芯片架构1001包括多个预备承载相同算法的目标芯片1002。目标芯片外部的电子设备根据每个目标芯片1002的故障处理核信息分别对每个目标芯片1002对应的算法编译结果进行分组处理,获取每个目标芯片1002对应的当前分组结果,如图10、图11和图12中的ID1、ID2、ID3……IDn。FIG. 10 , FIG. 11 , and FIG. 12 are schematic diagrams of a compilation method applied to an electronic device outside a target chip provided by an embodiment of the present disclosure. Referring to FIG. 10 , FIG. 11 , and FIG. 12 , the multi-chip architecture 1001 includes a plurality of target chips 1002 that are prepared to carry the same algorithm. The electronic device outside the target chip performs grouping processing on the algorithm compilation result corresponding to each target chip 1002 according to the fault processing core information of each target chip 1002, and obtains the current grouping result corresponding to each target chip 1002, as shown in Figure 10 and Figure 10. 11 and ID1, ID2, ID3...IDn in Figure 12.
在一个实施方式中,参照图11,目标芯片外部的电子设备将每个当前分组结果发送至对应的目标芯片1002。目标芯片1002接收与自身对应的当前分组结果后,将该当前分组结果存储在自身的DDR中。In one embodiment, referring to FIG. 11 , the electronic device outside the target chip sends each current grouping result to the corresponding target chip 1002 . After receiving the current grouping result corresponding to itself, the target chip 1002 stores the current grouping result in its own DDR.
在一些实施例中,针对多目标芯片架构,目标芯片外部的电子设备可以在获取一个目标芯片对应的当前分组结果之后,就将获取的当前分组结果发送给该目标芯片,然后再获取下一个目标芯片对应的当前分组结果。In some embodiments, for a multi-target chip architecture, an electronic device outside the target chip may, after obtaining the current grouping result corresponding to a target chip, send the obtained current grouping result to the target chip, and then obtain the next target The current grouping result corresponding to the chip.
在另一些实施例中,针对多目标芯片架构,目标芯片外部的电子设备可以在获取所有目标芯片对应的当前分组结果之后,再将获取的当前分组结果分别发送给各自对应的目标芯片。In other embodiments, for the multi-target chip architecture, the electronic device outside the target chip may, after obtaining the current grouping results corresponding to all target chips, send the obtained current grouping results to the corresponding target chips respectively.
本公开实施例提供的编译方法,多目标芯片的架构中,每个目标芯片的正常核均是基于自身对应的当前分组结果和算法编译结果实现预备承载的算法,因此,能够保证目标芯片的故障核不需要处理算法编译结果,进而有效避免出现目标芯片因为故障核而无法实现预备承载的算法的情况,有效提升芯片资源的利用率,降低芯片的制造成本,保障多目标芯片架构的稳定性。In the compilation method provided by the embodiment of the present disclosure, in the architecture of a multi-target chip, the normal core of each target chip is an algorithm that implements a preparatory bearer based on its corresponding current grouping result and algorithm compilation result, so it can ensure the failure of the target chip. The core does not need to process the algorithm compilation result, thereby effectively avoiding the situation that the target chip cannot implement the algorithm prepared for carrying due to the faulty core, effectively improving the utilization of chip resources, reducing the manufacturing cost of the chip, and ensuring the stability of the multi-target chip architecture.
在另一个实施方式中,参照图12,针对多目标芯片架构,目标芯片外部的电子设备 可以在获取所有目标芯片对应的当前分组结果之后,可以向每个目标芯片发送所有的当前分组结果,每个目标芯片可以从所有的当前分组结果中选择自身对应的当前分组结果。相比较于只向每个目标芯片发送该目标芯片对应的当前分组结果的方式,若目标芯片外部的电子设备向每个芯片都发送所有的当前分组结果,则电子设备给每一个目标芯片发送的内容都是一样的,因此电子设备可以在得到所有的当前分组结果之后,经过一次内存读取就可以将当前分组结果发送给所有目标芯片。In another embodiment, referring to FIG. 12 , for a multi-target chip architecture, an electronic device outside the target chip can send all the current grouping results to each target chip after acquiring the current grouping results corresponding to all target chips, and each Each target chip can select its own corresponding current grouping result from all the current grouping results. Compared with the method of only sending the current grouping result corresponding to the target chip to each target chip, if the electronic device outside the target chip sends all the current grouping results to each chip, the electronic device sends the current grouping result to each target chip. The contents are the same, so after obtaining all the current grouping results, the electronic device can send the current grouping results to all target chips after one memory read.
在一些实施例中,针对任意一个接收到所有的当前分组结果的目标芯片,该目标芯片在接收到所有的当前分组结果后,目标芯片的ARM或APU等具有计算能力的单元,从所有的当前分组结果中提取与自己的故障处理核信息对应的当前分组结果,并基于该当前分组结果和算法编译结果实现预备承载的算法。同时,该目标芯片的ARM或APU还可以保存所有的当前分组结果。虽然保存所有的当前分组结果会占用芯片的存储空间,但是,若该目标芯片在后续使用过程中出现其他故障(例如出现正常核变为故障核的情况),则目标芯片的ARM或APU可以直接从保存的多个当前分组结果中选择一个合适的当前分组结果,基于重新选择的当前分组结果和算法编译结果实现预备承载的算法,进一步提升了芯片资源的利用率,降低了芯片制造的成本。当然,如果目标芯片存储空间不够,也可以直接将剩余的所有的当前分组结果丢弃。In some embodiments, for any target chip that has received all the current grouping results, after the target chip has received all the current grouping results, the ARM or APU of the target chip has a computing capability, from all the current grouping results. The current grouping result corresponding to the own fault handling core information is extracted from the grouping result, and the algorithm for preparing the bearer is implemented based on the current grouping result and the algorithm compilation result. At the same time, the ARM or APU of the target chip can also save all the current grouping results. Although saving all the current grouping results will occupy the storage space of the chip, if the target chip has other failures during subsequent use (for example, a normal core becomes a faulty core), the ARM or APU of the target chip can directly An appropriate current grouping result is selected from a plurality of saved current grouping results, and an algorithm for preparatory bearer is implemented based on the re-selected current grouping result and the algorithm compilation result, which further improves the utilization of chip resources and reduces the cost of chip manufacturing. Of course, if the storage space of the target chip is insufficient, all the remaining current grouping results can also be directly discarded.
本实施例提供的编译方法,在获取所有分组结果之后,给每一个目标芯片都发送所有的当前分组结果,相当于为目标芯片提供了备选方案,目标芯片可以从多个当前分组结果中筛选出适合自己的分组结果,因此,本方式相比较于只向每个芯片发送该芯片对应的当前分组结果的方式,可以提升目标芯片实现预备承载的算法的成功率,避免了目标芯片不能使用的情况的出现,提升了芯片资源的利用率,降低了芯片制造的成本。In the compilation method provided in this embodiment, after obtaining all the grouping results, all the current grouping results are sent to each target chip, which is equivalent to providing an alternative solution for the target chip, and the target chip can filter from multiple current grouping results Therefore, compared with the method of only sending the current grouping result corresponding to the chip to each chip, this method can improve the success rate of the algorithm for the target chip to implement the preparatory bearer, and avoid the target chip that cannot be used. The emergence of the situation has improved the utilization rate of chip resources and reduced the cost of chip manufacturing.
图13为本公开实施例提供的一种应用于目标芯片外部的电子设备的编译方法的流程图。在一个实施方式中,基于正常核的目标数量,对目标芯片对应的算法编译结果进行分组处理,以获得当前分组结果(步骤S202)之后,参照图13,该编译方法还包括:下述步骤S1301-步骤S1304。FIG. 13 is a flowchart of a compilation method applied to an electronic device outside a target chip according to an embodiment of the present disclosure. In one embodiment, based on the target number of normal cores, grouping processing is performed on the algorithm compilation results corresponding to the target chips to obtain the current grouping results (step S202 ). Referring to FIG. 13 , the compilation method further includes: the following step S1301 - Step S1304.
步骤S1301、根据故障核的绝对坐标,获取正常核的绝对坐标。Step S1301: Acquire the absolute coordinates of the normal core according to the absolute coordinates of the faulty core.
在一些实施例中,目标芯片外部的电子设备与目标芯片连接之后,对目标芯片的一次性可编程存储器进行读取,得到该目标芯片的故障处理核信息。其中,故障处理核信息包括:故障核的实际数量、故障核在目标芯片中的绝对坐标、故障核的身份标识。目标芯片外部的电子设备还可以从目标芯片的一次性可编程存储器中获取目标芯片全部处理核的绝对坐标,进而基于该全部处理核的绝对坐标和故障核的绝对坐标,获取正常核的绝对坐标。In some embodiments, after the electronic device outside the target chip is connected to the target chip, the one-time programmable memory of the target chip is read to obtain the fault handling core information of the target chip. The fault processing core information includes: the actual number of faulty cores, the absolute coordinates of the faulty core in the target chip, and the identity of the faulty core. The electronic device outside the target chip can also obtain the absolute coordinates of all processing cores of the target chip from the one-time programmable memory of the target chip, and then obtain the absolute coordinates of the normal core based on the absolute coordinates of all the processing cores and the absolute coordinates of the faulty core. .
步骤S1302、将编译结果分组与正常核的绝对坐标之间一一对应,得到编译结果分组与正常核的绝对坐标的对应关系。Step S1302 , make a one-to-one correspondence between the compilation result group and the absolute coordinates of the normal core, and obtain the corresponding relationship between the compilation result group and the absolute coordinates of the normal core.
其中,每个编译结果分组用于指示待映射到一个正常核执行的可执行文件。该编译结果分组与正常核的绝对坐标的对应关系用于指示该编译结果分组对应的可执行文件 由哪一个正常核执行。Wherein, each compilation result group is used to indicate an executable file to be mapped to a normal core for execution. The correspondence between the compilation result group and the absolute coordinates of the normal core is used to indicate which normal core executes the executable file corresponding to the compilation result group.
本实施例中,对算法编译结果进行分组处理后获得的当前分组结果中包含多个编译结果分组。通过前述对算法编译结果进行分组处理的说明可知,当前分组结果包括的编译结果分组的数量小于或等于正常核的目标数量。因此,可以从目标数量个绝对坐标中选择出与编译结果分组的数量相同的绝对坐标,为每个编译结果分组分配一个正常核的绝对坐标,以实现将编译结果分组与正常核的绝对坐标之间一一对应。In this embodiment, the current grouping result obtained after the algorithm compilation result is grouped includes multiple compilation result groups. It can be known from the foregoing description of grouping the algorithm compilation results that the number of compilation result groups included in the current grouping result is less than or equal to the target number of normal cores. Therefore, the same number of absolute coordinates as the number of compilation result groups can be selected from the target number of absolute coordinates, and an absolute coordinate of a normal core can be assigned to each compilation result group, so as to realize the combination of the compilation result group and the absolute coordinates of the normal core. One-to-one correspondence.
在一个实施场景中,目标芯片有100个处理核,包括6个故障核和94个正常核,则当前分组结果当前分组结果包括94个编译结果分组,每个编译结果分组用于指示待映射到一个正常核执行的可执行文件。在该实施场景中,可以将第一个编译结果分组对应到绝对坐标(1,1);将第二个编译结果分组对应到绝对坐标为(1,2)……直到将编译结果分组与正常核的绝对坐标之间一一对应,得到编译结果分组与正常核的绝对坐标的对应关系。其中,该编译结果分组与正常核的绝对坐标的对应关系用于指示该编译结果分组对应的可执行文件由哪一个正常核执行,例如,第一编译结果分组对应的可执行文件由绝对坐标(1,1)的正常核执行。In an implementation scenario, the target chip has 100 processing cores, including 6 faulty cores and 94 normal cores, then the current grouping result The current grouping result includes 94 compilation result groups, and each compilation result group is used to indicate to be mapped to An executable for normal kernel execution. In this implementation scenario, the first compilation result can be grouped to correspond to absolute coordinates (1, 1); the second compilation result can be grouped to absolute coordinates (1, 2) ... until the compilation result is grouped with the normal The absolute coordinates of the cores are in one-to-one correspondence, and the corresponding relationship between the compilation result group and the absolute coordinates of the normal core is obtained. The corresponding relationship between the compilation result group and the absolute coordinates of the normal core is used to indicate which normal core executes the executable file corresponding to the compilation result group. 1,1) for normal kernel execution.
步骤S1303、基于编译结果分组与正常核的绝对坐标的对应关系,对目标芯片的路由进行路由编译,获得路由编译结果。Step S1303 , based on the corresponding relationship between the compilation result group and the absolute coordinates of the normal core, perform route compilation on the route of the target chip, and obtain a route compilation result.
其中,对目标芯片的路由进行路由编译的过程就是确定目标芯片的正常核执行可执行文件的顺序以及确定执行结果传递路径等信息的过程。路由编译结果包括目标芯片的正常核执行可执行文件的顺序以及执行结果传递路径等信息。The process of routing and compiling the route of the target chip is the process of determining the order in which the normal core of the target chip executes the executable file and determining the execution result transmission path and other information. The routing compilation result includes information such as the order in which the normal core of the target chip executes the executable file and the execution result transmission path.
步骤S1304、将当前分组结果、路由编译结果和算法编译结果发送至目标芯片,以供目标芯片基于当前分组结果、路由编译结果和算法编译结果实现预备承载的算法。Step S1304: Send the current grouping result, the routing compilation result and the algorithm compilation result to the target chip, so that the target chip can implement the algorithm for preparing the bearer based on the current grouping result, the routing compilation result and the algorithm compilation result.
在一个实施场景中,目标芯片基于当前分组结果、路由编译结果和算法编译结果实现预备承载的算法的过程中,绝对坐标为(1,1)的正常核先执行第一个编译结果分组对应的可执行文件,并将执行结果根据路由编译结果发送至下一个正常核(故障核的路由一般不会损坏,因此执行结果在发至下一个正常核的过程中可以通过故障核进行中转),如绝对坐标为(1,2)的正常核。接收到执行结果的绝对坐标为(1,2)的正常核,根据该执行结果执行第二个编译结果分组对应的可执行文件,以此类推,直至所有与编译结果分组有对应关系的正常核执行完映射至其的编译结果分组对应的可执行文件,将预备承载的算法实现。In an implementation scenario, in the process that the target chip implements the algorithm for preparing the bearer based on the current grouping result, the routing compilation result and the algorithm compilation result, the normal core whose absolute coordinate is (1,1) first executes the first compilation result corresponding to the grouping. Executable file, and send the execution result to the next normal core according to the routing compilation result (the route of the faulty core is generally not damaged, so the execution result can be transferred through the faulty core in the process of sending it to the next normal core), such as A normal kernel with absolute coordinates (1,2). Receive the normal core whose absolute coordinates of the execution result are (1, 2), execute the executable file corresponding to the second compilation result group according to the execution result, and so on, until all the normal cores corresponding to the compilation result grouping After executing the executable file corresponding to the compilation result group mapped to it, the algorithm to be carried is prepared to be implemented.
本公开实施例提供的编译方法,将当前分组结果、路由编译结果和算法编译结果发送至目标芯片,以供目标芯片基于当前分组结果、路由编译结果和算法编译结果实现预备承载的算法,能够有效提高目标芯片实现预备承载算法的过程的效率,降低芯片的制造成本。The compilation method provided by the embodiment of the present disclosure sends the current grouping result, the routing compilation result, and the algorithm compilation result to the target chip, so that the target chip can realize the pre-bearing algorithm based on the current grouping result, the routing compilation result and the algorithm compilation result, which can effectively The efficiency of the process of implementing the preparatory bearing algorithm for the target chip is improved, and the manufacturing cost of the chip is reduced.
应当理解,以上实施例还可与本公开实施例的其它任意方式结合使用。以上实施例只是本公开的一个具体例子,而不是对本公开保护范围的限定。It should be understood that the above embodiments can also be used in combination with any other manners of the embodiments of the present disclosure. The above embodiment is only a specific example of the present disclosure, rather than limiting the protection scope of the present disclosure.
第二方面,本公开实施例提供一种编译装置,其是实现本公开上述实施例提供的编 译方法的相应装置,该装置可采用软件和/或硬件的方式实现,并一般可集成于电子设备中。In a second aspect, an embodiment of the present disclosure provides a compiling apparatus, which is a corresponding apparatus for implementing the compiling method provided by the above-mentioned embodiments of the present disclosure. The apparatus can be implemented in software and/or hardware, and can generally be integrated into electronic equipment. middle.
图14为本公开实施例中的一种编译装置的示意图。参照图14,本公开实施例提供的一种编译装置包括:获取模块1401、决策模块1402和处理模块1403。FIG. 14 is a schematic diagram of a compiling apparatus in an embodiment of the disclosure. Referring to FIG. 14 , a compilation apparatus provided by an embodiment of the present disclosure includes: an acquisition module 1401 , a decision module 1402 , and a processing module 1403 .
其中,获取模块1401,用于获取目标芯片的故障处理核信息。Among them, the obtaining module 1401 is used for obtaining the fault processing core information of the target chip.
其中,目标芯片是包括多个处理核的芯片,例如众核芯片或多核芯片。目标芯片的多个处理核包括正常核和/或故障核。其中,故障核是目标芯片中由于各种原因故障或者暂时不能使用的处理核,该故障核例如:由于制造原因故障的处理核、在芯片使用过程中故障的处理核、由于过热或出错等原因暂时不能使用的处理核等;正常核是目标芯片中能够正常执行计算任务的处理核。需要说明的是,由于芯片的处理核路由不容易故障,因此,故障核虽然不具有计算能力,例如运行算法对应的可执行文件的能力,但是故障核通常仍旧具有路由功能,即故障核仍旧可以传递信息。The target chip is a chip including multiple processing cores, such as a many-core chip or a multi-core chip. The multiple processing cores of the target chip include normal cores and/or faulty cores. The faulty core is a processing core in the target chip that is faulty or temporarily unavailable due to various reasons. The faulty core is, for example, a processing core that fails due to manufacturing reasons, a processing core that fails during the use of the chip, or a processing core that fails due to overheating or errors. A processing core that cannot be used temporarily; a normal core is a processing core in the target chip that can normally perform computing tasks. It should be noted that since the routing of the processing core of the chip is not easy to fail, although the faulty core does not have the computing ability, such as the ability to run the executable file corresponding to the algorithm, the faulty core usually still has the routing function, that is, the faulty core can still Send message.
目标芯片的故障处理核信息是指目标芯片中故障核的信息。该故障处理核信息包括:故障核的实际数量、故障核在目标芯片中的绝对坐标、故障核的身份标识(Identity Document,ID)等信息。The fault processing core information of the target chip refers to the information of the fault core in the target chip. The fault handling core information includes: the actual number of faulty cores, the absolute coordinates of the faulty core in the target chip, the identity document (ID) of the faulty core and other information.
目标芯片在制造生产完成后,该目标芯片包括的处理核的总数量、各个处理核的绝对坐标和身份标识等处理核信息均已经确定,并且,这些信息会被写入目标芯片的存储器中,例如写入一次性可编程存储器(efuse)中。目标芯片的存储器中还存储有该目标芯片的基本信息,例如目标芯片可使用电源电压、版本号、生产日期等信息。After the target chip is manufactured and produced, the processing core information such as the total number of processing cores included in the target chip, the absolute coordinates and identification of each processing core have been determined, and these information will be written into the memory of the target chip. For example, write into one-time programmable memory (efuse). Basic information of the target chip is also stored in the memory of the target chip, for example, information such as power supply voltage, version number, production date, etc. that can be used by the target chip.
在一些实施例中,目标芯片在制造完成后,通常还需要对目标芯片进行测试。通过对目标芯片的测试过程,能够确定出该目标芯片的故障处理核信息(例如故障核的实际数量、故障核在目标芯片中的绝对坐标、故障核的ID等),该目标芯片的故障处理核信息被写入该目标芯片的存储器中,例如写入目标芯片的efuse中。In some embodiments, after the target chip is fabricated, the target chip usually needs to be tested. Through the testing process of the target chip, it is possible to determine the fault processing core information of the target chip (such as the actual number of faulty cores, the absolute coordinates of the faulty core in the target chip, the ID of the faulty core, etc.), the fault processing of the target chip The core information is written into the memory of the target chip, eg, into the efuse of the target chip.
在一个实施方式中,获取模块1401对目标芯片的一次性可编程存储器进行读取,得到该目标芯片的故障处理核信息。In one embodiment, the obtaining module 1401 reads the one-time programmable memory of the target chip to obtain the fault handling core information of the target chip.
决策模块1402,用于基于故障处理核信息和预设故障信息,确定目标芯片是否符合重分组条件。The decision module 1402 is configured to determine whether the target chip meets the regrouping condition based on the fault processing core information and the preset fault information.
其中,预设故障信息是预设的目标芯片的故障核的信息。该预设故障信息包括处理核故障率、故障核的预设数量、故障核的预设坐标等一种或多种信息。Wherein, the preset fault information is preset information of faulty cores of the target chip. The preset failure information includes one or more kinds of information, such as a processing core failure rate, a preset number of faulty cores, and preset coordinates of the faulty cores.
本实施例中,确定目标芯片是否符合重分组条件的步骤可参见前述实施例,此处不再赘述。In this embodiment, the steps of determining whether the target chip meets the regrouping condition may refer to the foregoing embodiment, and details are not repeated here.
处理模块1403,用于在目标芯片符合重分组条件的情况下,基于故障处理核信息,对目标芯片对应的算法编译结果进行分组处理,以获得当前分组结果,以使目标芯片的正常核基于当前分组结果和所述算法编译结果实现预备承载的算法。The processing module 1403 is configured to perform grouping processing on the algorithm compilation result corresponding to the target chip based on the fault processing core information under the condition that the target chip meets the regrouping condition, so as to obtain the current grouping result, so that the normal core of the target chip is based on the current The grouping result and the algorithm compilation result implement the algorithm for preparing the bearer.
其中,算法编译结果包括与目标芯片预备承载的算法所对应的可执行文件。The algorithm compilation result includes an executable file corresponding to the algorithm prepared to be carried by the target chip.
本实施例中,基于故障处理核信息,对目标芯片对应的算法编译结果进行分组处理, 以获得当前分组结果的步骤可参见前述实施例,此处不再赘述。In this embodiment, based on the fault processing core information, grouping processing is performed on the algorithm compilation result corresponding to the target chip, so as to obtain the current grouping result, reference may be made to the foregoing embodiment, which will not be repeated here.
在一个实施方式中,在目标芯片的设计阶段确定该目标芯片的预设故障信息之后,处理模块1403还用于基于预设故障信息,对目标芯片对应的算法编译结果进行分组处理,以获得预设分组结果。In one embodiment, after the preset fault information of the target chip is determined in the design stage of the target chip, the processing module 1403 is further configured to perform grouping processing on the algorithm compilation results corresponding to the target chip based on the preset fault information, so as to obtain the preset fault information. Set the grouping result.
其中,算法编译结果包括与目标芯片预备承载的算法所对应的可执行文件(如二进制可执行文件)。目标芯片预备承载的算法是指预备在该目标芯片上实现的算法,该算法是解决问题的方法及流程,是一段逻辑,而目标芯片则是实际执行解决问题的方法与流程的物理设备。将该预备承载的算法变为可执行文件的过程就是对该预备承载的算法进行编译的过程。The algorithm compilation result includes an executable file (eg, a binary executable file) corresponding to the algorithm prepared to be carried by the target chip. The algorithm to be carried by the target chip refers to the algorithm to be implemented on the target chip. The algorithm is a method and process for solving a problem, and it is a piece of logic, while the target chip is a physical device that actually implements the method and process for solving the problem. The process of converting the pre-hosted algorithm into an executable file is the process of compiling the pre-hosted algorithm.
目标芯片可以通过运行预备承载的算法所对应的可执行文件来实现该预备承载的算法。由于目标芯片是包括多个处理核的芯片,最终执行算法所对应的可执行文件的是目标芯片的多个处理核。因此,本实施方式中,通过在芯片设计阶段预估一定的处理核故障率或者故障核预设数量,然后基于预设故障信息,对包括该可执行文件的算法编译结果进行分组处理,将该算法编译结果分为多个编译结果分组,每个编译结果分组用于指示待映射到一个正常核执行的可执行文件,能够便于目标芯片的多个处理核中预设的正常核基于预设分组结果和算法编译结果实现预备承载的算法,保证目标芯片的多个处理核中存在一定故障的情况下,针对该目标芯片对应的算法编译结果的预设分组结果依然可以使用,能够提升目标芯片的使用率,减少目标芯片资源的浪费,同时也减少芯片制造的成本。The target chip may implement the pre-carried algorithm by running the executable file corresponding to the pre-carried algorithm. Since the target chip is a chip including multiple processing cores, it is the multiple processing cores of the target chip that finally execute the executable file corresponding to the algorithm. Therefore, in this embodiment, by estimating a certain processing core failure rate or a preset number of faulty cores in the chip design stage, and then grouping the algorithm compilation results including the executable file based on the preset failure information, the The algorithm compilation result is divided into multiple compilation result groups, and each compilation result group is used to indicate the executable file to be mapped to a normal core for execution, which can facilitate the preset normal cores in the multiple processing cores of the target chip based on the preset grouping The result and the algorithm compilation result implement the algorithm for preparatory bearing, and ensure that in the case of certain faults in the multiple processing cores of the target chip, the preset grouping results of the algorithm compilation result corresponding to the target chip can still be used, which can improve the performance of the target chip. The utilization rate is reduced, the waste of target chip resources is reduced, and the cost of chip manufacturing is also reduced.
重分组条件包括是否需要再次对目标芯片对应的算法编译结果进行分组处理的条件。The regrouping condition includes whether it is necessary to perform grouping processing on the algorithm compilation result corresponding to the target chip again.
需要说明的是,由于故障处理核的预设数量是根据目标芯片的特点来确定的,也就是说,对于批量制造的多个目标芯片,大部分的目标芯片的故障核的实际数量都可能为预设数量,即预设分组结果可以作为大部分目标芯片的分组结果,大大减少了芯片的编译工作量,节省了芯片的计算资源。但是,在实际的应用过程中,预设故障信息与目标芯片的故障处理核信息也可能存在差异。在很多预设故障信息与故障处理核信息存在差异情况中,目标芯片无法基于预设分组结果和算法编译结果实现预备承载的算法,目标芯片可能会被抛弃,依旧会造成芯片资源的浪费。因此,为了进一步提升目标芯片的使用率,减少目标芯片资源的浪费,降低目标芯片制造成本,需要对算法编译结果重新进行分组处理。It should be noted that, since the preset number of fault processing cores is determined according to the characteristics of the target chip, that is to say, for multiple target chips manufactured in batches, the actual number of fault cores of most target chips may be The preset number, that is, the preset grouping result can be used as the grouping result of most target chips, which greatly reduces the compilation workload of the chip and saves the computing resources of the chip. However, in an actual application process, there may be differences between the preset fault information and the fault processing core information of the target chip. In many cases where there is a difference between the preset fault information and the fault processing core information, the target chip cannot implement the pre-loading algorithm based on the preset grouping results and algorithm compilation results, and the target chip may be discarded, which will still cause a waste of chip resources. Therefore, in order to further improve the utilization rate of the target chip, reduce the waste of target chip resources, and reduce the manufacturing cost of the target chip, it is necessary to regroup the algorithm compilation results.
在一个实施方式中,处理模块1403还用于在目标芯片不符合重分组条件的情况下,将预设分组结果作为当前分组结果,以使目标芯片的正常核基于当前分组结果和算法编译结果实现预备承载的算法。In one embodiment, the processing module 1403 is further configured to use the preset grouping result as the current grouping result in the case that the target chip does not meet the regrouping condition, so that the normal core of the target chip can realize the realization based on the current grouping result and the algorithm compilation result Algorithms for preparing bearers.
本公开实施例提供的编译装置,获取模块用于获取目标芯片的故障处理核信息,该目标芯片包括多个处理核,多个处理核包括正常核和/或故障核;决策模块用于基于故障处理核信息和预设故障信息,确定目标芯片是否符合重分组条件;处理模块用于在目标 芯片符合重分组条件的情况下,基于故障处理核信息,对目标芯片对应的算法编译结果进行分组处理,获得当前分组结果,以使目标芯片的正常核基于当前分组结果和算法编译结果实现预备承载的算法,能够提高芯片使用过程的灵活性,保证目标芯片的故障核不需要处理算法编译结果,进而有效避免出现目标芯片因为故障核而无法实现预备承载的算法的情况,有效提升芯片资源的利用率,降低芯片的制造成本。In the compiling apparatus provided by the embodiment of the present disclosure, the acquisition module is used to acquire fault processing core information of a target chip, where the target chip includes multiple processing cores, and the multiple processing cores include normal cores and/or faulty cores; the decision module is used for fault-based processing Processing core information and preset fault information to determine whether the target chip meets the regrouping conditions; the processing module is used to perform grouping processing on the algorithm compilation results corresponding to the target chip based on the fault processing core information when the target chip meets the regrouping conditions , to obtain the current grouping result, so that the normal core of the target chip can realize the preparatory bearing algorithm based on the current grouping result and the algorithm compilation result, which can improve the flexibility of the chip usage process and ensure that the faulty core of the target chip does not need to process the algorithm compilation result, and then It can effectively avoid the situation that the target chip cannot implement the algorithm of the preparatory load due to the faulty core, effectively improve the utilization rate of chip resources, and reduce the manufacturing cost of the chip.
图15为本公开实施例提供的一种电子设备的框图。FIG. 15 is a block diagram of an electronic device according to an embodiment of the present disclosure.
参照图15,本公开实施例提供了一种电子设备,该电子设备包括:至少一个处理器1501;至少一个存储器1502,以及一个或多个I/O接口1503,连接在处理器1501与存储器1502之间;其中,存储器1502存储有可被至少一个处理器1501执行的一个或多个计算机程序,一个或多个计算机程序被至少一个处理器1501执行,以使至少一个处理器1501能够执行上述的编译方法。15 , an embodiment of the present disclosure provides an electronic device, the electronic device includes: at least one processor 1501 ; at least one memory 1502 , and one or more I/O interfaces 1503 connected between the processor 1501 and the memory 1502 wherein, the memory 1502 stores one or more computer programs executable by the at least one processor 1501, and the one or more computer programs are executed by the at least one processor 1501, so that the at least one processor 1501 can execute the above-mentioned compile method.
本公开实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序在被处理器执行时实现上述的编译方法。计算机可读存储介质可以是易失性或非易失性计算机可读存储介质。Embodiments of the present disclosure also provide a computer-readable storage medium on which a computer program is stored, wherein the computer program implements the above-mentioned compiling method when executed by a processor. Computer-readable storage media can be volatile or non-volatile computer-readable storage media.
本公开实施例还提供了一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,当所述计算机可读代码在电子设备的处理器中运行时,所述电子设备中的处理器执行上述编译方法。Embodiments of the present disclosure also provide a computer program product, including computer-readable codes, or a non-volatile computer-readable storage medium carrying computer-readable codes, when the computer-readable codes are stored in a processor of an electronic device When running in the electronic device, the processor in the electronic device executes the above compiling method.
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读存储介质上,计算机可读存储介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。Those of ordinary skill in the art can understand that all or some of the steps in the methods disclosed above, functional modules/units in the systems, and devices can be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be composed of several physical components Components execute cooperatively. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit . Such software may be distributed on computer-readable storage media, which may include computer storage media (or non-transitory media) and communication media (or transitory media).
如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读程序指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM)、静态随机存取存储器(SRAM)、闪存或其他存储器技术、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读程序指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。As is known to those of ordinary skill in the art, the term computer storage media includes both volatile and non-volatile memory media implemented in any method or technology for storage of information, such as computer readable program instructions, data structures, program modules or other data. volatile, removable and non-removable media. Computer storage media include, but are not limited to, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM), static random access memory (SRAM), flash memory or other memory technologies, portable Compact Disc Read Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical disk storage, magnetic cartridge, magnetic tape, magnetic disk storage or other magnetic storage device, or which can be used to store desired information and which can be accessed by a computer any other medium. In addition, communication media typically embodies computer readable program instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and can include any information delivery, as is well known to those of ordinary skill in the art medium.
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处 理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。The computer readable program instructions described herein may be downloaded to various computing/processing devices from a computer readable storage medium, or to an external computer or external storage device over a network, such as the Internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers. A network adapter card or network interface in each computing/processing device receives computer-readable program instructions from a network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。Computer program instructions for carrying out operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or instructions in one or more programming languages. Source or object code, written in any combination, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as the "C" language or similar programming languages. The computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider through the Internet connect). In some embodiments, custom electronic circuits, such as programmable logic circuits, field programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), can be personalized by utilizing state information of computer readable program instructions. Computer readable program instructions are executed to implement various aspects of the present disclosure.
这里所描述的计算机程序产品可以具体通过硬件、软件或其结合的方式实现。在一个可选实施例中,所述计算机程序产品具体体现为计算机存储介质,在另一个可选实施例中,计算机程序产品具体体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。The computer program product described herein may be embodied in hardware, software, or a combination thereof. In an optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK), etc. Wait.
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。Aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer readable program instructions.
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer or other programmable data processing apparatus to produce a machine that causes the instructions when executed by the processor of the computer or other programmable data processing apparatus , resulting in means for implementing the functions/acts specified in one or more blocks of the flowchart and/or block diagrams. These computer readable program instructions can also be stored in a computer readable storage medium, these instructions cause a computer, programmable data processing apparatus and/or other equipment to operate in a specific manner, so that the computer readable medium storing the instructions includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。Computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other equipment to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , thereby causing instructions executing on a computer, other programmable data processing apparatus, or other device to implement the functions/acts specified in one or more blocks of the flowcharts and/or block diagrams.
附图中的流程图和框图显示了根据本公开的多个实施例的系统、方法和计算机程序 产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more functions for implementing the specified logical function(s) executable instructions. In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented in dedicated hardware-based systems that perform the specified functions or actions , or can be implemented in a combination of dedicated hardware and computer instructions.
本文已经公开了示例实施例,并且虽然采用了具体术语,但它们仅用于并仅应当被解释为一般说明性含义,并且不用于限制的目的。在一些实例中,对本领域技术人员显而易见的是,除非另外明确指出,否则可单独使用与特定实施例相结合描述的特征、特性和/或元素,或可与其他实施例相结合描述的特征、特性和/或元件组合使用。因此,本领域技术人员将理解,在不脱离由所附的权利要求阐明的本公开的范围的情况下,可进行各种形式和细节上的改变。Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should only be construed in a general descriptive sense and not for purposes of limitation. In some instances, it will be apparent to those skilled in the art that features, characteristics and/or elements described in connection with a particular embodiment may be used alone or in combination with other embodiments, unless expressly stated otherwise. Features and/or elements are used in combination. Accordingly, it will be understood by those of ordinary skill in the art that various changes in form and details may be made therein without departing from the scope of the present disclosure as set forth in the appended claims.

Claims (16)

  1. 一种编译方法,其特征在于,包括:A compiling method, comprising:
    获取目标芯片的故障处理核信息;所述目标芯片包括多个处理核,所述多个处理核包括正常核和/或故障核;Acquire fault processing core information of the target chip; the target chip includes multiple processing cores, and the multiple processing cores include normal cores and/or faulty cores;
    基于所述故障处理核信息和预设故障信息,确定所述目标芯片是否符合重分组条件;determining whether the target chip meets the regrouping condition based on the fault processing core information and the preset fault information;
    在所述目标芯片符合重分组条件的情况下,基于所述故障处理核信息,对所述目标芯片对应的算法编译结果进行分组处理,以获得当前分组结果,以使所述目标芯片的正常核基于所述当前分组结果和所述算法编译结果实现预备承载的算法;In the case that the target chip meets the regrouping condition, based on the fault processing core information, perform grouping processing on the algorithm compilation result corresponding to the target chip to obtain the current grouping result, so that the normal core of the target chip can be processed into groups. An algorithm for implementing a preparatory bearer based on the current grouping result and the algorithm compilation result;
    其中,所述算法编译结果包括与所述目标芯片预备承载的算法所对应的可执行文件。The algorithm compilation result includes an executable file corresponding to the algorithm prepared to be carried by the target chip.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    基于预设故障信息,对所述目标芯片对应的算法编译结果进行所述分组处理,以获得预设分组结果;Based on the preset fault information, perform the grouping process on the algorithm compilation result corresponding to the target chip to obtain a preset grouping result;
    在所述目标芯片不符合重分组条件的情况下,将所述预设分组结果作为当前分组结果,以使所述目标芯片的正常核基于所述当前分组结果和所述算法编译结果实现预备承载的算法。In the case that the target chip does not meet the regrouping condition, the preset grouping result is used as the current grouping result, so that the normal core of the target chip implements a preparatory bearer based on the current grouping result and the algorithm compilation result algorithm.
  3. 根据权利要求1或2所述的方法,其特征在于,所述故障处理核信息包括故障核的实际数量;所述预设故障信息包括故障核的预设数量;所述基于所述故障处理核信息和预设故障信息,确定所述目标芯片是否符合重分组条件的步骤,包括:The method according to claim 1 or 2, wherein the fault processing core information includes an actual number of faulty cores; the preset fault information includes a preset number of faulty cores; information and preset fault information, and the steps of determining whether the target chip meets the regrouping conditions include:
    在所述故障核的实际数量与所述故障核的预设数量不一致的情况下,确定所述目标芯片符合重分组条件;In the case that the actual number of the faulty cores is inconsistent with the preset number of the faulty cores, determining that the target chip meets the regrouping condition;
    或者,在所述故障核的实际数量大于所述故障核的预设数量的情况下,确定所述目标芯片符合重分组条件。Alternatively, in the case that the actual number of the faulty cores is greater than the preset number of the faulty cores, it is determined that the target chip meets the regrouping condition.
  4. 根据权利要求1所述的方法,其特征在于,所述故障处理核信息包括故障核的实际数量;所述基于所述故障处理核信息,对所述目标芯片对应的算法编译结果进行分组处理,以获得当前分组结果的步骤,包括:The method according to claim 1, wherein the fault processing core information includes the actual number of fault cores; and the algorithm compilation result corresponding to the target chip is grouped based on the fault processing core information, The steps to obtain the current grouping result include:
    基于所述故障核的实际数量,确定所述正常核的目标数量;determining the target number of the normal cores based on the actual number of the faulty cores;
    基于所述正常核的目标数量,对所述目标芯片对应的算法编译结果进行分组处理,以获得所述当前分组结果;所述当前分组结果包括所述目标数量个编译结果分组,每个所述编译结果分组用于指示待映射到一个正常核执行的可执行文件。Based on the target number of the normal cores, grouping the algorithm compilation results corresponding to the target chips to obtain the current grouping result; the current grouping result includes the target number of compilation result groups, each of the The compilation result group is used to indicate the executable file to be mapped to a normal core execution.
  5. 根据权利要求1所述的方法,其特征在于,所述获取目标芯片的故障处理核信息的步骤,包括:The method according to claim 1, wherein the step of acquiring the fault handling core information of the target chip comprises:
    对所述目标芯片的一次性可编程存储器进行读取,得到所述目标芯片的故障处理核信息。The one-time programmable memory of the target chip is read to obtain fault processing core information of the target chip.
  6. 根据权利要求4所述的方法,其特征在于,所述方法应用于目标芯片;所述故障处理核信息还包括故障核的绝对坐标;所述基于所述正常核的目标数量,对所述目标芯片对应的算法编译结果进行分组处理,以获得所述当前分组结果之后,还包括:The method according to claim 4, wherein the method is applied to a target chip; the fault processing core information further includes absolute coordinates of the fault core; the target number based on the normal core is After the algorithm compilation result corresponding to the chip is grouped to obtain the current grouping result, it further includes:
    根据所述故障核的绝对坐标,确定所述正常核的绝对坐标;According to the absolute coordinates of the faulty core, determine the absolute coordinates of the normal core;
    基于所述正常核的绝对坐标,将所述当前分组结果包括的目标数量个所述编译结果分组映射到所述正常核,其中,任意两个所述编译结果分组映射的所述正常核的绝对坐标互不相同。Based on the absolute coordinates of the normal cores, the target number of the compilation result groups included in the current grouping result are mapped to the normal cores, wherein the absolute coordinates of the normal cores mapped by any two of the compilation result groups are The coordinates are different from each other.
  7. 根据权利要求6所述的方法,其特征在于,所述基于所述正常核的绝对坐标,将所述当前分组结果包括的目标数量个所述编译结果分组映射到所述正常核的步骤,包括:The method according to claim 6, wherein the step of grouping and mapping a target number of the compilation results included in the current grouping result to the normal cores based on the absolute coordinates of the normal cores comprises: :
    基于所述正常核的绝对坐标和所述正常核的计算能力参数,将所述当前分组结果包括的目标数量个所述编译结果分组映射到所述正常核。Based on the absolute coordinates of the normal cores and the computing capability parameter of the normal cores, a target number of the compilation result groups included in the current grouping result are grouped and mapped to the normal cores.
  8. 根据权利要求1所述的方法,其特征在于,所述方法应用于目标芯片;所述方法还包括:The method according to claim 1, wherein the method is applied to a target chip; the method further comprises:
    接收目标芯片外部的电子设备发送的所述算法编译结果。The algorithm compilation result sent by the electronic device outside the target chip is received.
  9. 根据权利要求1所述的方法,其特征在于,所述方法应用于所述目标芯片外部的电子设备,所述方法还包括:The method according to claim 1, wherein the method is applied to an electronic device outside the target chip, and the method further comprises:
    对所述目标芯片预备承载的算法进行编译,获得所述算法编译结果。Compile the algorithm to be carried by the target chip to obtain the algorithm compilation result.
  10. 根据权利要求1所述的方法,其特征在于,所述方法应用于目标芯片外部的电子设备,所述基于所述故障处理核信息,对所述目标芯片对应的算法编译结果进行分组处理,以获得当前分组结果之后,所述方法还包括:The method according to claim 1, wherein the method is applied to an electronic device outside the target chip, and the algorithm compilation result corresponding to the target chip is grouped based on the fault processing core information, so as to After obtaining the current grouping result, the method further includes:
    将所述当前分组结果和所述算法编译结果发送至所述目标芯片,以供所述目标芯片的正常核基于所述当前分组结果和所述算法编译结果实现预备承载的算法。The current grouping result and the algorithm compilation result are sent to the target chip, so that the normal core of the target chip implements the algorithm for preparing the bearer based on the current grouping result and the algorithm compilation result.
  11. 根据权利要求1所述的方法,其特征在于,所述方法应用于目标芯片外部的电子设备,所述方法还包括:The method according to claim 1, wherein the method is applied to an electronic device outside the target chip, and the method further comprises:
    基于多个目标芯片中每个目标芯片的故障处理核信息和各自对应的算法编译结果,确定同类芯片;其中,多个目标芯片中故障处理核信息一致、且对应的算法编译结果一致的目标芯片称为同类芯片;Based on the fault processing core information of each target chip in the multiple target chips and the corresponding algorithm compilation results, the same type of chips are determined; among them, the fault processing core information in the multiple target chips is consistent and the corresponding algorithm compilation results are consistent. called the same chip;
    所述基于所述故障处理核信息,对所述目标芯片对应的算法编译结果进行分组处理, 以获得当前分组结果之后,所述方法还包括:After performing grouping processing on the algorithm compilation result corresponding to the target chip based on the fault processing core information to obtain the current grouping result, the method further includes:
    将所述当前分组结果作为所述目标芯片的同类芯片所对应的当前分组结果。The current grouping result is used as the current grouping result corresponding to the same chip of the target chip.
  12. 根据权利要求4所述的方法,其特征在于,所述方法应用于目标芯片外部的电子设备,所述故障处理核信息包括故障核的绝对坐标;所述基于所述正常核的目标数量,对所述目标芯片对应的算法编译结果进行分组处理,以获得所述当前分组结果之后,所述方法还包括:The method according to claim 4, wherein the method is applied to an electronic device outside the target chip, and the fault processing core information includes absolute coordinates of the fault core; After the algorithm compilation result corresponding to the target chip is grouped to obtain the current grouping result, the method further includes:
    根据所述故障核的绝对坐标,获取所述正常核的绝对坐标;Obtain the absolute coordinates of the normal core according to the absolute coordinates of the faulty core;
    将编译结果分组与正常核的绝对坐标之间一一对应,得到编译结果分组与正常核的绝对坐标的对应关系;One-to-one correspondence between the compilation result grouping and the absolute coordinates of the normal core is obtained, and the corresponding relationship between the compilation result grouping and the absolute coordinates of the normal core is obtained;
    基于编译结果分组与正常核的绝对坐标的对应关系,对所述目标芯片的路由进行路由编译,获得路由编译结果;Based on the corresponding relationship between the compilation result grouping and the absolute coordinates of the normal core, route compilation is performed on the route of the target chip, and the route compilation result is obtained;
    将所述当前分组结果、所述路由编译结果和所述算法编译结果发送至所述目标芯片。Sending the current grouping result, the routing compilation result and the algorithm compilation result to the target chip.
  13. 一种编译装置,其特征在于,所述编译装置包括:A compiling device, characterized in that the compiling device comprises:
    获取模块,用于获取目标芯片的故障处理核信息;所述目标芯片包括多个处理核,所述多个处理核包括正常核和/或故障核;an acquisition module, configured to acquire fault processing core information of a target chip; the target chip includes multiple processing cores, and the multiple processing cores include normal cores and/or faulty cores;
    决策模块,用于基于所述故障处理核信息和预设故障信息,确定所述目标芯片是否符合重分组条件;a decision-making module, configured to determine whether the target chip meets the regrouping condition based on the fault processing core information and the preset fault information;
    处理模块,用于在所述目标芯片符合重分组条件的情况下,基于所述故障处理核信息,对所述目标芯片对应的算法编译结果进行分组处理,以获得当前分组结果,以使所述目标芯片的正常核基于所述当前分组结果和所述算法编译结果实现预备承载的算法;其中,所述算法编译结果包括与所述目标芯片预备承载的算法所对应的可执行文件。The processing module is configured to perform grouping processing on the algorithm compilation result corresponding to the target chip based on the fault processing core information under the condition that the target chip meets the regrouping condition, so as to obtain a current grouping result, so that the The normal core of the target chip implements the algorithm to be carried by the current grouping result and the algorithm compilation result; wherein the algorithm compilation result includes an executable file corresponding to the algorithm to be carried by the target chip.
  14. 一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至12中任一所述的编译方法。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, any one of claims 1 to 12 is implemented the compilation method described.
  15. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该计算机程序被处理器执行时实现如权利要求1至12中任一所述的编译方法。A computer-readable storage medium on which a computer program is stored, characterized in that, when the computer program is executed by a processor, the compiling method according to any one of claims 1 to 12 is implemented.
  16. 一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,其中,当所述计算机可读代码在电子设备的处理器中运行时,所述电子设备中的处理器执行用于实现权利要求1-12中的任一项所述的编译方法。A computer program product comprising computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code, wherein when the computer-readable code is executed in a processor of an electronic device, all The processor in the electronic device executes the compilation method for implementing any one of claims 1-12.
PCT/CN2022/081695 2021-03-26 2022-03-18 Compiling method and apparatus, electronic device, and computer-readable storage medium WO2022199483A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202110326147.X 2021-03-26
CN202110325748.9A CN112882722A (en) 2021-03-26 2021-03-26 Compiling method, chip, computer readable medium
CN202110326147.XA CN112925525A (en) 2021-03-26 2021-03-26 Compiling method, mapping method, server, chip, device and medium
CN202110325748.9 2021-03-26

Publications (1)

Publication Number Publication Date
WO2022199483A1 true WO2022199483A1 (en) 2022-09-29

Family

ID=83395158

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/081695 WO2022199483A1 (en) 2021-03-26 2022-03-18 Compiling method and apparatus, electronic device, and computer-readable storage medium

Country Status (1)

Country Link
WO (1) WO2022199483A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180181474A1 (en) * 2016-12-22 2018-06-28 Intel Corporation Systems and Methods for In-Field Core Failover
CN108563449A (en) * 2015-12-08 2018-09-21 上海兆芯集成电路有限公司 Compiler system and the method that application source program is compiled as executable program
US20190121713A1 (en) * 2017-10-19 2019-04-25 International Business Machines Corporation Method to sort partially good cores for specific operating system usage
CN112882722A (en) * 2021-03-26 2021-06-01 北京灵汐科技有限公司 Compiling method, chip, computer readable medium
CN112925525A (en) * 2021-03-26 2021-06-08 北京灵汐科技有限公司 Compiling method, mapping method, server, chip, device and medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108563449A (en) * 2015-12-08 2018-09-21 上海兆芯集成电路有限公司 Compiler system and the method that application source program is compiled as executable program
US20180181474A1 (en) * 2016-12-22 2018-06-28 Intel Corporation Systems and Methods for In-Field Core Failover
US20190121713A1 (en) * 2017-10-19 2019-04-25 International Business Machines Corporation Method to sort partially good cores for specific operating system usage
CN112882722A (en) * 2021-03-26 2021-06-01 北京灵汐科技有限公司 Compiling method, chip, computer readable medium
CN112925525A (en) * 2021-03-26 2021-06-08 北京灵汐科技有限公司 Compiling method, mapping method, server, chip, device and medium

Similar Documents

Publication Publication Date Title
US10430318B1 (en) Systems and methods for efficiently performing regression testing on software updates
US9432301B2 (en) Defining disjoint node groups for virtual machines with pre-existing placement policies
US10754869B2 (en) Managing data format of data received from devices in an internet of things network
US20160142475A1 (en) Shard management service
US10223301B2 (en) Pre-allocating memory buffers by physical processor and using a bitmap metadata in a control program
CN113204353B (en) Big data platform assembly deployment method and device
CN109189327A (en) The compression processing method and device of block chain data
US11558736B2 (en) Commit sets in a Kubernetes environment
WO2022199483A1 (en) Compiling method and apparatus, electronic device, and computer-readable storage medium
CN112925525A (en) Compiling method, mapping method, server, chip, device and medium
WO2023197851A1 (en) Abnormal component identification method and apparatus, device, storage medium, and program product
CN107463638A (en) File sharing method and equipment between offline virtual machine
US10379973B2 (en) Allocating storage in a distributed storage system
CN112003730A (en) Method, system, terminal and storage medium for rapid cluster deployment
US11704119B2 (en) Migrating infrastructure as code between different cloud providers
CN110581800A (en) Method and device for creating virtual router interface, storage medium and equipment
TWI662486B (en) Method and device for checking completeness of distributed business processing
CN112882722A (en) Compiling method, chip, computer readable medium
CN115408328A (en) Many-core system, processing method and processing unit
CN110058790B (en) Method, apparatus and computer program product for storing data
US11216263B2 (en) Policy-based automated generation of software-defined storage deployments
CN110113181A (en) Node configuration method, device, computer installation and readable storage medium storing program for executing
CN111797070A (en) Ticket data processing method and device
CN110287004B (en) Basic environment mirror image preheating method and device based on docker container technology
US11893373B2 (en) Exposure and de-duplication of input parameters for complex Helm chart deployment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22774144

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22774144

Country of ref document: EP

Kind code of ref document: A1