Distributed recommendation method and system based on near data processing

Through the reusable hardware architecture and efficient memory management of the near-memory processor ReCXL, combined with the embedded vector prefetching strategy, the inefficiency problem of DLRM training in CXL memory is solved, and the system's performance and throughput are significantly improved.

CN119127727AInactive Publication Date: 2024-12-13ZHEJIANG LAB

Patent Information

Application Number
CN202411605399.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2024-12-13
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing technology lacks effective and efficient NMP solutions to build a DLRM training system based on CXL memory, resulting in large hardware overhead, low training throughput, and long delays of DNN accelerators and CPU memory access latency.

Method used

Adopting the near-memory processor ReCXL, the DLRM training process is optimized through reusable hardware architecture, efficient memory management and embedded vector prefetching scheduling strategies, reducing hardware overhead, and improving memory access speed and training efficiency.

Benefits of technology

It realizes efficient reuse of hardware resources, shortens memory access time, improves the overall throughput and response speed of the system, reduces hardware costs, and improves training efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127727A_ABST
    Figure CN119127727A_ABST
Patent Text Reader

Abstract

The invention provides a distributed recommendation method and system based on near data processing, the recommendation system proposes a near memory processing (NMP) architecture by utilizing a memory decoupling technology and a memory expansion capability of Compute Express Link (CXL) so as to realize extensible and efficient recommendation model training; the design of the ReCXL comprises a uniform and hardware-efficient NMP framework, the training of the whole embedded layer can be executed in a CXL memory, the forward propagation and reverse propagation processes are completed, the data volume transmitted through the bandwidth-limited CXL is minimized, and the utilization of the bandwidth of the internal memory is improved. In addition, the design of the ReCXL utilizes flexible management of memory resources and optimization of bandwidth bottleneck in the training process of a recommendation system (DLRM). By implementing near-memory processing in the CXL memory pool, the ReCXL improves the training efficiency. The ReCXL also integrates software and hardware co-optimization techniques, including independent prefetching and fine-grained update scheduling, to maximize the utilization rate of hardware and further improve performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of information technology, and in particular relates to a distributed recommendation method and system based on near data processing. Background Art

[0002] Personalized recommendation systems play an increasingly important role in the Internet industry and are widely used in online services such as streaming media, e-commerce, and social media. Today's mainstream deep learning recommendation models (DLRMs) process both dense features containing personal information and sparse features containing related item indexes. The dense feature input is processed by the underlying fully connected multi-layer perceptron (MLP), while the sparse input is processed by the embedding layer, which maps the sparse features into dense vectors. Then, the outputs of the underlying MLP and the embedding layer are merged and input into the top MLP for prediction, and the final recommendation results, such as the probability of a user browsing a certain content, are further calculated.

[0003] Building a scalable and efficient distributed DLRM training system based on near data processing has the following challenges. First, existing memory-based NMP solutions only support DLRM inference, i.e., the embedding layer forward propagation stage, and are not optimized for DLRM training. The operations of the embedding table during training differ between the forward pass and the backward pass, i.e., gather-reduce in the forward pass and copy-merge-update in the backward pass, which requires different hardware implementations and may introduce additional hardware overhead. Second, the CPU and NMP processing units operate in different memory address spaces under CXL memory. The CPU manages the CXL device memory in the host physical address space, while the NMP processing units require device physical addresses to access it. Since the number of NMP processing units is quite large, direct host management will result in a lot of control and address translation overhead, which will weaken the benefits of near memory processing. Finally, in DLRM training, the DNN accelerator can only start after receiving the results from the embedding layer. Compared with local memory, CXL memory has longer access latency, which will delay the DNN accelerator process and reduce training throughput. Therefore, the existing technology still lacks effective techniques to build efficient NMP solutions for DLRM training within CXL memory. Summary of the invention

[0004] In view of the deficiencies of the prior art, the present invention provides a distributed recommendation method and system based on near data processing, aiming to solve at least one or more technical problems existing in the prior art.

[0005] To achieve the above object, the first aspect of the present invention provides a distributed recommendation method based on near data processing, comprising the following steps: (1) First, the host allocates memory space for the near memory processing device, initializes the memory address of the near memory processing device, and configures the memory controller; (2) Performing embedding layer lookup operations on the near-memory processing device, and working with the deep neural network (DNN) accelerator that executes the multi-layer perceptron (MLP) to complete the forward propagation process of the recommendation system and calculate the prediction results; (3) Use the predicted results and true values ​​to calculate the loss, and back-propagate the gradient information to update the parameter weights; (4) Pre-fetching technology is used to further optimize the training process of the recommendation system. The near-memory processor pre-fetches the embedding layer data of the next batch in the gap between forward propagation and backpropagation.

[0006] Furthermore, the step (2) comprises the following steps: (2.1) The processing unit retrieves the embedding vector from the memory and stores it in the input buffer; (2.2) Read the calculated partial sum from the partial sum buffer; (2.3) On a SIMD vector processor, use the embedded vector and partial sum calculations to obtain new partial sums; (2.4) According to the selection signal, the calculation result is stored in the partial sum buffer; (2.5) The device processor aggregates the results of the embedding layer in the parts and buffers of each near-memory processor; (2.6) The aggregation results of the embedding layer are transmitted to the DNN accelerator through the CXL link; (2.7) The DNN accelerator uses the results of the embedding layer and the bottom MLP to generate the final prediction probability of the recommendation system in the top MLP calculation.

[0007] Furthermore, the step (3) comprises the following steps: (3.1) The DNN accelerator uses the predicted results and the true values ​​to calculate the loss and calculate the gradient at the top MLP layer; (3.2) The DNN accelerator transfers the gradient to the near-memory processor via the CXL link; (3.3) The gradient is then stored in the gradient buffer; (3.4) On SIMD vector processors, the gradients are combined and calculated using sparse length and weighted sum operations; (3.5) Write the updated gradient back to the memory to complete the gradient update.

[0008] Furthermore, the step (4) comprises the following steps: (4.1) While forward propagating, pre-fetch the embedding layer vectors of the next batch; (4.2) Use the gradient to update the pre-fetched data that will be used in the next batch and updated in this round; (4.3) Set the update priority of pre-fetched data to be higher than the normal weight value, and schedule to ensure that the gradient of pre-fetched data is updated first each time to generate the next batch of input vectors, and then update the weight of the normal embedding vector; (4.4) For the updated weight data written back to the memory, when it is identified that prefetching is required, it is directly forwarded to the input buffer storage.

[0009] The second aspect of the present invention: a distributed recommendation system based on near data processing, which is used to jointly implement or execute the distributed recommendation method based on near data processing, including a near memory processor reusable hardware architecture module, an efficient device memory management module, and an embedded vector prefetch and scheduling strategy module: The near-memory processor can reuse hardware architecture modules. The ReCXL near-memory processor only needs to use three control signals to use the same set of hardware resources in the forward propagation and backward propagation stages, thus avoiding the additional hardware overhead caused by the design of different stages. The efficient device memory management module allocates a continuous memory area in the host physical address HPA space for each ReCXL device, allowing the host to map the data of the ReCXL device to the host's physical memory space, and further map it to the virtual address space through the operating system, providing a unified memory management method; The embedded vector prefetch and scheduling strategy module designs an intelligent prefetch strategy based on the computing characteristics of the DLRM model to shorten the time that the near-memory processor waits to read the embedded vector; through fine-grained update scheduling, when the updated data written back to the memory by ReCXL will be used in the next batch of training, it uses data forwarding technology to directly store the data in the input buffer, shortening the time required for memory access and training.

[0010] Furthermore, the efficient device memory management is specifically as follows: the host allocates a continuous memory area in the host physical address HPA space for each ReCXL device, and notifies the NMP device of its starting address HPAbase; the NMP device uses the obtained HPAbase internally to establish a mapping relationship between HPA and the device physical address DPA; the offset value of HPAbase minus HPAbase is DPA, and the NMP device can locate the corresponding data; when the NMP device needs to send data to the host, it only needs to add DPA to HPAbase to obtain HPA, thereby allowing the host to map the data of the ReCXL device to the physical memory space of the host, and further map it to the virtual address space through the operating system, providing a unified memory management method.

[0011] Further, the embedding vector prefetching strategy is configured as follows: when prefetching, the next batch of embedding vectors are read from DRAM and stored in the partial and buffers; because some of the prefetched vectors happen to be updated in this batch, it is necessary to use the gradients transmitted by the DNN accelerator through CXL to update the corresponding embedding vectors, and when performing the update of the pre-oriented vectors, the control signal S1 is set to 0, S2 is set to 0, and the prefetched embedding vectors are updated and calculated using the SIMD processor, corresponding to operation 6; when using the gradient to update the embedding vector, the embedding vectors for the next batch are updated first, and after the embedding vectors of the next batch are all updated, the training process of the next batch is executed, and the embedding layer reduction operation is performed using the prefetched data, and the calculation results are transmitted to the DNN accelerator through the CXL link, so that the DNN accelerator can start the training of the next batch as soon as possible, and at the same time, the NMP accelerator starts to update the embedding vectors in this batch that have not yet had their gradients updated.

[0012] Furthermore, the embedding vector scheduling strategy is configured as follows: in the back-propagation phase, when all embedding vectors are updated using gradients and written back to the memory in sequence, if a vector also needs to be updated in the next batch, the control signal S3 is set to 1, and the updated vector is directly forwarded to the input buffer, corresponding to operation 7; thereby eliminating one memory access in the next batch collection and aggregation prefetching and reducing the delay of each training iteration.

[0013] A third aspect of the present invention: an electronic device, characterized in that it comprises: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the distributed recommendation method based on recent data processing.

[0014] The fourth aspect of the present invention: a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the distributed recommendation method based on near data processing.

[0015] The beneficial technical effects of the present invention are as follows: The present invention provides a memory accelerator ReCXL for distributed recommendation system training based on near data processing, which is a near memory processing (NMP) architecture built on standard CXL memory technology. Compared with the existing ones that only support traditional memory expansion or independent hardware processing units, ReCXL innovatively integrates the reusability of hardware resources, efficient memory management, and intelligent pre-fetching and scheduling strategies into a unified system, and performs minimal hardware modifications. Hardware reusable hardware architecture, ReCXL realizes efficient reuse of hardware resources in different stages through only three control signals based on the non-overlapping characteristics of the forward propagation and backward propagation stages in DLRM model training, reduces hardware costs and improves the performance-power ratio of the system. Efficient device memory management method, ReCXL uses innovative memory mapping technology to allocate continuous memory areas for each device in the host physical address space, and establishes an efficient HPA to DPA mapping relationship through the starting address, which simplifies memory management and improves access speed. Embedding vector pre-fetching and scheduling strategy, ReCXL designed an intelligent pre-fetching strategy based on the computing characteristics of the DLRM model, which reduces the time that the near-memory processor waits to read the embedded vector, realizes the parallelization of data pre-fetching and processing, and significantly improves the overall throughput and response speed of the system. Fine-grained update scheduling, ReCXL further optimizes the update process, speeds up the data update speed by giving priority to pre-fetched embedded vectors, reduces the training iteration cycle, and further improves the training efficiency.

[0016] In summary, ReCXL provides an efficient, flexible, and cost-effective memory acceleration solution for distributed recommender system training through innovative architecture and strategies. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is an architecture diagram of a distributed recommendation system calculation based on near data processing according to a preferred embodiment of the present invention; Figure 2 is an architectural diagram of a reusable hardware device of a near memory processor according to a preferred embodiment of the present invention; Figure 3 is an example diagram of an efficient device memory management method according to a preferred embodiment of the present invention; Figure 4 It is an example diagram of an embedded vector prefetching and scheduling strategy of a preferred implementation mode provided by the present invention. DETAILED DESCRIPTION

[0018] The following is a detailed description with reference to the accompanying drawings.

[0019] The present invention provides a distributed recommendation method based on near data processing, comprising the following steps: (1) First, the host allocates memory space for the near memory processing device, initializes the memory address of the near memory processing device, and configures the memory controller; (2) Unify the forward propagation and back propagation operations of the embedding layer of the DLRM model in the recommendation system, and design a set of hardware to complete the tasks of the two stages; that is, perform the embedding layer lookup operation on the near-memory processing device, and work with the DNN accelerator that executes the MLP to complete the forward propagation process of the recommendation system and calculate the prediction results; use the prediction results and the true values ​​to calculate the loss, and back-propagate the gradient information to update the weight values ​​of the parameters; (3) Pre-fetching technology is used to optimize the training process. The near-memory processor pre-fetches the embedding layer data of the next batch in the gap between forward propagation and backpropagation.

[0020] The present invention also provides a distributed recommendation system based on near data processing, which is used to jointly implement or execute the distributed recommendation method based on near data processing, including a near memory processor reusable hardware architecture module, an efficient device memory management module, and an embedded vector prefetch and scheduling strategy module: Specifically, the ReCXL proposed in the present invention uses near-memory processing in CXL memory to support distributed recommender system training. ReCXL uses the abundant memory provided by the CXL memory pool and the high internal memory bandwidth provided by the NMP to achieve on-demand memory expansion and alleviate performance bottlenecks.

[0021] For the reusable hardware architecture module of the near-memory processor, the reusable hardware architecture design of the present invention allows the use of the same set of hardware resources in the forward and backward propagation stages by using only three control signals, based on the non-overlapping characteristics of the forward and backward propagation stages of the recommendation system DLRM training, thereby avoiding the overhead of additional hardware designed for different stages. This design not only reduces hardware costs, but also improves the performance-power ratio of the system. In the forward propagation stage, the hardware performs retrieval and aggregation operations of embedded vectors to generate prediction results; in the backward propagation stage, the same hardware is used to process the reverse flow of gradients and update model parameters. Through carefully designed control logic and data paths, efficient reuse of hardware resources is achieved.

[0022] The efficient device memory management module and the efficient device memory management method of the present invention involve an innovative memory mapping technology. The host allocates a continuous memory area in the host physical address (HPA) space for each ReCXL device and notifies the ReCXL device of its starting address (HPAbase). The ReCXL device uses this HPAbase internally to establish a mapping relationship between HPA and device physical address (DPA), thereby achieving efficient memory access and data management. This method not only simplifies the complexity of memory management, but also improves the speed of memory access and the efficiency of data transmission.

[0023] The embedded vector prefetching and scheduling strategy module, the embedded vector prefetching and scheduling strategy of the present invention is an optimization method for the cross-execution characteristics of the embedding layer and the MLP layer of the heavy DLRM model of the recommendation system. During the execution of the MLP layer, the ReCXL device will prefetch the next batch of data, thereby realizing pipeline processing of the data and reducing waiting time. This strategy makes full use of the computing characteristics of the DLRM model, reduces the waiting time of the near-memory processor by prefetching, realizes the parallelization of data prefetching and processing, and significantly improves the overall throughput and response speed of the system. For the prefetched embedded vectors, if they are also the embedded vectors that need to be updated using gradients in this batch, the calculation is updated first in the NMP processor to generate the next batch of embedded vectors as soon as possible.

[0024] Embodiment 1: For the inference process of training recommendation systems based on near data processing memory, the bandwidth of the PCIe bus used by CXL memory is significantly lower than the bandwidth of the host memory, which becomes a bottleneck limiting the training throughput of the recommendation system. The present invention provides a near memory processing architecture built on standard CXL memory technology, aiming to combine the scalable large capacity advantage of CXL memory with the advantage of near memory processing in reducing data transmission, thereby realizing efficient distributed recommendation system computing on CXL memory.

[0025] Specifically, the following are the specific implementation steps for the ReCXL device to perform DLRM training: Step 1: Configuration. Figure 1 As shown in the figure, the host initializes and configures the Near Memory Processing (NMP) device. The host first allocates the necessary memory space for the NMP device, which involves determining the storage capacity requirements of the device and the available system resources. Subsequently, the host initializes the memory address of the NMP device to ensure that each NMP device can be correctly addressed and its memory space can be identified and accessed by the system. Finally, the memory controller is configured, and each memory controller independently controls the corresponding NMP device to ensure the high scalability of the ReCXL system, which can be expanded to GB-level memory.

[0026] Step 2: Forward propagation. Figure 2 As shown in the figure, the control signal S1 is set to 0, S2 is set to 1, and the collect-reduce operation of the forward propagation of the embedding layer is performed on the NMP device. First, the embedding vector is searched in the memory, corresponding to operation 1. Then the embedding vector and the partial sum are input to the SIMD processor for calculation, and the calculated partial sum is written to the partial sum buffer, and the process is repeated until the embedding vector reduction result is obtained, corresponding to operation 2. The NMP device transmits the embedding layer calculation result to the DNN accelerator through the CXL link, corresponding to operation 3. After receiving the embedding layer result of the NMP device, the DNN accelerator performs MLP calculation and generates a prediction result.

[0027] Step 3: Back propagation. Figure 2 , control signal S1 is set to 1, S2 is set to 1, and the copy-merge-update operation of the embedding layer backpropagation is performed on the NMP device. The DNN accelerator uses the predicted results and the true values ​​to calculate the loss and calculates the gradient at the top MLP layer. Next, the DNN accelerator transmits the gradient for embedding layer update to the near memory processor through the CXL link and stores the gradient in the gradient buffer, corresponding to operation 4. Then, on the SIMD vector processor, the gradient is used to update the embedding vector by using sparse length sum and weighted sum operations. Finally, the updated gradient is written back to the memory to complete the gradient update of the DLRM embedding layer, corresponding to operation 5.

[0028] Embodiment 2: This embodiment provides an embedded vector prefetching and scheduling strategy based on a near memory processor, which can be used to jointly implement or execute a distributed recommendation system computing method based on near data processing as provided in Embodiment 1.

[0029] Specifically, see Figure 3 and Figure 4 , the distributed recommendation system computing method provided in this embodiment may at least include an efficient device memory management method, an embedded vector prefetching and scheduling strategy.

[0030] According to a preferred embodiment, Figure 3As shown, the efficient device memory management method is configured as follows: the host allocates a continuous memory area in the host physical address (HPA) space for each ReCXL device, and notifies the NMP device of its starting address (HPAbase). The NMP device uses this HPAbase internally to establish a mapping relationship between the HPA and the device physical address (DPA). The offset value of HPA minus the HPAbase is the DPA, and the NMP device can locate the corresponding data; when the NMP device needs to send data to the host, it only needs to add the DPA to the HPAbase to get the HPA, thereby allowing the host to map the data of the ReCXL device to the physical memory space of the host, and further map it to the virtual address space through the operating system, providing a unified memory management method.

[0031] According to a preferred embodiment, Figure 4 As shown in Figure 1, the embedding vector prefetching strategy is configured as follows: when prefetching, the next batch of embedding vectors are read from DRAM and stored in the partial and buffers; because some of the prefetched vectors are updated in this batch, the corresponding embedding vectors need to be updated using the gradients transmitted by the DNN accelerator through CXL. When performing the update of the pre-oriented vector, Figure 2 The control signals S1 and S2 in are set to 0 and 0, respectively. The pre-fetched embedding vectors are updated and calculated using the SIMD processor, corresponding to operation 6. When the gradient is used to update the embedding vectors, the embedding vectors for the next batch are updated first. After all the embedding vectors for the next batch are updated, the training process for the next batch is executed. The embedding layer reduction operation is performed using the pre-fetched data. The calculation results are transmitted to the DNN accelerator through the CXL link, so that the DNN accelerator can start the training of the next batch as soon as possible. At the same time, the NMP accelerator starts to update the embedding vectors in this batch that have not yet been updated with gradients.

[0032] According to a preferred embodiment, Figure 4 As shown in Figure 1, the embedding vector scheduling strategy is configured as follows: in the back-propagation phase, when all embedding vectors are updated using gradients and written back to the memory in sequence, if a vector also needs to be updated in the next batch, the control signal S3 is set to 1, and the updated vector is directly forwarded to the input buffer, corresponding to operation 7. This eliminates one memory access in the next batch collection and aggregation prefetch, and further reduces the latency of each training iteration.

[0033] In addition, the present invention also provides an electronic device, comprising: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the distributed recommendation method based on recent data processing.

[0034] A computer-readable storage medium stores computer instructions, which, when executed by a processor, implement the steps of a distributed recommendation method based on near data processing.

[0035] It should be noted that the above-mentioned specific embodiments are exemplary, and those skilled in the art can come up with various solutions inspired by the disclosure of the present invention, and these solutions also belong to the disclosure scope of the present invention and fall within the protection scope of the present invention. Those skilled in the art should understand that the present invention specification and its drawings are illustrative and do not constitute a limitation on the claims. The scope of protection of the present invention is defined by the claims and their equivalents. The present invention specification contains multiple inventive concepts, such as "preferably", "according to a preferred embodiment" or "optionally", all of which indicate that the corresponding paragraph discloses an independent concept, and the applicant reserves the right to file a divisional application based on each inventive concept.

Claims

1. A distributed recommendation method based on near data processing, characterized in that: The following steps are involved: (1) First, the host allocates memory space for the near memory processing device, initializes the memory address of the near memory processing device, and configures the memory controller; (2) Performing embedding layer lookup operations on the near-memory processing device, and working with the deep neural network (DNN) accelerator that executes the multi-layer perceptron (MLP) to complete the forward propagation process of the recommendation system and calculate the prediction results; (3) Use the predicted results and the true value to calculate the loss, and back-propagate the gradient information to update the weight value of the parameter; (4) Prefetching technology is used to further optimize the training process of the recommendation system. The near-memory processor prefetches the next batch of embedding layer data in the gap between forward propagation and backpropagation.

2. The distributed recommendation method based on near data processing according to claim 1, characterized in that: The step (2) includes the following steps: (2.1) The processing unit retrieves the embedding vector from the memory and stores it in the input buffer; (2.2) Read the calculated partial sum from the partial sum buffer; (2.3) On a SIMD vector processor, using the embedded vector and partial sum calculations to obtain new partial sums; (2.4) storing the calculation results in the partial sum buffer according to the selection signal; (2.5) The device processor aggregates the results of the embedding layer in the parts and buffers of each near-memory processor; (2.6) The aggregation results of the embedding layer are transmitted to the DNN accelerator through the CXL link; (2.7) The DNN accelerator uses the results of the embedding layer and the bottom MLP to calculate the final prediction probability of the recommendation system in the top MLP.

3. The distributed recommendation method based on near data processing according to claim 1, characterized in that: The step (3) includes the following steps: (3.1) The DNN accelerator calculates the loss using the predicted results and the true values, and calculates the gradient at the top MLP layer; (3.2) The DNN accelerator transfers gradients to the near-memory processor via the CXL link; (3.3) The gradient is then stored in the gradient buffer; (3.4) On SIMD vector processors, gradients are combined using sparse length sum and weighted sum operations. (3.5) Write the updated gradient back to the memory to complete the gradient update.

4. The distributed recommendation method based on near data processing according to claim 1, characterized in that: The step (4) includes the following steps: (4.1) While forward propagating, pre-fetch the embedding layer vectors of the next batch; (4.2) Use the gradient to update the pre-fetched data that will be used in the next batch of updates. (4.3) Setting the update priority of pre-fetched data higher than the normal weight value, the scheduling ensures that the gradient of pre-fetched data is updated first each time to generate the next batch of input vectors, and then the weight of the normal embedding vector is updated; (4.4) For the updated weight data written back to the memory, when it is identified that prefetching is required, it is directly forwarded to the input buffer storage.

5. A distributed recommendation system based on near data processing, characterized in that: The system is used to jointly implement or execute the distributed recommendation method based on near data processing according to any one of claims 1 to 4, including a near memory processor reusable hardware architecture module, an efficient device memory management module, and an embedded vector prefetch and scheduling strategy module: The near-memory processor can reuse hardware architecture modules. The ReCXL near-memory processor only needs three control signals to use the same set of hardware resources in the forward propagation and backward propagation stages, avoiding the additional hardware overhead caused by the design of different stages. The efficient device memory management module allocates a continuous memory area in the host physical address (HPA) space to each ReCXL device on the host side, allowing the host to map the data of the ReCXL device into the host's physical memory space, and further map it into the virtual address space through the operating system, providing a unified memory management method; The embedded vector prefetch and scheduling strategy module designs an intelligent prefetch strategy based on the computational characteristics of the DLRM model to shorten the time the near memory processor waits to read the embedded vector; Through fine-grained update scheduling, ReCXL uses data forwarding technology to directly store the updated data written back to the memory into the input buffer when it will be used in the next batch of training, shortening the time required for memory access and training.

6. A distributed recommendation system based on near data processing according to claim 5, characterized in that: The efficient device memory management is specifically as follows: the host allocates a continuous memory area in the host physical address (HPA) space for each ReCXL device and notifies the NMP device of its starting address (HPAbase); the NMP device uses the obtained HPAbase internally to establish a mapping relationship between the HPA and the device physical address (DPA); the offset value of the HPAbase minus the HPAbase is the DPA, and the NMP device can locate the corresponding data; when the NMP device needs to send data to the host, it only needs to add the DPA to the HPAbase to obtain the HPA, thereby allowing the host to map the ReCXL device data to the host's physical memory space, and further map it to the virtual address space through the operating system, providing a unified memory management method.

7. The distributed recommendation system based on near data processing according to claim 5, characterized in that: The embedding vector prefetching strategy is configured as follows: during prefetching, the next batch of embedding vectors are read from DRAM and stored in a partial sum buffer; because some of the prefetched vectors happen to be updated in this batch, it is necessary to use the gradients transmitted by the DNN accelerator through CXL to update the corresponding embedding vectors. When performing the update of the pre-oriented vector, the control signal S1 is set to 0 and S2 is set to 0, and the prefetched embedding vectors are updated and calculated using the SIMD processor, corresponding to operation 6; when using the gradient to update the embedding vector, the embedding vectors for the next batch are updated first. After all the embedding vectors for the next batch are updated, the training process for the next batch is executed, and the embedding layer reduction operation is performed using the prefetched data. The calculation results are transmitted to the DNN accelerator through the CXL link, allowing the DNN accelerator to start the training of the next batch as soon as possible. At the same time, the NMP accelerator starts to update the embedding vectors in this batch that have not yet been updated with gradients.

8. The distributed recommendation system based on near data processing according to claim 5, characterized in that: The embedding vector scheduling strategy is configured as follows: during the backpropagation phase, when all embedding vectors are updated using gradients and written back to memory in sequence, if a vector also needs to be updated in the next batch, the control signal S3 is set to 1, and the updated vector is directly forwarded to the input buffer, corresponding to operation 7; thereby eliminating a memory access in the next batch collection and aggregation prefetch and reducing the latency of each training iteration.

9. An electronic device, characterized in that: include: one or more processors; a memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the distributed recommendation method based on near data processing as described in any one of claims 1 to 4.

10. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed by a processor, the steps of the distributed recommendation method based on near data processing as described in any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Heterogeneous computing system and model training method and device thereof, medium and program product

    CN118396073A

  • Recommendation model reasoning acceleration system based on near-memory processing architecture

    CN118550697A

  • Neural network training with acceleration

    US20230147472A1

  • KR20240122167A

Cited By

  • High-efficiency hypergraph processing method and device based on variable resistance type memory

    CN119646268A

  • Data redundancy perception recommendation system calculation method and system

    CN120030239A

  • Control method of training and pushing expansion card, training and pushing expansion card and storage medium

    CN120144295A