System of artificial intelligence engine, method applied to system and computing equipment

By using a custom instruction set and handshake protocol in the AI ​​engine system to directly connect the processor and artificial intelligence core, the problem of AI engine configuration update delay is solved, and efficient configuration transmission and computing performance improvement are achieved.

CN118585481APending Publication Date: 2024-09-03SHENZHEN CORERAIN TECH CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202410634963.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-17
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

Existing technology cannot effectively reduce the configuration update delay of the AI ​​engine when running the neural network. The traditional AHB bus configuration and DMA handling method cannot meet the requirements of real-time low-latency replacement configuration, limiting the computing performance of the AI ​​engine.

Method used

Adopting an artificial intelligence engine system, the processor supports a custom instruction set and is directly connected to the artificial intelligence core. It uses a handshake protocol for high-speed transmission of configuration information, avoids the system bus, achieves fast prefetching and decoding, and groups configuration registers to reduce configuration transmission. Delay.

Benefits of technology

It greatly reduces the configuration transmission delay, improves the configuration update efficiency, significantly shortens the transmission path delay, and improves the computing performance and data exchange speed of the AI ​​engine.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118585481A
    Figure CN118585481A
Patent Text Reader

Abstract

The invention provides an artificial intelligence engine system, a method applied to the system and computing equipment, the system comprises an upper computer and a plurality of servers, each server comprises a plurality of artificial intelligence acceleration cards, each artificial intelligence acceleration card comprises an artificial intelligence chip and a memory, the artificial intelligence chip comprises a processor and an artificial intelligence core, the processor supports a user-defined instruction set and comprises a first instruction output interface, and the processor is directly connected with the artificial intelligence core through the first instruction output interface. According to the technical scheme of the invention, the delay of configuration transmission can be greatly reduced, and the efficiency of configuration transmission is improved while the chip area and power consumption are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an artificial intelligence engine system and a method and computing device applied to the system, an artificial intelligence chip architecture and a computing device. Background Art

[0002] With the development of the information age, the rapid rise of artificial intelligence (AI) has become one of the most eye-catching focuses in the field of science and technology. In the field of intelligent manufacturing, the application of AI technology will accelerate industrial upgrading and promote the transformation and upgrading of the manufacturing industry. In the medical field, AI will become an important assistant for doctors, providing accurate diagnosis and personalized treatment plans. At the same time, in various fields such as transportation, finance, and education, the application of AI will further promote innovation and development. The continuous evolution and innovation of AI intelligent technology has become one of the most important engines for promoting the development of science and technology.

[0003] However, to achieve sustainable development of AI technology, many challenges and technical problems need to be faced. For example, when the AI ​​engine runs a neural network, in order to maximize the performance of the neural network algorithm, the configuration parameters of each layer need to be changed, which will cause update delays. The traditional AHB bus configuration and DMA transfer configuration methods can no longer meet the requirements of real-time low-latency configuration changes, which will limit the computing performance of the AI ​​engine hardware.

[0004] In the current technology, when the AI ​​engine runs a neural network, the CPU usually first reads one or more instructions for configuring the AI ​​engine from the memory or instruction cache, and then decodes the read instructions to understand their meaning and the operations to be performed. The decoded instructions are then converted into corresponding AHB bus transactions or commands. Finally, the CPU sends these configuration commands through the AHB bus. As a high-speed communication channel within the system, the AHB bus is responsible for transmitting data and control signals between the CPU and other components such as the AI ​​engine. The interface circuit of the engine receives the configuration information from the AHB bus, decodes it, and applies these configuration parameters to the corresponding engine internal registers or control units, thereby realizing the setting of the AI ​​engine's working mode, parameters or algorithm structure.

[0005] Although the AHB bus is a high-performance bus, frequent register access and configuration changes may increase bus latency, thus affecting data transmission efficiency. This configuration method is suitable for most registers that do not need to be changed after being configured once. Secondly, the AHB configuration bus clock is usually 200MHz, which is too inefficient for high-performance modules operating above 500MHz / 1GHz.

[0006] Or the CPU can configure DMA, and DMA can move the configured AI engine to improve data transmission efficiency. First, the configuration information of the AI ​​engine is pre-processed and stored in the system's dynamic random access memory (DDR). The CPU reads the instruction that needs to update the AI ​​engine configuration and decodes it to determine the address of the DDR where the configuration information that needs to be moved is located, as well as other control information. After that, the instruction is sent to the DMA controller through the AHB bus. The DMA controller receives and parses the configuration information from the CPU, and performs burst transmission according to the preset parameters through a high-speed data transmission channel to move the configuration data from the DDR to the specified register of the AI ​​engine.

[0007] Although DMA transfer significantly improves the efficiency of configuration updates compared to direct AHB configuration and reduces the direct involvement of the CPU, the entire process is still limited by the bandwidth and latency of the system bus, and adds preprocessing and DMA configuration processes. Therefore, in AI applications that pursue extremely low latency and high throughput, deeper hardware and software optimization strategies need to be considered.

[0008] Therefore, a technical solution is needed that can improve the efficiency of configuration update while significantly reducing the delay of configuration transmission. Summary of the invention

[0009] The present invention aims to provide a system for an artificial intelligence engine, a method for reading configuration information and configuration registers applied to the system, an artificial intelligence chip architecture and a computing device, which can improve the efficiency of configuration updates while significantly reducing the delay of configuration transmission.

[0010] According to one aspect of the present invention, there is provided an artificial intelligence engine system, comprising: a host computer and multiple servers, each server comprising multiple artificial intelligence acceleration cards, the artificial intelligence acceleration card comprising an artificial intelligence chip and a memory, the artificial intelligence chip comprising a processor and an artificial intelligence core, wherein the processor supports a custom instruction set and comprises a first instruction output interface, the processor is directly connected to the artificial intelligence core through the first instruction output interface,

[0011] The host computer groups and packages all configuration information required by the artificial intelligence engine into a configuration information data packet, and transmits and stores it in the memory;

[0012] The processor reads and caches the configuration information data packet in the memory, and transmits it to the artificial intelligence core through the first instruction output interface;

[0013] The artificial intelligence core receives and decodes the configuration information data packet from the processor to obtain the configuration information, and groups and configures multiple registers inside the artificial intelligence engine according to the configuration information.

[0014] According to some embodiments, the artificial intelligence core includes a decoder and a first instruction input interface, the artificial intelligence core is directly connected to the first instruction output interface through the first instruction input interface, and the decoder receives the configuration information card data packet through the first instruction input interface and decodes it.

[0015] According to one aspect of the present invention, there is provided a method for caching configuration information, the method being used in a processor according to the system as described above, comprising:

[0016] Reading the configuration information data packet on the memory and caching it into the high-speed cache inside the processor;

[0017] Convert the configuration information data packet into a communication sequence of the handshake protocol and send it to the artificial intelligence core through the first instruction output interface,

[0018] Wherein, the data bit width of the first instruction output interface is at least 1024 bits.

[0019] According to some embodiments, the handshake protocol includes three types of signal pins: a data valid signal pin, a data reception completion signal pin, and a data signal pin.

[0020] According to some embodiments, during the process of converting the configuration information into a communication timing of a handshake protocol and sending it to the artificial intelligence engine, when the processor outputs a data valid signal pin as 1, the configuration information is valid.

[0021] According to one aspect of the present invention, a method for configuring registers is provided, the method being used for an artificial intelligence processing core of the system as described above, comprising:

[0022] Receive the communication timing of the handshake protocol through the first command input interface and decode it to obtain the configuration information;

[0023] Multiple registers inside the artificial intelligence engine are grouped and configured according to the configuration information.

[0024] According to some embodiments, the handshake protocol includes three types of signal pins: a data valid signal pin, a data reception completion signal pin, and a data signal pin.

[0025] According to some embodiments, during the process of receiving the communication timing of the handshake protocol through the first instruction input interface, when the artificial intelligence core outputs data and the receiving signal pin is 1, the configuration information is obtained to the decoder.

[0026] According to one aspect of the present invention, there is provided an architecture of an artificial intelligence chip, comprising: a processor and an artificial intelligence core, wherein the processor comprises a first instruction output interface, the processor is directly connected to the artificial intelligence core via the first instruction output interface, wherein the data bit width of the first instruction output interface is at least 1024 bits, and is applied to a system as described in any one of the above items.

[0027] According to another aspect of the present invention, there is provided a computing device, comprising:

[0028] Processor; and

[0029] A memory storing a computer program, which, when executed by the processor, enables the processor to execute any of the methods described above.

[0030] According to another aspect of the present invention, there is provided a non-transitory computer-readable storage medium having computer-readable instructions stored thereon, and when the instructions are executed by a processor, the processor is caused to execute any of the above methods.

[0031] According to an embodiment of the present invention, the processor supports a custom instruction set, can realize the function of quickly prefetching the instruction set and decoding it, and quickly update the AI ​​engine configuration; the processor is directly connected to the AI ​​engine through the first instruction output interface without passing through the system bus, thereby greatly reducing the delay of configuration transmission and improving the efficiency of configuration transmission.

[0032] It is to be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for describing the embodiments are briefly introduced below.

[0034] Figure 1 A system schematic diagram of an artificial intelligence engine according to an example embodiment is shown.

[0035] Figure 2 A method flow for reading configuration information according to an example embodiment is shown.

[0036] Figure 3 A flow chart of a method for configuring a register according to an example embodiment is shown.

[0037] Figure 4 A schematic diagram of configuration information in a method for configuring an artificial intelligence engine according to an example embodiment is shown.

[0038] Figure 5 A schematic diagram of the architecture of an artificial intelligence chip according to an example embodiment is shown.

[0039] Figure 6 A block diagram of a computing device according to an example embodiment of the invention is shown. DETAILED DESCRIPTION

[0040] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that the present invention will be comprehensive and complete and fully convey the concepts of the example embodiments to those skilled in the art. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.

[0041] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present invention. However, those skilled in the art will appreciate that the technical solution of the present invention can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring various aspects of the present invention.

[0042] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0043] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0044] It should be understood that although the terms first, second, third, etc. may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one component from another component. Therefore, the first component discussed below can be referred to as the second component without departing from the teachings of the present inventive concept. As used herein, the term "and / or" includes any one of the associated listed items and all combinations of one or more.

[0045] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0046] Those skilled in the art will appreciate that the drawings are merely schematic diagrams of example embodiments, and the modules or processes in the drawings are not necessarily necessary for implementing the present invention, and therefore cannot be used to limit the protection scope of the present invention.

[0047] With the development of the information age, the rapid rise of artificial intelligence (AI) has become one of the most eye-catching focuses in the field of science and technology. The continuous evolution and innovation of AI intelligent technology has become one of the most important engines driving the development of science and technology.

[0048] However, there are still many challenges and technical problems to be solved. For example, when the AI ​​engine runs a neural network, in order to maximize the performance of the neural network algorithm, the configuration parameters of each layer need to be changed, so the delay caused by the update should be minimized. The traditional AHB bus configuration and DMA transfer configuration methods can no longer meet the requirements of real-time low-latency configuration changes, which will limit the computing performance of the AI ​​engine hardware.

[0049] In the current technology, when the AI ​​engine runs a neural network, the CPU usually first reads one or more instructions for configuring the AI ​​engine from the memory or instruction cache, or configures the DMA through the CPU, and DMA transfers the configuration of the AI ​​engine to improve data transmission efficiency. Although DMA transfer significantly improves the efficiency of configuration updates compared to direct AHB configuration and reduces the direct involvement of the CPU, the entire process is still limited by the bandwidth and latency of the system bus, and adds preprocessing and DMA configuration processes. Therefore, in AI applications that pursue low latency and high throughput, deeper hardware and software optimization strategies need to be considered.

[0050] To this end, the present invention proposes an artificial intelligence engine system, a method for reading configuration information and configuring registers applied to the system, an artificial intelligence chip architecture and a computing device, which can significantly reduce the delay of configuration transmission while improving the efficiency of configuration update. According to an embodiment, the processor supports a custom instruction set, can realize the function of fast pre-fetching instruction sets and decoding, and quickly update the AI ​​engine configuration; the processor is directly connected to the AI ​​engine through the first instruction output interface, without passing through the system bus, which greatly reduces the delay of configuration transmission and improves the efficiency of configuration transmission.

[0051] Exemplary embodiments of the present invention are described below with reference to the accompanying drawings.

[0052] Figure 1 A system schematic diagram of an artificial intelligence engine according to an example embodiment is shown.

[0053] See also Figure 1 The figure shows a system of an artificial intelligence engine, including: a host computer and multiple servers, each server including multiple artificial intelligence acceleration cards, the artificial intelligence acceleration card including an AI chip and a memory, the AI ​​chip including a processor and an artificial intelligence core, wherein the processor supports a custom instruction set, including a first instruction output interface 01, and the processor is directly connected to the artificial intelligence core through the first instruction output interface 01.

[0054] According to some embodiments, the processor supports a custom instruction set and includes a first instruction output interface 01. The processor supports a custom instruction set, such as RISC-V, and can design specific instructions to accelerate specific types of operations, such as matrix multiplication, convolution operations, etc., according to the characteristics and requirements of AI computing, which are common computationally intensive tasks in deep learning, improve the execution efficiency of AI algorithms, reduce computing delays, and improve overall performance.

[0055] According to some embodiments, the first instruction output interface 01 serves as a direct communication bridge between the processor and the artificial intelligence core, avoiding indirect transmission through the system bus or other intermediate layers, reducing data transmission delays, improving data exchange speed, and significantly reducing configuration transmission delays. Compared with traditional solutions, the delay in the transmission path is shortened by dozens of times.

[0056] According to some embodiments, the first instruction output interface 01 supports custom instruction sets, and the design of direct connection with the artificial intelligence core gives the system a high degree of flexibility, enabling the system to easily introduce new instruction sets through software upgrades or firmware updates according to the development and changes of future AI algorithms to support more diverse computing needs.

[0057] According to some embodiments, the data bit width of the first instruction output interface 01 is large, usually above 1024 bits, and the function interval and data interval can be flexibly defined to achieve flexible and rapid replacement of the AI ​​engine configuration and achieve maximum configuration efficiency. In actual application scenarios, the processor can also dynamically adjust the data transmission rate between the processor and the artificial intelligence core according to task requirements, or reduce or shut down unnecessary communications during inactivity, reduce the energy consumption of the overall system, and achieve more sophisticated power consumption control.

[0058] The host computer groups all the configuration information required by the artificial intelligence engine, packages them into configuration information data packets, and transmits them to the memory for storage.

[0059] According to some embodiments, the host computer is responsible for configuration management and task scheduling in the artificial intelligence engine system. When the host computer needs to deploy all the configuration information required for the AI ​​engine to each accelerator card, it will collect all necessary configuration parameters from external sources or according to user settings. These parameters may include parameter files, execution graphs, algorithm configurations, data path settings, runtime parameters, etc. of the AI ​​model. The host computer needs to organize and verify this information to ensure its integrity and accuracy. In order to efficiently utilize the transmission bandwidth and reduce processing delays, the host computer will reasonably group the organized configuration information, so that when the processor reads it and configures the AI ​​engine through the handshake protocol, no additional hardware is required for decoding. By preprocessing the configuration information, the hardware design is simplified, the circuit area and power consumption are reduced, and the configuration efficiency is improved.

[0060] According to some embodiments, the pre-processing of grouping all the configuration information required by the artificial intelligence engine can be grouped according to the format or the content of the configuration required in the group. For example, the original AI engine contains a 1MB configuration address space, which contains 262,144 registers with a bit width of 32 bits. The method of this patent is used to integrate / join the original 32-bit register width. Now the bit width of each register is 1008 bits. With the same 1MB configuration space, the number of registers is reduced to 33,288; that is, the configuration of the AI ​​engine is divided into 33,026 groups, and each group of 1008 bits contains more configuration information.

[0061] According to some embodiments, the user may also perform customized pre-processing of configuration information according to the requirements of the actual scenario. For example, the data bit width of the handshake protocol is 1024 bits, wherein [1023:1016] indicates the configuration group, and [1015:0] is the configuration information of the AI ​​engine; or the data bit width of the handshake protocol is 1024 bits, wherein [1023:1019] indicates the configuration group, and [1018:0] is the configuration information of the AI ​​engine; or the data bit width of the handshake protocol is 2048 bits, wherein [2047:2040] indicates the configuration group, and [2039:0] is the configuration information of the AI ​​engine.

[0062] According to some embodiments, the host computer sends a configuration information packet to the AI ​​accelerator card in the target server. On the accelerator card side, the configuration information packet is received and directly stored in the memory (such as DDR) of the AI ​​accelerator card. The memory is suitable for storing frequently accessed configuration data and temporary data due to its high-speed access characteristics, ensuring that the AI ​​engine can quickly read the configuration information.

[0063] The processor reads and caches the configuration information data packet in the memory, and transmits it to the artificial intelligence core through the first instruction output interface.

[0064] According to some embodiments, the processor first reads the configuration information data packet previously transmitted and stored by the host computer from the memory (such as DDR). RISC-V contains a cache Cache inside, which can realize the function of quickly pre-fetching the instruction set and decoding. Compared with traditional real-time processors, the program is more streamlined, the amount of accessed instructions is small, and the power consumption is low. Since the instructions occupy less memory space, from the product perspective, it is possible to consider using storage particles with smaller memory, thereby reducing the cost of the whole machine. The processor will temporarily store the unpacked configuration information in the internal cache Cache, which can significantly reduce the access delay, because the cache is closer to the processor core than the memory, and the data exchange speed is faster. After the configuration information is ready, the processor transmits the configuration instructions and related parameters to the artificial intelligence core through the first instruction output interface.

[0065] The artificial intelligence core receives and decodes the configuration information data packet from the processor to obtain the configuration information, and groups and configures multiple registers inside the artificial intelligence engine according to the configuration information.

[0066] According to some embodiments, after receiving the configuration information data packet transmitted by the processor through the first instruction output interface, the artificial intelligence core first captures the configuration information data packet transmitted through the high-speed interface. These data packets may contain key instructions such as model parameters, algorithm configuration, data processing flow, memory mapping information, etc. The decoding logic built into the processing unit will decode these data packets, parse out specific operation instructions and corresponding parameter values, and the decoded configuration information will be further parsed and mapped to different internal modules or functional blocks of the processing unit according to content classification. For example, model parameters will be directly mapped to the AI ​​computing unit, while memory allocation instructions will be passed to the memory management module, and control signals may directly act on the task scheduler. Among them, key configuration information will be used to group and configure multiple registers inside the artificial intelligence engine. Registers are the basic control units of hardware, which determine key parameters such as the operating mode, data processing flow, and calculation accuracy of the processing unit. According to task requirements, the associated registers are grouped together and set uniformly to achieve efficient and orderly calculation control.

[0067] According to some embodiments, the configuration registers of the AI ​​engine usually correspond to the allocated address space, for example, each address register is 32 bits. The more modes the AI ​​engine works in, the more parameters need to be configured, the larger the configuration LUT scale is, the longer the relative configuration time will be. This solution adopts the method of merging configuration signals into groups, for example, a total of 256 groups, each group of registers has a width of 1016 bits. This operation simplifies the traditional decoding logic, and the amount of information configured for each group (address) increases by 30 times. The configuration is efficient and the circuit timing is easy to converge.

[0068] According to some embodiments, after the registers are configured, the artificial intelligence core enters the task initialization phase, including loading the model into the computing core, setting up data flows, initializing memory areas, configuring interrupts and error handling mechanisms, etc., to make final preparations for the upcoming AI computing task.

[0069] The data bit width of the first instruction output interface is at least 1024 bits.

[0070] According to some embodiments, the data bit width of the first instruction output interface is at least 1024 bits, which meets the needs of high-performance computing and high-speed data transmission, and significantly improves data throughput. For scenarios such as parameter transmission of large neural network models, high-resolution image or video processing, it can significantly reduce data handling time, speed up task processing, and reduce transmission delays of instructions and data.

[0071] According to some embodiments, a larger data bit width can satisfy the transmission of complex instruction sets, including instructions that are specially optimized for AI operations or instructions that support higher levels of parallel processing, further improving the computing performance of the AI ​​engine.

[0072] The artificial intelligence core includes a decoder and a first instruction input interface. The artificial intelligence core is directly connected to the first instruction output interface through the first instruction input interface. The decoder receives the configuration information card data packet through the first instruction input interface and decodes it.

[0073] According to some embodiments, the artificial intelligence core includes a decoder and a first instruction input interface, the artificial intelligence core is directly connected to the first instruction output interface through the first instruction input interface, and the decoder receives the configuration information card data packet through the first instruction input interface and decodes it. The decoder is responsible for receiving and parsing the configuration information data packet transmitted from the first instruction output interface of the processor. The decoding process converts the high-speed transmitted bit stream into instructions and parameters that can be understood and executed by the AI ​​processing unit, ensuring the correct application of the configuration information. Integrating a decoder in the artificial intelligence core and connecting it to the first instruction output interface is an important design strategy for achieving high-speed, efficient, flexible and secure AI operations, ensuring that the AI ​​engine can quickly and accurately respond to the configuration instructions of the host computer and perform complex artificial intelligence tasks.

[0074] The processor includes a cache and supports a pre-read mechanism.

[0075] According to some embodiments, the processor integrates a cache and supports a pre-reading mechanism, which can improve the processing efficiency of the artificial intelligence (AI) engine. The cache is located inside the processor, tightly coupled with the CPU core, and has extremely low access latency. The cache stores recent or frequently accessed data and instructions, allowing the processor to directly obtain information from the cache, which is much faster than the main memory, significantly improving the data processing speed. The processor analyzes the current access pattern and loads the data that is expected to be used next from the main memory into the cache in advance. In this way, when the data is actually needed, they are ready, reducing the time waiting for data transmission, and further improving the continuity and efficiency of data processing.

[0076] According to some embodiments, by effectively utilizing pre-reading to reduce memory access latency, the demand for external memory bandwidth can be reduced. The pre-reading mechanism can also help optimize data flow, ensure that data flows smoothly in the processing pipeline, and reduce "stalls", that is, the situation where the processor pauses due to waiting for data, thereby maintaining a high-efficiency computing state. Combining the cache and pre-reading mechanism can effectively reduce data access bottlenecks, improve the processor's instruction execution rate, and thus improve the throughput of the entire system.

[0077] The configuration information data packet is transmitted and stored in the memory via the PCIE and GMAC interfaces.

[0078] According to some embodiments, the configuration information data packet is transmitted through a PCIe (Peripheral Component Interconnect Express) or GMAC (Gigabit Media Independent Interface Controller, usually referring to a Gigabit Ethernet controller) interface and stored in a memory on the artificial intelligence acceleration card. On the host computer side, the configuration information is organized and packaged into a data format suitable for transmission through a high-speed interface. On the artificial intelligence acceleration card side, the data is received through the corresponding interface controller, and after decoding and verification, it is directly written to the memory (such as DDR). Because the memory is close to the computing core and has a fast access speed, it can quickly provide configuration data to the processor or directly for use by the AI ​​processing unit, reducing data waiting time.

[0079] According to some embodiments, the PCIe interface, as a high-speed, universal bus interface standard, is suitable for quickly transmitting a large number of configuration information data packets due to its high bandwidth and low latency. Data is transmitted on a point-to-point link via differential signals, supports multi-channel parallel operation, and can greatly increase the data transmission rate. If an Ethernet connection is used, data is transmitted in the network in the form of Ethernet frames through the GMAC interface. Although GMAC (Ethernet) may not have an advantage in bandwidth and latency relative to PCIe, its flexibility and versatility are significant advantages in distributed systems or scenarios that require remote configuration. Users can select the transmission interface according to the actual scenario requirements to optimize the data transmission efficiency in specific application scenarios.

[0080] According to some embodiments, transmitting configuration information to the memory via the PCIe or GMAC interface not only ensures the efficiency of data transmission, but also ensures that the AI ​​engine can quickly load the latest configuration information, flexibly respond to different task requirements, and improve the response speed and overall performance of the system.

[0081] Figure 2 A flow chart of a method for reading configuration information according to an example embodiment is shown.

[0082] See also Figure 2 , the figure shows a method for reading configuration information, the method is used for the processor of the system described in the book, including;

[0083] In S201, the configuration information data packet on the memory is read and cached into a high-speed cache inside the processor.

[0084] According to some embodiments, the host computer groups all the configuration information required in the artificial intelligence engine and obtains a configuration information data packet, and collects all the configuration information related to the operation of the AI ​​engine based on system design or user needs. The configuration information is reasonably grouped according to its nature and purpose. The purpose of grouping is to optimize the organizational structure of the data for efficient reading and processing. For example, it can be grouped by functional modules (such as model parameter groups, execution strategy groups, resource management groups), or by data processing processes (such as preprocessing, training, and reasoning). The grouped configuration information is packaged to form one or more configuration information data packets. The generated configuration information data packet is transmitted and stored in the memory of the AI ​​accelerator card.

[0085] According to some embodiments, the processor reads a configuration information data packet from a memory. The read configuration information is usually loaded into a cache. The configuration information loaded into the cache needs to be decoded. If the data packet is compressed or encrypted, corresponding decompression and decryption processing needs to be performed at this stage. At the same time, the system may verify the decoded configuration information to ensure its integrity and accuracy to avoid incorrect configuration due to data corruption.

[0086] In S203, the configuration information data packet is converted into a communication sequence of a handshake protocol, and sent to the artificial intelligence core through the first instruction output interface, wherein the data bit width of the first instruction output interface is at least 1024 bits.

[0087] According to some embodiments, once the configuration information is ready, the system prepares for data transmission by converting the configuration information data packet to the first command output interface. The preparation process includes converting the configuration information data packet into a communication sequence of a handshake protocol, transmitting it to the decoder through the first command output interface, and transmitting the configuration information data packet through the specified first command output interface according to the handshake protocol.

[0088] Figure 3 A flow chart of a method for configuring a register according to an example embodiment is shown.

[0089] The figure shows a method for configuring registers, the method being used for the artificial intelligence processing core of the system as described above, comprising:

[0090] In S301, the communication timing of the handshake protocol is received through the first instruction input interface and decoded to obtain the configuration information.

[0091] According to some embodiments, the decoder in the AI ​​processing unit monitors and receives communications from the processor through the first instruction output interface. The handshake protocol is established at this stage to ensure the synchronization and reliability of communication between the two parties, which is a preliminary step for data transmission. After receiving the handshake protocol, the decoder in the AI ​​processing unit will decode the communication timing of the received handshake protocol, including parsing the control signals, data packet headers, checksum information, etc. in the communication timing to ensure the integrity and correctness of the data. The decoding process converts the raw data into configuration instructions and parameters that can be understood by the AI ​​engine.

[0092] In S303, multiple registers inside the artificial intelligence engine are grouped and configured according to the configuration information.

[0093] According to some embodiments, based on the parsed configuration information, the registers inside the AI ​​engine will be logically divided into different groups. For each register group, a corresponding configuration instruction is generated based on the configuration information. Using the control logic inside the AI, the generated configuration instructions are applied to the corresponding register groups sequentially or in parallel, including directly writing register values, turning on / off specific functions, adjusting the clock speed, and other operations to match the current task requirements. Through this series of refined configuration processes, the AI ​​engine can flexibly adapt to different computing tasks, achieve efficient and accurate calculations, and meet the needs of complex artificial intelligence application scenarios.

[0094] Figure 4 A schematic diagram of configuration information in a method for configuring an artificial intelligence engine according to an example embodiment is shown.

[0095] The figure shows that the artificial intelligence core receives the configuration information data packet data[1023:0] and allocates it to each register of each group according to the information contained in the data. As shown in the figure, data[1023:1016] indicates the configuration of which register group is allocated. Each register has 32 bits of configuration information, and data[1015:0] contains the configuration information of 31 registers. The functions of each area of ​​data[1023:0] can be designed according to the actual needs of the AI ​​Core, such as the order of configuration storage, the time interval of configuration, etc.

[0096] According to some embodiments, based on the parsed configuration information, the AI ​​engine intelligently groups and configures multiple internal registers. Registers are the core of hardware control and are responsible for setting key parameters such as operation mode, data path, and operation accuracy. Group configuration means that related registers are grouped together according to task requirements and set in batches to achieve a fast and efficient task preparation state.

[0097] According to some embodiments, in some actual scenarios, the configuration process is not only register setting, but also includes the allocation and optimization of other hardware resources, such as memory management, data cache area division, enabling and allocation of computing units, etc., to ensure that the working efficiency and computing power of the entire AI engine are maximized.

[0098] According to some embodiments, first, the processor reads the previously stored configuration information data packet from its internal cache. After reading the configuration information data packet, the processor converts the data into a communication timing suitable for the handshake protocol. The handshake protocol is a mechanism to ensure synchronization and correct communication between both parties of data transmission, including a series of control signals and data transmission instructions to ensure the integrity, sequence and error detection of the data packet during transmission. The communication timing constructed according to the handshake protocol is transmitted through the first instruction output interface. The first instruction output interface is a direct, high-speed data transmission channel between the processor and the internal components of the AI ​​engine (such as a decoder), with high bandwidth and low latency characteristics, ensuring that a large amount of configuration information can be quickly delivered to the destination. The decoder is responsible for decoding the received data packet and restoring the timing of the handshake protocol to the original configuration information data, ensuring efficient and secure transmission of the configuration information, while using the handshake protocol to ensure reliable data interaction.

[0099] According to some embodiments, inside the AI ​​engine, the decoder receives data through the first instruction output interface. When the processor sends the communication timing of the handshake protocol through the interface, the decoder instantly captures these signals to ensure accurate reception of the data. After receiving the communication timing, the decoder starts decoding. The decoding process involves parsing the handshake protocol, including identifying control signals, separating the data packet header and the payload, performing error checking, and other steps to ensure that the original configuration information data packet content is correctly extracted from the transmission signal.

[0100] The handshake protocol includes three types of signal pins: vld, rdy, and data. The handshake protocol has simplified signals, easy circuit timing convergence, and low communication power consumption.

[0101] According to some embodiments, the handshake protocol uses three types of signal pins: vld (Valid), rdy (Ready) and data (Data). The design is simple and efficient, which reduces the hardware complexity, reduces the difficulty of design and implementation, and improves the maintainability and scalability of the system, thereby simplifying the timing logic design and making circuit timing convergence easier to achieve. Due to the simplification of protocol signals, invalid signal exchanges during the communication process are reduced, and effective data transmission timing control can effectively reduce the power consumption during the data transmission process. Especially in some high-frequency and large-data volume communication scenarios, the low power consumption characteristics are conducive to reducing system operating costs and extending the battery life of battery-driven devices.

[0102] The configuration information is converted into a communication timing of a handshake protocol and sent to the artificial intelligence engine. When the processor outputs vld=1, the configuration information is valid; when the artificial intelligence core outputs rdy=1, the configuration information is obtained to the decoder.

[0103] According to some embodiments, in the process of converting the configuration information into the communication timing of the handshake protocol and sending it to the artificial intelligence engine, when the processor outputs vld=1, this indicates that the information on the data line (data) is valid at this time, waiting for the receiver to be ready to receive. The artificial intelligence core (or its control logic) observes vld=1 through the monitoring interface and when its internal state is ready to receive data, it will output rdy=1 to indicate that the processing unit is ready to receive data from the interface, that is, the decoder can start reading the configuration information. Once the processor detects rdy=1 (that is, the receiver is ready), it will start to transmit the configuration information through the data line (data). At this point, the data transmission process in the handshake protocol officially begins, and the configuration information is transmitted to the artificial intelligence core when both vld and rdy are valid at high levels, and finally reaches the decoder.

[0104] According to some embodiments, the handshake mechanism of the vld and rdy signals ensures that data is sent only when the receiver is indeed ready to receive it, reducing the risk of data loss or erroneous reception and enhancing the reliability of data transmission and the overall stability of the system.

[0105] Figure 5 A schematic diagram of the architecture of an artificial intelligence chip according to an example embodiment is shown.

[0106] See also Figure 5 The figure shows the architecture of an artificial intelligence chip, including: a processor, an artificial intelligence core, wherein the processor includes a first instruction output interface, the processor is directly connected to the artificial intelligence core through the first instruction output interface, wherein the data bit width of the first instruction output interface is at least 1024 bits, and is applied to the system as described above.

[0107] According to some embodiments, the processor supports a custom instruction set, such as a RISC-V processor, for quickly updating the AI ​​engine configuration. The processor contains a high-speed cache, which can realize the function of quickly pre-fetching the instruction set and decoding it. Compared with traditional real-time processors, the processor core runs a more streamlined program, accesses fewer instructions, and has low power consumption. Since the instructions occupy less memory space, from the product perspective, it is possible to consider using storage particles with smaller memory, thereby reducing the cost of the entire machine.

[0108] According to some embodiments, the RISC-V processor is used to replace the traditional real-time processor in the solution of the present invention. The RISC-V is equipped with a custom instruction set decoding output interface, namely the first instruction output interface. The data bit width of the first instruction output interface is at least 1024 bits. The interface is directly connected to the AI ​​engine without passing through the system bus, which greatly reduces the delay of configuration transmission. The first instruction output interface is directly connected to the AI ​​engine, the interface load is small, the chip timing is easy to converge, and the chip area and power consumption are reduced.

[0109] According to some embodiments, the first instruction output interface in the solution of the present invention has a large data bit width (at least 1024 bits) and can flexibly define function intervals and data intervals, thereby achieving flexible and rapid replacement of AI engine configurations and achieving maximum configuration efficiency.

[0110] According to some embodiments, all configuration information in the scheme of the present invention needs to be grouped and organized according to the format and the content required to be configured in the group before being stored in the memory, so that when the artificial intelligence core reads and configures the AI ​​engine through the handshake protocol, no additional hardware is required for decoding. By preprocessing the configuration information, the hardware design is simplified, the circuit area and power consumption are reduced, and the configuration efficiency is improved.

[0111] Figure 6 A block diagram of a computing device according to an example embodiment of the invention is shown.

[0112] like Figure 6 As shown, computing device 30 includes processor 12 and memory 14. Computing device 30 may also include bus 22, network interface 16, and I / O interface 18. Processor 12, memory 14, network interface 16, and I / O interface 18 may communicate with each other via bus 22.

[0113] The processor 12 may include one or more general-purpose CPUs (Central Processing Units, processors), microprocessors, or application-specific integrated circuits, etc., for executing relevant program instructions. According to some embodiments, the computing device 30 may also include a high-performance graphics card (GPU) 20 for accelerating the processor 12.

[0114] The memory 14 may include a machine system readable medium in the form of a volatile memory, such as a random access memory (RAM), a read-only memory (ROM) and / or a cache memory. The memory 14 is used to store one or more programs including instructions and data. The processor 12 can read the instructions stored in the memory 14 to execute the above-mentioned method according to the embodiment of the present invention.

[0115] The computing device 30 may also communicate with one or more networks via the network interface 16. The network interface 16 may be a wireless network interface.

[0116] The bus 22 may include an address bus, a data bus, a control bus, etc. The bus 22 provides a path for exchanging information between components.

[0117] It should be noted that, in the specific implementation process, the computing device 30 may also include other components necessary for normal operation. In addition, those skilled in the art may understand that the above device may only include components necessary for implementing the embodiments of this specification, and need not include all components shown in the figure.

[0118] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the above method when executed by a processor. The computer-readable storage medium may include, but is not limited to, any type of disk, including a floppy disk, an optical disk, a DVD, a CD-ROM, a microdrive, and a magneto-optical disk, a ROM, a RAM, an EPROM, an EEPROM, a DRAM, a VRAM, a flash memory device, a magnetic card or an optical card, a nanosystem (including a molecular memory IC), a network storage device, a cloud storage device, or any type of medium or device suitable for storing instructions and / or data.

[0119] An embodiment of the present invention also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps of any method recorded in the above method embodiments.

[0120] Those skilled in the art can clearly understand that the technical solution of the present invention can be implemented with the help of software and / or hardware. "Unit" and "module" in this specification refer to software and / or hardware that can independently complete or cooperate with other components to complete specific functions, where the hardware can be, for example, a field programmable gate array, an integrated circuit, etc.

[0121] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0122] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

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

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

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

[0126] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the methods of various embodiments of the present invention.

[0127] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0128] The exemplary embodiments of the present invention are specifically shown and described above. It should be understood that the present invention is not limited to the detailed structures, configurations or implementations described herein; on the contrary, the present invention is intended to cover various modifications and equivalent configurations included in the spirit and scope of the appended clauses.

Claims

1. A system of an artificial intelligence engine, characterized in that: It includes: a host computer and multiple servers, each server includes multiple artificial intelligence acceleration cards, the artificial intelligence acceleration card includes an artificial intelligence chip and a memory, the artificial intelligence chip includes a processor and an artificial intelligence core, wherein the processor supports a custom instruction set and includes a first instruction output interface, and the processor is directly connected to the artificial intelligence core through the first instruction output interface; The host computer groups and packages all configuration information required by the artificial intelligence engine into a configuration information data packet, and transmits and stores it in the memory; The processor reads and caches the configuration information data packet in the memory, and transmits it to the artificial intelligence core through the first instruction output interface; The artificial intelligence core receives and decodes the configuration information data packet from the processor to obtain the configuration information, and groups and configures multiple registers inside the artificial intelligence engine according to the configuration information.

2. The system according to claim 1, characterized in that The artificial intelligence core includes a decoder and a first instruction input interface. The artificial intelligence core is directly connected to the first instruction output interface through the first instruction input interface. The decoder receives the configuration information data packet through the first instruction input interface and decodes it.

3. A method for reading configuration information, the method being used for a processor of a system according to claim 1 or 2, the method comprising: Reading the configuration information data packet on the memory and caching it into the high-speed cache inside the processor; Convert the configuration information data packet into a communication sequence of the handshake protocol and send it to the artificial intelligence core through the first instruction output interface, in, The data bit width of the first instruction output interface is at least 1024 bits.

4. The method according to claim 3, characterized in that The handshake protocol includes three types of signal pins: data valid signal pin, data reception completion signal pin, and data signal pin.

5. The method according to claim 3, characterized in that: In the process of converting the configuration information into the communication timing of the handshake protocol and sending it to the artificial intelligence engine, when the processor outputs the data valid signal pin as 1, the configuration information is valid.

6. A method for configuring registers, the method being used for an artificial intelligence processing core of a system according to claim 1 or 2, the method comprising: Receive the communication timing of the handshake protocol through the first command input interface and decode it to obtain the configuration information; Multiple registers inside the artificial intelligence engine are grouped and configured according to the configuration information.

7. The method according to claim 6, characterized in that The handshake protocol includes three types of signal pins: data valid signal pin, data reception completion signal pin, and data signal pin.

8. The method according to claim 7, characterized in that During the process of receiving the communication timing of the handshake protocol through the first instruction input interface, when the artificial intelligence core outputs data to complete receiving the signal pin is 1, the configuration information is obtained to the decoder.

9. An artificial intelligence chip architecture, characterized in that: include: A processor and an artificial intelligence core, wherein the processor comprises a first instruction output interface, the processor is directly connected to the artificial intelligence core through the first instruction output interface, wherein the data bit width of the first instruction output interface is at least 1024 bits, and is applied to the system as described in any one of claims 1-2.

10. A computing device, characterized in that: include: processor; as well as A memory storing a computer program, which, when executed by the processor, enables the processor to perform the method according to any one of claims 5 to 8.

Citation Information

Cited By

  • Hardware lookup table for artificial intelligence chip, data loading method and computing equipment

    CN119396845A

  • Hardware lookup table for artificial intelligence chip, method for loading data and computing device

    CN119396845B

  • Artificial intelligence chip, artificial intelligence processor core and electronic equipment

    CN121455903A