CPU-FPGA-oriented graph neural network training acceleration method and system

By working collaboratively with CPUs and multiple FPGA platforms, and employing load balancing and optimized data channels, the problems of load imbalance and communication bottlenecks in graph neural network training were solved, enabling efficient graph neural network training and accelerating large-scale graph data processing.

CN121936505APending Publication Date: 2026-04-28YUANQIXIN (SHANDONG) SEMICONDUCTOR TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511744302.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-25
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing graph neural network training techniques suffer from problems such as unbalanced load, high cross-device communication overhead, and high development threshold, resulting in high computational complexity, low efficiency, and difficulty in effective application in large-scale scenarios.

Method used

By working collaboratively with CPUs and multiple FPGA platforms, and employing load balancing algorithms and optimized data channels, efficient distribution of graph feature data and balanced allocation of computing tasks are achieved. Combined with a hardware design mapping engine, hardware resource configuration is optimized, cross-device communication latency is reduced, and the development process is simplified.

Benefits of technology

It achieves efficient parallel computation for graph neural network training, reduces computational complexity and communication latency, improves training efficiency and resource utilization, and reduces development difficulty.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121936505A_ABST
    Figure CN121936505A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of neural network acceleration, and relates to a CPU-FPGA-oriented graph neural network training acceleration method and system. The method comprises the steps that a CPU stores complete graph feature data and distributes different feature data to storage modules of different FPGAs through data channels according to a load balancing algorithm; partitioning the GNN network model by the CPU, and matching a partitioned model operator with a corresponding FPGA (Field Programmable Gate Array); the CPU completes issuing and sampling of a partition model according to a sampler algorithm, and sends the partition model to the FPGA; reading feature data after the FPGA is started, completing a calculation task by a load execution module, and writing a result back to a CPU memory; the CPU completes data updating and weight updating; and resending the updated weight data to the corresponding FPGA, and carrying out iterative training. According to the invention, operation of the graph neural network on a CPU-FPGA platform is successfully realized, and the overall acceleration effect is excellent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of neural network acceleration technology, and specifically to a method and system for accelerating graph neural network training for CPU-FPGA. Background Technology

[0002] Currently, in key application areas such as social network analysis, molecular structure prediction, and urban traffic flow modeling, the scale of graph data in the real world is experiencing an exponential explosion. According to statistics, the number of vertices in graph data in such scenarios can easily exceed tens of millions, and the number of edges can reach billions or even hundreds of billions. This trend has caused the computational complexity and data processing pressure in the training process of graph neural networks (GNNs) to rise sharply. The problem of computation time has become the core bottleneck restricting the application of GNN technology in large-scale scenarios.

[0003] However, current mainstream GNN training techniques still rely on traditional hardware platforms such as CPUs, single GPUs, or single FPGAs, all of which have unavoidable technical limitations. While CPU platforms, with their general-purpose computing architecture, can flexibly support graph data preprocessing (such as vertex feature cleaning, edge weight normalization, and subgraph sampling strategy adjustment), their overall computational parallelism is extremely low due to their serialized computation logic and limited parallel computing units. When processing graph data with tens of millions of vertices, a single GNN layer aggregation and update operation often takes several minutes, completely failing to meet the real-time and iterative efficiency requirements of large-scale GNN training. Although single GPUs or single FPGA platforms are superior to CPUs in parallel computing capabilities, their hardware resources have inherent limitations. When the feature matrix size of the graph data or intermediate computation results exceed the memory capacity of a single device, frequent data swapping between host memory and device memory occurs during training. The latency of a single data transfer can reach milliseconds. According to experimental data, this data exchange can cause an overall training performance drop of more than 50%, forming a significant performance bottleneck.

[0004] While existing multi-FPGA GNN acceleration solutions have a natural advantage in energy efficiency, they suffer from three major pain points due to imperfections in their technical design: First, there is the problem of unbalanced load. The inherent unstructured nature of graph data leads to extremely uneven distribution of vertex degrees (e.g., the number of edges associated with core users in a social network can reach millions, while ordinary users have only dozens). Traditional graph partitioning algorithms (such as hash partitioning and simple greedy partitioning) cannot divide graph data into subgraphs with balanced computational load. Consequently, some FPGAs are assigned to high-load subgraphs with a large number of high-degree vertices and run at full capacity continuously, while other FPGAs are assigned to low-load subgraphs and remain idle for a long time. Second, there is high cross-FPGA communication overhead. After graph data partitioning, a large number of cross-partition edges are inevitably generated. Traditional multi-FPGA GNN acceleration solutions have high cross-partition communication overhead. FPGA communication solutions require CPU-memory relay for data exchange between FPGAs. The additional latency introduced by this process accounts for 30%-50% of the total training time, becoming a major bottleneck restricting the improvement of training performance. Finally, the development threshold is high. The development of GNN acceleration on multiple FPGA platforms requires hardware experts with multi-domain expertise, including designing aggregation cores and update cores adapted to the computing characteristics of GNNs, optimizing memory layout to reduce random data access latency, and designing cross-FPGA data paths adapted to different platform topologies. Moreover, multi-FPGA design involves dozens of adjustable parameters such as the number of processing units (PE), the allocation ratio of hardware resources (DSP / LUT / BRAM), and pipeline depth. The optimal configuration can only be determined through extensive experimental verification, which seriously restricts the rapid iteration and practical application of the technology.

[0005] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this application, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0006] To provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. This summary is not intended as a general commentary, nor is it intended to identify key / important components or describe the scope of protection of these embodiments, but rather as a prelude to the detailed description that follows.

[0007] This disclosure provides a method and system for accelerating graph neural network training for CPU-FPGA, in order to solve the technical problems existing in the GNNG network acceleration framework, such as unbalanced load, large cross-device communication overhead, and high development threshold.

[0008] In some embodiments, the method includes: The CPU stores complete graph feature data and distributes different feature data to the storage modules of different FPGAs through data channels according to the load balancing algorithm, ensuring that there is no feature data dependency between FPGAs; The CPU partitions the GNN network model according to the network model configuration and the user-defined partition type, and then matches the partitioned model operators with the corresponding FPGA. The CPU completes the distribution and sampling of the partition model according to the sampler algorithm, generates the corresponding execution module bit stream according to the load type of each FPGA, and sends it to the FPGA; After the FPGA starts up, it reads the feature data, the load execution module completes the calculation task, and writes the result back to the CPU memory. The CPU receives the result data returned by the FPGA and completes the data update and weight update. The CPU resends the updated weight data to the corresponding FPGA for iterative training.

[0009] Preferably, the data channel between the CPU and the FPGA is as follows: The synchronous GNN training algorithm is specified through two sets of application programming interfaces, including: a network processing program interface that receives user-specified graph segmentation and feature storage strategies, and a network algorithm abstraction program interface that specifies GNN model parameters. The input training algorithm is parsed to extract an abstract representation of the GNN training algorithm; Based on the abstract representation, a host program is generated by a software generator for graph segmentation, feature allocation, mini-batch generation, management task scheduling, and data communication. The accelerator generator generates synthesizable hardware designs, and the accelerator configuration parameters are determined based on the hardware design mapping engine.

[0010] Preferably, the load balancing algorithm includes: The graph partitioning blocks are allocated to resource-rich FPGAs for execution based on the graph partitioning algorithm; When an idle FPGA resource is detected and continuously allocated to the same FPGA, the subsequent graph segmentation blocks are automatically reallocated to the idle FPGA for execution.

[0011] Preferably, if the FPGA cannot find the required vertex features in its local memory during execution, it sends a request to the CPU to obtain them from the CPU's memory.

[0012] Preferably, the method further includes hardware optimization: In the preprocessing stage, the edges of the input graph are sorted by source vertex so that edges with the same source vertex are processed together. The feature data distribution module copies and distributes the source vertex feature vectors to each distributed processing unit. During the iteration process, if the source vertex of an edge is the same as the loaded feature vector, then the feature vector is reused; otherwise, wait for the next feature vector to be loaded and replaced. During the calculation process, the feature vector of the next source vertex is pre-fetched to the feature data distribution module.

[0013] In some embodiments, the CPU-FPGA-oriented graph neural network training acceleration system includes a host CPU and an FPGA, wherein: The host CPU includes: The feature data storage module is used to store complete graph feature data; The network model partitioning module is used to partition the GNN network model according to the network model configuration and user-defined partitioning type, and match the partitioned model operators to the corresponding FPGA. The sampler module is used to distribute and sample the partition model according to the sampler algorithm, and generate a bit stream according to the load type of each FPGA and send it to the FPGA. The data update module is used to receive the calculation results written back by the FPGA, update the data, and update the weight data. The weight sending module is used to resend the updated weight data to the corresponding FPGA; The FPGA includes: The storage module is used to store the feature data sent from the host CPU; The load execution module is used to read feature data and execute training tasks, and write the calculation results back to the host CPU.

[0014] Preferably, the host CPU and FPGA interact through a data channel, which takes the GNN training algorithm, GNN model and platform metadata as input to generate the host program and accelerator generator.

[0015] Preferably, the host program is used to manage task scheduling, data communication and mini-batch sampling, and the accelerator generator is an optimized GNN kernel function running on an FPGA.

[0016] In some embodiments, the graph neural network training acceleration apparatus for CPU-FPGA includes a processor and a memory storing program instructions, the processor being configured to execute the graph neural network training acceleration method for CPU-FPGA when the program instructions are executed.

[0017] In some embodiments, the storage medium stores program instructions that, when executed, perform the method for accelerating the training of a graph neural network to a CPU-FPGA.

[0018] The present disclosure provides a method and system for accelerating graph neural network training for CPU-FPGA, which can achieve the following technical effects: A high-level abstraction of the GNN training algorithm was constructed, and various training algorithms with abstract descriptions were built based on this high-level abstraction. Subsequently, to achieve high throughput and automate the implementation process, a hardware design mapping engine was developed. This engine can determine the FPGA hardware configuration that optimizes training throughput based on given platform metadata. Furthermore, the data transmission dependencies and load balancing schemes between multiple FPGAs and the CPU were optimized to achieve more efficient resource utilization. Through the graph neural network training acceleration framework of this invention, the operation of graph neural networks on a CPU+Multi-FPGA platform was successfully realized, with excellent overall acceleration performance.

[0019] The above general description and the description below are exemplary and illustrative only and are not intended to limit this application. Attached Figure Description

[0020] One or more embodiments are illustrated by way of example with reference to the accompanying drawings. These illustrations and drawings do not constitute a limitation on the embodiments. Elements having the same reference numerals in the drawings are shown as similar elements. The drawings are not to be scaled. And wherein: Figure 1 This is a schematic diagram of the method flow of the present invention; Figure 2 This is a schematic diagram of the overall architecture of the graph neural network training acceleration method for CPU-FPGA provided in this embodiment of the disclosure; Figure 3 This is a schematic diagram of the data channel for a graph neural network training acceleration method for CPU-FPGA provided in an embodiment of this disclosure; Figure 4 This is a load balancing diagram of a graph neural network training acceleration method for CPU-FPGA provided in this embodiment of the disclosure; Figure 5 This is a hardware optimization diagram of a graph neural network training acceleration method for CPU-FPGA provided in an embodiment of this disclosure; Figure 6 This is a schematic diagram of the device structure according to an embodiment of the present disclosure. Detailed Implementation

[0021] To provide a more detailed understanding of the features and technical content of the embodiments of this disclosure, the implementation of the embodiments of this disclosure will be described in detail below with reference to the accompanying drawings. The accompanying drawings are for illustrative purposes only and are not intended to limit the embodiments of this disclosure. In the following technical description, for ease of explanation, several details are used to provide a full understanding of the disclosed embodiments. However, one or more embodiments may still be implemented without these details. In other cases, well-known structures and devices may be simplified in their depiction to simplify the drawings.

[0022] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this disclosure described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion.

[0023] Unless otherwise stated, the term "multiple" means two or more.

[0024] In this embodiment of the disclosure, the character " / " indicates that the objects before and after it are in an "or" relationship. For example, A / B means: A or B.

[0025] The term "and / or" describes an association between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or A and B.

[0026] The term "correspondence" can refer to an association or binding relationship. The correspondence between A and B means that there is an association or binding relationship between A and B.

[0027] Example 1 like Figures 1-2 As shown, a method for accelerating graph neural network training for CPU-FPGA is disclosed, the method comprising: S1: The CPU stores complete graph feature data and distributes different feature data to the storage modules of different FPGAs through the data channel according to the load balancing algorithm, ensuring that there is no feature data dependency between FPGAs; S2: The CPU partitions the GNN network model according to the network model configuration and the user-defined partition type, and matches the partitioned model operators with the corresponding FPGA; S3: The CPU completes the distribution and sampling of the partition model according to the sampler algorithm, generates the corresponding execution module bit stream according to the load type of each FPGA, and sends it to the FPGA; S4: After the FPGA starts up, it reads the feature data, the load execution module completes the calculation task, and writes the result back to the CPU memory; S5: The CPU receives the result data returned by the FPGA and completes the data update and weight update; S6: The CPU resends the updated weight data to the corresponding FPGA for iterative training.

[0028] As a refinement of the above embodiments, such as Figure 3As shown, the data channel takes the GNN training algorithm, GNN model and platform metadata as input to generate a high-throughput design scheme for accelerating the training process on a CPU+multi-FPGA platform. Specifically, the design scheme includes two parts: (1) a host program, which is responsible for managing task scheduling, data communication and mini-batch sampling; and (2) an accelerator design scheme, namely an optimized GNN kernel function running on the FPGA.

[0029] In the input program, the user specifies the synchronous GNN training algorithm through two sets of application programming interfaces: the network processing interface, which specifies the graph segmentation and feature storage strategy in the host-side graph preprocessing stage; and the network algorithm abstraction interface, which specifies the relevant parameters of the GNN model.

[0030] Subsequently, the host side parses the input program and extracts an abstract representation of the GNN training algorithm. This abstract representation serves as an intermediate expression between the software generator and the accelerator generator, used to generate a design scheme that can run on a CPU+multi-FPGA platform. Specifically, it includes the following functional modules: (1) Software generator: Based on the user-specified input information, the software generator generates a host program. In the preprocessing stage, the host program is responsible for performing graph segmentation operations and allocating vertex features to each FPGA; in the training stage, the host program generates small batches of data and distributes them to each FPGA. In addition, the host program also includes a runtime system for managing FPGA task scheduling and data communication; (2) Accelerator generator: Parses the user input and uses the hardware engineering code library to generate a hardware design scheme that supports parameter configuration, where the parameters (i.e., accelerator configuration) are determined by the hardware design mapping engine. Afterward, the accelerator generator generates a synthesizable hardware design for the target FPGA.

[0031] The CPU host sends the synthesized FPGA engineering logic and corresponding data to the FPGA's logic and storage modules to complete the project startup and scheduling, enabling the overall framework to run at high speed.

[0032] Specifically, the data channel between the CPU and the FPGA is as follows: The synchronous GNN training algorithm is specified through two sets of application programming interfaces, including: a network processing program interface that receives user-specified graph segmentation and feature storage strategies, and a network algorithm abstraction program interface that specifies GNN model parameters. The input training algorithm is parsed to extract an abstract representation of the GNN training algorithm; Based on the abstract representation, a host program is generated by a software generator for graph segmentation, feature allocation, mini-batch generation, management task scheduling, and data communication. The accelerator generator generates synthesizable hardware designs, and the accelerator configuration parameters are determined based on the hardware design mapping engine.

[0033] As a refinement of the above embodiments, such as Figure 4 As shown, to further improve the execution efficiency of FPGAs and the utilization of computing resources, a load balancing and communication optimization scheme is proposed based on the overall architecture of this invention. Specifically, load balancing mainly targets graph neural network operator segmentation. During the sampling phase, the sampler generates small batches of data from each graph segmentation block and distributes these small batches to various FPGAs. However, due to the difference in the number of vertices and edges within each segmentation block, the number of small batches of data generated by each graph segmentation block is also different, leading to load imbalance. To address this, a two-stage task scheduler is proposed to achieve load balancing between FPGAs. In the first stage, when graph segmentation block operator resources are abundant, the corresponding graph segmentation block is sent to the corresponding FPGA for execution according to the graph segmentation algorithm. In the second stage, when the graph segmentation algorithm encounters an idle FPGA resource during the segmentation phase and continuously allocates it to the same FPGA, the design layer automatically sends the second allocated graph segmentation block to the idle FPGA for execution, and the calculation result is also written back by the corresponding FPGA. It is worth noting that at this point, the FPGA-graph segmentation block mapping relationship in the second stage is maintained by the underlying implementation, while remaining transparent to the graph segmentation algorithm, in order to reduce the design complexity for top-level designers.

[0034] Specifically, the load balancing algorithm includes: The graph partitioning blocks are allocated to resource-rich FPGAs for execution based on the graph partitioning algorithm; When an idle FPGA resource is detected and continuously allocated to the same FPGA, the subsequent graph segmentation blocks are automatically reallocated to the idle FPGA for execution.

[0035] As a refinement of the above embodiments, for existing FPGA communication schemes implemented through shared memory space in CPU memory, data must first be copied from FPGA memory to the shared memory space before being transmitted to another FPGA. Compared to direct CPU-FPGA communication, FPGA communication is much slower. Therefore, the FPGA execution modules in this invention all retrieve data from CPU memory. Specifically, whenever a vertex feature required for training is not present in the FPGA's local memory, the FPGA sends a request to the host CPU to retrieve the data. Retrieving vertex features from CPU memory is feasible because the CPU memory stores the complete graph. This optimized scheme avoids reading vertex features from other FPGAs, thereby reducing inter-FPGA communication. As a refinement of the above embodiments, the computation process of the GNN network is time-consuming because it generates a large number of random memory accesses. To address this issue, the present invention constructs a hardware template with parameter configuration capabilities. By optimizing the data layout and memory organization, communication overhead is reduced, and the training throughput of the GNN is improved. The optimized module architecture diagram is shown below. Figure 5 As shown.

[0036] During the preprocessing stage, the edges of the input graph are sorted by their source vertices. This ensures that edges with the same source vertex are processed together, and the kernel function does not need to reload the data of that source vertex later. Initially, the feature vectors of the source vertices are loaded and distributed to each distributed processing unit via the feature data distribution module. In each iteration, one edge data is loaded into each distributed processing unit: if the source vertex of the loaded edge is the same as the source vertex corresponding to the loaded feature vector, the distributed processing unit will reuse the loaded feature vector for calculation; if they are different, the distributed processing unit will wait for the feature data distribution module to copy and distribute the feature vector of the next source vertex to replace the currently loaded feature vector. It is important to note that during the calculation process, the feature vector of the next source vertex is also prefetched into the feature data distribution module.

[0037] Specifically, the hardware optimizations include: In the preprocessing stage, the edges of the input graph are sorted by source vertex so that edges with the same source vertex are processed together. The feature data distribution module copies and distributes the source vertex feature vectors to each distributed processing unit. During the iteration process, if the source vertex of an edge is the same as the loaded feature vector, then the feature vector is reused; otherwise, wait for the next feature vector to be loaded and replaced. During the calculation process, the feature vector of the next source vertex is pre-fetched to the feature data distribution module.

[0038] Example 2 A CPU-FPGA-based graph neural network training acceleration system includes a host CPU and an FPGA, wherein: The host CPU includes: The feature data storage module is used to store complete graph feature data; The network model partitioning module is used to partition the GNN network model according to the network model configuration and user-defined partitioning type, and match the partitioned model operators to the corresponding FPGA. The sampler module is used to distribute and sample the partition model according to the sampler algorithm, and generate a bit stream according to the load type of each FPGA and send it to the FPGA. The data update module is used to receive the calculation results written back by the FPGA, update the data, and update the weight data. The weight sending module is used to resend the updated weight data to the corresponding FPGA; The FPGA includes: The storage module is used to store the feature data sent from the host CPU; The load execution module is used to read feature data and execute training tasks, and write the calculation results back to the host CPU.

[0039] As a refinement of the above embodiments, the host CPU and FPGA interact through a data channel, which takes the GNN training algorithm, GNN model and platform metadata as input to generate the host program and accelerator generator.

[0040] As a refinement of the above embodiments, the host program is used to manage task scheduling, data communication and mini-batch sampling, and the accelerator generator is an optimized GNN kernel function running on an FPGA.

[0041] Combination Figure 6 As shown, this disclosure provides a graph neural network training acceleration device 300 for CPU-FPGA, including a processor 304 and a memory 301. Optionally, the device may further include a communication interface 302 and a bus 303. The processor 304, communication interface 302, and memory 301 can communicate with each other via the bus 303. The communication interface 302 can be used for information transmission. The processor 304 can call logic instructions in the memory 301 to execute the graph neural network training acceleration method for CPU-FPGA described in the above embodiment.

[0042] Furthermore, the logic instructions in the aforementioned memory 301 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.

[0043] The memory 301, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as program instructions / modules corresponding to the methods in the embodiments of this disclosure. The processor 304 executes functional applications and data processing by running the program instructions / modules stored in the memory 301, that is, it implements the CPU-FPGA graph neural network training acceleration method in the above embodiments.

[0044] The memory 301 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, the memory 301 may include high-speed random access memory and may also include non-volatile memory.

[0045] This disclosure provides a computer-readable storage medium storing computer-executable instructions configured to execute the above-described CPU-FPGA-oriented graph neural network training acceleration method.

[0046] The aforementioned computer-readable storage medium may be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.

[0047] The technical solutions of this disclosure can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes one or more instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in this disclosure. The aforementioned storage medium can be a non-transitory storage medium, including: a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and other media capable of storing program code. It can also be a transient storage medium.

[0048] The foregoing description and accompanying drawings fully illustrate embodiments of this disclosure to enable those skilled in the art to practice them. Other embodiments may include structural, logical, electrical, procedural, and other changes. The embodiments represent only possible variations. Individual components and functions are optional unless explicitly required, and the order of operation may vary. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. Moreover, the terminology used in this application is for describing embodiments only and is not intended to limit the claims. As used in the description of embodiments and claims, the singular forms “a,” “an,” and “the” are intended to equally include the plural forms unless the context clearly indicates otherwise. Similarly, the term “and / or” as used in this application means including one or more of the associated listed items and all possible combinations thereof. Additionally, when used in this application, the term "comprise" and its variations "comprises" and / or "comprising" refer to the presence of stated features, integrals, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof. Without further limitations, an element defined by the phrase "comprises a..." does not exclude the presence of other identical elements in the process, method, or apparatus that includes said element. In this document, each embodiment may focus on the differences from other embodiments, and similar or identical parts between embodiments can be referred to mutually. For methods, products, etc., disclosed in the embodiments, if they correspond to the method section disclosed in the embodiments, the relevant parts can be referred to the description of the method section.

[0049] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this disclosure. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0050] The methods and products (including but not limited to devices and equipment) disclosed in the embodiments herein can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of units may be merely a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the coupling or direct coupling or communication connection shown or discussed between each other may be through some interfaces, and the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected to implement this embodiment according to actual needs. In addition, the functional units in the embodiments of this disclosure 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.

[0051] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than that shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. In the descriptions corresponding to the flowcharts and block diagrams in the accompanying drawings, the operations or steps corresponding to different blocks may also occur in a different order than disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. Each block in a block diagram and / or flowchart, and combinations of blocks in a block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

Claims

1. A method for accelerating graph neural network training for CPU-FPGA, characterized in that, Includes the following steps: The CPU stores complete graph feature data and distributes different feature data to the storage modules of different FPGAs through data channels according to the load balancing algorithm, ensuring that there is no feature data dependency between FPGAs; The CPU partitions the GNN network model according to the network model configuration and the user-defined partition type, and then matches the partitioned model operators with the corresponding FPGA. The CPU completes the distribution and sampling of the partition model according to the sampler algorithm, generates the corresponding execution module bit stream according to the load type of each FPGA, and sends it to the FPGA; After the FPGA starts up, it reads the feature data, the load execution module completes the calculation task, and writes the result back to the CPU memory. The CPU receives the result data returned by the FPGA and completes the data update and weight update. The CPU resends the updated weight data to the corresponding FPGA for iterative training.

2. The method for accelerating graph neural network training for CPU-FPGA according to claim 1, characterized in that, The data channel between the CPU and FPGA is as follows: The synchronous GNN training algorithm is specified through two sets of application programming interfaces, including: a network processing program interface that receives user-specified graph segmentation and feature storage strategies, and a network algorithm abstraction program interface that specifies GNN model parameters. The input training algorithm is parsed to extract an abstract representation of the GNN training algorithm; Based on the abstract representation, a host program is generated by a software generator for graph segmentation, feature allocation, mini-batch generation, management task scheduling, and data communication. The accelerator generator generates synthesizable hardware designs, and the accelerator configuration parameters are determined based on the hardware design mapping engine.

3. The method for accelerating graph neural network training for CPU-FPGA according to claim 1, characterized in that, The load balancing algorithm includes: The graph partitioning blocks are allocated to resource-rich FPGAs for execution based on the graph partitioning algorithm; When an idle FPGA resource is detected and continuously allocated to the same FPGA, the subsequent graph segmentation blocks are automatically reallocated to the idle FPGA for execution.

4. The method for accelerating graph neural network training for CPU-FPGA according to claim 3, characterized in that, If the required vertex feature is not found in the local memory during FPGA execution, it sends a request to the CPU to obtain it from the CPU memory.

5. The method for accelerating graph neural network training for CPU-FPGA according to claim 1, characterized in that, The method also includes hardware optimization: In the preprocessing stage, the edges of the input graph are sorted by source vertex so that edges with the same source vertex are processed together. The feature data distribution module copies and distributes the source vertex feature vectors to each distributed processing unit. During the iteration process, if the source vertex of an edge is the same as the loaded feature vector, then the feature vector is reused; otherwise, wait for the next feature vector to be loaded and replaced. During the calculation process, the feature vector of the next source vertex is pre-fetched to the feature data distribution module.

6. A CPU-FPGA-oriented graph neural network training acceleration system using the method of any one of claims 1-5, comprising a host CPU and an FPGA, characterized in that: The host CPU includes: The feature data storage module is used to store complete graph feature data; The network model partitioning module is used to partition the GNN network model according to the network model configuration and user-defined partitioning type, and match the partitioned model operators to the corresponding FPGA. The sampler module is used to distribute and sample the partition model according to the sampler algorithm, and generate a bit stream according to the load type of each FPGA and send it to the FPGA. The data update module is used to receive the calculation results written back by the FPGA, update the data, and update the weight data. The weight sending module is used to resend the updated weight data to the corresponding FPGA; The FPGA includes: The storage module is used to store the feature data sent from the host CPU; The load execution module is used to read feature data and execute training tasks, and write the calculation results back to the host CPU.

7. The graph neural network training acceleration system for CPU-FPGA according to claim 6, characterized in that, The host CPU and FPGA interact through a data channel, which takes the GNN training algorithm, GNN model and platform metadata as input to generate the host program and accelerator generator.

8. The graph neural network training acceleration system for CPU-FPGA according to claim 7, characterized in that, The host program is used to manage task scheduling, data communication and mini-batch sampling, and the accelerator generator is an optimized GNN kernel function running on the FPGA.

9. A graph neural network training acceleration device for CPU-FPGA, comprising a processor and a memory storing program instructions, characterized in that, The processor is configured to execute, when running the program instructions, the CPU-FPGA-oriented graph neural network training acceleration method as described in any one of claims 1 to 5.

10. A storage medium storing program instructions, characterized in that, When the program instructions are executed, they perform the method for accelerating the training of graph neural networks on a CPU-FPGA as described in any one of claims 1 to 5.