Control device, control method and controller of artificial intelligence AI chip

By introducing a controller and a prohibition circuit into the AI ​​chip, the opening of the AIC is flexibly controlled according to the number of AICs allowed to be opened, which solves the problem of performance degradation and replacement caused by damage to the AIC in the AI ​​chip, improves the utilization rate of the AIC, and improves the user experience. .

CN116406490BActive Publication Date: 2024-09-06HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202080106663.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-28
Publication Date
2024-09-06
Estimated Expiration
2040-10-28

AI Technical Summary

Technical Problem

Existing AI chips have different computing power requirements in different application scenarios, which results in the chips needing to be divided into high and low specifications. As a result, some AICs need to be dismantled and replaced when damaged after work. The utilization rate is low, which affects the user experience.

Method used

By introducing a controller and a prohibition circuit into the AI ​​chip, control instructions are generated based on the number of AICs allowed to be opened, and the opening and closing of AICs are flexibly controlled to avoid performance degradation caused by damage to AICs, and the use of AICs is optimized through quantity limiters and accumulators. .

Benefits of technology

It improves the utilization rate of AIC in the AI ​​chip, avoids performance degradation and replacement problems caused by AIC damage, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116406490B
    Figure CN116406490B
Patent Text Reader

Abstract

A control device, control method and controller of an AI chip are used to realize flexible control of AIC in the AI ​​chip while improving the utilization rate of AIC in the AI ​​chip, thereby improving user experience. In the control device of the artificial intelligence AI chip, the AI ​​chip includes N artificial intelligence core AICs, where N is an integer greater than 1, and the device includes: a controller, and a prohibition circuit connected to the controller; then, the controller is used to determine that the number of AICs allowed to be turned on in the N AICs is a first number, and after generating a control instruction according to the first number, the control instruction is sent to the prohibition circuit; thereafter, the prohibition circuit is connected to the N AICs, and is used to turn on or off at least one AIC in the N AICs according to the control instruction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of artificial intelligence (AI), and in particular to a control device, a control method, and a controller for an artificial intelligence (AI) chip. Background Art

[0002] Artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a branch of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is also the study of the design principles and implementation methods of various intelligent machines, so that machines have the functions of perception, reasoning and decision-making. Research in the field of artificial intelligence includes robotics, natural language processing, computer vision, decision-making and reasoning, human-computer interaction, recommendation and search, basic AI theory, etc.

[0003] At present, different application scenarios may have different computing power requirements. Hardware manufacturers generally design an AI chip that can meet different application scenarios at the same time, and divide the chips into different specifications for different application scenarios. Take the open compute project accelerator module (OAM or OCP acceleration module) and the high-speed peripheral component interconnect express (PCI-Express or PCIE) card, two commonly used AI basic hardware units in the industry, as high-specification chips and low-specification chips respectively.

[0004] Among them, the PCIE card uses the traditional PCIE interface, which has good inheritance and can be directly plugged into existing servers and desktops to quickly provide AI acceleration at a low cost. The disadvantage is that the power consumption is limited, with a maximum of 250 to 300 watts (W) for a single card; and the number of interfaces is limited, with only one set of PCIE X16 interfaces; the interface rate is limited by the structure and topology of the gold finger, with a maximum of 32 gigabits per second per channel (Gbps / lane), and low computing power. In addition, OAM is specially tailored for AI and can support higher power consumption (such as 700W), more interfaces (such as 8 sets of X16 interfaces), wider rates (such as 112Gbps / lane), and higher computing power. The disadvantage is that it cannot be directly plugged into an existing server, and the server needs to be redesigned. In addition, the compatibility between manufacturers is not as good as PCIE, and the cost is relatively high.

[0005] Generally, for sales strategies or other reasons (such as chip yield), it is necessary to classify chips into two categories for the above two scenarios, namely NPU_OAM and NPU_PCIE. Figure 1 As shown, when the AI ​​chip leaves the factory, each AIC in the AI ​​chip is set with an enable switch (Open). The AIC can be turned off by configuring Open=0, and the AIC can be turned on by configuring Open=1. In addition, the (pass) in each AIC indicates that the AIC function is intact. For high-specification OAM that requires 36 AICs, Figure 1 As shown, the Open of all AICs is configured as 1; for the low-specification NPU_PCIE that needs to use 25 AICs, only some of the AICs are configured as 1, and the Open of other AICs is configured as 0. For the terminal device using the AI ​​chip, the terminal device reads the Open configuration (0 or 1) corresponding to each AIC in the AI ​​chip, and controls the opening or closing of each AIC according to the configuration.

[0006] However, if Figure 1 In the configuration shown, after the AI ​​chip has worked for a period of time, if the AIC with Open configured as 1 is partially damaged, such as Figure 2 As shown in AIC_01(fail), the chip performance of AIC_01 has degraded or is unavailable. The terminal device using this AI chip must dismantle and replace the entire AI chip. Although the AIC with Open configured as 0 in the AI ​​chip is not damaged, the terminal device is limited to the factory configuration of this Open and cannot be used, resulting in low utilization of the AIC of the AI ​​chip in this configuration, affecting the user experience. Summary of the invention

[0007] The embodiments of the present application provide a control device, a control method and a controller for an artificial intelligence (AI) chip, which are used to realize flexible control of the AIC in the AI ​​chip while improving the utilization rate of the AIC in the AI ​​chip, thereby improving the user experience.

[0008] A first aspect of an embodiment of the present application provides a control device for an artificial intelligence (AI) chip, wherein the AI ​​chip includes N artificial intelligence cores AICs, wherein N is an integer greater than 1, and the device includes: a controller, and a prohibition circuit connected to the controller; the controller is used to determine that the number of AICs allowed to be turned on among the N AICs is a first number, and after generating a control instruction according to the first number, sends the control instruction to the prohibition circuit; thereafter, the prohibition circuit is connected to the N AICs, and is used to turn on or off at least one AIC among the N AICs according to the control instruction.

[0009] Based on the above technical solution, in the control device of the AI ​​chip, the controller uses the number of AICs allowed to be turned on in the N AICs in the AI ​​chip as the basis for generating control instructions, and executes the opening or closing of at least one AIC in the N AICs by prohibiting the circuit. Compared with the method of controlling the opening or closing of each AIC by configuring the Open of each AIC to 1 or 0, the opening or closing of at least one AIC in the N AICs can be flexibly controlled according to the number of AICs allowed to be turned on in the N AICs. It avoids the situation where the entire AI chip must be disassembled and replaced when some AICs with Open configured as 1 are damaged, resulting in a decrease in chip performance or unavailability, resulting in a low utilization rate of the AIC in the AI ​​chip. While realizing flexible control of the AIC in the AI ​​chip, the utilization rate of the AIC in the AI ​​chip is improved, thereby improving the user experience.

[0010] In a specific implementation of the first aspect of the embodiment of the present application, the device also includes a quantity limiter connected to the controller; wherein the quantity limiter is used to limit the number of AICs allowed to be opened among the N AICs to a first number; at this time, the controller is specifically used to determine the first number through the quantity limiter.

[0011] Based on the above technical solution, in the AI ​​control device, the number of AICs allowed to be turned on among the N AICs can be limited by hardware, that is, in the control device of the AI ​​chip, a quantity limiter for limiting the number of AICs allowed to be turned on among the N AICs to a first quantity is also included, that is, the controller can specifically determine the first quantity through the quantity limiter. While providing a specific implementation method for the controller to determine the first quantity, the security of limiting the first quantity can be improved by hardware limitation of the quantity controller.

[0012] In a specific implementation of the first aspect of the embodiment of the present application, the quantity limiter includes at least one electronic fuse efuse, and the quantity limiter is used to limit the number of AICs allowed to be turned on among the N AICs to the first number through the output level of the at least one efuse.

[0013] Based on the above technical solution, the quantity limiter can specifically limit the first quantity by burning at least one efuse, that is, limiting the number of AICs allowed to be turned on among the N AICs to the first number through the output level of at least one efuse, providing a specific implementation method for the quantity limiter to limit the first number, thereby improving the feasibility of the solution.

[0014] In a specific implementation of the first aspect of the embodiment of the present application, when the fuse state of the at least one efuse is blown, the output level of the at least one efuse is a first level; and / or, when the fuse state of the at least one efuse is not blown, the output level of the at least one efuse is a second level; wherein the first level is different from the second level.

[0015] Based on the above technical solution, different fuse states of at least one efuse can correspond to different output levels, so that the quantity limiter can limit the first quantity through the different output levels of at least one efuse, providing a specific implementation method for the quantity limiter to limit the first quantity through at least one efuse, thereby improving the feasibility of the solution.

[0016] In a specific implementation of the first aspect of the embodiment of the present application, the device also includes an accumulator connected to the controller; wherein the accumulator is connected to the N AICs and is used to count the number of AICs that are turned on among the N AICs as a second number; at this time, the controller is specifically used to generate the control instruction based on the first number and the second number.

[0017] Based on the above technical solution, the control device of the AI ​​chip may further include an accumulator for counting the number of AICs that have been turned on in the N AICs as a second number, that is, the controller can obtain the second number in real time through the accumulator, and generate a control instruction to be sent to the prohibition circuit based on the first number and the second number. That is, the controller combines the number of AICs allowed to be turned on in the N AICs and the number of AICs that have been turned on, turns on or off at least one AIC in the N AICs, and further optimizes the control of the N AICs during the use of the AI ​​chip.

[0018] In a specific implementation of the first aspect of the embodiment of the present application, the accumulator is specifically used to connect the non-faulty AICs among the N AICs, and the second number is used to indicate the number of opened AICs among the non-faulty AICs.

[0019] Based on the above technical solution, the accumulator can specifically avoid the faulty AIC among N AICs, that is, the number of opened AICs among the non-faulty AICs among the N AICs is counted as the second number, thereby avoiding the controller from sending an opening instruction to the faulty AIC, thereby further optimizing the control of the AI ​​chip.

[0020] In a specific implementation of the first aspect of the embodiment of the present application, the AI ​​chip includes a graphics processing unit GPU, a neural processing unit NPU or a tensor processing unit TPU.

[0021] Based on the above technical solutions, the AI ​​chip can be applied to a variety of different application scenarios, such as CPU, NPU, TPU or other AI application scenarios, thereby improving the applicability of the solution.

[0022] A second aspect of an embodiment of the present application provides a control method for an artificial intelligence (AI) chip, characterized in that the method is applied to a controller in a control device of the AI ​​chip, the device also including a prohibition circuit, wherein the AI ​​chip includes N artificial intelligence cores AICs, wherein N is an integer greater than 1, and the method includes: the controller first determines that the number of AICs allowed to be turned on among the N AICs is a first number; then, the controller generates a control instruction according to the first number, and the control instruction is used to instruct to turn on or off at least one AIC among the N AICs; finally, the controller sends the control instruction to the prohibition circuit.

[0023] Based on the above technical solution, in the control device of the AI ​​chip, the controller uses the number of AICs allowed to be turned on in the N AICs in the AI ​​chip as the basis for generating a control instruction, and sends the control instruction to the prohibition circuit so that the prohibition circuit executes to turn on or off at least one AIC in the N AICs. Compared with the method of controlling the opening or closing of each AIC by configuring the Open of each AIC to 1 or 0, the opening or closing of at least one AIC in the N AICs can be flexibly controlled according to the number of AICs allowed to be turned on in the N AICs. When some AICs with Open configured as 1 are damaged, resulting in a decrease in chip performance or unavailability, the entire AI chip must be disassembled and replaced, resulting in a low utilization rate of the AICs in the AI ​​chip. While realizing flexible control of the AICs in the AI ​​chip, the utilization rate of the AICs in the AI ​​chip is improved, thereby improving the user experience.

[0024] In a specific implementation of the second aspect of the embodiment of the present application, the device also includes a quantity limiter, which is used to limit the number of AICs allowed to be opened among the N AICs to a first number; wherein, the controller determines that the number of AICs allowed to be opened among the N AICs is the first number, including: the controller determines that the number of AICs allowed to be opened among the N AICs is the first number through the quantity limiter.

[0025] Based on the above technical solution, in the AI ​​control device, the number of AICs allowed to be turned on among the N AICs can be limited by hardware, that is, in the control device of the AI ​​chip, a quantity limiter for limiting the number of AICs allowed to be turned on among the N AICs to a first quantity is also included, that is, the controller can specifically determine the first quantity through the quantity limiter. While providing a specific implementation method for the controller to determine the first quantity, the security of limiting the first quantity can be improved by hardware limitation of the quantity controller.

[0026] In a specific implementation of the second aspect of the embodiment of the present application, the device also includes an accumulator, which is used to count the number of AICs that have been turned on among the N AICs as a second number; before generating the control instruction, the method also includes: determining the second number through the accumulator; wherein the controller generates the control instruction according to the first number includes: the controller generates the control instruction according to the first number and the second number.

[0027] Based on the above technical solution, the control device of the AI ​​chip may further include an accumulator for counting the number of AICs that have been turned on in the N AICs as a second number, that is, the controller can obtain the second number in real time through the accumulator, and generate a control instruction to be sent to the prohibition circuit based on the first number and the second number. That is, the controller combines the number of AICs allowed to be turned on in the N AICs and the number of AICs that have been turned on, turns on or off at least one AIC in the N AICs, and further optimizes the control of the N AICs during the use of the AI ​​chip.

[0028] In a specific implementation manner of the second aspect of the embodiment of the present application, the second number is used to indicate the number of turned-on AICs among the non-faulty AICs of the N AICs.

[0029] Based on the above technical solution, the accumulator can specifically avoid the faulty AIC among N AICs, that is, the number of opened AICs among the non-faulty AICs among the N AICs is counted as the second number, thereby avoiding the controller from sending an opening instruction to the faulty AIC, thereby further optimizing the control of the AI ​​chip.

[0030] In a specific implementation of the second aspect of the embodiment of the present application, the AI ​​chip includes a graphics processing unit GPU, a neural processing unit NPU or a tensor processing unit TPU.

[0031] Based on the above technical solutions, the AI ​​chip can be applied to a variety of different application scenarios, such as CPU, NPU, TPU or other AI application scenarios, thereby improving the applicability of the solution.

[0032] According to a third aspect of an embodiment of the present application, a controller of an artificial intelligence (AI) chip is provided. The controller is included in a control device of the AI ​​chip. The control device also includes a prohibition circuit. The AI ​​chip includes N artificial intelligence cores AIC, where N is an integer greater than 1. The controller includes:

[0033] A determining unit, configured to set the number of AICs allowed to be opened among the N AICs to be a first number;

[0034] A generating unit, configured to generate a control instruction according to the first quantity, wherein the control instruction is used to instruct to turn on or off at least one AIC among the N AICs;

[0035] The sending unit is used to send the control instruction to the prohibition circuit.

[0036] In a specific implementation of the third aspect of the embodiment of the present application, the device further includes a quantity limiter, which is used to limit the number of AICs allowed to be opened among the N AICs to a first number;

[0037] The determining unit is specifically configured to determine, through the quantity limiter, that the number of AICs allowed to be opened among the N AICs is a first number.

[0038] In a specific implementation of the third aspect of the embodiment of the present application, the device further includes an accumulator, which is used to count the number of opened AICs in the N AICs as a second number;

[0039] The determining unit is further configured to determine the second quantity through the accumulator;

[0040] The generating unit is specifically configured to generate the control instruction according to the first quantity and the second quantity.

[0041] In a specific implementation manner of the third aspect of the embodiment of the present application, the second number is used to indicate the number of turned-on AICs among the non-faulty AICs of the N AICs.

[0042] In a specific implementation of the third aspect of the embodiment of the present application, the AI ​​chip includes a graphics processing unit GPU, a neural processing unit NPU or a tensor processing unit TPU.

[0043] In the third aspect of the embodiment of the present application, the component modules of the controller can also be used to execute the steps performed in various possible implementation methods of the second aspect. For details, please refer to the second aspect and will not be repeated here.

[0044] A fourth aspect of an embodiment of the present application provides a controller, which includes at least one processor, a memory, a communication port, and computer execution instructions stored in the memory and executable on the processor. When the computer execution instructions are executed by the processor, the processor executes the method described in the second aspect or any possible implementation of the second aspect.

[0045] A fifth aspect of an embodiment of the present application provides a computer-readable storage medium storing one or more computer-executable instructions. When the computer-executable instructions are executed by a processor, the processor executes the method described in the second aspect or any possible implementation of the second aspect.

[0046] A sixth aspect of an embodiment of the present application provides a computer program product storing one or more computer-executable instructions. When the computer-executable instructions are executed by the processor, the processor executes the method of the second aspect or any possible implementation of the second aspect.

[0047] In a seventh aspect, the present application provides a chip system, which includes a processor for supporting a controller to implement the functions involved in the second aspect or any possible implementation of the second aspect. In a possible design, the chip system may also include a memory for storing necessary program instructions and data. The chip system may be composed of a chip or may include a chip and other discrete devices.

[0048] Among them, the technical effects brought about by the third to seventh aspects or any possible implementation methods thereof can refer to the technical effects brought about by the second aspect or different possible implementation methods of the second aspect, and will not be repeated here.

[0049] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages: in the control device of the AI ​​chip, the controller uses the number of AICs allowed to be turned on in the N AICs in the AI ​​chip as the basis for generating control instructions, and executes the opening or closing of at least one AIC in the N AICs by prohibiting the circuit. Compared with the method of controlling the opening or closing of each AIC by configuring the Open of each AIC to 1 or 0, the opening or closing of at least one AIC in the N AICs can be flexibly controlled according to the number of AICs allowed to be turned on in the N AICs. It avoids the situation where the entire AI chip must be disassembled and replaced when some AICs with Open configured as 1 are damaged, resulting in a decrease in chip performance or unavailability, resulting in a low utilization rate of the AIC in the AI ​​chip. While realizing flexible control of the AIC in the AI ​​chip, the utilization rate of the AIC in the AI ​​chip is improved, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1A schematic diagram for AI chip implementation;

[0051] Figure 2 Another schematic diagram for AI chip implementation;

[0052] Figure 3 A schematic diagram of an artificial intelligence main framework provided for an embodiment of the present application;

[0053] Figure 4 Another schematic diagram for AI chip implementation;

[0054] Figure 5 A schematic diagram of a control device of an AI chip provided in an embodiment of the present application;

[0055] Figure 6 Another schematic diagram of a control device for an AI chip provided in an embodiment of the present application;

[0056] Figure 7 Another schematic diagram of a control device for an AI chip provided in an embodiment of the present application;

[0057] Figure 8 Another schematic diagram of a control device for an AI chip provided in an embodiment of the present application;

[0058] Fig. 9 Another schematic diagram of a control device for an AI chip provided in an embodiment of the present application;

[0059] Figure 10-1 A schematic diagram of a method for screening AI chips provided in an embodiment of the present application;

[0060] Figure 10-2 A schematic diagram of a use process of a control device of an AI chip provided in an embodiment of the present application;

[0061] Figure 11-1 A schematic diagram of an application of a control device of an AI chip provided in an embodiment of the present application;

[0062] Figure 11-2 Another schematic diagram of an application of a control device of an AI chip provided in an embodiment of the present application;

[0063] Fig.12 Another schematic diagram of a control method for an AI chip provided in an embodiment of the present application;

[0064] Fig.13 A schematic diagram of a controller provided in an embodiment of the present application. DETAILED DESCRIPTION

[0065] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0066] Figure 3 A schematic diagram of an artificial intelligence main framework is shown, which describes the overall workflow of the artificial intelligence system and is applicable to general artificial intelligence field requirements.

[0067] The following is an explanation of the above artificial intelligence theme framework from two dimensions: "intelligent information chain" (horizontal axis) and "IT value chain" (vertical axis).

[0068] The "intelligent information chain" reflects a series of processes from data acquisition to processing. For example, it can be a general process of intelligent information perception, intelligent information representation and formation, intelligent reasoning, intelligent decision-making, intelligent execution and output. In this process, data undergoes a condensation process of "data-information-knowledge-wisdom".

[0069] The "IT value chain" reflects the value that artificial intelligence brings to the information technology industry, from the underlying infrastructure of human intelligence, information (providing and processing technology implementation) to the system's industrial ecological process.

[0070] (1) Infrastructure:

[0071] The infrastructure provides computing power support for the AI ​​system, enables communication with the outside world, and supports it through the basic platform. It communicates with the outside world through sensors; computing power is provided by smart chips (CPU, NPU, GPU, ASIC, FPGA and other hardware acceleration chips); the basic platform includes distributed computing frameworks and networks and other related platform guarantees and support, which can include cloud storage and computing, interconnected networks, etc. For example, sensors communicate with the outside world to obtain data, and these data are provided to the smart chips in the distributed computing system provided by the basic platform for calculation.

[0072] (2) Data

[0073] The data on the upper layer of the infrastructure is used to represent the data sources in the field of artificial intelligence. The data involves graphics, images, voice, text, and IoT data of traditional devices, including business data of existing systems and perception data such as force, displacement, liquid level, temperature, and humidity.

[0074] (3) Data processing

[0075] Data processing usually includes data training, machine learning, deep learning, search, reasoning, decision-making and other methods.

[0076] Among them, machine learning and deep learning can symbolize and formalize data for intelligent information modeling, extraction, preprocessing, and training.

[0077] Reasoning refers to the process of simulating human intelligent reasoning in computers or intelligent systems, using formalized information to perform machine thinking and solve problems based on reasoning control strategies. Typical functions are search and matching.

[0078] Decision-making refers to the process of making decisions after intelligent information is reasoned, usually providing functions such as classification, sorting, and prediction.

[0079] (4) General ability

[0080] After the data has undergone the data processing mentioned above, some general capabilities can be further formed based on the results of the data processing, such as an algorithm or a general system, for example, translation, text analysis, computer vision processing, speech recognition, image recognition, etc.

[0081] (5) Smart products and industry applications

[0082] Smart products and industry applications refer to the products and applications of artificial intelligence systems in various fields. They are the encapsulation of the overall artificial intelligence solution, which productizes intelligent information decision-making and realizes practical application. Its application areas mainly include: smart manufacturing, smart transportation, smart home, smart medical care, smart security, autonomous driving, safe cities, smart terminals, etc.

[0083] In recent years, with the development of advanced processes such as 7nm, the revolutionary innovation of NPU computing architecture, and the continuous introduction of new algorithm architectures, AI computing power has grown exponentially year by year, and AI has ushered in a new round of vigorous development. AI can be found in safe cities, medical research and development, weather forecasting, autonomous driving, e-commerce and other fields. Figure 3 Taking the artificial intelligence main framework diagram shown in the figure as an example, there are many application scenarios in the current AI field, and different application scenarios may have different computing power requirements. Hardware manufacturers generally design an AI chip that can meet different application scenarios at the same time, and divide the chips into different specification grades for different application scenarios. Take the open compute project accelerator module (OAM or OCP acceleration module) and the high-speed peripheral component interconnect express (PCI-Express or PCIE) card, two commonly used AI basic hardware units in the industry, as high-specification chips and low-specification chips as examples respectively.

[0084] Among them, the PCIE card uses the traditional PCIE interface, which has good inheritance and can be directly plugged into existing servers and desktops to quickly provide AI acceleration at a low cost. The disadvantage is that the power consumption is limited, with a maximum of 250 to 300 watts (W) for a single card; and the number of interfaces is limited, with only one set of PCIE X16 interfaces; the interface rate is limited by the structure and topology of the gold finger, with a maximum of 32 gigabits per second per channel (Gbps / lane), and low computing power. In addition, OAM is specially tailored for AI and can support higher power consumption (such as 700W), more interfaces (such as 8 sets of X16 interfaces), wider rates (such as 112Gbps / lane), and higher computing power. The disadvantage is that it cannot be directly plugged into an existing server, and the server needs to be redesigned. In addition, the compatibility between manufacturers is not as good as PCIE, and the cost is relatively high.

[0085] It is expected that OAM and PCIE cards will coexist in the market for quite a long time. In addition, OAM can be further divided into higher-specification liquid-cooled OAM and lower-specification air-cooled OAM. Compared with PCIE, air-cooled OAM is a high-specification chip. In order to reduce investment, chip manufacturers generally design an AI chip that can meet the application requirements of both OAM and PCIE cards. For sales strategies or other reasons (such as chip yield), it is necessary to divide the chips into high and low grades for two scenarios, recorded as NPU_OAM and NPU_PCIE.

[0086] For example, Figure 4 As shown in the figure, a certain NPU / GPU chip has 36 built-in AICs, and OAM scenarios (such as OAM) support all of them being enabled. Low-specification scenarios (such as PCIE cards) have limited power and heat dissipation, and can only support enabling 25 AICs. NPU_OAM opens all 36 AICs to users, while NPU_PCIE only opens the 25 AICs in the yellow part.

[0087] based on Figure 4 The AI ​​chip shown in FIG. 1 can control multiple AICs contained therein as follows: Figure 1 When the AI ​​chip leaves the factory, an enable switch (Open) is set for each AIC in the AI ​​chip. The AIC can be turned off by configuring Open=0, and the AIC can be turned on by configuring Open=1. In addition, the (pass) in each AIC indicates that the AIC function is intact. For high-specification OAM that requires 36 AICs, Figure 1As shown, the Open of all AICs is configured as 1; for the low-specification NPU_PCIE that needs to use 25 AICs, only some of the AICs are configured as 1, and the Open of other AICs is configured as 0. For the terminal device using the AI ​​chip, the terminal device reads the Open configuration (0 or 1) corresponding to each AIC in the AI ​​chip, and controls the opening or closing of each AIC according to the configuration.

[0088] In addition, if Figure 1 In the configuration shown, after the AI ​​chip has worked for a period of time, if the AIC with Open configured as 1 is partially damaged, such as Figure 2 As shown in AIC_01 (fail), the chip performance of AIC_01 has degraded or is unavailable. The terminal device using this AI chip must be disassembled and the entire AI chip must be replaced.

[0089] From the above configuration, it can be seen that the control method of multiple AICs in the current AI chip includes at least the following technical problems:

[0090] Problem 1: In low-spec AI chips, the number of chips that can be used is limited by software, which is easy to be cracked, affecting the tiered sales strategy;

[0091] Question 2: Figure 2 In the scenario shown, although the AIC with Open configured as 0 in the AI ​​chip is not damaged, the terminal device cannot be used due to the factory configuration of Open. As a result, the utilization rate of the AIC of the AI ​​chip in this configuration is low, affecting the user experience.

[0092] In order to solve the above problems, the embodiments of the present application provide a control device, a control method and a controller of an artificial intelligence AI chip, which are used to realize flexible control of the AIC in the AI ​​chip while improving the utilization rate of the AIC in the AI ​​chip, thereby improving the user experience.

[0093] See also Figure 5 , a control device of an AI chip provided in an embodiment of the present application includes:

[0094] a controller, and a disable circuit connected to the controller;

[0095] The controller is used to determine that the number of AICs allowed to be turned on among the N AICs is a first number, and after generating a control instruction according to the first number, sends the control instruction to the prohibition circuit; the prohibition circuit interconnected with the controller is connected to the N AICs in the AI ​​chip, and is used to turn on or off at least one AIC among the N AICs according to the control instruction.

[0096] It should be noted that in this embodiment and subsequent embodiments, the AI ​​chip may include a graphics processing unit GPU, a neural processing unit NPU or a tensor processing unit TPU, that is, the AI ​​chip can be suitable for a variety of different application scenarios, such as CPU, NPU, TPU or other AI application scenarios, which are not specifically limited here.

[0097] In this embodiment, in the control device of the AI ​​chip, the controller uses the number of AICs allowed to be turned on in the N AICs in the AI ​​chip as the basis for generating control instructions, and executes the opening or closing of at least one AIC in the N AICs by prohibiting the circuit. Compared with the method of controlling the opening or closing of each AIC by configuring the Open of each AIC to 1 or 0, the opening or closing of at least one AIC in the N AICs can be flexibly controlled according to the number of AICs allowed to be turned on in the N AICs. When some AICs configured as Open are damaged, resulting in a decrease in chip performance or unavailability, the entire AI chip must be disassembled and replaced, resulting in a low utilization rate of the AICs in the AI ​​chip. While realizing flexible control of the AICs in the AI ​​chip, the utilization rate of the AICs in the AI ​​chip is improved.

[0098] In addition, based on Figure 5 In the embodiment shown, the control device of the AI ​​chip can be further optimized in addition to the controller and the prohibition circuit. Figure 6 , an embodiment of the present application provides a control device for an AI chip.

[0099] In a specific implementation, Figure 6 As shown, the device also includes a quantity limiter connected to the controller; wherein the quantity limiter is used to limit the number of AICs allowed to be opened among the N AICs to a first number; at this time, the controller is specifically used to determine the first number through the quantity limiter.

[0100] Specifically, in the AI ​​control device, the number of AICs allowed to be turned on among the N AICs can be limited by hardware, that is, in the control device of the AI ​​chip, a quantity limiter for limiting the number of AICs allowed to be turned on among the N AICs to a first quantity is also included, that is, the controller can specifically determine the first quantity through the quantity limiter. While providing a specific implementation method for the controller to determine the first quantity, the security of limiting the first quantity can be improved by hardware limitation of the quantity controller.

[0101] In a specific implementation, Figure 6As shown, the device also includes an accumulator connected to the controller; wherein the accumulator is connected to the N AICs and is used to count the number of AICs that have been turned on in the N AICs as a second number; at this time, the controller is specifically used to generate the control instruction according to the first number and the second number.

[0102] Specifically, the control device of the AI ​​chip may further include an accumulator for counting the number of AICs that have been turned on in the N AICs as a second number, that is, the controller may obtain the second number in real time through the accumulator, and generate a control instruction to be sent to the prohibition circuit based on the first number and the second number. That is, the controller turns on or off at least one AIC in the N AICs in combination with the number of AICs that are allowed to be turned on and the number of AICs that have been turned on in the N AICs, and further optimizes the control of the N AICs during the use of the AI ​​chip.

[0103] In addition, the accumulator is specifically used to connect the non-faulty AICs among the N AICs, and the second number is used to indicate the number of AICs that have been turned on among the non-faulty AICs. That is, the accumulator can specifically avoid the AICs that have failed among the N AICs, that is, the number of AICs that have been turned on among the non-faulty AICs among the N AICs is counted as the second number, thereby avoiding the controller from sending an opening instruction to the AIC that has failed, and further optimizing the control of the AI ​​chip.

[0104] The following is an example explanation using the number N of AICs in the AI ​​chip as 36. Figure 7 , is a schematic diagram of a control device of an AI chip provided in an embodiment of the present application.

[0105] exist Figure 7 The device shown includes a comparator (ie, a controller), and a quantity limiter, an accumulator, and a prohibition circuit interconnected with the comparator.

[0106] Among them, the AIC control switch Open can set an open flag open for each AIC, which is software configurable and its value can only be 0 or 1. 0 means turning off the AIC, and 1 means turning it on. Figure 7 The control process of the device shown in the figure includes the following contents when executing the AI ​​chip.

[0107] The quantity limiter is used to limit the number of AICs allowed to be opened among N AICs to a first number (recorded as Open_sum), and sends Open_sum to the comparator, that is, the AIC opening quantity threshold open_sum, with a value of 25, which is hard-coded in hardware and can only be read but not written by software;

[0108] The accumulator is used to count the number of opened AICs among the N AICs as the second quantity (denoted as sum), that is, the AIC opening quantity accumulator, which counts the open value and outputs sum;

[0109] The controller is used to generate the control instruction (denoted as over) according to the first quantity and the second quantity, that is, the AIC opening quantity comparator. When sum >= Open_sum, it outputs the overflow indication over = 1. When sum < Open_sum, it outputs the overflow indication over = 0;

[0110] The prohibition circuit is connected to the N AICs in the AI chip and is used to open or close at least one AIC among the N AICs according to the control instruction, that is, the AIC opening prohibition circuit. When over is 1, it prohibits the opening of new AICs. When over is 0, it allows the opening of new AICs;

[0111] Among them, through Figure 7 the control device of the AI chip shown, the sum of the numbers of AICs with open = 1 in the AI chip can be made less than or equal to open_sum, so that the total number of AICs that can be opened through hardware control, and the total number cannot be changed by software - to avoid software cracking.

[0112] In Figure 6 the quantity limiter shown, a specific implementation method implemented by hardware can be achieved through electronic fuses (efuses). Among them, the quantity limiter includes at least one electronic fuse efuse, and the quantity limiter is used to limit the number of AICs allowed to be opened among the N AICs as the first quantity through the output level of the at least one efuse.

[0113] Specifically, the quantity limiter can specifically limit the first quantity by burning out at least one efuse, that is, limit the number of AICs allowed to be opened among the N AICs as the first quantity through the output level of the at least one efuse.

[0114] Among them, when the fusing state of the at least one efuse is fused, the output level of the at least one efuse is the first level; and / or when the fusing state of the at least one efuse is not fused, the output level of the at least one efuse is the second level; where the first level is different from the second level. That is to say, different fusing states of at least one efuse can correspond to different output levels, so that the quantity limiter can limit the first quantity through different output levels of at least one efuse.

[0115] The following is an example in which when the fuse state of at least one efuse is blown, the output level of the at least one efuse is a first level corresponding to a high level, and when the fuse state of at least one efuse is not blown, the output level of the at least one efuse is a second level corresponding to a low level.

[0116] like Figure 8 As shown, a specific implementation method of the quantity controller in the embodiment of the present application can be Figure 7 At least one efuse is implemented as shown. Figure 7 Ten, when the efuse is blown, the corresponding output is high level (i.e. "1"), and other efuses are not blown, and the corresponding output is low level (i.e. "0"). The quantity controller outputs to the controller through the at least one efuse the number of AICs allowed to be turned on in the N AICs as the first number, i.e. "011001", and the corresponding total output is 25, indicating that the number of AICs allowed to be turned on in the N AICs is 25.

[0117] In addition, a schematic diagram of an implementation of the inhibit circuit can be shown as follows Fig. 9 As shown. Fig. 9 In the embodiment, the prohibition circuit includes at least a configuration interface and a plurality of switches.

[0118] exist Fig. 9 In the implementation process of the prohibition circuit shown, when over=1, open=0, the switch is disconnected, and the configuration interface cannot modify the open value, that is, a new AIC cannot be opened; when over=1, open=1, the switch is connected, and the configuration interface can modify the open value, that is, the opened AIC can be closed; when over=0, open=0 / 1, the switch is connected, and the configuration interface can modify the open value, that is, a new AIC can be opened.

[0119] The following will take the AI ​​chip control device, where the AI ​​chip is an NPU, as an example to illustrate the AI ​​chip screening process. Figure 10-1 As shown in the AI ​​control device, AIC_O is the minimum number of AICs that meet OAM, and AIC_P is the minimum number of AICs that meet PCIE cards. The total number of AICs is recorded as AIC_A, and the relationship between the three is AIC_A>=AIC_O>=AIC_P. For ease of understanding, this article takes AIC_A=AIC_O=36, AIC_P=25. For PCIE card scenarios, the normal number of AICs>=AIC_P, that is, there is a surplus of AICs, which is suitable for similar high-configuration and low-use scenarios.

[0120] pass Figure 10-1During the sieve process of the sieve plate, when the number of normal AICs corresponding to the NPU chip >= AIC_O, the model of the NPU chip can be determined as NPU_OAM; when the number of normal AICs corresponding to the NPU chip < AIC_O and the number of normal AICs >= AIC_P, the model of the NPU chip can be determined as NPU_PCIE; and when the number of normal AICs corresponding to the NPU chip < AIC_P, the NPU chip can be determined as a defective chip, that is, it cannot be used by devices of OAM or PCIE.

[0121] Exemplarily, after sieving the AI chip, during the process of using the AI chip, the control device of the AI chip shown in any of the foregoing embodiments can be used to control the use of the AI chip. Please refer to Figure 10-2 , which is a schematic flowchart of using the control device of the AI chip to control the AI chip in the embodiments of the present application.

[0122] Through Figure 10-2 During the processing process, the model of the AI chip is PCIE. At this time, the controller can determine that the number of AICs allowed to be opened among the N AICs is the first number, that is, AIC_P; and the controller can also determine that the number of opened AICs among the N AICs is the second number, denoted as sum(Open), and accumulate sum(Open) and assign it to open_sum.

[0123] When the number of opened AICs open_sum < AIC_P among the current N AICs, it is determined that a new AIC can be (i.e., allowed to be) opened; when the number of opened AICs open_sum = AIC_P among the current N AICs, it is determined that opening a new AIC is prohibited; when the number of opened AICs open_sum > AIC_P among the current N AICs, it is determined to close the AIC.

[0124] The specific implementation scenario can be as Figure 11-1 , when all AICs are normal, any open_sum of the AICs can be selected to be opened (for example, open AIC_00 to AIC_04, AIC_10 to AIC_14, AIC_20 to AIC_24, AIC_30 to AIC_34, AIC_40 to AIC_44); as Figure 11-2 , when one or more AICs fail, they are closed (for example, set AIC_01 from Open = 1 to Open = 0), and other normal AICs are selected to be opened (for example, avoid the faulty AIC_01 and select to open AIC_05).

[0125] The control device of the AI chip in the embodiments of the present application has been described above. Next, an introduction will be made from the perspective of the control method of the AI chip.

[0126] See also Fig.12 , a control method of an AI chip in an embodiment of the present application includes the following steps.

[0127] The method is applied to a controller in a control device of the AI ​​chip, the control device also includes a prohibition circuit, wherein the AI ​​chip includes N artificial intelligence cores AIC, wherein N is an integer greater than 1, and the method includes:

[0128] S101, determining that the number of AICs allowed to be opened among the N AICs is a first number;

[0129] S102: Generate a control instruction according to the first quantity, where the control instruction is used to instruct to turn on or off at least one AIC among the N AICs;

[0130] S103: Send the control instruction to the prohibition circuit.

[0131] Based on the above technical solution, in the control device of the AI ​​chip, the controller uses the number of AICs allowed to be turned on in the N AICs in the AI ​​chip as the basis for generating a control instruction, and sends the control instruction to the prohibition circuit so that the prohibition circuit executes to turn on or off at least one AIC in the N AICs. Compared with the method of controlling the opening or closing of each AIC by configuring the Open of each AIC to 1 or 0, the opening or closing of at least one AIC in the N AICs can be flexibly controlled according to the number of AICs allowed to be turned on in the N AICs. When some AICs with Open configured as 1 are damaged, resulting in a decrease in chip performance or unavailability, the entire AI chip must be disassembled and replaced, resulting in a low utilization rate of the AICs in the AI ​​chip. While realizing flexible control of the AICs in the AI ​​chip, the utilization rate of the AICs in the AI ​​chip is improved, thereby improving the user experience.

[0132] In a specific implementation, before generating the control instruction in step S101, the method further includes:

[0133] Determine a first number, where the first number is the number of AICs allowed to be opened among the N AICs;

[0134] The step S101 of generating a control instruction includes:

[0135] The control instruction is generated according to the first quantity.

[0136] Based on the above technical solution, in the AI ​​control device, the number of AICs allowed to be turned on among the N AICs can be limited by hardware, that is, in the control device of the AI ​​chip, a quantity limiter for limiting the number of AICs allowed to be turned on among the N AICs to a first quantity is also included, that is, the controller can specifically determine the first quantity through the quantity limiter. While providing a specific implementation method for the controller to determine the first quantity, the security of limiting the first quantity can be improved by hardware limitation of the quantity controller.

[0137] In a specific implementation, before generating the control instruction in step S101, the method further includes:

[0138] Determine a second number, where the second number is the number of AICs that have been turned on among the N AICs;

[0139] The step S101 of generating a control instruction includes:

[0140] The control instruction is generated according to the first number and the second number.

[0141] Based on the above technical solution, the control device of the AI ​​chip may further include an accumulator for counting the number of AICs that have been turned on in the N AICs as a second number, that is, the controller can obtain the second number in real time through the accumulator, and generate a control instruction to be sent to the prohibition circuit based on the first number and the second number. That is, the controller combines the number of AICs allowed to be turned on in the N AICs and the number of AICs that have been turned on, turns on or off at least one AIC in the N AICs, and further optimizes the control of the N AICs during the use of the AI ​​chip.

[0142] In a specific implementation manner, the second number is used to indicate the number of turned-on AICs among the non-faulty AICs of the N AICs.

[0143] Based on the above technical solution, the accumulator can specifically avoid the faulty AIC among N AICs, that is, the number of opened AICs among the non-faulty AICs among the N AICs is counted as the second number, thereby avoiding the controller from sending an opening instruction to the faulty AIC, thereby further optimizing the control of the AI ​​chip.

[0144] In a specific implementation, the N AICs include N graphics processing units GPUs, N neural processing units NPUs, or N tensor processing units TPUs.

[0145] Based on the above technical solutions, the AI ​​chip can be applied to a variety of different application scenarios, such as CPU, NPU, TPU or other AI application scenarios, thereby improving the applicability of the solution.

[0146] The above describes the control method of the AI ​​chip implemented by the controller. The controller 1300 provided in the embodiment of the present application is introduced below in conjunction with the accompanying drawings.

[0147] See also Fig.13 The embodiment of the present application provides a controller 1300 of an artificial intelligence AI chip, wherein the controller 1300 is included in a control device of the AI ​​chip, wherein the control device further includes a prohibition circuit, wherein the AI ​​chip includes N artificial intelligence cores AIC, wherein N is an integer greater than 1, wherein the controller includes:

[0148] A determining unit 1301 is configured to set the number of AICs allowed to be opened among the N AICs to be a first number;

[0149] A generating unit 1302 is configured to generate a control instruction according to the first number, where the control instruction is used to instruct to turn on or off at least one AIC among the N AICs;

[0150] The sending unit 1303 is used to send the control instruction to the prohibition circuit.

[0151] In a specific implementation, the device further includes a quantity limiter, the quantity limiter being used to limit the number of AICs allowed to be opened among the N AICs to a first number;

[0152] The determining unit 1301 is specifically configured to determine, through the quantity limiter, that the number of AICs allowed to be opened among the N AICs is a first number.

[0153] In a specific implementation, the device further includes an accumulator, and the accumulator is used to count the number of opened AICs in the N AICs as a second number;

[0154] The determining unit 1301 is further configured to determine the second quantity through the accumulator;

[0155] The generating unit 1302 is specifically configured to generate the control instruction according to the first quantity and the second quantity.

[0156] In a specific implementation manner, the second number is used to indicate the number of turned-on AICs among the non-faulty AICs of the N AICs.

[0157] In a specific implementation, the AI ​​chip includes a graphics processing unit GPU, a neural processing unit NPU or a tensor processing unit TPU.

[0158] It should be noted that the specific contents of the information interaction, execution process, etc. between the various units of the above-mentioned controller 1300 can be found in the description of the method embodiment shown in the above-mentioned application, and will not be repeated here.

[0159] An embodiment of the present application also provides a computer-readable storage medium storing one or more computer-executable instructions. When the computer-executable instructions are executed by a processor, the processor executes the control method of the AI ​​chip as described above.

[0160] An embodiment of the present application also provides a computer program product storing one or more computer-executable instructions. When the computer-executable instructions are executed by the processor, the processor executes the control method of the above-mentioned AI chip.

[0161] The present application also provides a chip system, which includes a processor for supporting the controller to implement the functions involved in the above-mentioned battery replacement control method. In one possible design, the chip system may also include a memory for storing necessary program instructions and data. The chip system may be composed of a chip or may include a chip and other discrete devices.

[0162] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0163] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0164] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0165] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0166] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.

Claims

1. A control device for an artificial intelligence (AI) chip, characterized in that: The AI ​​chip includes N artificial intelligence cores AIC, where N is an integer greater than 1, and the device includes: a controller, and a disabling circuit connected to the controller; The controller is used to determine that the number of AICs allowed to be turned on among the N AICs is a first number, and after generating a control instruction according to the first number, send the control instruction to the prohibition circuit; The prohibition circuit is connected to the N AICs and is used to open or close at least one AIC among the N AICs according to the control instruction.

2. The device according to claim 1, characterized in that The device also includes a quantity limiter connected to the controller; The quantity limiter is used to limit the number of AICs allowed to be opened among the N AICs to a first number; The controller is specifically configured to determine the first quantity by means of the quantity limiter.

3. The device according to claim 2, characterized in that The quantity limiter includes at least one electronic fuse efuse, and the quantity limiter is used to limit the number of AICs allowed to be turned on among the N AICs to the first number through the output level of the at least one efuse.

4. The device according to claim 3, characterized in that When the fusing state of the at least one efuse is fusing, the output level of the at least one efuse is a first level; and / or, When the blown state of the at least one efuse is unblown, the output level of the at least one efuse is a second level; wherein the first level is different from the second level.

5. The device according to any one of claims 1 to 4, characterized in that: The device also includes an accumulator connected to the controller; The accumulator is connected to the N AICs and is used to count the number of opened AICs in the N AICs as a second number; The controller is specifically configured to generate the control instruction according to the first quantity and the second quantity.

6. The device according to claim 5, characterized in that The accumulator is specifically used to connect the non-faulty AICs among the N AICs, and the second number is used to indicate the number of turned-on AICs among the non-faulty AICs.

7. The device according to any one of claims 1 to 6, characterized in that The AI ​​chip includes a graphics processing unit GPU, a neural processing unit NPU or a tensor processing unit TPU.

8. A control method for an artificial intelligence AI chip, characterized in that: The method is applied to a controller in a control device of the AI ​​chip, the device further comprising a prohibition circuit, wherein the AI ​​chip comprises N artificial intelligence cores AIC, wherein N is an integer greater than 1, and the method comprises: Determine the number of AICs allowed to be opened among the N AICs as a first number; Generate a control instruction according to the first quantity, where the control instruction is used to instruct to turn on or off at least one AIC among the N AICs; The control instruction is sent to the inhibit circuit.

9. The method according to claim 8, characterized in that The device further includes a quantity limiter, the quantity limiter being used to limit the number of AICs allowed to be opened among the N AICs to a first number; The determining that the number of AICs allowed to be opened among the N AICs is a first number comprises: The number limiter determines the number of AICs allowed to be opened among the N AICs as a first number.

10. The method according to claim 9, characterized in that The device further includes an accumulator, and the accumulator is used to count the number of opened AICs in the N AICs as a second number; Before generating the control instruction, the method further includes: determining the second amount by the accumulator; Generating a control instruction according to the first quantity includes: The control instruction is generated according to the first number and the second number.

11. The method according to claim 10, characterized in that The second number is used to indicate the number of turned-on AICs among the non-faulty AICs of the N AICs.

12. The method according to any one of claims 8 to 11, characterized in that The AI ​​chip includes a graphics processing unit GPU, a neural processing unit NPU or a tensor processing unit TPU.

13. A controller for an artificial intelligence (AI) chip, characterized in that: The controller is included in the control device of the AI ​​chip, and the control device also includes a prohibition circuit, wherein the AI ​​chip includes N artificial intelligence cores AIC, wherein N is an integer greater than 1, and the controller includes: A determining unit, configured to set the number of AICs allowed to be opened among the N AICs to be a first number; a generating unit, configured to generate a control instruction according to the first quantity, wherein the control instruction is used to instruct to turn on or off at least one AIC among the N AICs; A sending unit is used to send the control instruction to the prohibition circuit.

14. The controller according to claim 13, characterized in that: The device further includes a quantity limiter, the quantity limiter being used to limit the number of AICs allowed to be opened among the N AICs to a first number; The determining unit is specifically configured to determine, through the quantity limiter, that the number of AICs allowed to be opened among the N AICs is a first number.

15. The controller according to claim 14, characterized in that: The device further includes an accumulator, and the accumulator is used to count the number of opened AICs in the N AICs as a second number; The determining unit is further configured to determine the second quantity by using the accumulator; The generating unit is specifically configured to generate the control instruction according to the first quantity and the second quantity.

16. The controller according to claim 15, characterized in that The second number is used to indicate the number of turned-on AICs among the non-faulty AICs of the N AICs.

17. The controller according to any one of claims 13 to 16, characterized in that: The AI ​​chip includes a graphics processing unit GPU, a neural processing unit NPU or a tensor processing unit TPU.

18. A computer program product comprising instructions, characterized in that When the computer program product is run on a computer, the computer is caused to execute the method according to any one of claims 8 to 12.

19. A computer-readable storage medium for storing program instructions, characterized in that: When the program instructions are executed on a computer, the computer is caused to execute the method according to any one of claims 8 to 12.