WO2022087866A1 - Control device and control method of artificial intelligence (ai) chip, and controller - Google Patents

Control device and control method of artificial intelligence (ai) chip, and controller Download PDF

Info

Publication number
WO2022087866A1
WO2022087866A1 PCT/CN2020/124241 CN2020124241W WO2022087866A1 WO 2022087866 A1 WO2022087866 A1 WO 2022087866A1 CN 2020124241 W CN2020124241 W CN 2020124241W WO 2022087866 A1 WO2022087866 A1 WO 2022087866A1
Authority
WO
WIPO (PCT)
Prior art keywords
aics
chip
controller
opened
aic
Prior art date
Application number
PCT/CN2020/124241
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
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2020/124241 priority Critical patent/WO2022087866A1/en
Priority to CN202080106663.5A priority patent/CN116406490A/en
Publication of WO2022087866A1 publication Critical patent/WO2022087866A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries

Definitions

  • 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 of an artificial intelligence AI chip.
  • Artificial intelligence is a 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.
  • artificial intelligence is a branch of computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that responds in a similar way to human intelligence.
  • Artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that the 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, and basic AI theory.
  • Hardware manufacturers generally design an AI chip that can meet different application scenarios at the same time, and divide the chips into chips with different specifications for different application scenarios.
  • Open computing project accelerator module open compute project accelerator module, OAM or OCP acceleration module
  • PCI-Express or PCIE high-speed peripheral component interconnect express
  • the PCIE card follows the traditional PCIE interface, which has good inheritance and can be directly inserted into existing servers and desktops to quickly provide AI acceleration with low cost.
  • the disadvantage is that the power consumption is limited, and a single card has a maximum of 250 to 300 watts (W); and the number of interfaces is limited, with only one set of PCIE X16 interfaces; Channel (Gbps/lane), low computing power.
  • 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 speed (such as 112Gbps/lane), and higher computing power. force.
  • the disadvantage is that it cannot be directly inserted into the existing server, the server needs to be redesigned, and the compatibility between various manufacturers is not as good as that of PCIE, and the cost is higher.
  • NPU_OAM and NPU_PCIE For sales strategy or other reasons (such as chip yield), chips need to be divided into high and low grades for the above two scenarios, which are respectively recorded as NPU_OAM and NPU_PCIE.
  • each AIC in the AI chip is set with an enable switch (Open).
  • a (pass) in each AIC indicates that the AIC is functionally intact.
  • the Open configuration of all AICs shown in Figure 1 is 1; for the low specification file NPU_PCIE that needs to use 25 AICs, the Open configuration of only a part of the AICs is 1, and the other The Open configuration of AIC is 0.
  • the terminal device reads the Open configuration (0 or 1) corresponding to each AIC in the AI chip, and controls each AIC to be turned on or off according to the configuration.
  • 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 achieve flexible control of the AIC in the AI chip and at the same time improve the utilization rate of the AIC in the AI chip, thereby improving user experience.
  • a first aspect of the embodiments of the present application provides a control device for an artificial intelligence AI chip.
  • the AI chip includes N artificial intelligence cores AIC, where N is an integer greater than 1.
  • the device includes: a controller, and a controller connected to the AI chip.
  • the prohibition circuit of the controller the controller is used to determine that the number of AICs allowed to be opened in the N AICs is the first number, and after generating a control command according to the first number, send the control command to the prohibition circuit; after that, the A prohibiting circuit is connected to the N AICs, and is used for turning on or off at least one AIC of the N AICs according to the control instruction.
  • the controller uses the number of AICs allowed to be opened among the N AICs in the AI chip as the basis for generating a control command, and disables the circuit to perform opening or closing of at least one of the N AICs.
  • an AIC Compared with the way 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 of the N AICs can be flexibly controlled according to the number of AICs allowed to be opened in the N AICs. On or off.
  • the entire AI chip must be disassembled and replaced, resulting in a low utilization rate of the AIC in the AI chip. While realizing the flexible control of the AIC in the AI chip , to improve the utilization of AIC in the AI chip, thereby improving the user experience.
  • the device further 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 is the first quantity; at this time, the controller is specifically configured to determine the first quantity through the quantity limiter.
  • the number of AICs that are allowed to be opened in the N AICs can be limited by hardware, that is, in the control device of the AI chip, there is also a method for limiting the AICs that are allowed to be opened in the N AICs.
  • the quantity of AICs is the quantity limiter of the first quantity, that is, the controller can specifically determine the first quantity through the quantity limiter. While providing a specific implementation manner for the controller to determine the first quantity, the security of limiting the first quantity can be improved by means of hardware limitation of the quantity controller.
  • the quantity limiter includes at least one electronic fuse efuse, and the quantity limiter is used to limit the allowable number of the N AICs through the output level of the at least one efuse The number of open AICs is the first number.
  • 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 opened among the N AICs by the output level of at least one efuse to be the A quantity, a specific implementation manner in which the quantity limiter limits the first quantity is provided, which improves the achievability of the solution.
  • the output level of the at least one efuse when the blown state of the at least one efuse is blown, the output level of the at least one efuse is the first level; and/or, in the When the blown state of 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.
  • 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 different output levels of the at least one efuse, providing the quantity limiter to pass at least one A specific implementation of efuse limiting the first number to improve the achievability of the solution.
  • the apparatus further includes an accumulator connected to the controller; wherein the accumulator is connected to the N AICs, and is used to count the opened AICs among the N AICs.
  • the number of AICs is the second number; at this time, the controller is specifically configured to generate the control instruction according to the first number and the second number.
  • the control device of the AI chip may further include an accumulator for counting the number of opened AICs in the N AICs as the second number, that is, the controller can obtain the second number in real time through the accumulator , and based on the first quantity and the second quantity, a control instruction sent to the prohibiting circuit is generated. That is, the controller combines the number of AICs allowed to be opened and the number of AICs that have been opened in the N AICs to open or close at least one AIC of the N AICs, and further optimize the control of the N AICs during the use of the AI chip. .
  • the accumulator is specifically used to connect the non-faulty AICs in the N AICs, and the second number is used to indicate the opened AICs in the non-faulty AICs quantity.
  • the accumulator can specifically avoid the faulty AICs among the N AICs, that is, the number of the opened AICs among the non-faulty AICs among the N AICs is counted as the second number, thereby preventing the controller from issuing the open AICs. Instructions are sent to the failed AIC to further optimize the control of the AI chip.
  • the AI chip includes an image processing unit GPU, a neural processing unit NPU, or a tensor processing unit TPU.
  • the AI chip can be applied to a variety of different application scenarios, such as CPU, NPU, TPU or other AI application scenarios, to improve the applicability of the solution.
  • a second aspect of the embodiments of the present application provides a method for controlling an artificial intelligence AI chip, wherein the method is applied to a controller in a control device for the AI chip, and the device further includes a prohibition circuit, wherein the AI chip It includes N artificial intelligence core AICs, where N is an integer greater than 1.
  • the method includes: the controller first determines that the number of AICs allowed to be opened in the N AICs is a first number; then, the controller determines according to the first number of AICs. The number generates a control instruction, the control instruction is used to instruct to open or close at least one AIC of the N AICs; finally, the controller sends the control instruction to the prohibition circuit.
  • the controller uses the number of AICs allowed to be opened among the N AICs in the AI chip as the basis for generating the control command, and sends the control command to the prohibition circuit, so that the prohibition circuit executes Turn on or off at least one AIC of the N AICs.
  • the opening or closing of at least one of the N AICs can be flexibly controlled according to the number of AICs allowed to be opened in the N AICs. On or off.
  • the entire AI chip must be disassembled and replaced, resulting in a low utilization rate of the AIC in the AI chip. While realizing the flexible control of the AIC in the AI chip , to improve the utilization of AIC in the AI chip, thereby improving the user experience.
  • the device further includes a quantity limiter, and the quantity limiter is used to limit the number of AICs allowed to be opened among the N AICs to be the first number;
  • the controller determining that the number of AICs allowed to be opened among the N AICs is the first number includes: the controller determines, through the number limiter, that the number of AICs that are allowed to be opened among the N AICs is the first number.
  • the number of AICs that are allowed to be opened in the N AICs can be limited by hardware, that is, in the control device of the AI chip, there is also a method for limiting the AICs that are allowed to be opened in the N AICs.
  • the quantity of AICs is the quantity limiter of the first quantity, that is, the controller can specifically determine the first quantity through the quantity limiter. While providing a specific implementation manner for the controller to determine the first quantity, the security of limiting the first quantity can be improved by means of hardware limitation of the quantity controller.
  • the apparatus further includes an accumulator, and the accumulator is used to count the number of opened AICs in the N AICs as the second number;
  • the method further includes: determining the second quantity through the accumulator; wherein, the controller generating the control instruction according to the first quantity includes: the controller generating the control instruction according to the first quantity and the second quantity.
  • the control device of the AI chip may further include an accumulator for counting the number of opened AICs in the N AICs as the second number, that is, the controller can obtain the second number in real time through the accumulator , and based on the first quantity and the second quantity, a control instruction sent to the prohibiting circuit is generated. That is, the controller combines the number of AICs allowed to be opened and the number of AICs that have been opened in the N AICs to open or close at least one AIC of the N AICs, and further optimize the control of the N AICs during the use of the AI chip. .
  • the second number is used to indicate the number of AICs that have been opened in the non-faulty AICs of the N AICs.
  • the accumulator can specifically avoid the faulty AICs among the N AICs, that is, the number of the opened AICs among the non-faulty AICs among the N AICs is counted as the second number, thereby preventing the controller from issuing the open AICs. Instructions are sent to the failed AIC to further optimize the control of the AI chip.
  • the AI chip includes an image processing unit GPU, a neural processing unit NPU, or a tensor processing unit TPU.
  • the AI chip can be applied to a variety of different application scenarios, such as CPU, NPU, TPU or other AI application scenarios, to improve the applicability of the solution.
  • a third aspect of the embodiments of the present application provides a controller of an artificial intelligence AI chip, the controller is included in a control device of the AI chip, and the control device further includes a prohibition circuit, wherein the AI chip includes N artificial intelligence cores AIC, where N is an integer greater than 1, and the controller includes:
  • the number of AICs allowed to be opened in the N AICs is the first number
  • a generating unit configured to generate a control instruction according to the first number, the control instruction being used to instruct to open or close at least one AIC in the N AICs;
  • the sending unit is used for sending the control instruction to the prohibiting circuit.
  • the device further includes a quantity limiter, and the quantity limiter is 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, the number of AICs allowed to be opened among the N AICs as the first number.
  • the device further includes an accumulator, and the accumulator is used to count the number of AICs that have been opened in the N AICs to be the second number;
  • the determining unit is further configured to determine the second quantity through the accumulator
  • the generating unit is specifically configured to generate the control instruction according to the first quantity and the second quantity.
  • the second number is used to indicate the number of AICs that have been opened in the non-faulty AICs of the N AICs.
  • the AI chip includes an image processing unit GPU, a neural processing unit NPU, or a tensor processing unit TPU.
  • the component modules of the controller may also be used to perform the steps performed in each possible implementation manner of the second aspect.
  • the second aspect which will not be repeated here.
  • a fourth aspect of the embodiments of the present application provides a controller, the controller includes at least one processor, a memory, a communication port, and computer-executable instructions stored in the memory and executable on the processor, when the computer executes the instructions When executed by the processor, the processor executes the method described in the second aspect or any of the possible implementation manners of the second aspect.
  • a fifth aspect of the embodiments of the present application provides a computer-readable storage medium that stores one or more computer-executable instructions.
  • the processor executes the above-mentioned second aspect or the second aspect. The method described in any possible implementation manner of the aspect.
  • a sixth aspect of the embodiments of the present application provides a computer program product that stores one or more computer-executable instructions.
  • the processor executes the second aspect or the second aspect A method of any possible implementation.
  • a seventh aspect of the present application provides a chip system, where the chip system includes a processor for supporting the controller to implement the functions involved in the second aspect or any possible implementation manner of the second aspect.
  • the chip system may further include a memory for storing necessary program instructions and data.
  • the chip system may be composed of chips, or may include chips and other discrete devices.
  • the controller uses the number of AICs that are allowed to be opened among the N AICs in the AI chip as the basis for generating control instructions, and disables the circuit by prohibiting the circuit. Turning on or off at least one AIC of the N AICs is performed. Compared with the way 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 of the N AICs can be flexibly controlled according to the number of AICs allowed to be opened in the N AICs. On or off.
  • the entire AI chip must be disassembled and replaced, resulting in a low utilization rate of the AIC in the AI chip. While realizing the flexible control of the AIC in the AI chip , to improve the utilization of AIC in the AI chip, thereby improving the user experience.
  • Fig. 1 is a schematic diagram of AI chip implementation
  • Fig. 2 is another schematic diagram of AI chip implementation
  • FIG. 3 is a schematic diagram of an artificial intelligence main body framework provided by an embodiment of the present application.
  • Fig. 4 is another schematic diagram of AI chip implementation
  • FIG. 5 is a schematic diagram of a control device for an AI chip provided by an embodiment of the present application.
  • FIG. 6 is another schematic diagram of a control device for an AI chip provided by an embodiment of the present application.
  • FIG. 7 is another schematic diagram of a control device for an AI chip provided by an embodiment of the present application.
  • FIG. 8 is another schematic diagram of a control device for an AI chip provided by an embodiment of the present application.
  • FIG. 9 is another schematic diagram of a control device for an AI chip provided by an embodiment of the present application.
  • FIG. 10-1 is a schematic diagram of a method for sieving an AI chip provided by an embodiment of the application.
  • 10-2 is a schematic diagram of a usage flow of a control device for an AI chip provided by an embodiment of the application;
  • 11-1 is a schematic diagram of an application of a control device for an AI chip provided by an embodiment of the application;
  • 11-2 is another schematic diagram of the application of a control device for an AI chip provided by an embodiment of the application;
  • FIG. 12 is another schematic diagram of a control method of an AI chip provided by an embodiment of the present application.
  • FIG. 13 is a schematic diagram of a controller according to an embodiment of the present application.
  • Figure 3 shows a schematic diagram of an artificial intelligence main frame, the main frame describes the overall workflow of the artificial intelligence system, and is suitable for general artificial intelligence field requirements.
  • the "intelligent information chain” reflects a series of processes from data acquisition to processing. For example, it can be the general process of intelligent information perception, intelligent information representation and formation, intelligent reasoning, intelligent decision-making, intelligent execution and output. In this process, data has gone through the process of "data-information-knowledge-wisdom".
  • the "IT value chain” reflects the value brought by artificial intelligence to the information technology industry from the underlying infrastructure of human intelligence, information (providing and processing technology implementation) to the industrial ecological process of the system.
  • the infrastructure provides computing power support for artificial intelligence systems, realizes communication with the outside world, and supports through the basic platform. Communication with the outside world through sensors; computing power is provided by smart chips (hardware acceleration chips such as CPU, NPU, GPU, ASIC, FPGA); the basic platform includes distributed computing framework and network-related platform guarantee and support, which can include cloud storage and computing, interconnection networks, etc. For example, sensors communicate with external parties to obtain data, and these data are provided to the intelligent chips in the distributed computing system provided by the basic platform for calculation.
  • smart chips hardware acceleration chips such as CPU, NPU, GPU, ASIC, FPGA
  • the basic platform includes distributed computing framework and network-related platform guarantee and support, which can include cloud storage and computing, interconnection networks, etc. For example, sensors communicate with external parties to obtain data, and these data are provided to the intelligent chips in the distributed computing system provided by the basic platform for calculation.
  • 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, and text, as well as IoT data from traditional devices, including business data from existing systems and sensory data such as force, displacement, liquid level, temperature, and humidity.
  • Data processing usually includes data training, machine learning, deep learning, search, reasoning, decision-making, etc.
  • machine learning and deep learning can perform symbolic and formalized intelligent information modeling, extraction, preprocessing, training, etc. on data.
  • Reasoning refers to the process of simulating human's intelligent reasoning method in a computer or intelligent system, using formalized information to carry out machine thinking and solving problems according to the reasoning control strategy, and the typical function is search and matching.
  • Decision-making refers to the process of making decisions after intelligent information is reasoned, usually providing functions such as classification, sorting, and prediction.
  • some general capabilities can be formed based on the results of data processing, such as algorithms or a general system, such as translation, text analysis, computer vision processing, speech recognition, image identification, etc.
  • Intelligent 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, and the productization of intelligent information decision-making and implementation of applications. Its application areas mainly include: intelligent manufacturing, intelligent transportation, Smart home, smart medical care, smart security, autonomous driving, safe city, smart terminals, etc.
  • AI computing power has grown exponentially year by year, and AI has ushered in a new round of vigorous development.
  • AI is used in safe cities, pharmaceutical research and development, weather forecasting, autonomous driving, e-commerce and other fields.
  • Figure 3 Taking the schematic diagram of the main frame of artificial intelligence shown in Figure 3 as an example, there are many application scenarios in the current AI field, and different application scenarios may have different computing power requirements.
  • AI chips are divided into chips of different specifications for different application scenarios.
  • Open computing project accelerator module (open compute project accelerator module, OAM or OCP acceleration module) and high-speed peripheral component interconnect express (PCI-Express or PCIE) card, two common AI basic hardware units in the industry , respectively as an example of a high-specification chip and a low-specification chip.
  • OAM compute project accelerator module
  • PCIE peripheral component interconnect express
  • the PCIE card follows the traditional PCIE interface, which has good inheritance and can be directly inserted into existing servers and desktops to quickly provide AI acceleration with low cost.
  • the disadvantage is that the power consumption is limited, and a single card has a maximum of 250 to 300 watts (W); and the number of interfaces is limited, with only one set of PCIE X16 interfaces; Channel (Gbps/lane), low computing power.
  • 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 speed (such as 112Gbps/lane), and higher computing power. force.
  • the disadvantage is that it cannot be directly inserted into the existing server, the server needs to be redesigned, and the compatibility between various manufacturers is not as good as that of PCIE, and the cost is higher.
  • OAM and PCIE cards will coexist in the market for a long time.
  • OAM can be further divided into liquid-cooled OAM with higher specifications and air-cooled OAM with lower specifications.
  • air-cooled OAM It is a high-grade chip.
  • chip manufacturers In order to reduce investment, the general practice of chip manufacturers is to design an AI chip that can meet the application requirements of OAM and PCIE cards at the same time. For sales strategy or other reasons (such as chip yield), chips need to be divided into high and low grades for two scenarios, denoted as NPU_OAM and NPU_PCIE.
  • an NPU/GPU chip has 36 built-in AICs, and OAM scenarios (such as OAM) support all of them.
  • OAM scenarios such as OAM
  • Low-specification scenarios such as PCIE cards
  • NPU_OAM opens all 36 AICs to users
  • NPU_PCIE only opens 25 AICs in the yellow part.
  • the control modes of the multiple AICs included in it may be as shown in FIG. 1 .
  • an enable switch (Open) is set for each AIC in the AI chip.
  • the (pass) indicates that the AIC function is intact.
  • the Open configuration of all AICs shown in Figure 1 is 1; for the low specification file NPU_PCIE that needs to use 25 AICs, the Open configuration of only a part of the AICs is 1, and the other The Open configuration of AIC is 0.
  • the terminal device reads the Open configuration (0 or 1) corresponding to each AIC in the AI chip, and controls each AIC to be turned on or off according to the configuration.
  • 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 the flexible control of the AIC in the AI chip and at the same time improve the utilization rate of the AIC in the AI chip, thereby Improve user experience.
  • a control device for an AI chip provided by an embodiment of the present application includes:
  • the controller is used to determine the number of AICs allowed to be opened among the N AICs as the first number, and after generating a control command according to the first number, send the control command to the prohibition circuit; the prohibition circuit interconnected with the controller It is connected to the N AICs in the AI chip, and is used for turning on or off at least one AIC in the N AICs according to the control instruction.
  • the AI chip may include an image processing unit GPU, a neural processing unit NPU, or a tensor processing unit TPU, that is, the AI chip may be applicable to a variety of different application scenarios, such as CPU , NPU, TPU, or other AI application scenarios, which are not specifically limited here.
  • the controller uses the number of AICs allowed to be opened among the N AICs in the AI chip as the basis for generating the control command, and disables the circuit to perform opening or closing of at least one of the N AICs.
  • an AIC Compared with the way 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 of the N AICs can be flexibly controlled according to the number of AICs allowed to be opened in the N AICs. On or off.
  • the control device of the AI chip can be further optimized.
  • an embodiment of the present application provides a control device for an AI chip.
  • the device further 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 be the first a quantity; at this time, the controller is specifically configured to determine the first quantity through the quantity limiter.
  • the number of AICs allowed to be opened among the N AICs can be limited by means of hardware, that is, in the control device of the AI chip, the number of AICs allowed to be opened among the N AICs is also limited.
  • the quantity is the quantity limiter of the first quantity, that is, the controller can specifically determine the first quantity through the quantity limiter. While providing a specific implementation manner for the controller to determine the first quantity, the security of limiting the first quantity can be improved by means of hardware limitation of the quantity controller.
  • the apparatus further includes an accumulator connected to the controller; wherein, the accumulator is connected to the N AICs for counting the opened AICs in the N AICs
  • the quantity is the second quantity; at this time, the controller is specifically configured to generate the control instruction according to the first quantity and the second quantity.
  • control device of the AI chip may further include an accumulator for counting the number of opened AICs among the N AICs as the second number, that is, the controller may obtain the second number in real time through the accumulator, and A control command sent to the inhibiting circuit is generated based on the first number and the second number. That is, the controller combines the number of AICs allowed to be opened and the number of AICs that have been opened in the N AICs to open or close at least one AIC of the N AICs, and further optimize the control of the N AICs during the use of the AI chip. .
  • 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 in the non-faulty AICs. That is to say, the accumulator can specifically avoid the faulty AICs among the 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 preventing the controller from issuing an opening command To the faulty AIC, the control of the AI chip is further optimized.
  • FIG. 7 is a schematic diagram of a control apparatus for an AI chip provided in an embodiment of the present application.
  • a comparator ie, a controller
  • a quantity limiter ie, an accumulator and a prohibition circuit interconnected with the comparator are included.
  • the AIC controls the switch Open, and an open flag open can be set in each AIC, which is configurable by software, and its value can only be 0 or 1. 0 means close the AIC, and 1 means open.
  • the control process of the device shown in FIG. 7 in executing the AI chip includes the following contents.
  • the number limiter is used to limit the number of AICs allowed to be opened among the N AICs to the first number (referred to as Open_sum), and send Open_sum to the comparator, that is, the open_sum threshold of the number of AICs, the value is 25, the hardware is hard-coded, and the software only Can read but not write;
  • the accumulator is used to count the number of AICs that have been opened in the N AICs as the second number (recorded as sum), that is, the accumulator of the number of AICs opened, count the open value, and output the sum;
  • the prohibition circuit is connected to the N AICs in the AI chip, and is used to turn on or off at least one AIC in the N AICs according to the control instruction, that is, the AIC turns on the prohibition circuit.
  • over 1
  • it is prohibited to turn on a new AIC.
  • over a new AIC is allowed to be opened;
  • a specific implementation of the quantity limiter shown in FIG. 6 by hardware may be implemented by an electronic fuse (efuse).
  • 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 to the first quantity through the output level of the at least one efuse.
  • 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 opened among the N AICs to the first quantity by the output level of at least one efuse .
  • the output level of the at least one efuse is the first level; and/or, when the blown state of the at least one efuse is not blown, the at least one efuse
  • the output level of is a second level; wherein, the first level is different from the second level. That is, different fusing states of the at least one efuse may correspond to different output levels, so that the quantity limiter can limit the first quantity through different output levels of the at least one efuse.
  • the output level of the at least one efuse is the first level corresponding to the high level
  • the output level of the at least one efuse is not blown.
  • An example is given for the realization that the second level corresponds to the low level.
  • a specific implementation manner of the quantity controller in the embodiment of the present application may be implemented by at least one efuse shown in FIG. 7 .
  • the corresponding output is high level (ie "1"), other efuses are not blown, and the corresponding output is low level (ie "0").
  • the number of AICs is 25.
  • the inhibiting circuit includes at least a configuration interface and a plurality of switches.
  • AIC_O is the minimum AIC quantity that satisfies the OAM
  • AIC_P is the minimum AIC quantity that satisfies the PCIE card.
  • FIG. 10-2 is a schematic flowchart of a control device using an AI chip to control the AI chip in an embodiment of the present application.
  • the model of the AI chip is PCIE.
  • the controller can determine the number of AICs allowed to be opened among the N AICs as the first number, that is, AIC_P; and the controller can also determine the number of AICs among the N AICs.
  • the number of opened AICs is the second number and is recorded as sum(Open), and sum(Open) is accumulated and assigned to open_sum.
  • FIG. 11-1 The specific implementation scenario can be shown in Figure 11-1.
  • open_sum AICs 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 shown in Figure 11- 2.
  • select other normal AICs to open for example, avoid the faulty AIC_01, and choose to open AIC_05 ).
  • control device of the AI chip in the embodiment of the present application has been described above, and the following will be introduced from the perspective of the control method of the AI chip.
  • a method for controlling an AI chip in an embodiment of the present application includes the following steps.
  • the method is applied to a controller in a control device of the AI chip, and the control device further includes a prohibiting circuit, wherein the AI chip includes N artificial intelligence core AICs, where N is an integer greater than 1, and the method includes:
  • control instruction is used to instruct to open or close at least one AIC in the N AICs;
  • the controller uses the number of AICs allowed to be opened among the N AICs in the AI chip as the basis for generating the control command, and sends the control command to the prohibition circuit, so that the prohibition circuit executes Turn on or off at least one AIC of the N AICs.
  • the controller uses the number of AICs allowed to be opened among the N AICs in the AI chip as the basis for generating the control command, and sends the control command to the prohibition circuit, so that the prohibition circuit executes Turn on or off at least one AIC of the N AICs.
  • the controller uses the number of AICs allowed to be opened among the N AICs in the AI chip as the basis for generating the control command, and sends the control command to the prohibition circuit, so that the prohibition circuit executes Turn on or off at least one AIC of the N AICs.
  • the entire AI chip must be disassembled and replaced, resulting in a low utilization rate of the AIC in the AI chip. While realizing the flexible control of the AIC in the AI chip , to improve the utilization of AIC in the AI chip, thereby improving the user experience.
  • the method before generating the control instruction in step S101, the method further includes:
  • the first number is the number of AICs allowed to be opened in the N AICs
  • Generating a control instruction in this step S101 includes:
  • the control instruction is generated according to the first number.
  • the number of AICs that are allowed to be opened in the N AICs can be limited by hardware, that is, in the control device of the AI chip, there is also a method for limiting the AICs that are allowed to be opened in the N AICs.
  • the quantity of AICs is the quantity limiter of the first quantity, that is, the controller can specifically determine the first quantity through the quantity limiter. While providing a specific implementation manner for the controller to determine the first quantity, the security of limiting the first quantity can be improved by means of hardware limitation of the quantity controller.
  • the method before generating the control instruction in step S101, the method further includes:
  • the second number is the number of opened AICs in the N AICs
  • Generating a control instruction in this step S101 includes:
  • the control instruction is generated according to the first quantity and the second quantity.
  • the control device of the AI chip may further include an accumulator for counting the number of opened AICs in the N AICs as the second number, that is, the controller can obtain the second number in real time through the accumulator , and based on the first quantity and the second quantity, a control instruction sent to the prohibiting circuit is generated. That is, the controller combines the number of AICs allowed to be opened and the number of AICs that have been opened in the N AICs to open or close at least one AIC of the N AICs, and further optimize the control of the N AICs during the use of the AI chip. .
  • the second number is used to indicate the number of opened AICs among the non-faulty AICs of the N AICs.
  • the accumulator can specifically avoid the faulty AICs among the N AICs, that is, the number of the opened AICs among the non-faulty AICs among the N AICs is counted as the second number, thereby preventing the controller from issuing the open AICs. Instructions are sent to the failed AIC to further optimize the control of the AI chip.
  • the N AICs include N image processing units GPU, N neural processing units NPU or N tensor processing units TPU.
  • the AI chip can be applied to a variety of different application scenarios, such as CPU, NPU, TPU or other AI application scenarios, to improve the applicability of the solution.
  • an embodiment of the present application provides a controller 1300 of an artificial intelligence AI chip, the controller 1300 is included in a control device of the AI chip, and the control device further includes a prohibition circuit, wherein the AI chip includes N an artificial intelligence core AIC, where N is an integer greater than 1, and the controller includes:
  • a generating unit 1302 configured to generate a control instruction according to the first number, the control instruction being used to instruct to open or close at least one AIC in the N AICs;
  • the sending unit 1303 is configured to send the control instruction to the prohibiting circuit.
  • the device further includes a quantity limiter, and the quantity limiter is used to limit the number of AICs allowed to be opened among the N AICs to a first number;
  • the determining unit 1301 is specifically configured to determine, through the quantity limiter, the number of AICs allowed to be opened among the N AICs as the first number.
  • the device further includes an accumulator, and the accumulator is used to count the number of AICs that have been opened in the N AICs as the second number;
  • the determining unit 1301 is further configured to determine the second quantity through the accumulator
  • the generating unit 1302 is specifically configured to generate the control instruction according to the first quantity and the second quantity.
  • the second number is used to indicate the number of opened AICs among the non-faulty AICs of the N AICs.
  • the AI chip includes an image processing unit GPU, a neural processing unit NPU or a tensor processing unit TPU.
  • Embodiments of the present application further provide a computer-readable storage medium that stores one or more computer-executable instructions.
  • the processor executes the above-mentioned control method for an AI chip.
  • Embodiments of the present application further provide a computer program product that stores one or more computer-executable instructions, and when the computer-executable instructions are executed by the processor, the processor executes the above-mentioned control method for an AI chip.
  • the present application also provides a chip system, where the chip system includes a processor for supporting the controller to implement the functions involved in the above-mentioned power replacement control method.
  • the chip system may further include a memory for storing necessary program instructions and data.
  • the chip system may be composed of chips, or may include chips and other discrete devices.
  • the disclosed system, apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium.
  • the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes .

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Hardware Redundancy (AREA)

Abstract

A control device and control method of an artificial intelligence (AI) chip, and a controller, used for achieving flexible control of artificial intelligence cores (AICs) in an AI chip and improving the utilization rate of the AICs in the AI chip, thereby improving user experience. In the control device of the AI chip, the AI chip comprises N AICs, N being an integer greater than one. The device comprises: a controller and a inhibit circuit connected to the controller. The controller is configured to determine that the number of AICs allowed to be enabled among the N AICs is a first number, and to generate a control command according to the first number and then send the control command to the inhibit circuit. The inhibit circuit is connected to the N AICs and is configured to enable or disable at least one of the N AICs according to the control command.

Description

人工智能AI芯片的控制装置、控制方法及控制器Control device, control method and controller of artificial intelligence AI chip 技术领域technical field
本申请实施例涉及人工智能AI领域,尤其涉及一种人工智能AI芯片的控制装置、控制方法及控制器。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 of an artificial intelligence AI chip.
背景技术Background technique
人工智能(artificial intelligence,AI)是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用系统。换句话说,人工智能是计算机科学的一个分支,它企图了解智能的实质,并生产出一种新的能以人类智能相似的方式作出反应的智能机器。人工智能也就是研究各种智能机器的设计原理与实现方法,使机器具有感知、推理与决策的功能。人工智能领域的研究包括机器人,自然语言处理,计算机视觉,决策与推理,人机交互,推荐与搜索,AI基础理论等。Artificial intelligence (AI) is a 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 kind of intelligent machine that responds in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that the 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, and basic AI theory.
目前,在不同应用场景可能存在不同的算力需求,硬件厂商的做法一般是设计一款能够同时满足不同应用场景的AI芯片,针对不同的应用场景将芯片分为不同规格档的芯片。以开放计算项目加速模组(open compute project accelerator module,OAM或OCP加速模组)和高速外设互联总线(peripheral component interconnect express,PCI-Express或PCIE)卡这两种业界常用的AI基本硬件单元,分别作为高规格档芯片和低规格档芯片为例。At present, there may be different computing power requirements in different application scenarios. Hardware manufacturers generally design an AI chip that can meet different application scenarios at the same time, and divide the chips into chips with different specifications for different application scenarios. Open computing project accelerator module (open compute project accelerator module, OAM or OCP acceleration module) and high-speed peripheral component interconnect express (PCI-Express or PCIE) card, two common AI basic hardware units in the industry , respectively as an example of a high-specification chip and a low-specification chip.
其中,PCIE卡沿用传统的PCIE接口,继承性较好,可以直接插到现有的服务器、台式机中,快速提供AI加速,成本便宜。缺点是功耗受限,单卡最大250~300瓦(W);且接口数量受限,只有1组PCIE X16接口;接口速率受限于金手指的结构和拓扑,最大32吉比特每秒每通道(Gbps/lane),算力较低。此外,OAM专门为AI量身定制,能支持更高的功耗(如700W),更多的接口数量(例如8组X16接口),更宽的速率(例如112Gbps/lane),更高的算力。缺点是不能直接插到现有服务器中,需要重新设计服务器,且各个厂家之间的兼容性没有PCIE好,成本较高。Among them, the PCIE card follows the traditional PCIE interface, which has good inheritance and can be directly inserted into existing servers and desktops to quickly provide AI acceleration with low cost. The disadvantage is that the power consumption is limited, and a single card has a maximum of 250 to 300 watts (W); and the number of interfaces is limited, with only one set of PCIE X16 interfaces; Channel (Gbps/lane), 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 speed (such as 112Gbps/lane), and higher computing power. force. The disadvantage is that it cannot be directly inserted into the existing server, the server needs to be redesigned, and the compatibility between various manufacturers is not as good as that of PCIE, and the cost is higher.
一般地,出于销售策略或者其他原因(比如芯片良率),需要针对上述两种场景将芯片分为高低两档,分别记为NPU_OAM和NPU_PCIE。如图1所示,AI芯片在出厂时,在AI芯片中的每个AIC设置1个使能开关(Open),通过配置Open=0可以关闭该AIC,通过配置Open=1可以打开该AIC,此外,每一个AIC中的(pass)表示该AIC功能完好无异常。对于需要使用36个AIC的高规格档的OAM,图1所示所有AIC的Open都配置为1;对于需要使用25个AIC的低规格档NPU_PCIE,只开启其中一部分AIC的Open配置为1,其他AIC的Open配置为0。对于使用该AI芯片的终端设备而言,终端设备通过读取AI芯片中的每一个AIC对应的Open的配置(0或1),并根据该配置控制每一个AIC的打开或者关闭。Generally, for sales strategy or other reasons (such as chip yield), chips need to be divided into high and low grades for the above two scenarios, which are respectively recorded as NPU_OAM and NPU_PCIE. As shown in Figure 1, when the AI chip is shipped from 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, a (pass) in each AIC indicates that the AIC is functionally intact. For the OAM of the high specification file that needs to use 36 AICs, the Open configuration of all AICs shown in Figure 1 is 1; for the low specification file NPU_PCIE that needs to use 25 AICs, the Open configuration of only a part of the AICs is 1, and the other The Open configuration of AIC is 0. For a 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 each AIC to be turned on or off according to the configuration.
然而,如图1所示配置方式中,AI芯片在工作一段时间后,如果的Open配置为1的AIC有部分损坏,如图2所示AIC_01(fail),该AIC_01的芯片性能下降或者不可用,使 用该AI芯片的终端设备必须拆机更换整个AI芯片。虽然在AI芯片中存在Open配置为0的AIC并未损坏,但是终端设备限于该Open的出厂配置而无法使用,导致该配置方式下的AI芯片的AIC的利用率较低,影响用户体验。However, in the configuration mode shown in Figure 1, after the AI chip has been working for a period of time, if the AIC whose Open configuration is 1 is partially damaged, as shown in Figure 2 AIC_01 (fail), the performance of the AIC_01 chip is degraded or unavailable. , the terminal equipment using this AI chip must be disassembled to replace the entire AI chip. Although the AIC with the Open configuration of 0 in the AI chip is not damaged, the terminal device is limited to the factory configuration of the Open and cannot be used. As a result, the utilization rate of the AIC of the AI chip in this configuration is low, which affects the user experience.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供了一种人工智能AI芯片的控制装置、控制方法及控制器,用于实现AI芯片中AIC的灵活控制的同时,提升AI芯片中AIC的利用率,从而提升用户体验。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 achieve flexible control of the AIC in the AI chip and at the same time improve the utilization rate of the AIC in the AI chip, thereby improving user experience.
本申请实施例第一方面提供了一种人工智能AI芯片的控制装置,该AI芯片包括N个人工智能核心AIC,其中,N为大于1的整数,该装置包括:控制器,以及连接于该控制器的禁止电路;该控制器用于确定该N个AIC中允许打开的AIC的数量为第一数量,并根据该第一数量生成控制指令之后,向该禁止电路发送该控制指令;此后,该禁止电路连接于该N个AIC,用于根据该控制指令打开或关闭该N个AIC中的至少一个AIC。A first aspect of the embodiments of the present application provides a control device for an artificial intelligence AI chip. The AI chip includes N artificial intelligence cores AIC, where N is an integer greater than 1. The device includes: a controller, and a controller connected to the AI chip. The prohibition circuit of the controller; the controller is used to determine that the number of AICs allowed to be opened in the N AICs is the first number, and after generating a control command according to the first number, send the control command to the prohibition circuit; after that, the A prohibiting circuit is connected to the N AICs, and is used for turning on or off at least one AIC of the N AICs according to the control instruction.
基于上述技术方案,在AI芯片的控制装置中,控制器以AI芯片中N个AIC中允许打开的AIC的数量作为生成控制指令的依据,通过禁止电路执行打开或关闭该N个AIC中的至少一个AIC。与通过为每一个AIC的Open配置为1或0以控制每一个AIC的打开或关闭的方式相比,可以根据N个AIC中允许打开的AIC的数量灵活控制N个AIC中的至少一个AIC的打开或关闭。避免在Open配置为1的部分AIC损坏导致芯片性能下降或者不可用时,必须拆机更换整个AI芯片导致AI芯片中AIC的利用率较低的情况出现,在实现AI芯片中AIC的灵活控制的同时,提升AI芯片中AIC的利用率,从而提升用户体验。Based on the above technical solution, in the control device of the AI chip, the controller uses the number of AICs allowed to be opened among the N AICs in the AI chip as the basis for generating a control command, and disables the circuit to perform opening or closing of at least one of the N AICs. an AIC. Compared with the way 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 of the N AICs can be flexibly controlled according to the number of AICs allowed to be opened in the N AICs. On or off. To avoid the situation that when part of the AIC whose Open configuration is 1 is damaged and the chip performance is degraded or unavailable, the entire AI chip must be disassembled and replaced, resulting in a low utilization rate of the AIC in the AI chip. While realizing the flexible control of the AIC in the AI chip , to improve the utilization of AIC in the AI chip, thereby improving the user experience.
在本申请实施例第一方面的一种具体的实现方式中,该装置还包括连接于该控制器的数量限制器;其中,该数量限制器用于限制该N个AIC中允许打开的AIC的数量为第一数量;此时,该控制器具体用于通过该数量限制器确定该第一数量。In a specific implementation of the first aspect of the embodiment of the present application, the device further 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 is the first quantity; at this time, the controller is specifically configured to determine the first quantity through the quantity limiter.
基于上述技术方案,在AI控制装置中,可以通过硬件的方式限制N个AIC中允许打开的AIC的数量,即在该AI芯片的控制装置中,还包括用于限制该N个AIC中允许打开的AIC的数量为第一数量的数量限制器,即控制器具体可以通过该数量限制器确定该第一数量。提供了控制器确定该第一数量的一种具体的实现方式的同时,通过数量控制器的硬件限制的方式可以提升对第一数量进行限制的安全性。Based on the above technical solutions, in the AI control device, the number of AICs that are allowed to be opened in the N AICs can be limited by hardware, that is, in the control device of the AI chip, there is also a method for limiting the AICs that are allowed to be opened in the N AICs. The quantity of AICs is the quantity limiter of the first quantity, that is, the controller can specifically determine the first quantity through the quantity limiter. While providing a specific implementation manner for the controller to determine the first quantity, the security of limiting the first quantity can be improved by means of hardware limitation of the quantity controller.
在本申请实施例第一方面的一种具体的实现方式中,该数量限制器包括至少一个电子熔丝efuse,该数量限制器用于通过该至少一个efuse的输出电平限制该N个AIC中允许打开的AIC的数量为该第一数量。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 allowable number of the N AICs through the output level of the at least one efuse The number of open AICs is the first number.
基于上述技术方案,该数量限制器具体可以通过至少一个efuse烧死的方式对第一数量进行限定,即通过至少一个efuse的输出电平限制该N个AIC中允许打开的AIC的数量为该第一数量,提供了数量限制器限制该第一数量的一种具体的实现方式,提升方案的可实现性。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 opened among the N AICs by the output level of at least one efuse to be the A quantity, a specific implementation manner in which the quantity limiter limits the first quantity is provided, which improves the achievability of the solution.
在本申请实施例第一方面的一种具体的实现方式中,在该至少一个efuse的熔断状态为已熔断时,该至少一个efuse的输出电平为第一电平;和/或,在该至少一个efuse的熔断状态为未熔断时,该至少一个efuse的输出电平为第二电平;其中,该第一电平不同于 该第二电平。In a specific implementation of the first aspect of the embodiment of the present application, when the blown state of the at least one efuse is blown, the output level of the at least one efuse is the first level; and/or, in the When the blown state of 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.
基于上述技术方案,至少一个efuse的不同熔断状态可以对应不同的输出电平,使得数量限制器可以通过至少一个efuse的不同的输出电平对第一数量进行限制,提供了数量限制器通过至少一个efuse限制第一数量的一种具体的实现方式,提升方案的可实现性。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 different output levels of the at least one efuse, providing the quantity limiter to pass at least one A specific implementation of efuse limiting the first number to improve the achievability of the solution.
在本申请实施例第一方面的一种具体的实现方式中,该装置还包括连接该控制器的累加器;其中,该累加器连接该N个AIC,用于统计该N个AIC中已打开的AIC的数量为第二数量;此时,该控制器具体用于根据该第一数量和该第二数量生成该控制指令。In a specific implementation manner of the first aspect of the embodiment of the present application, the apparatus further includes an accumulator connected to the controller; wherein the accumulator is connected to the N AICs, and is used to count the opened AICs among the N AICs. The number of AICs is the second number; at this time, the controller is specifically configured to generate the control instruction according to the first number and the second number.
基于上述技术方案,AI芯片的控制装置还可以包括用于统计该N个AIC中已打开的AIC的数量为第二数量的累加器,即控制器可以通过该累加器实时获取得到该第二数量,并以该第一数量和第二数量为依据生成向禁止电路发送的控制指令。即控制器结合N个AIC中允许打开的AIC的数量和已打开的AIC的数量,打开或关闭该N个AIC中的至少一个AIC,在AI芯片的使用过程中进一步优化对N个AIC的控制。Based on the above technical solution, the control device of the AI chip may further include an accumulator for counting the number of opened AICs in the N AICs as the second number, that is, the controller can obtain the second number in real time through the accumulator , and based on the first quantity and the second quantity, a control instruction sent to the prohibiting circuit is generated. That is, the controller combines the number of AICs allowed to be opened and the number of AICs that have been opened in the N AICs to open or close at least one AIC of the N AICs, and further optimize the control of the N AICs during the use of the AI chip. .
在本申请实施例第一方面的一种具体的实现方式中,该累加器具体用于连接该N个AIC中的未故障AIC,该第二数量用于指示该未故障AIC中已打开的AIC的数量。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 in the N AICs, and the second number is used to indicate the opened AICs in the non-faulty AICs quantity.
基于上述技术方案,累加器具体可以避开N个AIC中发生故障的AIC,即统计N个AIC中未故障AIC中已打开的AIC的数量为第二数量,从而,可以避免控制器下发打开指令至发生故障的AIC,进一步优化对AI芯片的控制。Based on the above technical solution, the accumulator can specifically avoid the faulty AICs among the N AICs, that is, the number of the opened AICs among the non-faulty AICs among the N AICs is counted as the second number, thereby preventing the controller from issuing the open AICs. Instructions are sent to the failed AIC to further optimize the control of the AI chip.
在本申请实施例第一方面的一种具体的实现方式中,该AI芯片包括图像处理单元GPU、神经处理单元NPU或张量处理单元TPU。In a specific implementation manner of the first aspect of the embodiment of the present application, the AI chip includes an image processing unit GPU, a neural processing unit NPU, or a tensor processing unit TPU.
基于上述技术方案,该AI芯片可以适用于多种不同的应用场景,例如CPU、NPU、TPU或者是其它的AI应用场景,提升方案的适用性。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, to improve the applicability of the solution.
本申请实施例第二方面提供了一种人工智能AI芯片的控制方法,其特征在于,该方法应用于该AI芯片的控制装置中的控制器,该装置还包括禁止电路,其中,该AI芯片包括N个人工智能核心AIC,其中,N为大于1的整数,该方法包括:控制器首先确定该N个AIC中允许打开的AIC的数量为第一数量;然后,该控制器根据该第一数量生成控制指令,该控制指令用于指示打开或关闭该N个AIC中的至少一个AIC;最后,该控制器向该禁止电路发送该控制指令。A second aspect of the embodiments of the present application provides a method for controlling an artificial intelligence AI chip, wherein the method is applied to a controller in a control device for the AI chip, and the device further includes a prohibition circuit, wherein the AI chip It includes N artificial intelligence core AICs, where N is an integer greater than 1. The method includes: the controller first determines that the number of AICs allowed to be opened in the N AICs is a first number; then, the controller determines according to the first number of AICs. The number generates a control instruction, the control instruction is used to instruct to open or close at least one AIC of the N AICs; finally, the controller sends the control instruction to the prohibition circuit.
基于上述技术方案,在AI芯片的控制装置中,控制器以AI芯片中N个AIC中允许打开的AIC的数量作为生成控制指令的依据,向禁止电路发送该控制指令,以使得该禁止电路执行打开或关闭该N个AIC中的至少一个AIC。与通过为每一个AIC的Open配置为1或0以控制每一个AIC的打开或关闭的方式相比,可以根据N个AIC中允许打开的AIC的数量灵活控制N个AIC中的至少一个AIC的打开或关闭。避免在Open配置为1的部分AIC损坏导致芯片性能下降或者不可用时,必须拆机更换整个AI芯片导致AI芯片中AIC的利用率较低的情况出现,在实现AI芯片中AIC的灵活控制的同时,提升AI芯片中AIC的利用率,从而提升用户体验。Based on the above technical solution, in the control device of the AI chip, the controller uses the number of AICs allowed to be opened among the N AICs in the AI chip as the basis for generating the control command, and sends the control command to the prohibition circuit, so that the prohibition circuit executes Turn on or off at least one AIC of the N AICs. Compared with the way 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 of the N AICs can be flexibly controlled according to the number of AICs allowed to be opened in the N AICs. On or off. To avoid the situation that when part of the AIC whose Open configuration is 1 is damaged and the chip performance is degraded or unavailable, the entire AI chip must be disassembled and replaced, resulting in a low utilization rate of the AIC in the AI chip. While realizing the flexible control of the AIC in the AI chip , to improve the utilization of AIC in the AI chip, thereby improving the user experience.
在本申请实施例第二方面的一种具体的实现方式中,该装置还包括数量限制器,该数量限制器用于限制该N个AIC中允许打开的AIC的数量为第一数量;其中,该控制器确定 该N个AIC中允许打开的AIC的数量为第一数量包括:控制器通过该数量限制器确定该N个AIC中允许打开的AIC的数量为第一数量。In a specific implementation of the second aspect of the embodiment of the present application, the device further includes a quantity limiter, and the quantity limiter is used to limit the number of AICs allowed to be opened among the N AICs to be the first number; The controller determining that the number of AICs allowed to be opened among the N AICs is the first number includes: the controller determines, through the number limiter, that the number of AICs that are allowed to be opened among the N AICs is the first number.
基于上述技术方案,在AI控制装置中,可以通过硬件的方式限制N个AIC中允许打开的AIC的数量,即在该AI芯片的控制装置中,还包括用于限制该N个AIC中允许打开的AIC的数量为第一数量的数量限制器,即控制器具体可以通过该数量限制器确定该第一数量。提供了控制器确定该第一数量的一种具体的实现方式的同时,通过数量控制器的硬件限制的方式可以提升对第一数量进行限制的安全性。Based on the above technical solutions, in the AI control device, the number of AICs that are allowed to be opened in the N AICs can be limited by hardware, that is, in the control device of the AI chip, there is also a method for limiting the AICs that are allowed to be opened in the N AICs. The quantity of AICs is the quantity limiter of the first quantity, that is, the controller can specifically determine the first quantity through the quantity limiter. While providing a specific implementation manner for the controller to determine the first quantity, the security of limiting the first quantity can be improved by means of hardware limitation of the quantity controller.
在本申请实施例第二方面的一种具体的实现方式中,该装置还包括累加器,该累加器用于统计该N个AIC中已打开的AIC的数量为第二数量;在该生成该控制指令之前,该方法还包括:通过该累加器确定该第二数量;其中,控制器根据该第一数量生成控制指令包括:控制器根据该第一数量和该第二数量生成该控制指令。In a specific implementation of the second aspect of the embodiment of the present application, the apparatus further includes an accumulator, and the accumulator is used to count the number of opened AICs in the N AICs as the second number; Before the instruction, the method further includes: determining the second quantity through the accumulator; wherein, the controller generating the control instruction according to the first quantity includes: the controller generating the control instruction according to the first quantity and the second quantity.
基于上述技术方案,AI芯片的控制装置还可以包括用于统计该N个AIC中已打开的AIC的数量为第二数量的累加器,即控制器可以通过该累加器实时获取得到该第二数量,并以该第一数量和第二数量为依据生成向禁止电路发送的控制指令。即控制器结合N个AIC中允许打开的AIC的数量和已打开的AIC的数量,打开或关闭该N个AIC中的至少一个AIC,在AI芯片的使用过程中进一步优化对N个AIC的控制。Based on the above technical solution, the control device of the AI chip may further include an accumulator for counting the number of opened AICs in the N AICs as the second number, that is, the controller can obtain the second number in real time through the accumulator , and based on the first quantity and the second quantity, a control instruction sent to the prohibiting circuit is generated. That is, the controller combines the number of AICs allowed to be opened and the number of AICs that have been opened in the N AICs to open or close at least one AIC of the N AICs, and further optimize the control of the N AICs during the use of the AI chip. .
在本申请实施例第二方面的一种具体的实现方式中,该第二数量用于指示在该N个AIC的未故障AIC中,已打开的AIC的数量。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 AICs that have been opened in the non-faulty AICs of the N AICs.
基于上述技术方案,累加器具体可以避开N个AIC中发生故障的AIC,即统计N个AIC中未故障AIC中已打开的AIC的数量为第二数量,从而,可以避免控制器下发打开指令至发生故障的AIC,进一步优化对AI芯片的控制。Based on the above technical solution, the accumulator can specifically avoid the faulty AICs among the N AICs, that is, the number of the opened AICs among the non-faulty AICs among the N AICs is counted as the second number, thereby preventing the controller from issuing the open AICs. Instructions are sent to the failed AIC to further optimize the control of the AI chip.
在本申请实施例第二方面的一种具体的实现方式中,该AI芯片包括图像处理单元GPU、神经处理单元NPU或张量处理单元TPU。In a specific implementation manner of the second aspect of the embodiment of the present application, the AI chip includes an image processing unit GPU, a neural processing unit NPU, or a tensor processing unit TPU.
基于上述技术方案,该AI芯片可以适用于多种不同的应用场景,例如CPU、NPU、TPU或者是其它的AI应用场景,提升方案的适用性。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, to improve the applicability of the solution.
本申请实施例第三方面提供了一种人工智能AI芯片的控制器,该控制器包含于该AI芯片的控制装置,该控制装置还包括禁止电路,其中,该AI芯片包括N个人工智能核心AIC,其中,N为大于1的整数,该控制器包括:A third aspect of the embodiments of the present application provides a controller of an artificial intelligence AI chip, the controller is included in a control device of the AI chip, and the control device further includes a prohibition circuit, wherein the AI chip includes N artificial intelligence cores AIC, where N is an integer greater than 1, and the controller includes:
确定单元,用于该N个AIC中允许打开的AIC的数量为第一数量;determining unit, the number of AICs allowed to be opened in the N AICs is the first number;
生成单元,用于根据该第一数量生成控制指令,该控制指令用于指示打开或关闭该N个AIC中的至少一个AIC;a generating unit, configured to generate a control instruction according to the first number, the control instruction being used to instruct to open or close at least one AIC in the N AICs;
发送单元,用于向该禁止电路发送该控制指令。The sending unit is used for sending the control instruction to the prohibiting circuit.
在本申请实施例第三方面的一种具体的实现方式中,该装置还包括数量限制器,该数量限制器用于限制该N个AIC中允许打开的AIC的数量为第一数量;In a specific implementation of the third aspect of the embodiment of the present application, the device further includes a quantity limiter, and the quantity limiter is used to limit the number of AICs allowed to be opened among the N AICs to a first number;
该确定单元,具体用于通过该数量限制器确定该N个AIC中允许打开的AIC的数量为第一数量。The determining unit is specifically configured to determine, through the quantity limiter, the number of AICs allowed to be opened among the N AICs as the first number.
在本申请实施例第三方面的一种具体的实现方式中,该装置还包括累加器,该累加器 用于统计该N个AIC中已打开的AIC的数量为第二数量;In a specific implementation of the third aspect of the embodiment of the present application, the device further includes an accumulator, and the accumulator is used to count the number of AICs that have been opened in the N AICs to be the second number;
该确定单元,还用于通过该累加器确定该第二数量;The determining unit is further configured to determine the second quantity through the accumulator;
该生成单元,具体用于根据该第一数量和该第二数量生成该控制指令。The generating unit is specifically configured to generate the control instruction according to the first quantity and the second quantity.
在本申请实施例第三方面的一种具体的实现方式中,该第二数量用于指示在该N个AIC的未故障AIC中,已打开的AIC的数量。In a specific implementation of the third aspect of the embodiment of the present application, the second number is used to indicate the number of AICs that have been opened in the non-faulty AICs of the N AICs.
在本申请实施例第三方面的一种具体的实现方式中,该AI芯片包括图像处理单元GPU、神经处理单元NPU或张量处理单元TPU。In a specific implementation manner of the third aspect of the embodiment of the present application, the AI chip includes an image processing unit GPU, a neural processing unit NPU, or a tensor processing unit TPU.
本申请实施例第三方面中,控制器的组成模块还可以用于执行第二方面的各个可能实现方式中所执行的步骤,具体均可以参阅第二方面,此处不再赘述。In the third aspect of the embodiment of the present application, the component modules of the controller may also be used to perform the steps performed in each possible implementation manner of the second aspect. For details, refer to the second aspect, which will not be repeated here.
本申请实施例第四方面提供了一种控制器,该控制器包括至少一个处理器、存储器、通信端口以及存储在存储器中并可在处理器上运行的计算机执行指令,当所述计算机执行指令被所述处理器执行时,所述处理器执行如上述第二方面或第二方面任意一种可能的实现方式所述的方法。A fourth aspect of the embodiments of the present application provides a controller, the controller includes at least one processor, a memory, a communication port, and computer-executable instructions stored in the memory and executable on the processor, when the computer executes the instructions When executed by the processor, the processor executes the method described in the second aspect or any of the possible implementation manners of the second aspect.
本申请实施例第五方面提供一种存储一个或多个计算机执行指令的计算机可读存储介质,当所述计算机执行指令被处理器执行时,所述处理器执行如上述第二方面或第二方面任意一种可能的实现方式所述的方法。A fifth aspect of the embodiments of the present application provides a computer-readable storage medium that stores one or more computer-executable instructions. When the computer-executable instructions are executed by a processor, the processor executes the above-mentioned second aspect or the second aspect. The method described in any possible implementation manner of the aspect.
本申请实施例第六方面提供一种存储一个或多个计算机执行指令的计算机程序产品,当所述计算机执行指令被所述处理器执行时,所述处理器执行上述第二方面或第二方面任意一种可能实现方式的方法。A sixth aspect of the embodiments of the present application provides a computer program product that stores one or more computer-executable instructions. When the computer-executable instructions are executed by the processor, the processor executes the second aspect or the second aspect A method of any possible implementation.
本申请第七方面提供了一种芯片系统,该芯片系统包括处理器,用于支持控制器实现上述第二方面或第二方面任意一种可能的实现方式中所涉及的功能。在一种可能的设计中,芯片系统还可以包括存储器,存储器,用于保存必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包含芯片和其他分立器件。A seventh aspect of the present application provides a chip system, where the chip system includes a processor for supporting the controller to implement the functions involved in the second aspect or any possible implementation manner of the second aspect. In a possible design, the chip system may further include a memory for storing necessary program instructions and data. The chip system may be composed of chips, or may include chips and other discrete devices.
其中,第三方面至第七方面或者其中任一种可能实现方式所带来的技术效果可参见第二方面或第二方面不同可能实现方式所带来的技术效果,此处不再赘述。Wherein, for the technical effects brought by the third aspect to the seventh aspect or any one of the possible implementation manners, reference may be made to the technical effects brought by the second aspect or different possible implementation manners of the second aspect, which will not be repeated here.
从以上技术方案可以看出,本申请实施例具有以下优点:在AI芯片的控制装置中,控制器以AI芯片中N个AIC中允许打开的AIC的数量作为生成控制指令的依据,通过禁止电路执行打开或关闭该N个AIC中的至少一个AIC。与通过为每一个AIC的Open配置为1或0以控制每一个AIC的打开或关闭的方式相比,可以根据N个AIC中允许打开的AIC的数量灵活控制N个AIC中的至少一个AIC的打开或关闭。避免在Open配置为1的部分AIC损坏导致芯片性能下降或者不可用时,必须拆机更换整个AI芯片导致AI芯片中AIC的利用率较低的情况出现,在实现AI芯片中AIC的灵活控制的同时,提升AI芯片中AIC的利用率,从而提升用户体验。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 that are allowed to be opened among the N AICs in the AI chip as the basis for generating control instructions, and disables the circuit by prohibiting the circuit. Turning on or off at least one AIC of the N AICs is performed. Compared with the way 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 of the N AICs can be flexibly controlled according to the number of AICs allowed to be opened in the N AICs. On or off. To avoid the situation that when part of the AIC whose Open configuration is 1 is damaged and the chip performance is degraded or unavailable, the entire AI chip must be disassembled and replaced, resulting in a low utilization rate of the AIC in the AI chip. While realizing the flexible control of the AIC in the AI chip , to improve the utilization of AIC in the AI chip, thereby improving the user experience.
附图说明Description of drawings
图1为AI芯片实现的一个示意图;Fig. 1 is a schematic diagram of AI chip implementation;
图2为AI芯片实现的另一个示意图;Fig. 2 is another schematic diagram of AI chip implementation;
图3为本申请实施例提供的一种人工智能主体框架示意图;3 is a schematic diagram of an artificial intelligence main body framework provided by an embodiment of the present application;
图4为AI芯片实现的另一个示意图;Fig. 4 is another schematic diagram of AI chip implementation;
图5为本申请实施例提供的一种AI芯片的控制装置的一个示意图;5 is a schematic diagram of a control device for an AI chip provided by an embodiment of the present application;
图6为本申请实施例提供的一种AI芯片的控制装置的另一个示意图;6 is another schematic diagram of a control device for an AI chip provided by an embodiment of the present application;
图7为本申请实施例提供的一种AI芯片的控制装置的另一个示意图;7 is another schematic diagram of a control device for an AI chip provided by an embodiment of the present application;
图8为本申请实施例提供的一种AI芯片的控制装置的另一个示意图;8 is another schematic diagram of a control device for an AI chip provided by an embodiment of the present application;
图9为本申请实施例提供的一种AI芯片的控制装置的另一个示意图;9 is another schematic diagram of a control device for an AI chip provided by an embodiment of the present application;
图10-1为本申请实施例提供的一种AI芯片的筛片方法的一个示意图;FIG. 10-1 is a schematic diagram of a method for sieving an AI chip provided by an embodiment of the application;
图10-2为本申请实施例提供的一种AI芯片的控制装置的使用流程的一个示意图;10-2 is a schematic diagram of a usage flow of a control device for an AI chip provided by an embodiment of the application;
图11-1为本申请实施例提供的一种AI芯片的控制装置的应用的一个示意图;11-1 is a schematic diagram of an application of a control device for an AI chip provided by an embodiment of the application;
图11-2为本申请实施例提供的一种AI芯片的控制装置的应用的另一个示意图;11-2 is another schematic diagram of the application of a control device for an AI chip provided by an embodiment of the application;
图12为本申请实施例提供的一种AI芯片的控制方法的另一个示意图;12 is another schematic diagram of a control method of an AI chip provided by an embodiment of the present application;
图13为本申请实施例提供的一种控制器的一个示意图。FIG. 13 is a schematic diagram of a controller according to an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application.
图3示出一种人工智能主体框架示意图,该主体框架描述了人工智能系统总体工作流程,适用于通用的人工智能领域需求。Figure 3 shows a schematic diagram of an artificial intelligence main frame, the main frame describes the overall workflow of the artificial intelligence system, and is suitable for general artificial intelligence field requirements.
下面从“智能信息链”(水平轴)和“IT价值链”(垂直轴)两个维度对上述人工智能主题框架进行阐述。The above artificial intelligence theme framework will be explained from the two dimensions of "intelligent information chain" (horizontal axis) and "IT value chain" (vertical axis).
“智能信息链”反映从数据的获取到处理的一列过程。举例来说,可以是智能信息感知、智能信息表示与形成、智能推理、智能决策、智能执行与输出的一般过程。在这个过程中,数据经历了“数据—信息—知识—智慧”的凝练过程。The "intelligent information chain" reflects a series of processes from data acquisition to processing. For example, it can be the general process of intelligent information perception, intelligent information representation and formation, intelligent reasoning, intelligent decision-making, intelligent execution and output. In this process, data has gone through the process of "data-information-knowledge-wisdom".
“IT价值链”从人智能的底层基础设施、信息(提供和处理技术实现)到系统的产业生态过程,反映人工智能为信息技术产业带来的价值。The "IT value chain" reflects the value brought by artificial intelligence to the information technology industry from the underlying infrastructure of human intelligence, information (providing and processing technology implementation) to the industrial ecological process of the system.
(1)基础设施:(1) Infrastructure:
基础设施为人工智能系统提供计算能力支持,实现与外部世界的沟通,并通过基础平台实现支撑。通过传感器与外部沟通;计算能力由智能芯片(CPU、NPU、GPU、ASIC、FPGA等硬件加速芯片)提供;基础平台包括分布式计算框架及网络等相关的平台保障和支持,可以包括云存储和计算、互联互通网络等。举例来说,传感器和外部沟通获取数据,这些数据提供给基础平台提供的分布式计算系统中的智能芯片进行计算。The infrastructure provides computing power support for artificial intelligence systems, realizes communication with the outside world, and supports through the basic platform. Communication with the outside world through sensors; computing power is provided by smart chips (hardware acceleration chips such as CPU, NPU, GPU, ASIC, FPGA); the basic platform includes distributed computing framework and network-related platform guarantee and support, which can include cloud storage and computing, interconnection networks, etc. For example, sensors communicate with external parties to obtain data, and these data are provided to the intelligent chips in the distributed computing system provided by the basic platform for calculation.
(2)数据(2) Data
基础设施的上一层的数据用于表示人工智能领域的数据来源。数据涉及到图形、图像、语音、文本,还涉及到传统设备的物联网数据,包括已有系统的业务数据以及力、位移、液位、温度、湿度等感知数据。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, and text, as well as IoT data from traditional devices, including business data from existing systems and sensory data such as force, displacement, liquid level, temperature, and humidity.
(3)数据处理(3) Data processing
数据处理通常包括数据训练,机器学习,深度学习,搜索,推理,决策等方式。Data processing usually includes data training, machine learning, deep learning, search, reasoning, decision-making, etc.
其中,机器学习和深度学习可以对数据进行符号化和形式化的智能信息建模、抽取、预处理、训练等。Among them, machine learning and deep learning can perform symbolic and formalized intelligent information modeling, extraction, preprocessing, training, etc. on data.
推理是指在计算机或智能系统中,模拟人类的智能推理方式,依据推理控制策略,利用形式化的信息进行机器思维和求解问题的过程,典型的功能是搜索与匹配。Reasoning refers to the process of simulating human's intelligent reasoning method in a computer or intelligent system, using formalized information to carry out machine thinking and solving problems according to the reasoning control strategy, and the typical function is search and matching.
决策是指智能信息经过推理后进行决策的过程,通常提供分类、排序、预测等功能。Decision-making refers to the process of making decisions after intelligent information is reasoned, usually providing functions such as classification, sorting, and prediction.
(4)通用能力(4) General ability
对数据经过上面提到的数据处理后,进一步基于数据处理的结果可以形成一些通用的能力,比如可以是算法或者一个通用系统,例如,翻译,文本的分析,计算机视觉的处理,语音识别,图像的识别等等。After the above-mentioned data processing, some general capabilities can be formed based on the results of data processing, such as algorithms or a general system, such as translation, text analysis, computer vision processing, speech recognition, image identification, etc.
(5)智能产品及行业应用(5) Smart products and industry applications
智能产品及行业应用指人工智能系统在各领域的产品和应用,是对人工智能整体解决方案的封装,将智能信息决策产品化、实现落地应用,其应用领域主要包括:智能制造、智能交通、智能家居、智能医疗、智能安防、自动驾驶,平安城市,智能终端等。Intelligent 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, and the productization of intelligent information decision-making and implementation of applications. Its application areas mainly include: intelligent manufacturing, intelligent transportation, Smart home, smart medical care, smart security, autonomous driving, safe city, smart terminals, etc.
近年来,随着7nm等先进工艺的发展,NPU计算架构的革命性创新,新算法架构的不断推出,AI算力呈指数级逐年增长,AI迎来新一轮的蓬勃发展。在平安城市、医药研发、天气预报、自动驾驶、电子商务等领域都有AI的身影。以图3所示人工智能主体框架示意图为例,当前AI领域存在众多应用场景,而在不同应用场景可能存在不同的算力需求,硬件厂商的做法一般是设计一款能够同时满足不同应用场景的AI芯片,针对不同的应用场景将芯片分为不同规格档的芯片。以开放计算项目加速模组(open compute project accelerator module,OAM或OCP加速模组)和高速外设互联总线(peripheral component interconnect express,PCI-Express或PCIE)卡这两种业界常用的AI基本硬件单元,分别作为高规格档芯片和低规格档芯片为例。In recent years, with the development of advanced technologies 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 is used in safe cities, pharmaceutical research and development, weather forecasting, autonomous driving, e-commerce and other fields. Taking the schematic diagram of the main frame of artificial intelligence shown in Figure 3 as an example, there are many application scenarios in the current AI field, and different application scenarios may have different computing power requirements. AI chips are divided into chips of different specifications for different application scenarios. Open computing project accelerator module (open compute project accelerator module, OAM or OCP acceleration module) and high-speed peripheral component interconnect express (PCI-Express or PCIE) card, two common AI basic hardware units in the industry , respectively as an example of a high-specification chip and a low-specification chip.
其中,PCIE卡沿用传统的PCIE接口,继承性较好,可以直接插到现有的服务器、台式机中,快速提供AI加速,成本便宜。缺点是功耗受限,单卡最大250~300瓦(W);且接口数量受限,只有1组PCIE X16接口;接口速率受限于金手指的结构和拓扑,最大32吉比特每秒每通道(Gbps/lane),算力较低。此外,OAM专门为AI量身定制,能支持更高的功耗(如700W),更多的接口数量(例如8组X16接口),更宽的速率(例如112Gbps/lane),更高的算力。缺点是不能直接插到现有服务器中,需要重新设计服务器,且各个厂家之间的兼容性没有PCIE好,成本较高。Among them, the PCIE card follows the traditional PCIE interface, which has good inheritance and can be directly inserted into existing servers and desktops to quickly provide AI acceleration with low cost. The disadvantage is that the power consumption is limited, and a single card has a maximum of 250 to 300 watts (W); and the number of interfaces is limited, with only one set of PCIE X16 interfaces; Channel (Gbps/lane), 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 speed (such as 112Gbps/lane), and higher computing power. force. The disadvantage is that it cannot be directly inserted into the existing server, the server needs to be redesigned, and the compatibility between various manufacturers is not as good as that of PCIE, and the cost is higher.
预计相当长一段时间内OAM和PCIE卡在市面上并存,此外,OAM还可以进一步划分为较高规格的液冷OAM,以及较低规格的风冷OAM,其中,相较于PCIE,风冷OAM为高规格档芯片。为减少投资,芯片厂商的一般做法是设计一款AI芯片,能够同时满足OAM和PCIE卡的应用需求。出于销售策略或者其他原因(比如芯片良率),需要针对两种场景将芯片分为高低两档,记为NPU_OAM和NPU_PCIE。It is expected that OAM and PCIE cards will coexist in the market for a long time. In addition, OAM can be further divided into liquid-cooled OAM with higher specifications and air-cooled OAM with lower specifications. Compared with PCIE, air-cooled OAM It is a high-grade chip. In order to reduce investment, the general practice of chip manufacturers is to design an AI chip that can meet the application requirements of OAM and PCIE cards at the same time. For sales strategy or other reasons (such as chip yield), chips need to be divided into high and low grades for two scenarios, denoted as NPU_OAM and NPU_PCIE.
举例说明,如图4所示,某NPU/GPU芯片内置36个AIC,OAM场景(比如OAM)支持全部开启。低规格场景(比如PCIE卡)功率、散热受限,仅能支持开启25个AIC。NPU_OAM 对用户开放所有的36个AIC,NPU_PCIE仅开放黄色部分的25个AIC。For example, as shown in Figure 4, an NPU/GPU chip has 36 built-in AICs, and OAM scenarios (such as OAM) support all of them. Low-specification scenarios (such as PCIE cards) have limited power and heat dissipation, and can only support 25 AICs. NPU_OAM opens all 36 AICs to users, and NPU_PCIE only opens 25 AICs in the yellow part.
基于图4所示AI芯片,其所包含的多个AIC的控制方式可以如图1所示。AI芯片在出厂时,在AI芯片中的每个AIC设置1个使能开关(Open),通过配置Open=0可以关闭该AIC,通过配置Open=1可以打开该AIC,此外,每一个AIC中的(pass)表示该AIC功能完好无异常。对于需要使用36个AIC的高规格档的OAM,图1所示所有AIC的Open都配置为1;对于需要使用25个AIC的低规格档NPU_PCIE,只开启其中一部分AIC的Open配置为1,其他AIC的Open配置为0。对于使用该AI芯片的终端设备而言,终端设备通过读取AI芯片中的每一个AIC对应的Open的配置(0或1),并根据该配置控制每一个AIC的打开或者关闭。Based on the AI chip shown in FIG. 4 , the control modes of the multiple AICs included in it may be as shown in FIG. 1 . When the AI chip is shipped from 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, in each AIC The (pass) indicates that the AIC function is intact. For the OAM of the high specification file that needs to use 36 AICs, the Open configuration of all AICs shown in Figure 1 is 1; for the low specification file NPU_PCIE that needs to use 25 AICs, the Open configuration of only a part of the AICs is 1, and the other The Open configuration of AIC is 0. For a 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 each AIC to be turned on or off according to the configuration.
此外,如图1所示配置方式中,AI芯片在工作一段时间后,如果的Open配置为1的AIC有部分损坏,如图2所示AIC_01(fail),该AIC_01的芯片性能下降或者不可用,使用该AI芯片的终端设备必须拆机更换整个AI芯片。In addition, in the configuration mode shown in Figure 1, after the AI chip has been working for a period of time, if the AIC whose Open configuration is 1 is partially damaged, as shown in Figure 2 AIC_01 (fail), the performance of the AIC_01 chip is degraded or unavailable. , the terminal equipment using this AI chip must be disassembled to replace the entire AI chip.
由上述配置方式可知,当前的AI芯片中的多个AIC的控制方式中至少包括以下技术问题:It can be seen from the above configuration methods that the control methods of multiple AICs in the current AI chip include at least the following technical problems:
问题1、在低规格档的AI芯片中,限制其使用的数量是通过软件方式屏蔽,容易被破解,影响分档销售策略; Question 1. In low-specification AI chips, limiting the number of AI chips used is shielded by software, which is easy to be cracked and affects the sales strategy of different grades;
问题2、如图2所示场景,虽然在AI芯片中存在Open配置为0的AIC并未损坏,但是终端设备限于该Open的出厂配置而无法使用。导致该配置方式下的AI芯片的AIC的利用率较低,影响用户体验。Question 2. As shown in Figure 2, although there is an AIC with an Open configuration of 0 in the AI chip and it is not damaged, the terminal device is limited to the factory configuration of the Open and cannot be used. As a result, the utilization rate of the AIC of the AI chip in this configuration mode is low, which affects the user experience.
为了解决上述问题,本申请实施例提供了一种人工智能AI芯片的控制装置、控制方法及控制器,用于实现AI芯片中AIC的灵活控制的同时,提升AI芯片中AIC的利用率,从而提升用户体验。In order to solve the above problems, 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 the flexible control of the AIC in the AI chip and at the same time improve the utilization rate of the AIC in the AI chip, thereby Improve user experience.
请参阅图5,本申请实施例提供的一种AI芯片的控制装置包括:Referring to FIG. 5 , a control device for an AI chip provided by an embodiment of the present application includes:
控制器,以及连接于该控制器的禁止电路;a controller, and an inhibiting circuit connected to the controller;
其中,控制器用于确定该N个AIC中允许打开的AIC的数量为第一数量,并根据该第一数量生成控制指令之后,向该禁止电路发送该控制指令;与控制器相互连接的禁止电路连接于AI芯片中的N个AIC,用于根据该控制指令打开或关闭该N个AIC中的至少一个AIC。The controller is used to determine the number of AICs allowed to be opened among the N AICs as the first number, and after generating a control command according to the first number, send the control command to the prohibition circuit; the prohibition circuit interconnected with the controller It is connected to the N AICs in the AI chip, and is used for turning on or off at least one AIC in the N AICs according to the control instruction.
需要说明的是,本实施例及后续实施例中,AI芯片可以包括图像处理单元GPU、神经处理单元NPU或张量处理单元TPU,即该AI芯片可以适用于多种不同的应用场景,例如CPU、NPU、TPU或者是其它的AI应用场景,此处不作具体的限定。It should be noted that, in this embodiment and subsequent embodiments, the AI chip may include an image processing unit GPU, a neural processing unit NPU, or a tensor processing unit TPU, that is, the AI chip may be applicable to a variety of different application scenarios, such as CPU , NPU, TPU, or other AI application scenarios, which are not specifically limited here.
本实施例中,在AI芯片的控制装置中,控制器以AI芯片中N个AIC中允许打开的AIC的数量作为生成控制指令的依据,通过禁止电路执行打开或关闭该N个AIC中的至少一个AIC。与通过为每一个AIC的Open配置为1或0以控制每一个AIC的打开或关闭的方式相比,可以根据N个AIC中允许打开的AIC的数量灵活控制N个AIC中的至少一个AIC的打开或关闭。避免在Open配置为1的部分AIC损坏导致芯片性能下降或者不可用时,必须拆机更换整个AI芯片导致AI芯片中AIC的利用率较低的情况出现,在实现AI芯片中AIC的灵活控制的同时,提升AI芯片中AIC的利用率。In this embodiment, in the control device of the AI chip, the controller uses the number of AICs allowed to be opened among the N AICs in the AI chip as the basis for generating the control command, and disables the circuit to perform opening or closing of at least one of the N AICs. an AIC. Compared with the way 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 of the N AICs can be flexibly controlled according to the number of AICs allowed to be opened in the N AICs. On or off. To avoid the situation that when part of the AIC whose Open configuration is 1 is damaged and the chip performance is degraded or unavailable, the entire AI chip must be disassembled and replaced, resulting in a low utilization rate of the AIC in the AI chip. While realizing the flexible control of the AIC in the AI chip , to improve the utilization of AIC in AI chips.
此外,基于图5所示实施例,该AI芯片的控制装置中除了控制器和禁止电路,还可以进一步优化,请参阅图6,本申请实施例提供了一种AI芯片的控制装置。In addition, based on the embodiment shown in FIG. 5 , in addition to the controller and the prohibition circuit, the control device of the AI chip can be further optimized. Referring to FIG. 6 , an embodiment of the present application provides a control device for an AI chip.
在一种具体的实现方式中,如图6所示,该装置还包括连接于该控制器的数量限制器;其中,该数量限制器用于限制该N个AIC中允许打开的AIC的数量为第一数量;此时,该控制器具体用于通过该数量限制器确定该第一数量。In a specific implementation manner, as shown in FIG. 6 , the device further 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 be the first a quantity; at this time, the controller is specifically configured to determine the first quantity through the quantity limiter.
具体地,在AI控制装置中,可以通过硬件的方式限制N个AIC中允许打开的AIC的数量,即在该AI芯片的控制装置中,还包括用于限制该N个AIC中允许打开的AIC的数量为第一数量的数量限制器,即控制器具体可以通过该数量限制器确定该第一数量。提供了控制器确定该第一数量的一种具体的实现方式的同时,通过数量控制器的硬件限制的方式可以提升对第一数量进行限制的安全性。Specifically, in the AI control device, the number of AICs allowed to be opened among the N AICs can be limited by means of hardware, that is, in the control device of the AI chip, the number of AICs allowed to be opened among the N AICs is also limited. The quantity is the quantity limiter of the first quantity, that is, the controller can specifically determine the first quantity through the quantity limiter. While providing a specific implementation manner for the controller to determine the first quantity, the security of limiting the first quantity can be improved by means of hardware limitation of the quantity controller.
在一种具体的实现方式中,如图6所示,该装置还包括连接该控制器的累加器;其中,该累加器连接该N个AIC,用于统计该N个AIC中已打开的AIC的数量为第二数量;此时,该控制器具体用于根据该第一数量和该第二数量生成该控制指令。In a specific implementation manner, as shown in FIG. 6 , the apparatus further includes an accumulator connected to the controller; wherein, the accumulator is connected to the N AICs for counting the opened AICs in the N AICs The quantity is the second quantity; at this time, the controller is specifically configured to generate the control instruction according to the first quantity and the second quantity.
具体地,AI芯片的控制装置还可以包括用于统计该N个AIC中已打开的AIC的数量为第二数量的累加器,即控制器可以通过该累加器实时获取得到该第二数量,并以该第一数量和第二数量为依据生成向禁止电路发送的控制指令。即控制器结合N个AIC中允许打开的AIC的数量和已打开的AIC的数量,打开或关闭该N个AIC中的至少一个AIC,在AI芯片的使用过程中进一步优化对N个AIC的控制。Specifically, the control device of the AI chip may further include an accumulator for counting the number of opened AICs among the N AICs as the second number, that is, the controller may obtain the second number in real time through the accumulator, and A control command sent to the inhibiting circuit is generated based on the first number and the second number. That is, the controller combines the number of AICs allowed to be opened and the number of AICs that have been opened in the N AICs to open or close at least one AIC of the N AICs, and further optimize the control of the N AICs during the use of the AI chip. .
此外,该累加器具体用于连接该N个AIC中的未故障AIC,该第二数量用于指示该未故障AIC中已打开的AIC的数量。也就是说,累加器具体可以避开N个AIC中发生故障的AIC,即统计N个AIC中未故障AIC中已打开的AIC的数量为第二数量,从而,可以避免控制器下发打开指令至发生故障的AIC,进一步优化对AI芯片的控制。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 opened AICs in the non-faulty AICs. That is to say, the accumulator can specifically avoid the faulty AICs among the 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 preventing the controller from issuing an opening command To the faulty AIC, the control of the AI chip is further optimized.
下面将以AI芯片中AIC的数量N为36进行示例性说明,请参阅图7,为本申请实施例提供的一种AI芯片的控制装置的一种示意图。In the following, the number N of AICs in the AI chip is 36 for exemplary description. Please refer to FIG. 7 , which is a schematic diagram of a control apparatus for an AI chip provided in an embodiment of the present application.
在图7所示装置中,包括比较器(即控制器)、以及与比较器相互连接的数量限制器、累加器和禁止电路。In the apparatus shown in FIG. 7, a comparator (ie, a controller) is included, and a quantity limiter, an accumulator and a prohibition circuit interconnected with the comparator are included.
其中,AIC控制开关Open,可以在每一个AIC设置一个开启标识open,软件可配置,其值只能取0或者1。0表示关闭该AIC,1表示打开。图7所示装置在执行AI芯片的控制过程包括如下内容。Among them, the AIC controls the switch Open, and an open flag open can be set in each AIC, which is configurable by software, and its value can only be 0 or 1. 0 means close the AIC, and 1 means open. The control process of the device shown in FIG. 7 in executing the AI chip includes the following contents.
数量限制器用于限制N个AIC中允许打开的AIC的数量为第一数量(记为Open_sum),并向比较器发送Open_sum,即AIC的开启数量门限open_sum,值为25,硬件写死,软件只能读不能写;The number limiter is used to limit the number of AICs allowed to be opened among the N AICs to the first number (referred to as Open_sum), and send Open_sum to the comparator, that is, the open_sum threshold of the number of AICs, the value is 25, the hardware is hard-coded, and the software only Can read but not write;
累加器用于统计该N个AIC中已打开的AIC的数量为第二数量(记为sum),即AIC开启数量累加器,统计open值,输出sum;The accumulator is used to count the number of AICs that have been opened in the N AICs as the second number (recorded as sum), that is, the accumulator of the number of AICs opened, count the open value, and output the sum;
控制器用于根据该第一数量和该第二数量生成该控制指令(记为over),即AIC开启数量比较器,当sum>=Open_sum时,输出溢出指示over=1,当sum<Open_sum时,输出溢出指示over=0;The controller is used to generate the control instruction (referred to as over) according to the first quantity and the second quantity, that is, the AIC turns on the quantity comparator, when sum>=Open_sum, the output overflow indication over=1, when sum<Open_sum, output overflow indication over=0;
禁止电路连接于AI芯片中的N个AIC,用于根据该控制指令打开或关闭该N个AIC中的至少一个AIC,即AIC开启禁止电路,当over为1时,禁止开启新的AIC,当over为0时,允许开启新的AIC;The prohibition circuit is connected to the N AICs in the AI chip, and is used to turn on or off at least one AIC in the N AICs according to the control instruction, that is, the AIC turns on the prohibition circuit. When over is 1, it is prohibited to turn on a new AIC. When over is 0, a new AIC is allowed to be opened;
其中,通过图7所示AI芯片的控制装置,可以使得AI芯片中AIC的open=1的数量之和小于等于open_sum,从而通过硬件控制能够开启的AIC的总数,且总数不可软件更改—避免软件破解。Among them, through the control device of the AI chip shown in FIG. 7, the sum of the number of open=1 of the AIC in the AI chip can be less than or equal to open_sum, so that the total number of AICs that can be opened is controlled by hardware, and the total number cannot be changed by software—avoid software crack.
在图6中所示数量限制器,通过硬件实现的一种具体实现方式可以通过电子熔丝(efuse)实现。其中,该数量限制器包括至少一个电子熔丝efuse,该数量限制器用于通过该至少一个efuse的输出电平限制该N个AIC中允许打开的AIC的数量为该第一数量。A specific implementation of the quantity limiter shown in FIG. 6 by hardware may be implemented by an electronic fuse (efuse). Wherein, 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 to the first quantity through the output level of the at least one efuse.
具体地,该数量限制器具体可以通过至少一个efuse烧死的方式对第一数量进行限定,即通过至少一个efuse的输出电平限制该N个AIC中允许打开的AIC的数量为该第一数量。Specifically, 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 opened among the N AICs to the first quantity by the output level of at least one efuse .
其中,在该至少一个efuse的熔断状态为已熔断时,该至少一个efuse的输出电平为第一电平;和/或,在该至少一个efuse的熔断状态为未熔断时,该至少一个efuse的输出电平为第二电平;其中,该第一电平不同于该第二电平。也就是说,至少一个efuse的不同熔断状态可以对应不同的输出电平,使得数量限制器可以通过至少一个efuse的不同的输出电平对第一数量进行限制。Wherein, when the blown state of the at least one efuse is blown, the output level of the at least one efuse is the first level; and/or, when the blown state of the at least one efuse is not blown, the at least one efuse The output level of is a second level; wherein, the first level is different from the second level. That is, different fusing states of the at least one efuse may correspond to different output levels, so that the quantity limiter can limit the first quantity through different output levels of the at least one efuse.
下面以至少一个efuse的熔断状态为已熔断时,该至少一个efuse的输出电平为第一电平对应高电平,且至少一个efuse的熔断状态为未熔断时,该至少一个efuse的输出电平为第二电平对应低电平的实现进行举例说明。In the following, when the blown state of at least one efuse is blown, the output level of the at least one efuse is the first level corresponding to the high level, and when the blown state of at least one efuse is not blown, the output level of the at least one efuse is not blown. An example is given for the realization that the second level corresponds to the low level.
如图8所示,本申请实施例中数量控制器的一种具体的实现方式可以通过图7所示至少一个efuse实现。在图7中,当efuse熔断后,对应的输出为高电平(即“1”),其他efuse未熔断,对应输出为低电平(即“0”)。使得数量控制器通过该至少一个efuse向控制器输出该N个AIC中允许打开的AIC的数量为第一数量,即“011001”,对应总的输出为25,即指示N个AIC中允许打开的AIC的数量为25。As shown in FIG. 8 , a specific implementation manner of the quantity controller in the embodiment of the present application may be implemented by at least one efuse shown in FIG. 7 . In Figure 7, when the efuse is blown, the corresponding output is high level (ie "1"), other efuses are not blown, and the corresponding output is low level (ie "0"). Make the quantity controller output to the controller through the at least one efuse that the number of AICs allowed to be opened among the N AICs is the first number, that is, "011001", and the corresponding total output is 25, that is, it indicates that the number of AICs allowed to be opened among the N AICs is the first number. The number of AICs is 25.
此外,禁止电路的一种实现示意图可以通过如图9所示。在图9中,禁止电路至少包括配置接口、多个开关。In addition, a schematic diagram of an implementation of the inhibit circuit can be shown in FIG. 9 . In FIG. 9 , the inhibiting circuit includes at least a configuration interface and a plurality of switches.
在图9所示禁止电路的实现过程中,当over=1,open=0时,开关断开,配置接口不能修改open值,即不能打开新的AIC;当over=1,open=1时,开关接通,配置接口可以修改open值,即可以关闭已打开的AIC;当over=0,open=0/1时,开关接通,配置接口可以修改open值,即可以打开新的AIC。In the implementation process of the prohibition circuit shown in Figure 9, when over=1, open=0, the switch is turned off, and the configuration interface cannot modify the open value, that is, a new AIC cannot be opened; when over=1, open=1, When the switch is turned on, 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 turned on, and the configuration interface can modify the open value, that is, a new AIC can be opened.
下面将以AI芯片的控制装置中,应用于AI芯片为NPU的场景为例,对该AI芯片的筛片流程进行示例性说明。如图10-1所示在AI控制装置中,AIC_O为满足OAM的最低AIC数量,AIC_P为满足PCIE卡的最低AIC数量。AIC总数记为AIC_A,三者关系是AIC_A>=AIC_O>=AIC_P。为便于理解,本文取AIC_A=AIC_O=36,AIC_P=25。对于PCIE卡场景,正常AIC数>=AIC_P,即AIC存在富余,适用于类似的高配低用场景。The following will exemplify the sieving process of the AI chip by taking the control device of the AI chip applied to the scenario where the AI chip is an NPU as an example. As shown in Figure 10-1, in the AI control device, AIC_O is the minimum AIC quantity that satisfies the OAM, and AIC_P is the minimum AIC quantity that satisfies the PCIE card. The total number of AICs is recorded as AIC_A, and the relationship among the three is AIC_A>=AIC_O>=AIC_P. For ease of understanding, this paper takes AIC_A=AIC_O=36 and AIC_P=25. For the PCIE card scenario, the normal number of AICs >= AIC_P, that is, there is a surplus of AICs, which is suitable for similar high-end and low-use scenarios.
通过图10-1的筛片过程,在NPU芯片对应的正常AIC数>=AIC_O时,可以确定该NPU芯片的型号设为NPU_OAM;在NPU芯片对应的正常AIC数<AIC_O且正常AIC数>=AIC_P时, 可以确定NPU芯片的型号设为NPU_PCIE;而在NPU芯片对应的正常AIC数<AIC_P时,可以确定NPU芯片为废片,即不可被OAM或PCIE的设备所使用。Through the sieving process in Figure 10-1, when the normal number of AICs corresponding to the NPU chip>=AIC_O, it can be determined that the model of the NPU chip is set to NPU_OAM; when the normal number of AICs corresponding to the NPU chip<AIC_O and the normal number of AICs>= When AIC_P, it can be determined that the model of the NPU chip is set to NPU_PCIE; and when the normal number of AICs corresponding to the NPU chip < AIC_P, it can be determined that the NPU chip is a waste chip, that is, it cannot be used by OAM or PCIE devices.
示例性地,在对AI芯片进行筛片之后,在使用该AI芯片的过程中,可以使用前述任一实施例所示的AI芯片的控制装置控制该AI芯片的使用。请参阅图10-2,为本申请实施例中,使用AI芯片的控制装置控制该AI芯片的一个流程示意图。Exemplarily, after the AI chip is screened, in 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 FIG. 10-2 , which is a schematic flowchart of a control device using an AI chip to control the AI chip in an embodiment of the present application.
通过图10-2的处理过程,AI芯片的型号为PCIE,此时控制器可以确定N个AIC中允许打开的AIC的数量为第一数量即AIC_P;并且,控制器还可以确定N个AIC中已打开的AIC的数量为第二数量记为sum(Open),并将sum(Open)进行累加赋值给open_sum。Through the process shown in Figure 10-2, the model of the AI chip is PCIE. At this time, the controller can determine the number of AICs allowed to be opened among the N AICs as the first number, that is, AIC_P; and the controller can also determine the number of AICs among the N AICs. The number of opened AICs is the second number and is recorded as sum(Open), and sum(Open) is accumulated and assigned to open_sum.
在当前N个AIC中已打开的AIC的数量open_sum<AIC_P时,确定可以(即允许)开启新的AIC;在当前N个AIC中已打开的AIC的数量open_sum=AIC_P时,确定禁止开启新的AIC;在当前N个AIC中已打开的AIC的数量open_sum>AIC_P时,确定关闭所述AIC。When the number of open AICs in the current N AICs is open_sum<AIC_P, it is determined that new AICs can be opened (that is, allowed); when the number of open AICs in the current N AICs is open_sum=AIC_P, it is determined that it is forbidden to open new AICs AIC; when the number of open AICs in the current N AICs is open_sum > AIC_P, it is determined to close the AICs.
具体实施场景可以如图11-1,AIC全部正常时可以任选其中open_sum个AIC开启(例如打开AIC_00至AIC_04、AIC_10至AIC_14、AIC_20至AIC_24、AIC_30至AIC_34、AIC_40至AIC_44);如图11-2,当存在一个或多个AIC出现故障时,将其关闭(例如将AIC_01由Open=1设置为Open=0),选择其他正常的AIC打开(例如避开其中故障的AIC_01,而选择打开AIC_05)。The specific implementation scenario can be shown in Figure 11-1. When all AICs are normal, you can choose to open_sum AICs (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 shown in Figure 11- 2. When one or more AICs are faulty, close them (for example, set AIC_01 from Open=1 to Open=0), select other normal AICs to open (for example, avoid the faulty AIC_01, and choose to open AIC_05 ).
上面对本申请实施例中的AI芯片的控制装置进行了描述,下面将从AI芯片的控制方法的角度进行介绍。The control device of the AI chip in the embodiment of the present application has been described above, and the following will be introduced from the perspective of the control method of the AI chip.
请参阅图12,本申请实施例中一种AI芯片的控制方法,包括如下步骤。Referring to FIG. 12 , a method for controlling an AI chip in an embodiment of the present application includes the following steps.
该方法应用于该AI芯片的控制装置中的控制器,该控制装置还包括禁止电路,其中,该AI芯片包括N个人工智能核心AIC,其中,N为大于1的整数,该方法包括:The method is applied to a controller in a control device of the AI chip, and the control device further includes a prohibiting circuit, wherein the AI chip includes N artificial intelligence core AICs, where N is an integer greater than 1, and the method includes:
S101、确定所述N个AIC中允许打开的AIC的数量为第一数量;S101. Determine that the number of AICs allowed to be opened in the N AICs is a first number;
S102、根据所述第一数量生成控制指令,该控制指令用于指示打开或关闭该N个AIC中的至少一个AIC;S102. Generate a control instruction according to the first quantity, where the control instruction is used to instruct to open or close at least one AIC in the N AICs;
S103、向该禁止电路发送该控制指令。S103. Send the control instruction to the prohibition circuit.
基于上述技术方案,在AI芯片的控制装置中,控制器以AI芯片中N个AIC中允许打开的AIC的数量作为生成控制指令的依据,向禁止电路发送该控制指令,以使得该禁止电路执行打开或关闭该N个AIC中的至少一个AIC。与通过为每一个AIC的Open配置为1或0以控制每一个AIC的打开或关闭的方式相比,可以根据N个AIC中允许打开的AIC的数量灵活控制N个AIC中的至少一个AIC的打开或关闭。避免在Open配置为1的部分AIC损坏导致芯片性能下降或者不可用时,必须拆机更换整个AI芯片导致AI芯片中AIC的利用率较低的情况出现,在实现AI芯片中AIC的灵活控制的同时,提升AI芯片中AIC的利用率,从而提升用户体验。Based on the above technical solution, in the control device of the AI chip, the controller uses the number of AICs allowed to be opened among the N AICs in the AI chip as the basis for generating the control command, and sends the control command to the prohibition circuit, so that the prohibition circuit executes Turn on or off at least one AIC of the N AICs. Compared with the way of controlling the opening or closing of each AIC by configuring the Open of each AIC as 1 or 0, it is possible to flexibly control the opening or closing of at least one of the N AICs according to the number of AICs allowed to be opened in the N AICs. On or off. To avoid the situation that when part of the AIC whose Open configuration is 1 is damaged and the chip performance is degraded or unavailable, the entire AI chip must be disassembled and replaced, resulting in a low utilization rate of the AIC in the AI chip. While realizing the flexible control of the AIC in the AI chip , to improve the utilization of AIC in the AI chip, thereby improving the user experience.
在一种具体的实现方式中,在步骤S101生成控制指令之前,该方法还包括:In a specific implementation manner, before generating the control instruction in step S101, the method further includes:
确定第一数量,该第一数量为该N个AIC中允许打开的AIC的数量;determining a first number, where the first number is the number of AICs allowed to be opened in the N AICs;
该步骤S101中生成控制指令包括:Generating a control instruction in this step S101 includes:
根据该第一数量生成该控制指令。The control instruction is generated according to the first number.
基于上述技术方案,在AI控制装置中,可以通过硬件的方式限制N个AIC中允许打开的AIC的数量,即在该AI芯片的控制装置中,还包括用于限制该N个AIC中允许打开的AIC的数量为第一数量的数量限制器,即控制器具体可以通过该数量限制器确定该第一数量。提供了控制器确定该第一数量的一种具体的实现方式的同时,通过数量控制器的硬件限制的方式可以提升对第一数量进行限制的安全性。Based on the above technical solutions, in the AI control device, the number of AICs that are allowed to be opened in the N AICs can be limited by hardware, that is, in the control device of the AI chip, there is also a method for limiting the AICs that are allowed to be opened in the N AICs. The quantity of AICs is the quantity limiter of the first quantity, that is, the controller can specifically determine the first quantity through the quantity limiter. While providing a specific implementation manner for the controller to determine the first quantity, the security of limiting the first quantity can be improved by means of hardware limitation of the quantity controller.
在一种具体的实现方式中,在步骤S101生成控制指令之前,该方法还包括:In a specific implementation manner, before generating the control instruction in step S101, the method further includes:
确定第二数量,该第二数量为该N个AIC中已打开的AIC的数量;determining a second number, where the second number is the number of opened AICs in the N AICs;
该步骤S101中生成控制指令包括:Generating a control instruction in this step S101 includes:
根据该第一数量和该第二数量生成该控制指令。The control instruction is generated according to the first quantity and the second quantity.
基于上述技术方案,AI芯片的控制装置还可以包括用于统计该N个AIC中已打开的AIC的数量为第二数量的累加器,即控制器可以通过该累加器实时获取得到该第二数量,并以该第一数量和第二数量为依据生成向禁止电路发送的控制指令。即控制器结合N个AIC中允许打开的AIC的数量和已打开的AIC的数量,打开或关闭该N个AIC中的至少一个AIC,在AI芯片的使用过程中进一步优化对N个AIC的控制。Based on the above technical solution, the control device of the AI chip may further include an accumulator for counting the number of opened AICs in the N AICs as the second number, that is, the controller can obtain the second number in real time through the accumulator , and based on the first quantity and the second quantity, a control instruction sent to the prohibiting circuit is generated. That is, the controller combines the number of AICs allowed to be opened and the number of AICs that have been opened in the N AICs to open or close at least one AIC of the N AICs, and further optimize the control of the N AICs during the use of the AI chip. .
在一种具体的实现方式中,该第二数量用于指示在该N个AIC的未故障AIC中,已打开的AIC的数量。In a specific implementation manner, the second number is used to indicate the number of opened AICs among the non-faulty AICs of the N AICs.
基于上述技术方案,累加器具体可以避开N个AIC中发生故障的AIC,即统计N个AIC中未故障AIC中已打开的AIC的数量为第二数量,从而,可以避免控制器下发打开指令至发生故障的AIC,进一步优化对AI芯片的控制。Based on the above technical solution, the accumulator can specifically avoid the faulty AICs among the N AICs, that is, the number of the opened AICs among the non-faulty AICs among the N AICs is counted as the second number, thereby preventing the controller from issuing the open AICs. Instructions are sent to the failed AIC to further optimize the control of the AI chip.
在一种具体的实现方式中,该N个AIC包括N个图像处理单元GPU、N个神经处理单元NPU或N个张量处理单元TPU。In a specific implementation manner, the N AICs include N image processing units GPU, N neural processing units NPU or N tensor processing units TPU.
基于上述技术方案,该AI芯片可以适用于多种不同的应用场景,例如CPU、NPU、TPU或者是其它的AI应用场景,提升方案的适用性。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, to improve the applicability of the solution.
以上描述了通过控制器实现的AI芯片的控制方法,下面结合附图介绍本申请实施例提供的控制器1300。The control method of the AI chip implemented by the controller is described above, and the controller 1300 provided by the embodiment of the present application is described below with reference to the accompanying drawings.
请参阅图13,本申请实施例提供了一种人工智能AI芯片的控制器1300,该控制器1300包含于该AI芯片的控制装置,该控制装置还包括禁止电路,其中,该AI芯片包括N个人工智能核心AIC,其中,N为大于1的整数,其中,该控制器包括:Referring to FIG. 13 , an embodiment of the present application provides a controller 1300 of an artificial intelligence AI chip, the controller 1300 is included in a control device of the AI chip, and the control device further includes a prohibition circuit, wherein the AI chip includes N an artificial intelligence core AIC, where N is an integer greater than 1, and the controller includes:
确定单元1301,用于该N个AIC中允许打开的AIC的数量为第一数量;Determining unit 1301, the number of AICs allowed to be opened in the N AICs is the first number;
生成单元1302,用于根据该第一数量生成控制指令,该控制指令用于指示打开或关闭该N个AIC中的至少一个AIC;A generating unit 1302, configured to generate a control instruction according to the first number, the control instruction being used to instruct to open or close at least one AIC in the N AICs;
发送单元1303,用于向该禁止电路发送该控制指令。The sending unit 1303 is configured to send the control instruction to the prohibiting circuit.
在一种具体的实现方式中,该装置还包括数量限制器,该数量限制器用于限制该N个AIC中允许打开的AIC的数量为第一数量;In a specific implementation manner, the device further includes a quantity limiter, and the quantity limiter is used to limit the number of AICs allowed to be opened among the N AICs to a first number;
该确定单元1301,具体用于通过该数量限制器确定该N个AIC中允许打开的AIC的数量为第一数量。The determining unit 1301 is specifically configured to determine, through the quantity limiter, the number of AICs allowed to be opened among the N AICs as the first number.
在一种具体的实现方式中,该装置还包括累加器,该累加器用于统计该N个AIC中已 打开的AIC的数量为第二数量;In a specific implementation manner, the device further includes an accumulator, and the accumulator is used to count the number of AICs that have been opened in the N AICs as the second number;
该确定单元1301,还用于通过该累加器确定该第二数量;The determining unit 1301 is further configured to determine the second quantity through the accumulator;
该生成单元1302,具体用于根据该第一数量和该第二数量生成该控制指令。The generating unit 1302 is specifically configured to generate the control instruction according to the first quantity and the second quantity.
在一种具体的实现方式中,该第二数量用于指示在该N个AIC的未故障AIC中,已打开的AIC的数量。In a specific implementation manner, the second number is used to indicate the number of opened AICs among the non-faulty AICs of the N AICs.
在一种具体的实现方式中,该AI芯片包括图像处理单元GPU、神经处理单元NPU或张量处理单元TPU。In a specific implementation manner, the AI chip includes an image processing unit GPU, a neural processing unit NPU or a tensor processing unit TPU.
需要说明的是,上述控制器1300的各单元之间的信息交互、执行过程等内容,具体内容可参见本申请前述所示的方法实施例中的叙述,此处不再赘述。It should be noted that, for the information exchange and execution process among the units of the controller 1300, for details, please refer to the descriptions in the method embodiments shown in the foregoing application, which will not be repeated here.
本申请实施例还提供一种存储一个或多个计算机执行指令的计算机可读存储介质,当所述计算机执行指令被处理器执行时,所述处理器执行如上述AI芯片的控制方法。Embodiments of the present application further provide a computer-readable storage medium that stores one or more computer-executable instructions. When the computer-executable instructions are executed by a processor, the processor executes the above-mentioned control method for an AI chip.
本申请实施例还提供一种存储一个或多个计算机执行指令的计算机程序产品,当所述计算机执行指令被所述处理器执行时,所述处理器执行上述AI芯片的控制方法。Embodiments of the present application further provide a computer program product that stores one or more computer-executable instructions, and when the computer-executable instructions are executed by the processor, the processor executes the above-mentioned control method for an AI chip.
本申请还提供了一种芯片系统,该芯片系统包括处理器,用于支持控制器实现上述换电控制方法中所涉及的功能。在一种可能的设计中,芯片系统还可以包括存储器,存储器,用于保存必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包含芯片和其他分立器件。The present application also provides a chip system, where the chip system includes a processor for supporting the controller to implement the functions involved in the above-mentioned power replacement control method. In a possible design, the chip system may further include a memory for storing necessary program instructions and data. The chip system may be composed of chips, or may include chips and other discrete devices.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and unit described above may refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。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 alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、 随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes .

Claims (19)

  1. 一种人工智能AI芯片的控制装置,其特征在于,所述AI芯片包括N个人工智能核心AIC,其中,N为大于1的整数,所述装置包括:A control device for an artificial intelligence AI chip, wherein 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 disabling circuit connected to the controller;
    所述控制器用于确定所述N个AIC中允许打开的AIC的数量为第一数量,并根据所述第一数量生成控制指令之后,向所述禁止电路发送所述控制指令;The controller is configured to determine that the number of AICs allowed to be opened among the N AICs is a first number, and after generating a control command according to the first number, send the control command to the prohibition circuit;
    所述禁止电路连接于所述N个AIC,用于根据所述控制指令打开或关闭所述N个AIC中的至少一个AIC。The prohibiting circuit is connected to the N AICs, and is used for turning on or off at least one AIC of the N AICs according to the control instruction.
  2. 根据权利要求1所述的装置,其特征在于,所述装置还包括连接于所述控制器的数量限制器;The apparatus of claim 1, wherein the apparatus further comprises a quantity limiter connected to the controller;
    所述数量限制器用于限制所述N个AIC中允许打开的AIC的数量为第一数量;The quantity limiter is used to limit the number of AICs allowed to be opened in the N AICs to the first quantity;
    所述控制器具体用于通过所述数量限制器确定所述第一数量。The controller is specifically configured to determine the first quantity through the quantity limiter.
  3. 根据权利要求2所述的装置,其特征在于,所述数量限制器包括至少一个电子熔丝efuse,所述数量限制器用于通过所述至少一个efuse的输出电平限制所述N个AIC中允许打开的AIC的数量为所述第一数量。The device according to claim 2, wherein the quantity limiter comprises at least one electronic fuse efuse, and the quantity limiter is configured to limit the allowable ones in the N AICs through the output level of the at least one efuse The number of opened AICs is the first number.
  4. 根据权利要求3所述的装置,其特征在于,The device of claim 3, wherein:
    在所述至少一个efuse的熔断状态为已熔断时,所述至少一个efuse的输出电平为第一电平;和/或,When the blown state of the at least one efuse is blown, the output level of the at least one efuse is the first level; and/or,
    在所述至少一个efuse的熔断状态为未熔断时,所述至少一个efuse的输出电平为第二电平;其中,所述第一电平不同于所述第二电平。When the blown 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.
  5. 根据权利要求1至4任一项所述的装置,其特征在于,所述装置还包括连接所述控制器的累加器;The device according to any one of claims 1 to 4, wherein the device further comprises an accumulator connected to the controller;
    所述累加器连接所述N个AIC,用于统计所述N个AIC中已打开的AIC的数量为第二数量;The accumulator is connected to the N AICs, and is used to count the number of opened AICs in the N AICs as the second number;
    所述控制器具体用于根据所述第一数量和所述第二数量生成所述控制指令。The controller is specifically configured to generate the control instruction according to the first quantity and the second quantity.
  6. 根据权利要求5所述的装置,其特征在于,所述累加器具体用于连接所述N个AIC中的未故障AIC,所述第二数量用于指示所述未故障AIC中已打开的AIC的数量。The apparatus according to claim 5, wherein the accumulator is specifically configured to connect non-faulty AICs in the N AICs, and the second number is used to indicate the opened AICs in the non-faulty AICs quantity.
  7. 根据权利要求1至6任一项所述的装置,其特征在于,所述AI芯片包括图像处理单元GPU、神经处理单元NPU或张量处理单元TPU。The apparatus according to any one of claims 1 to 6, wherein the AI chip comprises an image processing unit GPU, a neural processing unit NPU or a tensor processing unit TPU.
  8. 一种人工智能AI芯片的控制方法,其特征在于,所述方法应用于所述AI芯片的控制装置中的控制器,所述装置还包括禁止电路,其中,所述AI芯片包括N个人工智能核心AIC,其中,N为大于1的整数,所述方法包括:A method for controlling 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 includes N artificial intelligence The core AIC, where N is an integer greater than 1, the method includes:
    确定所述N个AIC中允许打开的AIC的数量为第一数量;determining that the number of AICs allowed to be opened in the N AICs is the first number;
    根据所述第一数量生成控制指令,所述控制指令用于指示打开或关闭所述N个AIC中的至少一个AIC;generating a control instruction according to the first number, the control instruction being used to instruct to open or close at least one AIC of the N AICs;
    向所述禁止电路发送所述控制指令。The control command is sent to the inhibit circuit.
  9. 根据权利要求8所述的方法,其特征在于,所述装置还包括数量限制器,所述数量 限制器用于限制所述N个AIC中允许打开的AIC的数量为第一数量;The method according to claim 8, wherein the device further comprises a quantity limiter, and the quantity limiter is used to limit the number of AICs allowed to be opened in the N AICs to a first quantity;
    所述确定所述N个AIC中允许打开的AIC的数量为第一数量包括:The determining that the number of AICs allowed to be opened in the N AICs is the first number includes:
    通过所述数量限制器确定所述N个AIC中允许打开的AIC的数量为第一数量。The number of AICs allowed to be opened among the N AICs is determined by the number limiter as the first number.
  10. 根据权利要求9所述的方法,其特征在于,所述装置还包括累加器,所述累加器用于统计所述N个AIC中已打开的AIC的数量为第二数量;在所述生成所述控制指令之前,所述方法还包括:The method according to claim 9, wherein the device further comprises an accumulator, and the accumulator is used to count the number of the AICs that have been opened among the N AICs as the second number; Before the control instruction, the method further includes:
    通过所述累加器确定所述第二数量;determining the second quantity by the accumulator;
    所述根据所述第一数量生成控制指令包括:The generating a control instruction according to the first quantity includes:
    根据所述第一数量和所述第二数量生成所述控制指令。The control instruction is generated according to the first quantity and the second quantity.
  11. 根据权利要求8至10任一项所述的方法,其特征在于,所述第二数量用于指示在所述N个AIC的未故障AIC中,已打开的AIC的数量。The method according to any one of claims 8 to 10, wherein the second number is used to indicate the number of opened AICs among the non-faulty AICs of the N AICs.
  12. 根据权利要求8至11任一项所述的方法,其特征在于,所述AI芯片包括图像处理单元GPU、神经处理单元NPU或张量处理单元TPU。The method according to any one of claims 8 to 11, wherein the AI chip comprises an image processing unit GPU, a neural processing unit NPU or a tensor processing unit TPU.
  13. 一种人工智能AI芯片的控制器,其特征在于,所述控制器包含于所述AI芯片的控制装置,所述控制装置还包括禁止电路,其中,所述AI芯片包括N个人工智能核心AIC,其中,N为大于1的整数,所述控制器包括:A controller of an artificial intelligence AI chip, characterized in that the controller is included in a control device of the AI chip, and the control device further includes a prohibition circuit, wherein the AI chip includes N artificial intelligence core AICs , where N is an integer greater than 1, and the controller includes:
    确定单元,用于所述N个AIC中允许打开的AIC的数量为第一数量;a determining unit, where the number of AICs allowed to be opened in the N AICs is the first number;
    生成单元,用于根据所述第一数量生成控制指令,所述控制指令用于指示打开或关闭所述N个AIC中的至少一个AIC;a generating unit, configured to generate a control instruction according to the first quantity, where the control instruction is used to instruct to open or close at least one AIC in the N AICs;
    发送单元,用于向所述禁止电路发送所述控制指令。A sending unit, configured to send the control instruction to the prohibiting circuit.
  14. 根据权利要求13所述的控制器,其特征在于,所述装置还包括数量限制器,所述数量限制器用于限制所述N个AIC中允许打开的AIC的数量为第一数量;The controller according to claim 13, wherein the device further comprises a quantity limiter, and the quantity limiter is configured to limit the number of AICs allowed to be opened among the N AICs to a first number;
    所述确定单元,具体用于通过所述数量限制器确定所述N个AIC中允许打开的AIC的数量为第一数量。The determining unit is specifically configured to determine, by the quantity limiter, the number of AICs allowed to be opened among the N AICs as the first number.
  15. 根据权利要求14所述的控制器,其特征在于,所述装置还包括累加器,所述累加器用于统计所述N个AIC中已打开的AIC的数量为第二数量;The controller according to claim 14, wherein the device further comprises an accumulator, and the accumulator is used to count the number of the opened AICs among the N AICs as the second number;
    所述确定单元,还用于通过所述累加器确定所述第二数量;the determining unit, further configured to determine the second quantity through the accumulator;
    所述生成单元,具体用于根据所述第一数量和所述第二数量生成所述控制指令。The generating unit is specifically configured to generate the control instruction according to the first quantity and the second quantity.
  16. 根据权利要求13至15任一项所述的控制器,其特征在于,所述第二数量用于指示在所述N个AIC的未故障AIC中,已打开的AIC的数量。The controller according to any one of claims 13 to 15, wherein the second number is used to indicate the number of opened AICs among the non-faulty AICs of the N AICs.
  17. 根据权利要求13至16任一项所述的控制器,其特征在于,所述AI芯片包括图像处理单元GPU、神经处理单元NPU或张量处理单元TPU。The controller according to any one of claims 13 to 16, wherein the AI chip comprises an image processing unit GPU, a neural processing unit NPU or a tensor processing unit TPU.
  18. 一种包含指令的计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求8至12中任一项所述的方法。A computer program product comprising instructions, characterized in that, when the computer program product is run on a computer, the computer is caused to perform the method of any one of claims 8 to 12.
  19. 一种计算机可读存储介质,所述计算机可读存储介质用于存储程序指令,其特征在于,当所述程序指令在计算机上运行时,使得所述计算机执行如权利要求8至12中任一项所述的方法。A computer-readable storage medium for storing program instructions, characterized in that, when the program instructions are executed on a computer, the computer is made to execute any one of claims 8 to 12. method described in item.
PCT/CN2020/124241 2020-10-28 2020-10-28 Control device and control method of artificial intelligence (ai) chip, and controller WO2022087866A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2020/124241 WO2022087866A1 (en) 2020-10-28 2020-10-28 Control device and control method of artificial intelligence (ai) chip, and controller
CN202080106663.5A CN116406490A (en) 2020-10-28 2020-10-28 Control device, control method and controller of artificial intelligent AI chip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/124241 WO2022087866A1 (en) 2020-10-28 2020-10-28 Control device and control method of artificial intelligence (ai) chip, and controller

Publications (1)

Publication Number Publication Date
WO2022087866A1 true WO2022087866A1 (en) 2022-05-05

Family

ID=81381705

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/124241 WO2022087866A1 (en) 2020-10-28 2020-10-28 Control device and control method of artificial intelligence (ai) chip, and controller

Country Status (2)

Country Link
CN (1) CN116406490A (en)
WO (1) WO2022087866A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1148515A1 (en) * 1999-10-04 2001-10-24 Seiko Epson Corporation Write prohibition circuit, semiconductor integrated circuit containing the same, ink cartridge having this semiconductor integrated circuit, and ink jet recorder
CN103825328A (en) * 2014-02-28 2014-05-28 杭州金恒电源科技有限公司 Device and method for balancing voltage of efficient high-power super capacitor module
CN110889503A (en) * 2019-11-26 2020-03-17 中科寒武纪科技股份有限公司 Data processing method, data processing device, computer equipment and storage medium
CN110928579A (en) * 2019-09-29 2020-03-27 天博电子信息科技有限公司 Instruction set acceleration method for biological recognition and processor
CN111799865A (en) * 2020-07-17 2020-10-20 福建飞毛腿动力科技有限公司 Multi-lithium battery circuit with 0V charging prohibition function

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1148515A1 (en) * 1999-10-04 2001-10-24 Seiko Epson Corporation Write prohibition circuit, semiconductor integrated circuit containing the same, ink cartridge having this semiconductor integrated circuit, and ink jet recorder
CN103825328A (en) * 2014-02-28 2014-05-28 杭州金恒电源科技有限公司 Device and method for balancing voltage of efficient high-power super capacitor module
CN110928579A (en) * 2019-09-29 2020-03-27 天博电子信息科技有限公司 Instruction set acceleration method for biological recognition and processor
CN110889503A (en) * 2019-11-26 2020-03-17 中科寒武纪科技股份有限公司 Data processing method, data processing device, computer equipment and storage medium
CN111799865A (en) * 2020-07-17 2020-10-20 福建飞毛腿动力科技有限公司 Multi-lithium battery circuit with 0V charging prohibition function

Also Published As

Publication number Publication date
CN116406490A (en) 2023-07-07

Similar Documents

Publication Publication Date Title
US11928590B2 (en) Methods and systems for power management in a pattern recognition processing system
US9489622B2 (en) Event-driven universal neural network circuit
CA2040903C (en) Neural networks
EP2875433B1 (en) Methods and systems for handling data received by a state machine engine
TWI814984B (en) Split network acceleration architecture
TW201627923A (en) Model compression and fine-tuning
KR102165134B1 (en) Methods and systems for using state vector data in a state machine engine
CN107003705A (en) Technology for routeing electric power to usb host under without electric battery condition
CN110210021A (en) Read understanding method and device
US20210004685A1 (en) Techniques to manage training or trained models for deep learning applications
US11687785B2 (en) Modification of neural network topology
WO2022087866A1 (en) Control device and control method of artificial intelligence (ai) chip, and controller
KR101873645B1 (en) Method and apparatus for multiple image information generation and the processing for optimal recognition performance in a deep learning
US10970630B1 (en) Neuromorphic computing architecture with dynamically accessible contexts
CN105247442B (en) For managing the technology and system of the activity in multi-part platform
CN205665729U (en) Cell convolutional neural network intelligent vision pays accelerator
JP7488375B2 (en) Method, device and computer-readable storage medium for generating neural networks
CN105550140B (en) A kind of electronic equipment and data processing method
CN112486895B (en) FPGA chip and interconnection control method thereof
CN115810196A (en) Seal identification method, seal identification device and storage medium
CN114927179A (en) Information and medical diagnosis classification method, computing device and storage medium
Ugur et al. Structuring pattern generalization through evolutionary techniques
Jaimes Computer vision startups tackle AI
Yousefzadeh et al. Performance comparison of time-step-driven versus event-driven neural state update approaches in spinnaker
CN113792808B (en) Data classification method, device, electronic equipment and storage medium

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: 20959030

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: 20959030

Country of ref document: EP

Kind code of ref document: A1