Deep recommendation model training method and device, equipment and storage medium

By concurrently training multiple deep recommendation model jobs on heterogeneous platforms and scheduling tasks according to computing intensity and memory usage, the problem of low GPU resource utilization is solved and the throughput and overall performance of deep recommendation model training are improved.

CN118819817APending Publication Date: 2024-10-22SUN YAT SEN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410688906.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-30
Publication Date
2024-10-22

AI Technical Summary

Technical Problem

In the deep recommendation model training task, GPU resource utilization is low, resulting in insufficient throughput, and existing technology cannot fully utilize the computing capabilities of the CPU and GPU.

Method used

By training multiple jobs concurrently on a heterogeneous platform composed of GPUs and CPUs, scheduling tasks to the graphics processor or central processor according to computing intensity and memory usage improves GPU resource utilization.

Benefits of technology

It improves the throughput of deep recommendation model training tasks, optimizes resource allocation and utilization through concurrent training operations on heterogeneous platforms, and improves overall performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118819817A_ABST
    Figure CN118819817A_ABST
Patent Text Reader

Abstract

The invention discloses a deep recommendation model training method, device and equipment and a storage medium, and relates to the technical field of artificial intelligence, the deep recommendation model training method is applied to a model training system, and the model training system comprises a graphics processor and a central processor. The graphics processor and the central processor can simultaneously train a plurality of jobs, and the method comprises the following steps: obtaining the calculation intensity of a target training job of a to-be-trained depth recommendation model, the calculation intensity representing the consumption of calculation resources and the calculation complexity; determining a first operation type of the target training operation based on the calculation intensity; and scheduling the target training job to a graphics processor or a central processing unit for processing based on the first job type so as to train the to-be-trained deep recommendation model. The method can improve the throughput of the training task of the deep recommendation model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a deep recommendation model training method, device, equipment and storage medium. Background Art

[0002] The development of deep learning recommendation models has significantly improved the accuracy of information matching and provided strong support for many applications such as social networks, search engines, and e-commerce websites.

[0003] At present, in the deep recommendation model training task, heterogeneous hardware platforms equipped with CPU (Central Processing Unit) and GPU (Graphics Processing Unit) have become the dominant standard. Among them, CPU is usually used as an auxiliary device for data preprocessing and transmission, and GPU, as the smallest unit of a single training job, usually cannot fully utilize all computing power, resulting in low GPU resource utilization, which in turn affects the throughput of the deep recommendation model training task.

[0004] Therefore, how to improve the throughput of deep recommendation model training tasks is a problem that needs to be solved urgently. Summary of the invention

[0005] The main purpose of this application is to provide a deep recommendation model training method, device, equipment and storage medium, aiming to improve the throughput of deep recommendation model training tasks.

[0006] To achieve the above object, the present application provides a deep recommendation model training method, which is applied to a model training system, wherein the model training system includes a graphics processor and a central processing unit, wherein the graphics processor and the central processing unit are capable of concurrently training multiple jobs, and the deep recommendation model training method includes:

[0007] Obtaining the computing intensity of a target training job of a deep recommendation model to be trained, wherein the computing intensity represents the consumption of computing resources and the computing complexity;

[0008] Determining a first job type of the target training job based on the computing intensity;

[0009] The target training job is scheduled to the graphics processor or the central processor for processing based on the first job type, so as to train the deep recommendation model to be trained.

[0010] In one embodiment, the step of determining the first job type of the target training job based on the computing intensity includes:

[0011] Determining whether the computing intensity is greater than a preset computing intensity;

[0012] When the computing intensity is greater than the preset computing intensity, determining that the first job type of the target training job is computing intensive;

[0013] When the computing intensity is less than or equal to the preset computing intensity, a memory usage of the target training job is determined, and a first job type of the target training job is determined based on the memory usage.

[0014] In one embodiment, the step of determining the memory usage of the target training job includes:

[0015] Obtain input tensors, output tensors, weight tensors, temporary tensors, framework context, and optimizer status corresponding to the target training job;

[0016] Determine the union of the output tensor, the weight tensor and the temporary tensor as the amount of memory occupied by each operator of the target training job;

[0017] A union of the memory amounts, the input tensors, the framework context, and the optimizer state is determined as a memory footprint of the target training job.

[0018] In one embodiment, the step of determining the first job type of the target training job based on the memory usage includes:

[0019] Determine whether the memory usage is greater than a preset usage;

[0020] When the memory usage is greater than the preset usage, determining that the first job type of the target training job is memory intensive;

[0021] When the memory usage is less than or equal to the preset usage, it is determined that the first job type is bandwidth intensive.

[0022] In one embodiment, the step of scheduling the target training job to the graphics processor or the central processor for processing based on the first job type includes:

[0023] Determining a ratio between a maximum length of a queue of jobs to be processed by the graphics processor and a maximum length of a queue of jobs to be processed by the central processing unit;

[0024] Based on the memory usage of the target training job, the ratio, and the first job type, the target training job is scheduled to the graphics processor or the central processor for processing.

[0025] In one embodiment, the step of scheduling the target training job to the graphics processor or the central processor for processing based on the memory usage of the target training job, the ratio, and the first job type includes:

[0026] When the first job type is the memory intensive or the bandwidth intensive job, scheduling the target training job to the central processing unit for processing;

[0027] When the first job type is the computationally intensive type and the memory usage of the target training job and the ratio do not meet a preset condition, scheduling the target training job to the central processing unit for processing, wherein the preset condition is that the memory usage is less than or equal to the total memory of the graphics processing unit and the ratio is less than a preset threshold;

[0028] When the first job type is the computationally intensive type and the memory usage and the ratio meet a preset condition, the target training job is scheduled to the graphics processor for processing.

[0029] In one embodiment, the deep recommendation model training method further includes:

[0030] detecting a second job type of the real-time training job being processed by the graphics processor and the central processor;

[0031] In a case where the first job type is different from the second job type, the step of scheduling the target training job to the graphics processor or the central processing unit for processing based on the first job type is performed to train the deep recommendation model to be trained.

[0032] In addition, to achieve the above-mentioned purpose, the present application also provides a deep recommendation model training device, which is applied to a model training system, wherein the model training system includes a graphics processor and a central processing unit, wherein the graphics processor and the central processing unit are capable of concurrently training multiple jobs, and the deep recommendation model training device includes:

[0033] An acquisition module, used to acquire the computing intensity of a target training job of a deep recommendation model to be trained, wherein the computing intensity represents the consumption of computing resources and the computing complexity;

[0034] A determination module, configured to determine a first job type of the target training job based on the computing intensity;

[0035] A scheduling module is used to schedule the target training job to the graphics processor or the central processing unit for processing based on the first job type, so as to train the deep recommendation model to be trained.

[0036] In addition, to achieve the above-mentioned purpose, the present application also provides a storage medium, which is a computer-readable storage medium, and a program for implementing a deep recommendation model training method is stored on the computer-readable storage medium. The program for implementing the deep recommendation model training method is executed by a processor to implement the steps of the deep recommendation model training method as described above.

[0037] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the deep recommendation model training method as described above.

[0038] The present application provides a deep recommendation model training method, which is applied to a model training system, wherein the model training system includes an image processor and a central processing unit, and the image processor and the central processing unit can concurrently train multiple jobs. The present application first obtains the computing intensity of the target training job, wherein the computing intensity characterizes the consumption and computing complexity of the computing source, determines the job type (i.e., the first job type) of the target training job of the deep recommendation model to be trained based on the computing intensity, and schedules the target training job to a graphics processor or a central processing unit for processing based on the first job type, so as to train the deep recommendation model to be trained.

[0039] In this way, compared with the traditional deep recommendation model training method that uses GPU as the smallest unit of a single training job, the present application improves the resource utilization of GPU by concurrently training multiple jobs on a heterogeneous platform composed of GPU and CPU, thereby improving the throughput of deep recommendation model training tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0041] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0042] Figure 1 A schematic diagram of the structure of a traditional deep recommendation model involved in the first embodiment of the deep recommendation model training method of the present application;

[0043] Figure 2 This is a flowchart of the first embodiment of the deep recommendation model training method of the present application;

[0044] Figure 3 A schematic diagram of the basic architecture of ConfluxRec involved in an embodiment of the deep recommendation model training method of the present application;

[0045] Figure 4 A flowchart of a job scheduling decision involved in an embodiment of a deep recommendation model training method of the present application;

[0046] Figure 5 This is a schematic diagram of the module structure of the deep recommendation model training device of this application;

[0047] Figure 6 This is a schematic diagram of the device structure of the hardware operating environment involved in the deep recommendation model training method in the embodiment of the present application.

[0048] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0049] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0050] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0051] The main solution of the present application is: obtaining the computing intensity of the target training job of the deep recommendation model to be trained, wherein the computing intensity characterizes the consumption of computing resources and the computing complexity; determining the first job type of the target training job based on the computing intensity; scheduling the target training job to the graphics processor or the central processing unit for processing based on the first job type, so as to train the deep recommendation model to be trained.

[0052] At present, in the deep recommendation model training task, heterogeneous hardware platforms equipped with CPU (Central Processing Unit) and GPU (Graphics Processing Unit) have become the dominant standard. Among them, CPU is usually used as an auxiliary device for data preprocessing and transmission, and GPU, as the smallest unit of a single training job, usually cannot fully utilize all computing power, resulting in low GPU resource utilization, which in turn affects the throughput of the deep recommendation model training task.

[0053] This application improves the resource utilization of the GPU by concurrently training multiple jobs on a heterogeneous platform composed of a GPU and a CPU, thereby improving the throughput of the deep recommendation model training task.

[0054] It should be noted that if Figure 1 The figure shows a schematic diagram of the classic deep recommendation model structure, which includes two main components to process dense and sparse data: an MLP (Multi-layer perceptron) layer for continuous features and an embedding table for sparse features. The MLP layer processes numerical inputs, while the embedding table converts sparse inputs into dense vectors, where sparse feature 1 is input into embedding table 1, sparse feature 2 is input into embedding table 2, and dense features are input into the MLP layer. The feature vectors output by the embedding table and the output by the MLP layer are integrated to obtain the output features. In the deep recommendation model training task, heterogeneous hardware platforms equipped with CPUs and GPUs have become the dominant standard. Common practices include: using the CPU mainly as an auxiliary device for data preprocessing and transmission, and allocating the entire GPU as the minimum unit of a single training job. These practices are very effective for models in the fields of computer vision and natural language processing. Considering that both computer vision and natural language processing require intensive computing, the GPU may be saturated by a single training task, making the performance benefits of CPU collaborative computing negligible. However, compared with their counterparts such as CNN (Convolutional Neural Network) and Transformer (a deep learning model based on self-attention mechanism), deep recommendation models exhibit different computation, data access, and memory usage characteristics. Deep recommendation models not only contain computationally intensive operations such as matrix multiplication, but also include a large number of data-intensive embedding lookup operations. Therefore, deep recommendation models usually exhibit higher memory capacity requirements and significantly reduced arithmetic intensity. In addition, the limited memory capacity of GPUs may make some deep recommendation model training tasks impossible due to the large memory consumption of the embedding table.

[0055] Therefore, using traditional deep recommendation model training methods may lead to insufficient resource utilization in the following aspects: Modern CPUs in data centers usually contain dozens of cores. For deep recommendation model training tasks, as mentioned above, only a small number of cores are used for data preprocessing, and the remaining CPU cores are idle; allocating the entire GPU as the minimum granularity to a single-chip deep recommendation model training job has a low algorithm intensity and may lead to low GPU utilization.

[0056] Therefore, the present application can improve the utilization of GPU resources by co-locating multiple deep recommendation model training tasks on one GPU. At present, NVIDIA provides two task co-location mechanisms, multi-process service (MPS) and multi-instance service GPU (MIG), to share space on the GPU through resource partitioning. MPS only limits the use of GPU cores. When multiple jobs with large resource requirements are executed simultaneously, out of memory (OOM) errors may occur due to the overall high memory consumption of all jobs. MIG allocates fixed memory to each partition to prevent other jobs from causing OOM errors. However, MIG's fixed memory allocation limits the flexibility of resource allocation. Deep recommendation models need to process not only continuous input features, but also categorical input features. Their memory consumption fluctuates significantly with the embedding dimension and the categorical features of the input data set. Therefore, their memory consumption cannot be simply obtained by model parameters. In addition, not all co-executions will produce satisfactory results. Directly applying space sharing technology between multiple jobs without proper resource management may lead to resource contention and reduce performance.

[0057] It should be noted that the execution subject of this embodiment can be a model training system, wherein the model training system includes a graphics processor and a central processing unit, and the graphics processor and the central processing unit can train multiple jobs concurrently; it can also be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc.; or a deep recommendation model training device that can realize the above functions, etc. This embodiment does not specifically limit this. The following takes the model training system as the execution subject as an example to illustrate this embodiment and the following embodiments.

[0058] Based on this, this application proposes a deep recommendation model training method of the first embodiment, please refer to Figure 2 The deep recommendation model training method includes steps S10 to S30:

[0059] Step S10, obtaining the computing intensity of the target training job of the deep recommendation model to be trained, wherein the computing intensity represents the consumption of computing resources and the computing complexity;

[0060] It should be noted that the deep recommendation model to be trained refers to the deep recommendation model that needs to be trained, the training job that needs to be performed when training the deep recommendation model to be trained is the target training job, and the computational intensity of the training job represents the consumption of computing resources and the computational complexity.

[0061] The present application does not limit the specific method of how to obtain the computing intensity of the target training job. For example, in a feasible implementation, step S10 may include: obtaining the number of floating-point operations per second and the number of memory accesses of the target deep recommendation model training job; and determining the ratio between the number of floating-point operations per second and the number of memory accesses as the computing intensity of the target deep recommendation model training job.

[0062] Step S20, determining a first job type of the target training job based on the computing intensity;

[0063] It should be noted that the job type of the training job is compute-intensive, memory-intensive, or bandwidth-intensive.

[0064] In a first feasible implementation manner, step S20 may include steps S201 to S203:

[0065] Step S201, determining whether the computing intensity is greater than a preset computing intensity;

[0066] Step S202, when the computing intensity is greater than the preset computing intensity, determining that the first job type of the target training job is computing intensive;

[0067] Step S203: when the computing intensity is less than or equal to the preset computing intensity, determine the memory usage of the target training job, and determine the first job type of the target training job based on the memory usage.

[0068] It should be noted that when the job type of the target training job (hereinafter referred to as the first job type for distinction) is computationally intensive, it means that the computational intensity of the target training job is greater than the preset computational intensity, wherein the preset computational intensity is pre-set based on the computing power of the GPU, and this application does not limit the specific size of the preset computational intensity. For example, the preset computational intensity can be set to 15% of the GPU computing power. It should be understood that the preset computational intensity is an empirical value. In addition, the memory usage of the target training job is the amount of memory that the CPU or GPU needs to use when executing the target training job.

[0069] In this embodiment, it is determined whether the computing intensity of the target training job is greater than the preset computing intensity. When the computing intensity of the target training job is greater than the preset computing intensity, the first job type of the target training job is determined to be computing intensive. When the computing intensity of the target training job is less than or equal to the preset computing intensity, the memory usage of the target training job is determined, and then the first job type of the target training job is determined based on the memory usage.

[0070] In this embodiment, step S203 may include steps S2031 to S2033.

[0071] Step S2031, obtaining the input tensor, output tensor, weight tensor, temporary tensor, framework context and optimizer state corresponding to the target training job;

[0072] It should be noted that during the training of the model, the operator dynamically requests memory to store the required tensors. Tensors can be divided into four categories, namely input tensor (IT), output tensor (OT), weight tensor (WT) and temporary tensor (TT), where the input tensor is used as the input of the model. The input tensor consists of dense input and sparse input. Usually, the input tensor is two-dimensional, with the first dimension representing the batch size of the training and the second dimension representing the feature dimension of the data set; the output tensor stores the intermediate results of the forward calculation (for example, O2m) and the output gradient during back propagation; the weight tensor contains the weight of the operator and the weight gradient during back propagation. Usually two-dimensional, the first dimension of the weight tensor represents the input dimension of the operator, and the second dimension represents the output dimension. The weight and weight gradient corresponding to the same operator have the same shape. The weight tensor of DLRM will change significantly with the changes in the model structure and training data set; temporary tensors refer to the additional memory usage caused by the computing framework at runtime, which varies depending on the computing framework and device. In addition, in addition to the tensors mentioned above, the DLRM training process also contains two additional tensors: Framework Context (FT) and Optimizer State (OS). The framework context usually remains unchanged and is determined by the framework, while the optimizer state changes according to the choice of optimizer. Specifically, if the optimizer selected for training is SGD (Stochastic Gradient Descent), the optimizer state remains unchanged and is independent of the model structure. However, if the optimizer is Adam or AdamW, then the optimizer state becomes a linear function associated with the weight tensor, because these algorithms involve estimates of the first and second moments of the gradient.

[0073] Step S2032, determining the union of the output tensor, the weight tensor and the temporary tensor as the amount of memory occupied by each operator of the target training job;

[0074] It should be noted that all six components of memory consumption, OT, WT, and ET, are operator-specific. The memory consumption of IT depends on the batch size and the training dataset, and OS is completely determined by the optimizer selected during training. FT is model-independent. Therefore, the memory calculation formula for an operator is expressed as: MU(o) = OT(o) ∪ WT(o) ∪ ET(o), where o is the abbreviation of the operator and MU(o) represents the memory occupied by an operator.

[0075] Step S2033: Determine the union of the memory amounts, the input tensors, the framework context, and the optimizer state as the memory usage of the target training job.

[0076] In this embodiment, the calculation formula of the memory usage of the target training job is expressed as: in, Represents the union of the memory occupied by each operator in the target training job.

[0077] Thus, through the formal analysis of memory usage, this application proposes ConfluxRec (parallel deep recommendation model training framework), which can estimate the memory consumption of various deep recommendation model training tasks by statically processing model configuration and structure. Among them, ConfluxRec is the training framework for deep recommendation model training in this application.

[0078] In a second feasible implementation manner, step S20 may include steps S2034 to S2036:

[0079] Step S2034, determining whether the memory usage is greater than a preset usage;

[0080] Step S2035: when the memory usage is greater than the preset usage, determining that the first job type of the target training job is memory intensive;

[0081] Step S2036: When the memory usage is less than or equal to the preset usage, determine that the first job type is bandwidth intensive.

[0082] It should be noted that when the first job type of the target training job is memory intensive, it means that the memory usage of the target training job is greater than the preset usage, wherein the preset usage is pre-set based on the total memory of the GPU, and the present application does not limit the specific size of the preset usage, for example, the preset usage is set to 15% of the total GPU usage. It should be understood that the preset usage is an empirical value. When the first job type of the target training job is bandwidth intensive, it means that the target training job needs to access the memory more than the preset number of times, wherein the preset number of times is pre-set according to actual needs.

[0083] In this embodiment, it is determined whether the memory usage of the target training job is greater than the preset usage. When the memory usage is greater than the preset usage, the first job type of the target training job is determined to be memory intensive. When the memory usage is less than or equal to the preset usage, the first job type of the target training job is determined to be bandwidth intensive.

[0084] Exemplarily, ConfluxRec's monitoring module roughly divides the resources on the GPU and CPU into three categories: computing resources, bandwidth resources, and memory capacity resources. The memory usage of each DLRM training job can be calculated based on the above tensors, and other resource usage can be dynamically obtained through configuration file tools such as Netdata. The type of DLRM training job can be described by a Boolean triple (C, M, B), where C indicates whether the job is a compute-intensive job (i.e., the job type is compute-intensive), M indicates whether the job is a memory-intensive job (i.e., the job type is memory-intensive), and B indicates whether the job is a bandwidth-intensive job (i.e., the job type is bandwidth-intensive). If the GPU usage is higher than a certain threshold, C is set to 1, otherwise it is set to 0. The experiment obtained the optimal threshold, whose value is related to the hardware configuration.

[0085] Step S30: scheduling the target training job to the graphics processor or the central processor for processing based on the first job type, so as to train the deep recommendation model to be trained.

[0086] For example, Figure 3The figure shows the basic architecture of ConfluxRec, where ConfluxRec mainly consists of a job management module, a monitoring module, a CPU execution module, and a GPU execution module. The job management module implements a job queue structure that enables ConfluxRec to offload a portion of appropriate jobs to the CPU based on the job context of the monitoring module. The CPU and GPU job queues allow the use of scheduling policies to schedule and submit jobs in a more optimal order on the device, thereby maximizing overall throughput and resource utilization. The monitoring module collects resource usage of the system and each job. The CPU execution module and the GPU execution module obtain jobs from the job management module and obtain resource usage information from the monitoring module. Subsequently, they determine the order of job execution and follow the scheduling policy to maximize resource utilization and avoid out of memory (OOM) errors.

[0087] The present application provides a deep recommendation model training method, which is applied to a model training system, wherein the model training system includes an image processor and a central processing unit, and the image processor and the central processing unit can concurrently train multiple jobs. The present application first obtains the computing intensity of the target training job, wherein the computing intensity characterizes the consumption and computing complexity of the computing source, determines the job type (i.e., the first job type) of the target training job of the deep recommendation model to be trained based on the computing intensity, and schedules the target training job to a graphics processor or a central processing unit for processing based on the first job type, so as to train the deep recommendation model to be trained.

[0088] In this way, compared with the traditional deep recommendation model training method that uses GPU as the smallest unit of a single training job, the present application improves the resource utilization of GPU by concurrently training multiple jobs on a heterogeneous platform composed of GPU and CPU, thereby improving the throughput of deep recommendation model training tasks.

[0089] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. On this basis, the step S30 may include steps S301 to S302:

[0090] Step S301, determining the ratio between the maximum length of the job queue to be processed by the graphics processor and the maximum length of the job queue to be processed by the central processing unit;

[0091] In this embodiment, the maximum length of the GPU job queue is represented as GQ, the maximum length of the CPU job queue is represented as CQ, and the ratio between GQ and CQ is represented as α, where it should be noted that α is dynamically adjusted and obtained experimentally based on the load information of the jobs in the received job queue. When the proportion of computationally intensive jobs in the received job queue increases, ConfluxRec increases the value of α, otherwise, ConfluxRec will reduce the value of α. In this way, it can be ensured that when computationally intensive jobs increase, most of the computationally intensive jobs are taken over by the GPU to ensure training efficiency. In the embodiment of the present application, α is approximately in the range of 2 to 6.

[0092] Step S302: Based on the memory usage of the target training job, the ratio and the first job type, the target training job is scheduled to the graphics processor or the central processor for processing.

[0093] In this embodiment, a scheduling strategy is determined based on the memory usage of the target training job, the ratio, and the first job type to schedule the target training job to the graphics processor or the central processor for processing.

[0094] In this embodiment, the step S302 includes steps S3021 to S3023:

[0095] Step S3021: When the first job type is the memory intensive or the bandwidth intensive job, scheduling the target training job to the central processing unit for processing;

[0096] When the first job type is memory-intensive or bandwidth-intensive, the target training job is preferentially allocated to the CPU.

[0097] Step S3022: If the first job type is the computationally intensive job and the memory usage of the target training job and the ratio do not meet a preset condition, scheduling the target training job to the central processing unit for processing, wherein the preset condition is that the memory usage is less than or equal to the total memory of the graphics processing unit and the ratio is less than a preset threshold;

[0098] It should be noted that the above preset threshold is a preset value used to characterize the gap between the CPU queue length and the GPU queue length. This application does not limit the specific size of the preset threshold. It should be understood that the preset threshold is an empirical value. This application sets the preset threshold to 8 to characterize that the gap between the CPU queue length and the GPU queue length is large.

[0099] When the first job type is computationally intensive and the memory usage of the target training job is greater than the total memory of the graphics processor and / or the ratio is greater than or equal to a preset threshold, the target training job is scheduled to the central processing unit for processing.

[0100] Step S3023: When the first job type is the computationally intensive type and the memory usage and the ratio meet a preset condition, the target training job is scheduled to the graphics processor for processing.

[0101] When the first job type is computationally intensive and the memory usage is less than or equal to the total memory of the graphics processor and the ratio is less than a preset threshold, the target training job is scheduled to the graphics processor for processing to ensure processing efficiency.

[0102] In this way, the present application offloads part of the training work on the GPU to the CPU for processing, and uses space sharing technology on the GPU to improve resource utilization.

[0103] Based on the first embodiment and / or the second embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those in the first embodiment can be referred to the above introduction, and will not be repeated in the following. On this basis, the deep recommendation model training method of the present application also includes steps A10 to A20:

[0104] Step A10, detecting a second job type of the real-time training job being processed by the graphics processor and the central processor;

[0105] Step A20, when the first job type is different from the second job type, execute the step of scheduling the target training job to the graphics processor or the central processor for processing based on the first job type to train the deep recommendation model to be trained.

[0106] Obtain the job types of multiple real-time training jobs processed in parallel by the image processor and the central processing unit (hereinafter referred to as the second job type for distinction), and when the first job type is different from the second job type (i.e., complementary), schedule the target training job to the graphics processor or the central processing unit for processing based on the first job type to train the deep recommendation model to be trained.

[0107] For example, Figure 4The figure shows a job scheduling decision flow chart. Considering that static grouping may cause the comprehensive execution time of jobs in the same group to be limited by the slowest job, this application adopts a dynamic grouping strategy to determine the parallelism of jobs at runtime, that is, a task parallel strategy involving dynamic grouping. This strategy effectively reduces the time that jobs in the same group wait for each other. Considering the diverse computing modes of the deep recommendation model, not only the memory usage or computing intensity of the job is used as the optimization target, but the two are comprehensively considered, and the computing type of the job is used as the main optimization target. Through static analysis and evaluation of the job, tasks are divided into computing-intensive, memory-intensive, and bandwidth-intensive according to the memory usage and computing intensity of the task, and the job type of the job is used as the main criterion for job scheduling, that is, the job type is used as the optimization target. When scheduling tasks, resource complementarity is used as the main criterion for task scheduling to minimize resource contention.

[0108] The present application also provides a deep recommendation model training device, which is applied to a model training system. The model training system includes a graphics processor and a central processing unit. The graphics processor and the central processing unit can train multiple jobs concurrently. Figure 5 , the deep recommendation model training device comprises:

[0109] An acquisition module 10 is used to acquire the computing intensity of a target training job of a deep recommendation model to be trained, wherein the computing intensity represents the consumption of computing resources and the computing complexity;

[0110] A determination module 20, configured to determine a first job type of the target training job based on the computing intensity;

[0111] The scheduling module 30 is used to schedule the target training job to the graphics processor or the central processing unit for processing based on the first job type, so as to train the deep recommendation model to be trained.

[0112] Optionally, the determination module 20 is further configured to:

[0113] Determining whether the computing intensity is greater than a preset computing intensity;

[0114] When the computing intensity is greater than the preset computing intensity, determining that the first job type of the target training job is computing intensive;

[0115] When the computing intensity is less than or equal to the preset computing intensity, a memory usage of the target training job is determined, and a first job type of the target training job is determined based on the memory usage.

[0116] Optionally, the determination module 20 is further configured to:

[0117] Obtain input tensors, output tensors, weight tensors, temporary tensors, framework context, and optimizer status corresponding to the target training job;

[0118] Determine the union of the output tensor, the weight tensor and the temporary tensor as the amount of memory occupied by each operator of the target training job;

[0119] A union of the memory amounts, the input tensors, the framework context, and the optimizer state is determined as a memory footprint of the target training job.

[0120] Optionally, the determination module 20 is further configured to:

[0121] Determine whether the memory usage is greater than a preset usage;

[0122] When the memory usage is greater than the preset usage, determining that the first job type of the target training job is memory intensive;

[0123] When the memory usage is less than or equal to the preset usage, it is determined that the first job type is bandwidth intensive.

[0124] Optionally, the scheduling module 30 is further used for:

[0125] Determining a ratio between a maximum length of a queue of jobs to be processed by the graphics processor and a maximum length of a queue of jobs to be processed by the central processing unit;

[0126] Based on the memory usage of the target training job, the ratio, and the first job type, the target training job is scheduled to the graphics processor or the central processor for processing.

[0127] Optionally, the scheduling module 30 is further used for:

[0128] When the first job type is the memory intensive or the bandwidth intensive job, scheduling the target training job to the central processing unit for processing;

[0129] When the first job type is the computationally intensive type and the memory usage of the target training job and the ratio do not meet a preset condition, scheduling the target training job to the central processing unit for processing, wherein the preset condition is that the memory usage is less than or equal to the total memory of the graphics processing unit and the ratio is less than a preset threshold;

[0130] When the first job type is the computationally intensive type and the memory usage and the ratio meet a preset condition, the target training job is scheduled to the graphics processor for processing.

[0131] Optionally, the deep recommendation model training device further includes:

[0132] detecting a second job type of the real-time training job being processed by the graphics processor and the central processor;

[0133] In a case where the first job type is different from the second job type, the step of scheduling the target training job to the graphics processor or the central processing unit for processing based on the first job type is performed to train the deep recommendation model to be trained.

[0134] The deep recommendation model training device provided in the embodiment of the present application adopts the deep recommendation model training method in the above embodiment, which can solve the technical problem of how to improve the throughput of the deep recommendation model training task. Compared with the prior art, the beneficial effects of the deep recommendation model training device provided in the embodiment of the present application are the same as the beneficial effects of the deep recommendation model training method provided in the above embodiment, and the other technical features in the deep recommendation model training device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0135] The present application provides a deep recommendation model training device, which includes: at least one central processing unit and at least one graphics processing unit; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the deep recommendation model training method in the above-mentioned embodiment one.

[0136] Reference below Figure 6 , which shows a schematic diagram of the structure of a deep recommendation model training device suitable for implementing the embodiment of the present application. The deep recommendation model training device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc.

[0137] like Figure 6As shown, the deep recommendation model training device may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the deep recommendation model training device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the deep recommendation model training device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a deep recommendation model training device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or provided instead.

[0138] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0139] The deep recommendation model training device provided by the present application adopts the deep recommendation model training method in the above embodiment, which can solve the technical problems of deep recommendation model training. Compared with the prior art, the beneficial effects of the deep recommendation model training device provided by the present application are the same as the beneficial effects of the deep recommendation model training method provided by the above embodiment, and the other technical features in the deep recommendation model training device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0140] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0141] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0142] The present application provides a computer-readable storage medium having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the deep recommendation model training method in the above-mentioned embodiment.

[0143] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0144] The above-mentioned computer-readable storage medium may be included in the deep recommendation model training device; or it may exist independently without being assembled into the deep recommendation model training device.

[0145] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the deep recommendation model training device, the deep recommendation model training device: obtains the computing intensity of the target training job of the deep recommendation model to be trained, wherein the computing intensity characterizes the consumption of computing resources and the computing complexity; determines a first job type of the target training job based on the computing intensity; and schedules the target training job to the graphics processor or the central processing unit for processing based on the first job type, so as to train the deep recommendation model to be trained.

[0146] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0147] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0148] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0149] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned deep recommendation model training method, and can solve the technical problems of deep recommendation model training. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the deep recommendation model training method provided in the above-mentioned embodiment, and will not be repeated here.

[0150] An embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the deep recommendation model training method as described above.

[0151] The computer program product provided in this application can solve the technical problem of how to improve the heat dissipation efficiency of the model training system. Compared with the prior art, the beneficial effects of the computer program product provided in the embodiment of this application are the same as the beneficial effects of the deep recommendation model training method provided in the above embodiment, which will not be repeated here.

[0152] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent processing scope of the present application.

Claims

1. A deep recommendation model training method, characterized in that: The deep recommendation model training method is applied to a model training system, the model training system includes a graphics processor and a central processing unit, the graphics processor and the central processing unit can concurrently train multiple jobs, and the deep recommendation model training method includes: Obtaining the computing intensity of a target training job of a deep recommendation model to be trained, wherein the computing intensity represents the consumption of computing resources and the computing complexity; Determining a first job type of the target training job based on the computing intensity; The target training job is scheduled to the graphics processor or the central processor for processing based on the first job type, so as to train the deep recommendation model to be trained.

2. The method according to claim 1, characterized in that The step of determining the first job type of the target training job based on the computing intensity includes: Determining whether the computing intensity is greater than a preset computing intensity; When the computing intensity is greater than the preset computing intensity, determining that the first job type of the target training job is computing intensive; When the computing intensity is less than or equal to the preset computing intensity, a memory usage of the target training job is determined, and a first job type of the target training job is determined based on the memory usage.

3. The method according to claim 2, characterized in that The step of determining the memory usage of the target training job includes: Obtain input tensors, output tensors, weight tensors, temporary tensors, framework context, and optimizer status corresponding to the target training job; Determine the union of the output tensor, the weight tensor and the temporary tensor as the amount of memory occupied by each operator of the target training job; A union of the memory amounts, the input tensors, the framework context, and the optimizer state is determined as a memory footprint of the target training job.

4. The method according to claim 2, characterized in that The step of determining the first job type of the target training job based on the memory usage includes: Determine whether the memory usage is greater than a preset amount; When the memory usage is greater than the preset usage, determining that the first job type of the target training job is memory intensive; When the memory usage is less than or equal to the preset usage, it is determined that the first job type is bandwidth intensive.

5. The method according to claim 4, characterized in that The step of scheduling the target training job to the graphics processor or the central processor for processing based on the first job type includes: Determining a ratio between a maximum length of a queue of jobs to be processed by the graphics processor and a maximum length of a queue of jobs to be processed by the central processing unit; Based on the memory usage of the target training job, the ratio, and the first job type, the target training job is scheduled to the graphics processor or the central processor for processing.

6. The method according to claim 5, characterized in that The step of scheduling the target training job to the graphics processor or the central processor for processing based on the memory usage of the target training job, the ratio, and the first job type includes: When the first job type is the memory intensive or the bandwidth intensive job, scheduling the target training job to the central processing unit for processing; When the first job type is the computationally intensive type and the memory usage of the target training job and the ratio do not meet a preset condition, scheduling the target training job to the central processing unit for processing, wherein the preset condition is that the memory usage is less than or equal to the total memory of the graphics processing unit and the ratio is less than a preset threshold; When the first job type is the computationally intensive type and the memory usage and the ratio meet a preset condition, the target training job is scheduled to the graphics processor for processing.

7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: detecting a second job type of the real-time training job being processed by the graphics processor and the central processor; In a case where the first job type is different from the second job type, the step of scheduling the target training job to the graphics processor or the central processing unit for processing based on the first job type is performed to train the deep recommendation model to be trained.

8. A deep recommendation model training device, characterized in that: The deep recommendation model training device is applied to a model training system, the model training system includes a graphics processor and a central processing unit, the graphics processor and the central processing unit can concurrently train multiple jobs, and the deep recommendation model training device includes: An acquisition module, used to acquire the computing intensity of a target training job of a deep recommendation model to be trained, wherein the computing intensity represents the consumption of computing resources and the computing complexity; A determination module, configured to determine a first job type of the target training job based on the computing intensity; A scheduling module is used to schedule the target training job to the graphics processor or the central processing unit for processing based on the first job type, so as to train the deep recommendation model to be trained.

9. A deep recommendation model training device, characterized in that: The deep recommendation model training device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the deep recommendation model training method according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the deep recommendation model training method according to any one of claims 1 to 7 are implemented.