A fast communication method for large-scale brain simulation

By employing a GPU-Direct encoding and decoding scheme in large-scale brain simulation, issues such as memory-video memory interaction and unstable data volume are reduced, enabling fast communication and improving simulation speed and efficiency.

CN115906966BActive Publication Date: 2026-03-17CHINA NANHU ACAD OF ELECTRONICS & INFORMATION TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211327864.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-27
Publication Date
2026-03-17
Estimated Expiration
2042-10-27

AI Technical Summary

Technical Problem

Traditional large-scale brain simulations suffer from problems such as communication time consumption, memory-video memory interaction time consumption, and unstable communication volume. In particular, during communication between multiple machines, the large and unbalanced amount of data limits the simulation speed.

Method used

A fast communication method based on GPU-Direct technology is adopted. By encoding, compressing and decoding neuron clusters between computing nodes, the interaction of data between memory and video memory is reduced. Direct communication between GPU data is utilized, and an encoding and decoding method is designed to compress and transmit pulse data, adapting to various hardware devices for accelerated transmission.

Benefits of technology

It reduces the amount of data communication between computing nodes, fixes the amount of data in each communication, improves the communication efficiency of brain simulation, is compatible with a variety of hardware devices, and solves the problems of communication time consumption and unstable communication volume in traditional large-scale brain simulation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115906966B_ABST
    Figure CN115906966B_ABST
Patent Text Reader

Abstract

This invention discloses a fast communication method for large-scale brain simulation, providing a communication method based on GPU-Direct technology. This reduces data interaction between memory and GPU memory through direct communication between GPU data. Furthermore, it proposes a multi-GPU-based data encoding and decoding scheme to address issues such as uneven pulse data and large pulse data volume. This scheme arranges neuron clusters by process during the establishment of large-scale brain-like networks, ensuring that neuron clusters within the same process are allocated in a contiguous address space. Encoding and decoding methods are designed accordingly to compress and transmit pulse data. This ensures that when pulse data is encoded, compressed, and decoded based on multi-computing node cluster information, the amount of data communicated each time is a fixed value that depends only on the number of neurons, reducing the amount of data communication between computing nodes. This solves the problems of communication time consumption, memory-GPU memory interaction time consumption, and unstable communication volume in traditional large-scale brain-like simulations, and is adaptable to various hardware devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of communication technology, specifically relating to a fast communication method for large-scale brain simulation. Background Technology

[0002] Neuromorphic computing inherits the brain's characteristics of low power consumption, high parallelism, high fault tolerance, in-memory computing, and event-driven operation, making it suitable for real-time processing of unstructured complex information. It possesses ultra-high parallelism, ultra-high speed, ultra-low power consumption, and high robustness. Currently, the biological brain is the only known general-purpose intelligent system in the world. Understanding and drawing upon the intelligent mechanisms of the biological brain, and conducting near-real-time simulations or even training complex, large-scale brain simulation networks with biological interpretability, is one of the important and irreplaceable approaches to achieving strong artificial intelligence. Among these, computational speed and communication capability are crucial indicators for building and running large-scale brain simulation networks. Software-based simulations possess a complete application ecosystem and good usability, but their simulation speed lags far behind that of biological simulations.

[0003] The simulation speed of software-based neuromorphic simulations is constrained by many factors, among which computing resources and communication latency are two important factors affecting simulation time. Traditional computing resources include central processing units (CPUs) and graphics processing units (GPUs). CPUs have excellent capabilities for processing complex logic, but their parallelism is limited by computer performance. In recent years, GPUs have been widely used in general computing. High-end GPUs can achieve floating-point operations of up to trillions of operations per second. GPU parallel computing methods are lighter in scale and have a more significant acceleration effect compared to CPU parallel methods. Therefore, the development of neuromorphic simulation software based on a CPU-GPU heterogeneous parallel architecture is of key significance for improving the speed of neuromorphic simulations.

[0004] Large-scale brain simulation computations require the use of multiple GPUs in parallel to improve simulation speed. Therefore, inter-machine communication latency significantly impacts simulation speed. Traditional communication methods (such as the MPI messaging interface) only support data exchange within memory. Thus, pulse data existing in GPU memory during simulation needs to be copied to memory for inter-machine communication, increasing communication overhead. Furthermore, as the scale of brain simulation tasks continues to expand, distributed training frameworks have become an important choice for large-scale brain simulation tasks. However, the increased number of pulses also leads to a larger amount of data for inter-process communication, thus increasing communication time. How to pass messages between multiple processes has become a bottleneck for large-scale brain simulation frameworks. Traditional solutions mainly rely on MPI technology to achieve inter-process communication. Existing frameworks supporting large-scale brain simulation include the following:

[0005] Based on the NEST brain simulation framework, which serves as the core simulator for the European Human Brain Project (HBP), this framework utilizes a CPU supercomputing parallel computing architecture to sequentially allocate neurons to each thread according to their indexes. Neurons in different threads communicate via MPI technology. NEST-Simulator is a framework supporting large-scale distributed spiking neural network simulation, relying on the CPU for simulation. In the NEST brain simulation framework, neurons are assigned a global ID (identification number) according to their creation order, and then placed into a virtual process based on this ID. Therefore, neurons in a neuron cluster may be distributed across all machines in the system. This leads to a drawback: all machines need to communicate during the simulation, and the maximum latency and minimum bandwidth between all machines can easily become bottlenecks limiting simulation speed. Furthermore, the NEST brain simulation framework only considers the specific connections between neurons during communication. For example, if there are two machines, machine 1 has a neuron n, and machine 2 has 10 neurons, each connected by a synaptic link, then when neuron n on machine 1 emits a pulse, the amount of data it needs to send to machine 2 is 10 times the amount of data for a single connection. This means that the amount of communication between machines is linearly related to the total number of synaptic connections of neurons that emit pulses between machines. This approach results in a large amount of communication and requires high network bandwidth.

[0006] Based on the NeuronGPU brain simulation framework, launched in 2021 by a research team at Kalia University, NeuronGPU is a GPU library for simulating large-scale spiking neural networks. Currently, NeuronGPU implements various neuron models, including Integrate-And-Fire (LIF), but users need to manually allocate neuron clusters on each GPU. The NeuronGPU framework maps the network to GPU memory in units of neuron clusters, achieving GPU-based parallel computing acceleration. Furthermore, since neurons within a cluster do not need to communicate remotely, this reduces communication overhead. Inter-GPU communication in NeuronGPU is based on the MPI method. MPI is a cross-language communication protocol for writing distributed programs, supporting point-to-point and broadcast methods. This protocol only supports communication between memory data and cannot communicate between GPU memory data. Therefore, when receiving data from the GPU, the sender in NeuronGPU needs to copy the data from GPU memory to main memory before communication; similarly, the receiver also needs to copy the data back to GPU memory after receiving it. During this period, the copying speeds from GPU memory to RAM, RAM to GPU memory, and MPI transfer speeds all increase communication time during simulation. Furthermore, when facing large-scale simulation tasks, the time it takes for the Neuron GPU to send data increases with the increase in pulse information. Summary of the Invention

[0007] The purpose of this invention is to address the above-mentioned problems by proposing a fast communication method for large-scale brain simulation, which reduces the amount of data communication between computing nodes and solves the problems of communication time consumption, memory-video memory interaction time consumption, and unstable communication volume in traditional large-scale brain-like simulation.

[0008] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0009] This invention proposes a fast communication method for large-scale brain simulation, used to achieve communication between different computing devices, including CPUs and GPUs. The fast communication method for large-scale brain simulation includes the following steps:

[0010] S1. Construct a brain simulation network model. The brain simulation network model includes multiple neuron clusters, each neuron cluster includes several neurons, and the neurons are interconnected. All neuron clusters are evenly distributed among multiple computing nodes, with one GPU considered as one computing node.

[0011] S2. Create a corresponding offset list for each computing node based on the mapping information between global neurons and computing nodes. The offset list is used to store the starting address of the neurons in each computing node in the current computing node.

[0012] S3. Perform communication between the CPU memory of different computing devices to transmit agent neuron information. Create a corresponding agent neuron and computing node start address table for each computing node. The agent neuron information includes GPU number and neuron ID. The computing node start address table is used to store the start address of the agent neuron ID of the local neuron on the remote computing node. Different computing devices are regarded as the sender and receiver of each other. The computing node of the sender is called the source computing node and the computing node of the receiver is called the target computing node.

[0013] S4. Perform brain simulation based on the pulse information emitted by the surrogate neurons. The brain simulation is as follows:

[0014] S41. Encode and compress the pulse information emitted by the proxy neuron according to the starting address table of the computing node. The pulse information emitted by the proxy neuron is the proxy neuron ID of the neuron that sent the pulse information at the current time step in the target computing node.

[0015] S42. Perform communication between the GPU memory of different computing devices to transmit the encoded and compressed pulse information;

[0016] S43. After receiving the encoded and compressed pulse information, the target computing node obtains the agent neuron ID of the neuron that issued the pulse information on the local computing node according to the local computing node start address table.

[0017] S5. Determine whether the brain simulation is complete. If yes, end the process; otherwise, return to step S4.

[0018] Preferably, the connection between neurons is a unidirectional connection or a bidirectional connection.

[0019] Preferably, the neuron is a LIF neuron.

[0020] Preferably, the process of creating the offset list is as follows:

[0021] The number of neurons in each computing node is obtained based on the mapping information between global neurons and computing nodes, and then arranged sequentially to form an offset list.

[0022] Preferably, a proxy neuron for the corresponding remote neuron and a table of starting addresses for the computing node are created for each computing node, as follows:

[0023] S31. Traverse the connection information of each computing node. The connection information includes the source neuron cluster ID, the target neuron cluster ID, the computing node ID to which the source neuron cluster belongs, and the computing node ID to which the target neuron cluster belongs.

[0024] S32. When the ID of the computing node to which the source neuron cluster belongs is the same as the ID of the current computing node, a remote connection establishment and transmission operation is triggered. The computing node to which the source neuron cluster belongs sends the neuron IDs in the source neuron cluster that are connected to the target neuron cluster according to the connection information.

[0025] S33. When the ID of the computing node to which the target neuron cluster belongs is the same as the ID of the current computing node, a remote connection receiving operation is triggered to receive the neuron ID sent by the computing node to which the source neuron cluster belongs, and a proxy neuron is created at the corresponding position according to the offset list.

[0026] S34. Based on the offset list and the ID range of the proxy neuron, create a computing node starting address table on the current computing node. The proxy neuron establishes a remote connection on the current computing node based on the connection information.

[0027] Preferably, the pulse information emitted by the proxy neuron is encoded and compressed according to the starting address table of the computing nodes, as follows:

[0028] S411. Obtain the machine offset of the proxy neuron ID based on the computing node start address table. The machine offset of the proxy neuron ID is calculated as follows:

[0029] offset = id - H i

[0030] Where offset∈[0,H i+1 -H i ],

[0031] In the formula, id represents the agent neuron ID of the current neuron at computation node ID i, and H i This represents the starting address of the agent neuron ID of the current neuron on computing node ID i;

[0032] S412. Create an array of all zeros representing the number of neurons in the current computing node, update the array by setting the value of the element at the offset position to 1, and then compress the array by encoding each 32 bits into a decimal unsigned integer.

[0033] Preferably, after receiving the encoded and compressed pulse information, the target computing node obtains the agent neuron ID of the neuron that issued the pulse information on the local computing node according to its local computing node start address table, as follows:

[0034] S431. The target computing node receives the encoded and compressed pulse information from the source computing node, converts the encoded and compressed pulse information into a binary representation, extracts the positions with a value of 1 and records them in the pulse delivery table;

[0035] S432. Add the data in the pulse dispensing table to the starting address of the proxy neuron ID in the corresponding starting address table of the target computing node to obtain the proxy neuron ID of the neuron dispensing pulse information on the local computing node.

[0036] Preferably, when communicating between the CPU memory of different computing devices, the following operations are also performed:

[0037] Determine if the data flow is normal. If it is, create a proxy neuron for the corresponding remote neuron and a table of starting addresses for each computing node. Otherwise, retry communication and return to determine if the data flow is normal, until the number of communication attempts exceeds the preset number. If communication still fails, prompt to check the corresponding communication interface and end the process.

[0038] Preferably, the communication interface is an Ethernet interface or a PCIe interface.

[0039] Preferably, when communicating between GPU memory of different computing devices, the following operations are also performed:

[0040] Determine if the data stream is normal. If it is, transmit the encoded and compressed pulse information. Otherwise, retry communication and return to determine if the data stream is normal, until the number of communication attempts exceeds the preset number. If communication still fails, prompt to check the corresponding communication interface and end the process.

[0041] Preferably, the communication interface is one of the following: InfiniBand interface, NvLink interface, or PCIe interface.

[0042] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0043] The problem this invention addresses is the need for high communication speed in near real-time brain simulation. It provides a novel communication method based on GPU-Direct technology, which reduces data interaction between memory and GPU memory through direct communication between GPU data. Furthermore, it proposes a multi-GPU-based data encoding and decoding scheme to address issues such as uneven pulse data and large pulse data volume. This scheme arranges neuron clusters by process during the establishment of large-scale brain-like networks, ensuring that neuron clusters within the same process are allocated in a contiguous address space. Encoding and decoding methods are designed to compress transmitted pulse data, guaranteeing that the amount of data communicated each time is a fixed value that depends only on the number of neurons when pulse data is encoded, compressed, and decoded based on multi-node cluster information. This reduces the amount of data communication between computing nodes and solves the problems of communication time, memory-GPU memory interaction time, and unstable communication volume in traditional large-scale brain-like simulations. It is compatible with various hardware devices and supports accelerated transmission between different computing nodes, increasing the communication efficiency of brain simulation. Attached Figure Description

[0044] Figure 1 This is a flowchart of the fast communication method for large-scale brain simulation according to the present invention;

[0045] Figure 2 This is a schematic diagram illustrating the arrangement of neurons and information transmission between different computing devices according to the present invention;

[0046] Figure 3 This is a comparison diagram of the communication process between different computing devices in the prior art (a) and the communication process between different computing devices in the present invention (b). Detailed Implementation

[0047] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0048] It should be noted that, unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application.

[0049] In existing technologies, large-scale neuromorphic networks, due to their large parameter scale and complex structure, primarily rely on MPI or CUDA-aware MPI technologies for data transmission. However, MPI transmission, because it cannot directly interact with GPU memory, requires additional data interaction between memory and GPU memory as an extra overhead, increasing communication time between different computing nodes. While CUDA-aware MPI, as a method for implementing data interaction between GPU memory, supports data exchange between GPU memory, its support on physical devices and data transmission schemes are not ideal. This invention addresses these problems by proposing a compressed coding communication method based on GPU-Direct technology. Based on known global network information and neuron cluster information of different computing nodes, neurons are arranged so that neurons of the same computing node are arranged in a contiguous address space. Furthermore, pulse data is compressed based on the address information of neurons in different computing nodes, reducing the amount of data communication between computing nodes, fixing the amount of data transmitted each time, and enabling simultaneous adaptation to multiple hardware devices. It supports accelerated transmission between different computing nodes using various hardware, solving the time consumed by GPU memory and main memory interaction due to communication in traditional large-scale brain simulations, and increasing the communication efficiency of brain simulations.

[0050] like Figure 1-3As shown, a fast communication method for large-scale brain simulation is used to realize communication between different computing devices, including CPUs and GPUs. The fast communication method for large-scale brain simulation includes the following steps:

[0051] S1. Construct a brain simulation network model. The brain simulation network model includes multiple neuron clusters, each neuron cluster includes several neurons, and the neurons are interconnected. All neuron clusters are evenly distributed among multiple computing nodes, with one GPU considered as one computing node.

[0052] In one embodiment, the connections between neurons are either unidirectional or bidirectional. That is, any two neurons can communicate either unidirectionally or bidirectionally.

[0053] In one embodiment, the neurons are LIF neurons. The specific number and type can be adjusted according to actual needs.

[0054] S2. Based on the mapping information between global neurons and computing nodes, create a corresponding offset list for each computing node. The offset list is used to store the starting address of the neurons in each computing node in the current computing node.

[0055] In one embodiment, the process of creating the offset list is as follows:

[0056] The number of neurons in each computing node is obtained based on the mapping information between global neurons and computing nodes, and then arranged sequentially to form an offset list.

[0057] The offset list stores the starting address of each neuron in the current computing node. This means that the starting addresses of each neuron in the current computing node are arranged in order, so that the neuron clusters in the same process are allocated in a contiguous address space.

[0058] S3. Perform communication between the CPU memory of different computing devices to transmit agent neuron information. Create a corresponding agent neuron and computing node start address table for each computing node. The agent neuron information includes the GPU number and neuron ID. The computing node start address table is used to store the start address of the agent neuron ID of the local neuron on the remote computing node. Different computing devices are regarded as the sender and receiver of each other. The computing node of the sender is called the source computing node and the computing node of the receiver is called the target computing node.

[0059] In one embodiment, a proxy neuron for the corresponding remote neuron and a table of starting addresses for the computing node are created for each computing node, as follows:

[0060] S31. Traverse the connection information of each computing node. The connection information includes the source neuron cluster ID, the target neuron cluster ID, the computing node ID to which the source neuron cluster belongs, and the computing node ID to which the target neuron cluster belongs.

[0061] S32. When the ID of the computing node to which the source neuron cluster belongs is the same as the ID of the current computing node, a remote connection establishment and transmission operation is triggered. The computing node to which the source neuron cluster belongs sends the neuron IDs in the source neuron cluster that are connected to the target neuron cluster according to the connection information.

[0062] S33. When the ID of the computing node to which the target neuron cluster belongs is the same as the ID of the current computing node, a remote connection receiving operation is triggered to receive the neuron ID sent by the computing node to which the source neuron cluster belongs, and a proxy neuron is created at the corresponding position according to the offset list.

[0063] S34. Based on the offset list and the ID range of the proxy neurons, create a computing node starting address table on the current computing node. The proxy neurons establish remote connections on the current computing node based on the connection information. The ID range of the proxy neurons is determined by the number of proxy neurons.

[0064] In one embodiment, when communicating between the CPU memory of different computing devices, the following operations are also performed:

[0065] Determine if the data flow is normal. If it is, create a proxy neuron for the corresponding remote neuron and a table of starting addresses for each computing node. Otherwise, retry communication and return to determine if the data flow is normal, until the number of communication attempts exceeds the preset number. If communication still fails, prompt to check the corresponding communication interface and end the process.

[0066] In one embodiment, the communication interface is an Ethernet interface or a PCIe interface.

[0067] It should be noted that remote neurons represent all neurons other than local neurons, and remote computing nodes represent all computing nodes other than local computing nodes.

[0068] S4. Perform brain simulation based on the pulse information emitted by the surrogate neurons. The brain simulation is as follows:

[0069] S41. Encode and compress the pulse information emitted by the proxy neuron according to the starting address table of the computing node. The pulse information emitted by the proxy neuron is the proxy neuron ID of the neuron that sent the pulse information at the current time step in the target computing node.

[0070] In one embodiment, the pulse information emitted by the proxy neuron is encoded and compressed according to the starting address table of the computing node, as follows:

[0071] S411. Obtain the machine offset of the proxy neuron ID based on the computing node start address table. The machine offset of the proxy neuron ID is calculated as follows:

[0072] offset = id - H i

[0073] Where offset∈[0,H i+1 -H i ],

[0074] In the formula, id represents the agent neuron ID of the current neuron at computation node ID i, and H i This represents the starting address of the agent neuron ID of the current neuron on computing node ID i;

[0075] S412. Create an array of all zeros representing the number of neurons in the current computing node, update the array by setting the value of the element at the offset position to 1, and then compress the array by encoding each 32 bits into a decimal unsigned integer.

[0076] For example, if the current compute node ID is 5 (int value), containing 5000 neurons, and 4000 neurons on the compute node need to emit pulse information, and one of these neurons has a surrogate neuron ID = 10000 (int value) on compute node ID 3, and the starting address of the surrogate neuron ID on compute node ID 3 is H5 = 8000, then the machine offset of this neuron ID is offset = 10000 – 8000 = 2000. Similarly, the machine offsets of the remaining 3999 neurons can be calculated in the same way. Consider a 5000-bit all-zero binary array, and set the offset bit corresponding to the neuron emitting pulse information to 1 (4000 neurons emit pulse information, so 4000 bits are set to 1). Then convert it to a 32-bit int value to complete data compression.

[0077] S42. Perform communication between the GPU memory of different computing devices to transmit the encoded and compressed pulse information.

[0078] In one embodiment, when communicating between GPU memory of different computing devices, the following operations are also performed:

[0079] Determine if the data stream is normal. If it is, transmit the encoded and compressed pulse information. Otherwise, retry communication and return to determine if the data stream is normal, until the number of communication attempts exceeds the preset number. If communication still fails, prompt to check the corresponding communication interface and end the process.

[0080] In one embodiment, the communication interface is one of an InfiniBand interface, an NvLink interface, or a PCIe interface.

[0081] S43. After receiving the encoded and compressed pulse information, the target computing node obtains the agent neuron ID of the neuron that issued the pulse information on the local computing node according to the local computing node start address table.

[0082] In one embodiment, after receiving the encoded and compressed pulse information, the target computing node obtains the proxy neuron ID of the neuron that issued the pulse information on the local computing node according to its local computing node start address table, as follows:

[0083] S431. The target computing node receives the encoded and compressed pulse information from the source computing node, converts the encoded and compressed pulse information into a binary representation, extracts the positions with a value of 1 and records them in the pulse delivery table;

[0084] S432. Add the data in the pulse dispensing table to the starting address of the proxy neuron ID in the corresponding starting address table of the target computing node to obtain the proxy neuron ID of the neuron dispensing pulse information on the local computing node.

[0085] If compute node ID 3 receives encoded and compressed pulse information (int value) from compute node ID 5, it converts the value to binary and finds the bit with a value of 1, such as the 2000th bit being 1. If the starting address of the surrogate neuron ID corresponding to the 2000th bit on compute node ID 3 is known to be H5 = 8000, then it can be known that the surrogate neuron ID = 8000 + 2000 = 10000 issues the pulse information.

[0086] S5. Determine whether the brain simulation is complete. If yes, end the process; otherwise, return to step S4.

[0087] The following detailed description is provided through specific embodiments.

[0088] In this embodiment, the brain simulation network model has the following structure: twelve neuron clusters, each containing one million LIF (Leaky Integrate and Fire) neurons. The connections between neuron clusters are One-to-One connections, meaning neurons with the same index in two clusters are connected. These twelve neuron clusters are evenly distributed across three computing nodes for simulation.

[0089] First, based on global information (i.e., the mapping information between global neurons and computing nodes), the number of neurons in each computing node is obtained, and the offset list for each computing node is calculated. Then, all connection information is traversed. When the computing node ID of the source neuron cluster is the same as the current computing node ID, a remote connection establishment operation is triggered. At this time, the computing node of the source neuron cluster will send the connection information to the target computing node via MPI. After receiving this information, the target computing node will create a proxy neuron of the computing node of the source neuron cluster on the target computing node according to the offset list, and create a computing node starting address table on the current computing node according to the offset list and the ID range of the proxy neuron, and establish a remote connection, such as... Figure 2 The diagram illustrates the arrangement of neurons and information transmission between different computing devices. The communication process between different computing devices is the same, as shown below. Figure 3 As shown, the communication process (brain simulation process) between two computing devices is taken as an example.

[0090] After creating the surrogate neurons, the starting address table of the computing nodes, and establishing remote connections, brain simulation will begin. At each simulation time step, the pulse information of the current time step will be sent to other computing nodes. At this point, the pulse information of the current time step needs to be encoded. Specifically, this involves calculating the surrogate neuron ID of the current computing node's neuron on the target computing node and obtaining the machine offset of the surrogate neuron ID based on the computing node's starting address table. An array of all zeros representing the number of neurons in the current computing node is created, the resulting offset is set to 1, and then every 32 bits of the updated array is encoded into a decimal unsigned integer to complete data compression.

[0091] In this embodiment, compressed data will be transmitted using GPU-Direct technology. The communication interface utilizes a PCIe interface to accelerate data transmission, enabling rapid pulse information delivery. Data is transmitted by invoking relevant operations of the data stream. If an operation is not effectively injected into the data stream, communication attempts can be repeatedly made. If the number of communication attempts exceeds a preset number, an error flag will be returned, prompting a check of the corresponding communication interface. GPU-Direct technology is part of the Magnum IO software stack, enhancing GPU data transmission and access. Through GPU-Direct technology, network adapters and memory can directly read and write to video memory. Therefore, GPU-Direct-based communication technology can eliminate unnecessary memory duplication, reduce CPU overhead, and decrease latency, thereby significantly improving the speed of large-scale brain simulation.

[0092] After receiving the encoded and compressed pulse information from the transmitter, the target computing node decodes the encoded and compressed pulse information according to the information in the computing node's starting address table, and uses the pulse information to perform brain simulation tasks.

[0093] This embodiment conducted three experiments: an MPI method using MPI communication with uncompressed pulse information, an MPI+GPU-Direct method using MPI to transmit pulse length information with uncompressed pulse information and GPU-Direct to transmit pulse information, and a GPU-Direct+encoding / decoding method based on GPU-Direct transmission described in this invention. Table 1 shows the experimental results.

[0094] Table 1. Statistical results of brain simulation communication time

[0095] MPI MPI+GPU-Direct GPU-Direct+ encoding and decoding Data transmission time 2.36774 0.115867 0.218011 Data communication time 22.1785 17.6387 11.5436 Time for receiving data processing 1.30657 0.809653 0.130891 Communication time 25.85281 18.56422 11.8925

[0096] Table 1 shows that the GPU-Direct+ encoding / decoding method in this embodiment outperforms the other two methods in terms of communication time. Specifically, the data transmission time is significantly better than the MPI method because it reduces data interaction between memory and GPU memory. However, due to the increased data encoding operations, the data transmission time is slightly slower than the MPI+GPU-Direct method. Secondly, the GPU-Direct data communication method can greatly reduce data communication time. Finally, in terms of the time for processing received data, the GPU-Direct+ encoding / decoding method of this invention reduces data interaction between memory and GPU memory, ensuring that data processing is performed on high-performance computing devices. Therefore, it outperforms the MPI and MPI+GPU-Direct methods in processing time, with the time unit being seconds. Figure 3 This diagram compares the communication process between different computing devices in the prior art (a) with the communication process between different computing devices in the present invention (b), demonstrating that the present invention reduces the frequent data transfer process between video memory and main memory.

[0097] During communication, neuronal pulse information is first encoded according to the starting address table of computing nodes to ensure that the amount of data in each communication is a fixed value. Then, different communication hardware devices are selected according to different hardware cluster structures to send the data from the sender to the receiver. The receiver decodes the data according to its local starting address table of computing nodes. Through the above method, based on GPU-Direct technology, frequent data transfer between video memory and main memory is avoided, reducing the communication time of brain simulation and enabling fast large-scale brain simulation. Furthermore, the stability of pulse data transmission is improved by encoding and decoding pulse information.

[0098] The problem this invention addresses is the need for high communication speed in near real-time brain simulation. It provides a novel communication method based on GPU-Direct technology, which reduces data interaction between memory and GPU memory through direct communication between GPU data. Furthermore, it proposes a multi-GPU-based data encoding and decoding scheme to address issues such as uneven pulse data and large pulse data volume. This scheme arranges neuron clusters by process during the establishment of large-scale brain-like networks, ensuring that neuron clusters within the same process are allocated in a contiguous address space. Encoding and decoding methods are designed to compress transmitted pulse data, guaranteeing that the amount of data communicated each time is a fixed value that depends only on the number of neurons when pulse data is encoded, compressed, and decoded based on multi-node cluster information. This reduces the amount of data communication between computing nodes and solves the problems of communication time, memory-GPU memory interaction time, and unstable communication volume in traditional large-scale brain-like simulations. It is compatible with various hardware devices and supports accelerated transmission between different computing nodes, increasing the communication efficiency of brain simulation.

[0099] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0100] The embodiments described above are merely specific and detailed examples of the embodiments described in this application, and should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the scope of protection of this application. Therefore, the scope of protection of this patent application should be determined by the appended claims.

Claims

1. A method for fast communication for large-scale brain simulation, for realizing communication between different computing devices, the computing devices including CPUs and GPUs, characterized in that: The rapid communication method for large-scale brain simulation comprises the following steps: S1, constructing a brain simulation network model, wherein the brain simulation network model comprises a plurality of neuron clusters, each neuron cluster comprises a plurality of neurons, the neurons are connected with each other, and all the neuron clusters are evenly divided into a plurality of computing nodes, and one GPU is regarded as one computing node; S2, creating a corresponding offset list for each computing node according to mapping information between global neurons and computing nodes, wherein the offset list is used to store the starting address of neurons in the current computing node in each computing node; S3, performing communication between the CPU memories of different computing devices to transmit proxy neuron information, creating a corresponding proxy neuron and computing node starting address table of remote neurons for each computing node, wherein the proxy neuron information comprises a GPU number and a neuron ID, the computing node starting address table is used to store the starting address of the proxy neuron ID of the local neuron in the remote computing node, and different computing devices are regarded as a sending end and a receiving end, wherein the computing node of the sending end is regarded as a source computing node, and the computing node of the receiving end is regarded as a target computing node; S4, performing brain simulation according to the pulse information sent by the proxy neuron, and the brain simulation specifically comprises the following steps: S41, encoding and compressing the pulse information sent by the proxy neuron according to the computing node starting address table, wherein the pulse information sent by the proxy neuron is the proxy neuron ID of the neuron sending the pulse information in the target computing node at the current time step; S42, performing communication between the GPU memories of different computing devices to transmit the encoded and compressed pulse information; S43, after the target computing node receives the encoded and compressed pulse information, obtaining the proxy neuron ID of the neuron sending the pulse information on the local computing node according to the local computing node starting address table; S5, judging whether the brain simulation is completed, if yes, ending the process, otherwise, returning to step S4.

2. The method for fast communication against large-scale brain simulation of claim 1, wherein: The connection mode between the neurons is one-way connection or two-way connection.

3. The method for fast communication for large-scale brain simulation of claim 1, wherein: The neuron is an LIF neuron.

4. The method for fast communication for large-scale brain simulation of claim 1, wherein: The creation process of the offset list is as follows: obtaining the neuron quantity information of each computing node according to the mapping information between global neurons and computing nodes, and sequentially arranging to form an offset list.

5. The method for fast communication for large-scale brain simulation of claim 1, wherein: The process of creating a corresponding proxy neuron and computing node starting address table of remote neurons for each computing node is as follows: S31, traversing the connection information of each computing node, wherein the connection information comprises a source neuron cluster ID, a target neuron cluster ID, a source neuron cluster belonging computing node ID and a target neuron cluster belonging computing node ID; S32, when the source neuron cluster belonging computing node ID is the same as the current computing node ID, triggering a remote connection sending operation, and the source neuron cluster belonging computing node sends the neuron ID connected with the target neuron cluster in the source neuron cluster according to the connection information; S33, when the computing node ID to which the target neuron cluster belongs is the same as the current computing node ID, triggering a remote connection receiving operation to receive the neuron ID sent by the computing node to which the source neuron cluster belongs, and creating a proxy neuron at a corresponding position according to the offset list; S34, creating a computing node start address table according to the offset list and the ID range of the proxy neuron in the current computing node, and establishing a remote connection according to the connection information in the current computing node.

6. The method for fast communication for large-scale brain simulation of claim 1, wherein: The pulse information sent by the proxy neuron is encoded and compressed according to the computing node start address table, and the specific process is as follows: S411, obtaining the machine offset of the proxy neuron ID according to the computing node start address table, and the machine offset of the proxy neuron ID is calculated as follows: offset = id - H i where offset ∈ [0, H i+1 -H i ], In the formula, id represents the agent neuron ID of the current neuron on the computing node ID i, H i represents the agent neuron ID start address of the current neuron on the computing node ID i; S412, creating a full 0 array with the number of neurons in the current computing node, and updating the value of the element at the offset position in the array to 1, and encoding every 32 bits in the updated array into an unsigned integer in decimal to complete the compression.

7. The method for fast communication for large-scale brain simulation of claim 1, wherein: After the target computing node receives the encoded and compressed pulse information, the proxy neuron ID of the neuron sending the pulse information on the local computing node is obtained according to the local computing node start address table, and the specific process is as follows: S431, the target computing node receives the encoded and compressed pulse information from the source computing node, and converts the encoded and compressed pulse information into a binary representation, extracts the positions with a value of 1 and records them in the pulse sending table; S432, adding the data in the pulse sending table to the start address of the proxy neuron ID in the corresponding computing node start address table of the target computing node to obtain the proxy neuron ID of the neuron sending the pulse information on the local computing node.

8. The method for fast communication for large-scale brain simulation of claim 1, wherein: When communicating between the CPUs of different computing devices, the following operations are also performed: If the data flow is normal, create the corresponding proxy neuron of the remote neuron and the computing node start address table for each computing node, otherwise, reattempt communication and return to judge whether the data flow is normal, until the number of communication attempts is greater than the preset number, if the communication still fails, prompt to check the corresponding communication interface and end the process.

9. The method for fast communication against large-scale brain simulation of claim 8, wherein: The communication interface is an Ethernet interface or a PCIE interface.

10. The method for fast communication for large-scale brain simulation of claim 1, wherein: When communicating between the GPUs of different computing devices, the following operations are also performed: If the data flow is normal, transmit the encoded and compressed pulse information, otherwise, reattempt communication and return to judge whether the data flow is normal, until the number of communication attempts is greater than the preset number, if the communication still fails, prompt to check the corresponding communication interface and end the process.

11. The method for fast communication against large-scale brain simulation of claim 10, wherein: The communication interface is one of an infiniband interface, an NvLink interface, and a PCIE interface.

Citation Information

Patent Citations

  • Pulse neural network simulation method based on GPU

    CN114186665A

  • Population-based connectivity architecture for spiking neural networks

    US20180174033A1