WO2016173450A1 - Graphic processing device, resource service device, resource scheduling method and device thereof - Google Patents

Graphic processing device, resource service device, resource scheduling method and device thereof Download PDF

Info

Publication number
WO2016173450A1
WO2016173450A1 PCT/CN2016/079865 CN2016079865W WO2016173450A1 WO 2016173450 A1 WO2016173450 A1 WO 2016173450A1 CN 2016079865 W CN2016079865 W CN 2016079865W WO 2016173450 A1 WO2016173450 A1 WO 2016173450A1
Authority
WO
WIPO (PCT)
Prior art keywords
processing device
graphics processing
gpu
resource
scheduling
Prior art date
Application number
PCT/CN2016/079865
Other languages
French (fr)
Chinese (zh)
Inventor
孔建钢
Original Assignee
阿里巴巴集团控股有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2016173450A1 publication Critical patent/WO2016173450A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements

Definitions

  • the present application relates to the field of computer applications, and in particular, to a graphics processing device, a resource service device, a resource scheduling method, and a device.
  • GPU graphics processing unit
  • a scheduling method is that the resource scheduler dispatches only one GPU (for example, one GPU card) to one user's job.
  • Another scheduling method is that the resource scheduler simultaneously schedules one GPU to jobs for multiple users.
  • the inventors of the present application found that at least the following problems exist in the prior art: in the first scheduling method, since one GPU is exclusively occupied by one user's job, one user's job may not be able to Make full use of one GPU's resources, so there will be problems with low GPU resource utilization. In the second scheduling method, since one GPU is shared by multiple users' jobs, and multiple users are more likely to fully utilize the resources of one GPU, the utilization of GPU resources is improved to some extent.
  • the second scheduling method can improve the utilization of GPU resources, when multiple users' jobs share a GPU, the number of processes simultaneously opened by multiple users may be large. For each process, the GPU must Establishing a GPU context for it, so the number of GPU contexts built on the GPU can be very large, and it can also be switched in a large number of GPU contexts, creating and switching GPU contexts can cause huge overhead for GPU resources. , which leads to excessive sharing of GPU issues.
  • the embodiment of the present application provides a graphics processing device, a resource service device, a resource scheduling method, and a device, so as to improve the utilization of GPU resources, and also save the overhead of establishing and switching a GPU context. Further, the problem of excessive sharing of the GPU is avoided as much as possible.
  • a graphics processing device in which the logic unit is a minimum graphics processor GPU resource scheduling unit, the graphics processing device mapping at least one GPU multi-process proxy server GPU-MPS, the GPU-MPS is Scheduling the agent of the graphics processing device, a client of the GPU-MPS may schedule at least one of the logical units, one task process is a client of the GPU-MPS, and the maximum number of logical units that the graphics processing device may include M ⁇ N ⁇ K;
  • M is the number of logical units that can be scheduled by one client of the GPU-MPS
  • N is the maximum number of clients included in one GPU-MPS
  • K is the number of GPU-MPS mapped by the graphics processing device
  • M, N, and K are both Is a non-zero positive integer.
  • one client of the GPU-MPS can schedule one logical unit.
  • the graphics processing device maps a GPU multi-process proxy server.
  • the graphics processing device comprises M ⁇ N ⁇ K logical units.
  • a resource service device comprising the graphics processing device, the monitoring unit and the first communication unit according to any one of the above, wherein
  • a monitoring unit configured to monitor the number of remaining logic units in the graphics processing device during the current period when the monitoring period arrives;
  • a first communication unit configured to send the monitored data to a monitoring node in the cluster, so that the monitoring node updates the preset resource dynamic table by using the monitored data atom when the update period arrives;
  • the resource dynamic table includes at least the number of logical units remaining in the graphics processing device.
  • the resource service device is a slave node in the cluster.
  • the resource dynamic table further includes an actual usage rate of the graphics processing device; and the monitoring unit is further configured to monitor an actual usage rate of the local graphics processing device in the current period when the monitoring period arrives.
  • a resource scheduling method which is applied to the resource service device according to any one of the preceding claims, the method comprising:
  • the resource dynamic table includes at least the number of logical units remaining in the graphics processing device.
  • the resource dynamic table further includes an actual usage rate of the graphics processing device
  • the scheduling logic unit for the target job is:
  • the resource dynamic table further includes an operation state of the resource service device in the resource server cluster and an operation state of the graphics processing device in the resource service device; the method further includes:
  • the atom Upon arrival of the update cycle, the atom updates the operational state of the resource service device in the resource dynamics table and the operational state of the graphics processing device, the operational state including work and non-work.
  • a resource scheduling apparatus comprising: the resource service apparatus according to any one of the preceding items, comprising:
  • a second communication unit configured to receive a scheduling request for scheduling a GPU resource of the graphics processor for the target job, where the number of logical units requesting scheduling is indicated in the scheduling request;
  • a response unit configured to, in response to the scheduling request, search for a graphics processing device whose number of remaining logical units is not zero from a preset resource dynamic table, and according to the number of indications of the scheduling request, from the found graphics Scheduling a logical unit for the target job in the processing device;
  • the resource dynamic table includes at least the number of logical units remaining in the graphics processing device.
  • the resource dynamic table further includes an actual usage rate of the graphics processing device
  • the response unit is configured to: in response to the scheduling request, search for a graphics processing device that is less than or equal to a preset maximum threshold and the number of remaining logical units is not zero from a preset resource dynamic table. And scheduling, according to the quantity indicated by the scheduling request, a logical unit for the target job from the found graphics processing device.
  • the resource dynamic table further includes an operation status of the resource service device in the resource server cluster and an operation status of the graphics processing device in the resource service device; the device further includes:
  • an update unit configured to, when the update period arrives, atomically update an operation state of the resource service device in the resource dynamic table and an operation state of the graphics processing device, where the work state includes work and non-work.
  • the logical unit Since the logical unit is the smallest GPU resource scheduling unit, it can be different in one graphics processing device. The logical unit is scheduled to different task processes, so that different user jobs share the same graphics processing device to ensure the utilization of GPU resources in the graphics processing device.
  • this application utilizes GPU-MPS technology to make a task process a client of GPU-MPS, so that GPU-MPS can manage the task process just like the management client. Since all clients in a GPU-MPS share a GPU context, in a GPU multi-process proxy server, multiple task processes as their clients only need to share one GPU context.
  • the logic unit is scheduled based on the actual usage rate of each GPU, and the problem of excessive GPU sharing may also be avoided.
  • FIG. 1 schematically shows a block diagram of a graphics processing apparatus according to an embodiment of the present application
  • FIG. 2 schematically shows a block diagram of another graphics processing apparatus according to an embodiment of the present application
  • FIG. 3 schematically shows a block diagram of another graphics processing apparatus according to an embodiment of the present application.
  • FIG. 4 schematically shows a block diagram of another graphics processing apparatus according to an embodiment of the present application.
  • FIG. 5 schematically shows a structural diagram of a resource service device according to an embodiment of the present application
  • FIG. 6 schematically illustrates an exemplary application scenario in which an embodiment of the present application may be implemented
  • FIG. 7 is a block diagram showing a structure of a resource scheduling apparatus according to an embodiment of the present application.
  • FIG. 8 schematically illustrates a flow chart of a resource scheduling method in accordance with an embodiment of the present application.
  • a job submitted by a user is composed of multiple tasks, and one task is completed by a task process. Therefore, scheduling GPU resources for a user's job is actually scheduling GPU resources for all task processes that complete the job.
  • FIG. 1 schematically illustrates a junction of a graphics processing apparatus according to an embodiment of the present application.
  • the logic unit 11 is a minimum GPU resource scheduling unit
  • the graphics processing device maps a GPU-Multiple Process Server (GPU-MPS) 20, which is a GPU-
  • the MPS 20 has a maximum number of clients of 16, and the GPU-MPS 20 is a proxy for scheduling the graphics processing device 10.
  • One client of the GPU-MPS 20 can schedule one logical unit 11, and one task process is the GPU-MPS.
  • the graphics processing device can include a maximum of 16 logical units.
  • this application utilizes GPU-MPS technology to make a task process a client of GPU-MPS, so that GPU-MPS can manage task processes like management clients. Since all clients in a GPU-MPS share a GPU context, in a GPU-MPS, multiple task processes as their clients only need to share a single GPU context.
  • a graphics processing device maps a GPU-MPS
  • the number of logical units can be arbitrarily configured between 1 and 16.
  • a client of GPU-MPS 20 can schedule multiple logical units, such as 2, 3, or even more logical units, in addition to scheduling one logical unit. For example, when one client of the GPU-MPS 20 can schedule two logical units, and the graphics processing device 10 still maps one GPU-MPS 20, the maximum number of logical units that the graphics processing device 10 can include is 32. 2 is shown. It can be seen that, in the case that the number of GPU-MPSs 20 mapped by the graphics processing device 10 is fixed, the maximum number of logical units that the graphics processing device 10 can include and one client schedulable logic of the GPU-MPS 20 The number of units is related and proportional.
  • the graphics processing apparatus 10 may map only one GPU-MPS 20, or may map multiple GPU-MPSs 20, such as two, three, or even more GPU-MPSs 20.
  • the graphics processing device 10 maps two GPU-MPSs 20, and one client of the GPU-MPS 20 can schedule one logical unit, the graphics processing device can include 32 maximum logical units, as shown in FIG. Show. It can be seen that, in the case that the number of logical units that can be scheduled by one client of the GPU-MPS 20 is fixed, the maximum number of logical units that the graphics processing device 10 can include is mapped to the GPU-MPS 20 mapped by the graphics processing apparatus 10. The number is related and proportional.
  • the maximum number of logical units that the graphics processing device 10 can include is both a guest of the GPU-MPS20.
  • the number of logical units that can be scheduled by the terminal is related to the number of GPU-MPSs 20 mapped by the graphics processing device 10, and is proportional. For example, when the graphics processing device 10 maps two GPU-MPSs 20, and one client of the GPU-MPS 20 can schedule two logical units, the graphics processing device can include 64 maximum logical units, as shown in FIG. Shown.
  • the maximum number of logical units that can be included is M ⁇ N ⁇ K, where M is the number of configurable logical units of one client of the GPU-MPS, and N is a GPU-MPS.
  • M is the number of configurable logical units of one client of the GPU-MPS
  • N is a GPU-MPS.
  • the maximum number of clients included, K is the number of GPU-MPS mapped by the graphics processing device, and M, N, and K are all non-zero positive integers.
  • the logic unit in the graphics processing device 10 When the logic unit in the graphics processing device 10 is arranged, it may be arranged within the maximum number of logical units that the graphics processing device 10 can include.
  • the graphics processing apparatus 10 includes M x N x K logic units.
  • one client of the GPU-MPS can schedule one logical unit, and the graphics processing device 10 maps one GPU-MPS 20. It will be appreciated that in this preferred embodiment, a graphics processing device includes a maximum number of logical units equal to the maximum number of clients included in a GPU-MPS.
  • the graphics processing device 10 is physically a graphics processor.
  • FIG. 5 is a schematic structural diagram of a resource service apparatus according to an embodiment of the present application, wherein the resource service apparatus 50 includes at least one graphics processing apparatus 51. (for example, two graphics processing devices 511 and 512), a monitoring unit 52, and a first communication unit 53.
  • the graphics processing device 511 is mapped to the GPU-MPS 611.
  • One client of the GPU-MPS 611 can call a logic unit in the graphics processing device 511.
  • the graphics processing device 512 is mapped to the GPU-MPS 612, and a client of the GPU-MPS 612.
  • One of the logic units in the graphics processing device 512 can be invoked.
  • a task process can be a client of the GPU-MPS 611 or a client of the GPU-MPS 612.
  • the monitoring unit 52 is configured to monitor the number of remaining logical units in the graphics processing device in the current period when the monitoring period arrives;
  • the first communication unit 53 is configured to send the monitored data to the monitoring node in the cluster, so that the monitoring node updates the preset resource dynamic table by using the monitored data atom when the update period arrives;
  • the resource dynamic table includes at least the number of logical units remaining in the graphics processing device.
  • Each of the logical units generates a PIPE file in the specified path of the resource server. Once the logical unit is used, the corresponding PIPE file is generated. Therefore, the monitoring unit 11 only needs to monitor the path. The number of PIPEs can be used to determine the number of remaining logical units.
  • the update operation can support offline scheduling, that is, the resource is not directly used by the unified scheduler, but the GPU resource is directly used locally. ).
  • the structure of the resource service device shown in FIG. 5 is only an example, and it is also possible to have a larger number of graphics processing devices.
  • the present application also does not limit the number of GPU-MPSs mapped by each graphics processing device, the number of logical units that one client of GPU-MPS can call, and the number of logical units that each graphics processing device includes.
  • the resource service device 50 is physically a resource server.
  • the resource server can be a slave node in the cluster.
  • FIG. 6 schematically illustrates an exemplary application scenario in which embodiments may be implemented in accordance with embodiments of the present application.
  • a cluster there are a plurality of slave nodes 10 (only one slave node is shown in FIG. 1 for convenience of description and display), one monitoring node 20 and one monitoring node 30.
  • the slave node 10 is a resource server, and the slave node 10 includes a plurality of graphics processors (GPUs). Only two GPUs are shown in FIG. 1, namely, GPU-0 and GPU-1, and each GPU is used.
  • GPUs graphics processors
  • MPS-0 is the agent that schedules GPU-0
  • MPS-1 is the agent that schedules GPU-1
  • MPS-0 and MPS-1 each have 16 clients, one customer of MPS-0
  • the terminal can schedule one logical unit of GPU-0.
  • One client of MPS-1 can schedule one logical unit of GPU-1.
  • One task process in the user job can be either a client of MPS-0 or an MPS. -1 for a client.
  • the task process is connected to the agent of GPU-0 to which the logical unit belongs, that is, connected to MPS- 0 on.
  • the monitoring node 30 includes a job management device 31 and a resource scheduling device 32.
  • the job management device 31 first receives a request 61 sent by the cluster client 60 to allocate GPU resources for the target user job, and in the request 61, a logical unit requesting scheduling is indicated. quantity.
  • the job management device 31 forwards the request to the resource scheduling device 32.
  • the resource scheduling apparatus 32 includes a second communication unit 321 and a response unit 322, wherein the second communication unit 321 is configured to receive a scheduling request for scheduling a graphics processor GPU resource for a target job.
  • the response unit 322 is configured to: in response to the scheduling request, search for a graphics processing device whose number of remaining logical units is not zero from a preset resource dynamic table, and according to the quantity indicated by the scheduling request, from the search to a logic processing unit for the target job in the graphics processing device; wherein the resource dynamic table includes at least a graph The number of logical units remaining in the processing device.
  • the resource scheduling device 32 may schedule the logical unit using any of the prior art scheduling methods. For example, First Fit scheduling, Best fit scheduling, Backfill scheduling, or CFS scheduling.
  • the resource scheduling device 32 generates a resource dynamic table, and dynamically updates the number of logical units remaining in the GPU-0 and GPU-1 on the resource dynamic table by the slave node 10, so that the resource scheduling device 32 can according to the remaining logical units of each GPU. Perform resource scheduling.
  • the remaining logical unit refers to the logical unit that is not scheduled to the task process.
  • the resource dynamic table is also dynamically maintained by other slave nodes, and the resource dynamic table further includes the number of logical units remaining in each GPU on the other slave nodes. That is, the resource dynamic table contains the number of logical units remaining in the GPU on all slave nodes.
  • the resource dynamic table may further include the resource dynamic table including the identifiers of all the slave nodes and the identifiers of all the GPUs in each slave node to determine the location of each logical unit.
  • the resource dynamic table includes the identifier of the slave node 10 (for example, the identifier may be a global number of the slave node 10 in the cluster), the GPU-0 and the GPU included in the slave node 10. The identifier of -1, and the number of logical units remaining in GPU-0 and GPU-1.
  • the actual use of resources may be larger than its scheduling resources.
  • scheduling resources in the GPU for different jobs it is also easy to create problems of over-sharing the GPU.
  • the actual usage rate of each GPU may also be maintained in the resource dynamic table, so that the resource scheduling apparatus schedules the logical units in each GPU according to the actual usage rate of each GPU. That is, the resource dynamic table includes the identifiers of all the slave nodes in the cluster, the identifiers of all the GPUs in each slave node, the number of remaining logical units in each GPU, and the actual usage rate of each GPU.
  • the resource dynamic table further includes the actual usage rate of GPU-0 and GPU-1.
  • the monitoring unit 11 is further configured to monitor the GPU in the current cycle when the monitoring period arrives. -0 and GPU-1 actual usage.
  • the response unit 322 in the resource scheduling device 32 is configured to: in response to the scheduling request, find that the actual usage rate is less than or equal to a preset maximum threshold and remaining from the preset resource dynamic table.
  • the graphics processing device of the number of logical units is not zero, and the logical unit is scheduled for the target job from the found graphics processing device according to the number indicated by the scheduling request.
  • the resource dynamic table may further include an operating state of the resource serving device in the resource server cluster and an operating state of the graphics processing device in the resource serving device, and is scheduled by the resource.
  • an update unit configured to: when the update period arrives, atomically update an operation state of the resource service device in the resource dynamic table and an operation state and a use state of the graphics processing device, where the work state includes work and non-work, and the use state includes logic Unit usage and overall utilization.
  • a slave node or GPU or a slave node or GPU fails, its working state changes from work to inoperative.
  • a new slave node or a new GPU is added, its working state is set to work.
  • the update unit 323 may initialize the resource dynamic table when the cluster is initialized, or may update the resource dynamic table when the task needs to be migrated due to job migration failure or QoS during job migration. . In addition, the update unit may further update the number of remaining logical units in each GPU in the resource dynamic table according to the resource scheduling response.
  • FIG. 8 is a flowchart of a resource scheduling method according to an embodiment of the present application.
  • the method may be performed by the resource scheduling device 32.
  • the method may include, for example:
  • Step 801 Receive a scheduling request for scheduling a graphics processor GPU resource for a target job, where the number of logical units requesting scheduling is indicated in the scheduling request.
  • Step 802 In response to the scheduling request, searching for a graphics processing device whose number of remaining logical units is not zero from a preset resource dynamic table, and searching for the graphics processing device according to the quantity indicated by the scheduling request. Scheduling a logical unit for the target job.
  • the resource dynamic table includes at least the number of logical units remaining in the graphics processing device.
  • the resource dynamic table further includes an actual usage rate of the graphics processing device; the step 802 is:
  • the resource dynamic table further includes an operation status of the resource service device in the resource server cluster and an operation status of the graphics processing device in the resource service device; the method may further include: updating When the cycle arrives, the atom updates the working state of the resource service device in the resource dynamic table and the working state of the graphics processing device, the working state including work and non-work.
  • this application utilizes GPU-MPS technology to make a task process a client of GPU-MPS, so that GPU-MPS can manage the task process just like the management client. Since all clients in a GPU-MPS share a GPU context, in a GPU-MPS, multiple task processes as their clients only need to share a single GPU context.
  • the logic unit is scheduled based on the actual usage rate of each GPU, and the problem of excessive GPU sharing may also be avoided.
  • the disclosed systems, devices, and methods may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined. Or it can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may be or may be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware and can be implemented in the form of a software functional unit.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Information Transfer Between Computers (AREA)
  • Processing Or Creating Images (AREA)

Abstract

Disclosed in an embodiment of this application is a graphic processing device. A logical unit is the minimal GPU resource scheduling unit. The graphic processing device maps at least one GPU multi-process proxy server (GPU-MPS), and the GPU-MPS is a proxy for scheduling the graphic processing device. One client of the GPU-MPS can schedule at least one logical unit. One task process corresponds to one client of the GPU-MPS. The maximum number of logical units which can be comprised by the graphic processing device is M×N×K; M is the number of the logical units which can be scheduled by one client of the GPU-MPS; N is the maximum number of the client comprised by the GPU-MPS; and K is the number of the GPU-MPS mapped by the graphic processing device. By this application, the utilization rate of GPU resources is improved, at the same time, the cost of establishing and switching the GPU context for the graphic processing device is saved. Also disclosed in this application are a resource service device, resource scheduling method and device thereof.

Description

图形处理装置、资源服务装置、资源调度方法和装置Graphics processing device, resource service device, resource scheduling method and device
本申请要求2015年04月28日递交的申请号为201510208923.0、发明名称为“图形处理装置、资源服务装置、资源调度方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 201510208923.0, entitled "Graphic Processing Device, Resource Service Device, Resource Scheduling Method and Device", filed on April 28, 2015, the entire contents of which are incorporated herein by reference. In the application.
技术领域Technical field
本申请涉及计算机应用领域,特别是涉及图形处理装置、资源服务装置、资源调度方法和装置。The present application relates to the field of computer applications, and in particular, to a graphics processing device, a resource service device, a resource scheduling method, and a device.
背景技术Background technique
由于在现代的计算机中,图形的处理越来越重要,因此,需要一种专门用于图形处理的核心处理器,而图形处理器(GPU,Graphics Processing Unit)就是一种专门用于图形处理的器件。与此同时,把GPU的强大的计算能力处理通用计算(GPGPU,General Purpose GPU)也日益盛行,用于各种高性能计算集群中。Since the processing of graphics is becoming more and more important in modern computers, a core processor dedicated to graphics processing is required, and a graphics processing unit (GPU) is a type of graphics processing. Device. At the same time, the GPU's powerful computing power (General Purpose GPU) is also becoming more and more popular in various high-performance computing clusters.
目前,在现有的GPU集群技术中,当处理用户提交的作业(job)时,主要存在两种GPU资源的调度方法。其中,一种调度方法是,资源调度器将一个GPU(如,一张GPU卡)只调度给一个用户的作业。另一种调度方法是,资源调度器将一个GPU同时调度给多个用户的作业。Currently, in the existing GPU clustering technology, when processing a job submitted by a user, there are mainly two scheduling methods of GPU resources. Among them, a scheduling method is that the resource scheduler dispatches only one GPU (for example, one GPU card) to one user's job. Another scheduling method is that the resource scheduler simultaneously schedules one GPU to jobs for multiple users.
在实现本申请的过程中,本申请的发明人发现现有技术中至少存在如下问题:在第一种调度方法中,由于一个GPU只被一个用户的作业独占,而一个用户的作业很可能无法充分利用一个GPU的资源,因此会出现GPU资源利用率低的问题。而在第二种调度方法中,由于一个GPU是被多个用户的作业共享的,而多个用户更有可能会充分利用一个GPU的资源,因此一定程度上提高了GPU资源的利用率。In the process of implementing the present application, the inventors of the present application found that at least the following problems exist in the prior art: in the first scheduling method, since one GPU is exclusively occupied by one user's job, one user's job may not be able to Make full use of one GPU's resources, so there will be problems with low GPU resource utilization. In the second scheduling method, since one GPU is shared by multiple users' jobs, and multiple users are more likely to fully utilize the resources of one GPU, the utilization of GPU resources is improved to some extent.
虽然第二种调度方法可以提高GPU资源的利用率,但是,当多个用户的作业共享一个GPU时,多个用户的作业同时开启的进程数可能会很大,对于每一个进程,GPU都要为其建立一个GPU上下文,因此,在GPU上建立的GPU上下文的数量也就可能非常大,并且,还会在数量众多的GPU上下文中进行切换,建立和切换GPU上下文会使GPU资源产生巨大开销,从而导致过度共享GPU问题。Although the second scheduling method can improve the utilization of GPU resources, when multiple users' jobs share a GPU, the number of processes simultaneously opened by multiple users may be large. For each process, the GPU must Establishing a GPU context for it, so the number of GPU contexts built on the GPU can be very large, and it can also be switched in a large number of GPU contexts, creating and switching GPU contexts can cause huge overhead for GPU resources. , which leads to excessive sharing of GPU issues.
发明内容Summary of the invention
为了解决上述技术问题,本申请实施例提供了图形处理装置、资源服务装置、资源调度方法和装置,以在提高GPU资源的利用率的同时,也能节约建立和切换GPU上下文的开销。进一步的,尽可能地避免GPU的过度共享的问题。In order to solve the above technical problem, the embodiment of the present application provides a graphics processing device, a resource service device, a resource scheduling method, and a device, so as to improve the utilization of GPU resources, and also save the overhead of establishing and switching a GPU context. Further, the problem of excessive sharing of the GPU is avoided as much as possible.
本申请实施例公开了如下技术方案:The embodiment of the present application discloses the following technical solutions:
一种图形处理装置,在所述图形处理装置中,逻辑单元是最小的图形处理器GPU资源调度单元,所述图形处理装置映射至少一个GPU多进程代理服务器GPU-MPS,所述GPU-MPS为调度所述图形处理装置的代理,GPU-MPS的一个客户端可调度至少一个所述逻辑单元,一个任务进程为GPU-MPS的一个客户端,所述图形处理装置可包含的最大逻辑单元数为M×N×K个;A graphics processing device, in which the logic unit is a minimum graphics processor GPU resource scheduling unit, the graphics processing device mapping at least one GPU multi-process proxy server GPU-MPS, the GPU-MPS is Scheduling the agent of the graphics processing device, a client of the GPU-MPS may schedule at least one of the logical units, one task process is a client of the GPU-MPS, and the maximum number of logical units that the graphics processing device may include M × N × K;
其中,M为GPU-MPS的一个客户端可调度的逻辑单元数,N为一个GPU-MPS包含的最大客户端数,K为所述图形处理装置映射的GPU-MPS数,M、N和K均为非零正整数。Where M is the number of logical units that can be scheduled by one client of the GPU-MPS, N is the maximum number of clients included in one GPU-MPS, and K is the number of GPU-MPS mapped by the graphics processing device, and M, N, and K are both Is a non-zero positive integer.
优选的,GPU-MPS的一个客户端可调度一个逻辑单元。Preferably, one client of the GPU-MPS can schedule one logical unit.
优选的,所述图形处理装置映射一个GPU多进程代理服务器。Preferably, the graphics processing device maps a GPU multi-process proxy server.
优选的,所述图形处理装置包含M×N×K个逻辑单元。Preferably, the graphics processing device comprises M×N×K logical units.
一种资源服务装置,包括至少一个上述任意一项所述的图形处理装置、监测单元和第一通信单元,其中,A resource service device comprising the graphics processing device, the monitoring unit and the first communication unit according to any one of the above, wherein
监测单元,用于在监测周期到达时,监测当前周期内所述图形处理装置中剩余的逻辑单元的数量;a monitoring unit, configured to monitor the number of remaining logic units in the graphics processing device during the current period when the monitoring period arrives;
第一通信单元,用于将监测到的数据发送给集群中的监控节点,以便所述监控节点在更新周期到达时利用监测到的数据原子更新预设的资源动态表;a first communication unit, configured to send the monitored data to a monitoring node in the cluster, so that the monitoring node updates the preset resource dynamic table by using the monitored data atom when the update period arrives;
其中,所述资源动态表至少包含图形处理装置中剩余的逻辑单元的数量。The resource dynamic table includes at least the number of logical units remaining in the graphics processing device.
优选的,所述资源服务装置为集群中的一个从节点。Preferably, the resource service device is a slave node in the cluster.
优选的,所述资源动态表还包含图形处理装置的实际使用率;所述监测单元还用于,在监测周期到达时,监测当前周期内本地的图形处理装置的实际使用率。Preferably, the resource dynamic table further includes an actual usage rate of the graphics processing device; and the monitoring unit is further configured to monitor an actual usage rate of the local graphics processing device in the current period when the monitoring period arrives.
一种资源调度方法,应用在上述任意一项所述的资源服务装置,所述方法包括:A resource scheduling method, which is applied to the resource service device according to any one of the preceding claims, the method comprising:
接收为目标作业调度图形处理器GPU资源的调度请求,所述调度请求中指示了请求调度的逻辑单元的数量;Receiving a scheduling request for scheduling a GPU resource of a graphics processor for a target job, where the number of logical units requesting scheduling is indicated in the scheduling request;
响应于所述调度请求,从预设的资源动态表中查找剩余的逻辑单元的数量不为零的图形处理装置,并按照所述调度请求指示的数量,从查找到的图形处理装置中为所述目 标作业调度逻辑单元;Responding to the scheduling request, searching for a graphics processing device whose number of remaining logical units is not zero from a preset resource dynamic table, and according to the number of the scheduling request indication, from the found graphics processing device State Job scheduling logic unit;
其中,所述资源动态表至少包含图形处理装置中剩余的逻辑单元的数量。The resource dynamic table includes at least the number of logical units remaining in the graphics processing device.
优选的,所述资源动态表还包含图形处理装置的实际使用率;Preferably, the resource dynamic table further includes an actual usage rate of the graphics processing device;
所述响应于所述调度请求,从预设的资源动态表中查找剩余的逻辑单元的数量不为零的图形处理装置,并按照所述调度请求指示的数量,从查找到的图形处理装置中为所述目标作业调度逻辑单元为:And in response to the scheduling request, searching for, from the preset resource dynamic table, a graphics processing device whose number of remaining logical units is not zero, and according to the quantity indicated by the scheduling request, from the searched graphics processing device The scheduling logic unit for the target job is:
响应于所述调度请求,从预设的资源动态表中查找实际使用率小于或等于预设的最大阈值且剩余的逻辑单元的个数不为零的图形处理装置,并按照所述调度请求指示的数量,从查找到的图形处理装置中为所述目标作业调度逻辑单元。And in response to the scheduling request, searching for, from the preset resource dynamic table, a graphics processing device whose actual usage rate is less than or equal to a preset maximum threshold and the number of remaining logical units is not zero, and according to the scheduling request indication The number of logical units that are scheduled for the target job from the found graphics processing device.
优选的,所述资源动态表还包含资源服务器集群中的资源服务装置的工作状态和资源服务装置中的图形处理装置的工作状态;所述方法还包括:Preferably, the resource dynamic table further includes an operation state of the resource service device in the resource server cluster and an operation state of the graphics processing device in the resource service device; the method further includes:
在更新周期到达时,原子更新所述资源动态表中资源服务装置的工作状态和图形处理装置的工作状态,所述工作状态包括工作和非工作。Upon arrival of the update cycle, the atom updates the operational state of the resource service device in the resource dynamics table and the operational state of the graphics processing device, the operational state including work and non-work.
一种资源调度装置,其特征在于,应用在上述任意一项所述的资源服务装置,包括:A resource scheduling apparatus, comprising: the resource service apparatus according to any one of the preceding items, comprising:
第二通信单元,用于接收为目标作业调度图形处理器GPU资源的调度请求,所述调度请求中指示了请求调度的逻辑单元的数量;a second communication unit, configured to receive a scheduling request for scheduling a GPU resource of the graphics processor for the target job, where the number of logical units requesting scheduling is indicated in the scheduling request;
响应单元,用于响应于所述调度请求,从预设的资源动态表中查找剩余的逻辑单元的数量不为零的图形处理装置,并按照所述调度请求指示的数量,从查找到的图形处理装置中为所述目标作业调度逻辑单元;a response unit, configured to, in response to the scheduling request, search for a graphics processing device whose number of remaining logical units is not zero from a preset resource dynamic table, and according to the number of indications of the scheduling request, from the found graphics Scheduling a logical unit for the target job in the processing device;
其中,所述资源动态表至少包含图形处理装置中剩余的逻辑单元的数量。The resource dynamic table includes at least the number of logical units remaining in the graphics processing device.
优选的,所述资源动态表还包含图形处理装置的实际使用率;Preferably, the resource dynamic table further includes an actual usage rate of the graphics processing device;
所述响应单元具体用于,响应于所述调度请求,从预设的资源动态表中查找实际使用率小于或等于预设的最大阈值且剩余的逻辑单元的个数不为零的图形处理装置,并按照所述调度请求指示的数量,从查找到的图形处理装置中为所述目标作业调度逻辑单元。The response unit is configured to: in response to the scheduling request, search for a graphics processing device that is less than or equal to a preset maximum threshold and the number of remaining logical units is not zero from a preset resource dynamic table. And scheduling, according to the quantity indicated by the scheduling request, a logical unit for the target job from the found graphics processing device.
优选的,所述资源动态表还包含资源服务器集群中的资源服务装置的工作状态和资源服务装置中的图形处理装置的工作状态;所述装置还包括:Preferably, the resource dynamic table further includes an operation status of the resource service device in the resource server cluster and an operation status of the graphics processing device in the resource service device; the device further includes:
更新单元,用于在更新周期到达时,原子更新所述资源动态表中资源服务装置的工作状态和图形处理装置的工作状态,所述工作状态包括工作和非工作。And an update unit, configured to, when the update period arrives, atomically update an operation state of the resource service device in the resource dynamic table and an operation state of the graphics processing device, where the work state includes work and non-work.
由上述实施例可以看出,与现有技术相比,本申请的优点在于:As can be seen from the above embodiments, the advantages of the present application over the prior art are:
由于逻辑单元是最小的GPU资源调度单元,因此,可以将一个图形处理装置中不同 的逻辑单元调度给不同的任务进程,使不同的用户作业共同占用同一个图形处理装置,保证图形处理装置中GPU资源的利用率。同时,本申请利用GPU-MPS技术,使一个任务进程成为GPU-MPS的一个客户端,这样,GPU-MPS就可以像管理客户端一样管理任务进程。由于一个GPU-MPS中的所有客户端共享一个GPU上下文,因此,在一个GPU多进程代理服务器中,作为其客户端的多个任务进程也就只需共享一个GPU上下文。Since the logical unit is the smallest GPU resource scheduling unit, it can be different in one graphics processing device. The logical unit is scheduled to different task processes, so that different user jobs share the same graphics processing device to ensure the utilization of GPU resources in the graphics processing device. At the same time, this application utilizes GPU-MPS technology to make a task process a client of GPU-MPS, so that GPU-MPS can manage the task process just like the management client. Since all clients in a GPU-MPS share a GPU context, in a GPU multi-process proxy server, multiple task processes as their clients only need to share one GPU context.
另外,在资源调度时,基于各GPU的实际使用率调度逻辑单元,还可以避免出现GPU过度共享的问题。In addition, when resource scheduling, the logic unit is scheduled based on the actual usage rate of each GPU, and the problem of excessive GPU sharing may also be avoided.
附图说明DRAWINGS
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings to be used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present application, and other drawings can be obtained according to the drawings without any creative labor for those skilled in the art.
图1示意性地示出了根据本申请的实施方式的一种图形处理装置的结构图;FIG. 1 schematically shows a block diagram of a graphics processing apparatus according to an embodiment of the present application; FIG.
图2示意性地示出了根据本申请的实施方式的另一种图形处理装置的结构图;FIG. 2 schematically shows a block diagram of another graphics processing apparatus according to an embodiment of the present application; FIG.
图3示意性地示出了根据本申请的实施方式的另一种图形处理装置的结构图;FIG. 3 schematically shows a block diagram of another graphics processing apparatus according to an embodiment of the present application; FIG.
图4示意性地示出了根据本申请的实施方式的另一种图形处理装置的结构图;FIG. 4 schematically shows a block diagram of another graphics processing apparatus according to an embodiment of the present application; FIG.
图5示意性地示出了根据本申请的实施方式的一种资源服务装置的结构图;FIG. 5 schematically shows a structural diagram of a resource service device according to an embodiment of the present application; FIG.
图6示意性地示出根据本申请的实施方式可以在其中实施的示例性应用场景;FIG. 6 schematically illustrates an exemplary application scenario in which an embodiment of the present application may be implemented;
图7示意性地示出了根据本申请的实施方式的一种资源调度装置的结构框图;FIG. 7 is a block diagram showing a structure of a resource scheduling apparatus according to an embodiment of the present application; FIG.
图8示意性地示出了根据本申请的实施方式的一种资源调度方法的流程图。FIG. 8 schematically illustrates a flow chart of a resource scheduling method in accordance with an embodiment of the present application.
具体实施方式detailed description
为使本申请的上述目的、特征和优点能够更加明显易懂,下面结合附图对本申请实施例进行详细描述。The above described objects, features and advantages of the present application will become more apparent and understood.
用户提交的一个作业(job)是由多个任务(task)组成的,一个任务是由一个任务进程来完成的。因此,为用户的作业调度GPU资源实际上就是为完成该作业的所有任务进程调度GPU资源。A job submitted by a user is composed of multiple tasks, and one task is completed by a task process. Therefore, scheduling GPU resources for a user's job is actually scheduling GPU resources for all task processes that complete the job.
请参阅图1,图1示意性地示出了根据本申请的实施方式的一种图形处理装置的结 构图,在该图形处理装置10中,逻辑单元11是最小的GPU资源调度单元,该图形处理装置映射一个GPU多进程代理服务器(GPU-MPS,Graphics Processing Unit-Multiple Process Server)20,该GPU-MPS 20具有的最大客户端数为16个,并且,该GPU-MPS 20为调度该图形处理装置10的代理,GPU-MPS20的一个客户端可调度一个逻辑单元11,一个任务进程为该GPU-MPS 20的一个客户端,该图形处理装置可包含的最大逻辑单元数为16个。Please refer to FIG. 1. FIG. 1 schematically illustrates a junction of a graphics processing apparatus according to an embodiment of the present application. In the graphics processing device 10, the logic unit 11 is a minimum GPU resource scheduling unit, and the graphics processing device maps a GPU-Multiple Process Server (GPU-MPS) 20, which is a GPU- The MPS 20 has a maximum number of clients of 16, and the GPU-MPS 20 is a proxy for scheduling the graphics processing device 10. One client of the GPU-MPS 20 can schedule one logical unit 11, and one task process is the GPU-MPS. For a client of 20, the graphics processing device can include a maximum of 16 logical units.
可以理解的,由于逻辑单元是最小的GPU资源调度单元,因此,可以将一个图形处理装置中不同的逻辑单元调度给不同的任务进程,使不同的用户作业共同占用同一个图形处理装置,保证图形处理装置中GPU资源的利用率。同时,本申请利用GPU-MPS技术,使一个任务进程成为-GPU-MPS的一个客户端,这样,GPU-MPS就可以像管理客户端一样管理任务进程。由于一个GPU-MPS中的所有客户端共享一个GPU上下文,因此,在一个GPU-MPS中,作为其客户端的多个任务进程也就只需共享一个GPU上下文。例如,当一个图形处理装置映射一个GPU-MPS时,只需为调度该图形处理装置的所有任务进程共享一个GPU上下文,而不再需要分别建立GPU上下文,从而降低了GPU上下文的数量,最终节约了建立和切换GPU上下文的开销。It can be understood that, since the logical unit is the smallest GPU resource scheduling unit, different logical units in one graphics processing device can be scheduled to different task processes, so that different user jobs share the same graphics processing device to ensure graphics. The utilization of GPU resources in the processing device. At the same time, this application utilizes GPU-MPS technology to make a task process a client of GPU-MPS, so that GPU-MPS can manage task processes like management clients. Since all clients in a GPU-MPS share a GPU context, in a GPU-MPS, multiple task processes as their clients only need to share a single GPU context. For example, when a graphics processing device maps a GPU-MPS, it only needs to share a GPU context for all task processes that schedule the graphics processing device, instead of separately establishing a GPU context, thereby reducing the number of GPU contexts and ultimately saving The overhead of establishing and switching GPU contexts.
另外,在为该图形处理装置10配置逻辑单元时,可以在1至16之间(包括1和16)任意配置逻辑单元的数量。In addition, when the logic unit is configured for the graphics processing apparatus 10, the number of logical units can be arbitrarily configured between 1 and 16.
GPU-MPS 20的一个客户端除了可以调度一个逻辑单元之外,可以调度多个逻辑单元,如,2个、3个,甚至更多个逻辑单元。例如,当GPU-MPS20的一个客户端可调度两个逻辑单元,并且,该图形处理装置10仍然映射一个GPU-MPS20时,该图形处理装置10可包含的最大逻辑单元数为32个,如图2所示。由此可见,在该图形处理装置10映射的GPU-MPS 20的个数固定不变的情况下,该图形处理装置10可包含的最大逻辑单元数与GPU-MPS20的一个客户端可调度的逻辑单元数有关,且成正比。A client of GPU-MPS 20 can schedule multiple logical units, such as 2, 3, or even more logical units, in addition to scheduling one logical unit. For example, when one client of the GPU-MPS 20 can schedule two logical units, and the graphics processing device 10 still maps one GPU-MPS 20, the maximum number of logical units that the graphics processing device 10 can include is 32. 2 is shown. It can be seen that, in the case that the number of GPU-MPSs 20 mapped by the graphics processing device 10 is fixed, the maximum number of logical units that the graphics processing device 10 can include and one client schedulable logic of the GPU-MPS 20 The number of units is related and proportional.
另外,该图形处理装置10可以只映射一个GPU-MPS20,也可以映射多个GPU-MPS 20,如,2个、3个,甚至更多个GPU-MPS 20。例如,当图形处理装置10映射两个GPU-MPS 20,并且,GPU-MPS20的一个客户端可调度一个逻辑单元时,该图形处理装置可包含的最大逻辑单元数为32个,如图3所示。由此可见,在GPU-MPS 20的一个客户端可调度的逻辑单元数固定不变的情况下,该图形处理装置10可包含的最大逻辑单元数与该图形处理装置10映射的GPU-MPS 20的个数有关,且成正比。In addition, the graphics processing apparatus 10 may map only one GPU-MPS 20, or may map multiple GPU-MPSs 20, such as two, three, or even more GPU-MPSs 20. For example, when the graphics processing device 10 maps two GPU-MPSs 20, and one client of the GPU-MPS 20 can schedule one logical unit, the graphics processing device can include 32 maximum logical units, as shown in FIG. Show. It can be seen that, in the case that the number of logical units that can be scheduled by one client of the GPU-MPS 20 is fixed, the maximum number of logical units that the graphics processing device 10 can include is mapped to the GPU-MPS 20 mapped by the graphics processing apparatus 10. The number is related and proportional.
也就是说,该图形处理装置10可包含的最大逻辑单元数既与GPU-MPS20的一个客 户端可调度的逻辑单元数有关,又与该图形处理装置10映射的GPU-MPS 20的个数有关,且成正比。例如,当图形处理装置10映射两个GPU-MPS 20,并且GPU-MPS 20的一个客户端可调度两个逻辑单元时,该图形处理装置可包含的最大逻辑单元数为64个,如图4所示。That is, the maximum number of logical units that the graphics processing device 10 can include is both a guest of the GPU-MPS20. The number of logical units that can be scheduled by the terminal is related to the number of GPU-MPSs 20 mapped by the graphics processing device 10, and is proportional. For example, when the graphics processing device 10 maps two GPU-MPSs 20, and one client of the GPU-MPS 20 can schedule two logical units, the graphics processing device can include 64 maximum logical units, as shown in FIG. Shown.
因此,对于图形处理装置10来说,其可包含的最大逻辑单元数为M×N×K个,其中,M为GPU-MPS的一个客户端可调度的逻辑单元数,N为一个GPU-MPS包含的最大客户端数,K为所述图形处理装置映射的GPU-MPS数,M、N和K均为非零正整数。Therefore, for the graphics processing apparatus 10, the maximum number of logical units that can be included is M×N×K, where M is the number of configurable logical units of one client of the GPU-MPS, and N is a GPU-MPS. The maximum number of clients included, K is the number of GPU-MPS mapped by the graphics processing device, and M, N, and K are all non-zero positive integers.
在配置该图形处理装置10中的逻辑单元时,只要在该图形处理装置10可包含的最大逻辑单元数以内配置即可。When the logic unit in the graphics processing device 10 is arranged, it may be arranged within the maximum number of logical units that the graphics processing device 10 can include.
在本申请的一个优选实施方式中,该图形处理装置10包含M×N×K个逻辑单元。In a preferred embodiment of the present application, the graphics processing apparatus 10 includes M x N x K logic units.
在本申请的另一个优选实施方式中,GPU-MPS的一个客户端可调度一个逻辑单元,图形处理装置10映射一个GPU-MPS 20。可以理解的,在这种优选实施方式中,一个图形处理装置包含的最大逻辑单元数与一个GPU-MPS包含的最大客户端数相等。In another preferred embodiment of the present application, one client of the GPU-MPS can schedule one logical unit, and the graphics processing device 10 maps one GPU-MPS 20. It will be appreciated that in this preferred embodiment, a graphics processing device includes a maximum number of logical units equal to the maximum number of clients included in a GPU-MPS.
另外,需要说明的是,该图形处理装置10在物理形态上是一个图形处理器。In addition, it should be noted that the graphics processing device 10 is physically a graphics processor.
除了图形处理装置之外,本申请实施例还提供了一种资源服务装置。请参阅图5,图5示意性地示出了根据本申请的实施方式的一种资源服务装置的结构图,其中,该资源服务装置50包括,该资源服务装置50包括至少一个图形处理装置51、(例如,两个图形处理装置511和512)、监测单元52和第一通信单元53。并且,图形处理装置511与GPU-MPS611映射,GPU-MPS 611的一个客户端可调用图形处理装置511中的一个逻辑单元,图形处理装置512与GPU-MPS612映射,GPU-MPS 612的一个客户端可调用图形处理装置512中的一个逻辑单元,一个任务进程可以为GPU-MPS 611的一个客户端,也可以为GPU-MPS 612的一个客户端。In addition to the graphics processing device, the embodiment of the present application further provides a resource service device. Referring to FIG. 5, FIG. 5 is a schematic structural diagram of a resource service apparatus according to an embodiment of the present application, wherein the resource service apparatus 50 includes at least one graphics processing apparatus 51. (for example, two graphics processing devices 511 and 512), a monitoring unit 52, and a first communication unit 53. Moreover, the graphics processing device 511 is mapped to the GPU-MPS 611. One client of the GPU-MPS 611 can call a logic unit in the graphics processing device 511. The graphics processing device 512 is mapped to the GPU-MPS 612, and a client of the GPU-MPS 612. One of the logic units in the graphics processing device 512 can be invoked. A task process can be a client of the GPU-MPS 611 or a client of the GPU-MPS 612.
监测单元52,用于在监测周期到达时,监测当前周期内所述图形处理装置中剩余的逻辑单元的数量;The monitoring unit 52 is configured to monitor the number of remaining logical units in the graphics processing device in the current period when the monitoring period arrives;
第一通信单元53,用于将监测到的数据发送给集群中的监控节点,以便所述监控节点在更新周期到达时利用监测到的数据原子更新预设的资源动态表;The first communication unit 53 is configured to send the monitored data to the monitoring node in the cluster, so that the monitoring node updates the preset resource dynamic table by using the monitored data atom when the update period arrives;
其中,所述资源动态表至少包含图形处理装置中剩余的逻辑单元的数量。The resource dynamic table includes at least the number of logical units remaining in the graphics processing device.
其中,每一个逻辑单元都会在资源服务器的指定路径下生成一个PIPE文件,一旦该逻辑单元被使用,对应的PIPE文件即会被生成,因此,监测单元11只要监测该路径下 的PIPE的数量,即可确定剩余的逻辑单元的数量。Each of the logical units generates a PIPE file in the specified path of the resource server. Once the logical unit is used, the corresponding PIPE file is generated. Therefore, the monitoring unit 11 only needs to monitor the path. The number of PIPEs can be used to determine the number of remaining logical units.
可以理解的,当集群中的各从节点动态更新本地GPU中剩余的逻辑单元的数量时,该更新操作可以支持离线调度,即,不通过统一的调度器调度资源,而直接在本地使用GPU资源)。It can be understood that when each slave node in the cluster dynamically updates the number of logical units remaining in the local GPU, the update operation can support offline scheduling, that is, the resource is not directly used by the unified scheduler, but the GPU resource is directly used locally. ).
需要说明的是,图5所示的资源服务装置的结构仅是一个示例,其还可以更多数量的图形处理装置。并且,本申请也不限定每一个图形处理装置映射的GPU-MPS数量、GPU-MPS的一个客户端可调用的逻辑单元的数量以及每一个图形处理装置包含的逻辑单元的数量。It should be noted that the structure of the resource service device shown in FIG. 5 is only an example, and it is also possible to have a larger number of graphics processing devices. Moreover, the present application also does not limit the number of GPU-MPSs mapped by each graphics processing device, the number of logical units that one client of GPU-MPS can call, and the number of logical units that each graphics processing device includes.
在本申请的一个优选实施方式中,该资源服务装置50在物理形态上是一个资源服务器。In a preferred embodiment of the present application, the resource service device 50 is physically a resource server.
在申请的另一个优选实施方式中,该资源服务器可以为集群中的一个从节点。In another preferred embodiment of the application, the resource server can be a slave node in the cluster.
例如,请参阅图6,图6示意性地示出根据本申请的实施方式可以在其中实施的示例性应用场景。其中,在一个集群中,包含有多个从节点10(为了方便描述和展示,图1中仅示出了一个从节点)、一个监控节点20和一个监控节点30。从节点10即为一个资源服务器,在从节点10中包含有多个图形处理器(GPU),图1中仅示出了两个GPU,即,GPU-0和GPU-1,每一个GPU各包含16个逻辑单元,MPS-0为调度GPU-0的代理,MPS-1为调度GPU-1的代理,并且,MPS-0和MPS-1各具有16个客户端,MPS-0的一个客户端可调度GPU-0的一个逻辑单元,MPS-1的一个客户端可调度GPU-1的一个逻辑单元,用户作业中的一个任务进程既可以为MPS-0的一个客户端,也可以为MPS-1的一个客户端。For example, please refer to FIG. 6, which schematically illustrates an exemplary application scenario in which embodiments may be implemented in accordance with embodiments of the present application. Among them, in a cluster, there are a plurality of slave nodes 10 (only one slave node is shown in FIG. 1 for convenience of description and display), one monitoring node 20 and one monitoring node 30. The slave node 10 is a resource server, and the slave node 10 includes a plurality of graphics processors (GPUs). Only two GPUs are shown in FIG. 1, namely, GPU-0 and GPU-1, and each GPU is used. Contains 16 logical units, MPS-0 is the agent that schedules GPU-0, MPS-1 is the agent that schedules GPU-1, and MPS-0 and MPS-1 each have 16 clients, one customer of MPS-0 The terminal can schedule one logical unit of GPU-0. One client of MPS-1 can schedule one logical unit of GPU-1. One task process in the user job can be either a client of MPS-0 or an MPS. -1 for a client.
例如,当将GPU-0中的一个逻辑单元调度给某一个用户作业中的某一个任务进程时,该任务进程会连接到该逻辑单元所属的GPU-0的代理上,即,连接到MPS-0上。For example, when a logical unit in GPU-0 is scheduled to a task process in a user job, the task process is connected to the agent of GPU-0 to which the logical unit belongs, that is, connected to MPS- 0 on.
监控节点30包括作业管理装置31和资源调度装置32,作业管理装置31先接收到集群客户端60发送的为目标用户作业分配GPU资源的请求61,在该请求61中指示有请求调度的逻辑单元的数量。作业管理装置31将该请求转发给资源调度装置32。The monitoring node 30 includes a job management device 31 and a resource scheduling device 32. The job management device 31 first receives a request 61 sent by the cluster client 60 to allocate GPU resources for the target user job, and in the request 61, a logical unit requesting scheduling is indicated. quantity. The job management device 31 forwards the request to the resource scheduling device 32.
如图7所示的资源调度装置的结构框图,资源调度装置32包括第二通信单元321和响应单元322,其中,第二通信单元321用于接收为目标作业调度图形处理器GPU资源的调度请求61;响应单元322用于响应于所述调度请求,从预设的资源动态表中查找剩余的逻辑单元的数量不为零的图形处理装置,并按照所述调度请求指示的数量,从查找到的图形处理装置中为所述目标作业调度逻辑单元;其中,所述资源动态表至少包含图 形处理装置中剩余的逻辑单元的数量。As shown in the structural block diagram of the resource scheduling apparatus shown in FIG. 7, the resource scheduling apparatus 32 includes a second communication unit 321 and a response unit 322, wherein the second communication unit 321 is configured to receive a scheduling request for scheduling a graphics processor GPU resource for a target job. The response unit 322 is configured to: in response to the scheduling request, search for a graphics processing device whose number of remaining logical units is not zero from a preset resource dynamic table, and according to the quantity indicated by the scheduling request, from the search to a logic processing unit for the target job in the graphics processing device; wherein the resource dynamic table includes at least a graph The number of logical units remaining in the processing device.
在本申请中,资源调度装置32可以采用现有技术中的任意一种调度方法调度逻辑单元。例如,First fit调度、Best fit调度、Backfill调度或CFS调度等。In the present application, the resource scheduling device 32 may schedule the logical unit using any of the prior art scheduling methods. For example, First Fit scheduling, Best fit scheduling, Backfill scheduling, or CFS scheduling.
资源调度装置32生成一个资源动态表,并由从节点10动态更新该资源动态表上GPU-0和GPU-1中剩余的逻辑单元的数量,以便资源调度装置32可以根据各GPU剩余的逻辑单元进行资源调度。剩余的逻辑单元就是指未调度给任务进程的逻辑单元。The resource scheduling device 32 generates a resource dynamic table, and dynamically updates the number of logical units remaining in the GPU-0 and GPU-1 on the resource dynamic table by the slave node 10, so that the resource scheduling device 32 can according to the remaining logical units of each GPU. Perform resource scheduling. The remaining logical unit refers to the logical unit that is not scheduled to the task process.
当然,如果集群中还包括其他从节点,该资源动态表也同时由其它从节点动态维护,并且,该资源动态表中还包含有位于其它从节点上的各GPU中剩余的逻辑单元的数量。也就是说,该资源动态表中包含所有从节点上的GPU中剩余的逻辑单元的数量。Of course, if the cluster further includes other slave nodes, the resource dynamic table is also dynamically maintained by other slave nodes, and the resource dynamic table further includes the number of logical units remaining in each GPU on the other slave nodes. That is, the resource dynamic table contains the number of logical units remaining in the GPU on all slave nodes.
另外,该资源动态表中还可以包含有该资源动态表包含所有从节点的标识以及各从节点中的所有GPU的标识,以确定各个逻辑单元的所在位置。例如,如图6所示资源动态表,该资源动态表中包含从节点10的标识(例如,该标识可以为从节点10在集群中的全局编号)、从节点10包含的GPU-0和GPU-1的标识、以及GPU-0和GPU-1中剩余的逻辑单元的数量。In addition, the resource dynamic table may further include the resource dynamic table including the identifiers of all the slave nodes and the identifiers of all the GPUs in each slave node to determine the location of each logical unit. For example, as shown in FIG. 6, the resource dynamic table includes the identifier of the slave node 10 (for example, the identifier may be a global number of the slave node 10 in the cluster), the GPU-0 and the GPU included in the slave node 10. The identifier of -1, and the number of logical units remaining in GPU-0 and GPU-1.
此外,考虑到作业实际使用的GPU资源很有可能比其请求的GPU资源大,针对一个GPU,其实际使用资源就可能比其调度资源大。当为不同作业调度该GPU中的资源时,也很容易产生过度共享该GPU的问题。In addition, considering that the GPU resources actually used by the job are likely to be larger than the GPU resources they request, for a GPU, the actual use of resources may be larger than its scheduling resources. When scheduling resources in the GPU for different jobs, it is also easy to create problems of over-sharing the GPU.
因此,为了避免过度共享GPU的问题,还可以在资源动态表中维护各GPU的实际使用率,以便资源调度装置根据各GPU的实际使用率调度各GPU中的逻辑单元。也就是说,该资源动态表包含集群中的所有从节点的标识、各从节点中的所有GPU的标识、各GPU中剩余的逻辑单元的数量和各GPU的实际使用率。Therefore, in order to avoid the problem of excessive sharing of the GPU, the actual usage rate of each GPU may also be maintained in the resource dynamic table, so that the resource scheduling apparatus schedules the logical units in each GPU according to the actual usage rate of each GPU. That is, the resource dynamic table includes the identifiers of all the slave nodes in the cluster, the identifiers of all the GPUs in each slave node, the number of remaining logical units in each GPU, and the actual usage rate of each GPU.
在本申请的一个优选实施方式中,资源动态表还包含GPU-0和GPU-1的实际使用率,在从节点10中,监测单元11还用于在监测周期到达时,监测当前周期内GPU-0和GPU-1的实际使用率。In a preferred embodiment of the present application, the resource dynamic table further includes the actual usage rate of GPU-0 and GPU-1. In the slave node 10, the monitoring unit 11 is further configured to monitor the GPU in the current cycle when the monitoring period arrives. -0 and GPU-1 actual usage.
相应的,对于监控节点30,资源调度装置32中的响应单元322具体用于,响应于所述调度请求,从预设的资源动态表中查找实际使用率小于或等于预设的最大阈值且剩余的逻辑单元的个数不为零的图形处理装置,并按照所述调度请求指示的数量,从查找到的图形处理装置中为所述目标作业调度逻辑单元。Correspondingly, for the monitoring node 30, the response unit 322 in the resource scheduling device 32 is configured to: in response to the scheduling request, find that the actual usage rate is less than or equal to a preset maximum threshold and remaining from the preset resource dynamic table. The graphics processing device of the number of logical units is not zero, and the logical unit is scheduled for the target job from the found graphics processing device according to the number indicated by the scheduling request.
在本申请的另一个优选实施方式中,资源动态表还可以包含资源服务器集群中的资源服务装置的工作状态和资源服务装置中的图形处理装置的工作状态,并且由资源调度 装置动态更新,资源调度装置32还包括:In another preferred embodiment of the present application, the resource dynamic table may further include an operating state of the resource serving device in the resource server cluster and an operating state of the graphics processing device in the resource serving device, and is scheduled by the resource. The device dynamically updates, and the resource scheduling device 32 further includes:
更新单元,用于在更新周期到达时,原子更新所述资源动态表中资源服务装置的工作状态和图形处理装置的工作状态和使用状态,所述工作状态包括工作和非工作,使用状态包括逻辑单元的使用量和整体利用率。And an update unit, configured to: when the update period arrives, atomically update an operation state of the resource service device in the resource dynamic table and an operation state and a use state of the graphics processing device, where the work state includes work and non-work, and the use state includes logic Unit usage and overall utilization.
例如,当删除从节点或GPU或者生从节点或GPU故障时,其工作状态从工作变为不工作,当添加新的从节点或新的GPU时,其工作状态被设定为工作。For example, when a slave node or GPU or a slave node or GPU fails, its working state changes from work to inoperative. When a new slave node or a new GPU is added, its working state is set to work.
在本申请中,更新单元323可以在集群初始化时,初始化该资源动态表,或者,在作业迁移时,因作业迁移失败或者QoS的原因,需要迁移任务时,更新单元323可以更新该资源动态表。另外,更新单元还可以根据资源调度响应更新资源动态表中各GPU中剩余的逻辑单元的数量。In the present application, the update unit 323 may initialize the resource dynamic table when the cluster is initialized, or may update the resource dynamic table when the task needs to be migrated due to job migration failure or QoS during job migration. . In addition, the update unit may further update the number of remaining logical units in each GPU in the resource dynamic table according to the resource scheduling response.
与上述的资源调度装置相对应,本申请实施例还提供了资源调度方法。请参阅图8,图8示意性地示出了根据本申请的实施方式的一种资源调度方法的流程图,该方法可以由资源调度装置32执行,该方法例如可以包括:Corresponding to the foregoing resource scheduling apparatus, the embodiment of the present application further provides a resource scheduling method. Please refer to FIG. 8. FIG. 8 is a flowchart of a resource scheduling method according to an embodiment of the present application. The method may be performed by the resource scheduling device 32. The method may include, for example:
步骤801:接收为目标作业调度图形处理器GPU资源的调度请求,所述调度请求中指示了请求调度的逻辑单元的数量。Step 801: Receive a scheduling request for scheduling a graphics processor GPU resource for a target job, where the number of logical units requesting scheduling is indicated in the scheduling request.
步骤802:响应于所述调度请求,从预设的资源动态表中查找剩余的逻辑单元的数量不为零的图形处理装置,并按照所述调度请求指示的数量,从查找到的图形处理装置中为所述目标作业调度逻辑单元。Step 802: In response to the scheduling request, searching for a graphics processing device whose number of remaining logical units is not zero from a preset resource dynamic table, and searching for the graphics processing device according to the quantity indicated by the scheduling request. Scheduling a logical unit for the target job.
其中,所述资源动态表至少包含图形处理装置中剩余的逻辑单元的数量。The resource dynamic table includes at least the number of logical units remaining in the graphics processing device.
在本申请的一个优选实施方式中,资源动态表还包含图形处理装置的实际使用率;所述步骤802为:In a preferred embodiment of the present application, the resource dynamic table further includes an actual usage rate of the graphics processing device; the step 802 is:
响应于所述调度请求,从预设的资源动态表中查找实际使用率小于或等于预设的最大阈值且剩余的逻辑单元的个数不为零的图形处理装置,并按照所述调度请求指示的数量,从查找到的图形处理装置中为所述目标作业调度逻辑单元。And in response to the scheduling request, searching for, from the preset resource dynamic table, a graphics processing device whose actual usage rate is less than or equal to a preset maximum threshold and the number of remaining logical units is not zero, and according to the scheduling request indication The number of logical units that are scheduled for the target job from the found graphics processing device.
在本申请的另一个优选实施方式中,所述资源动态表还包含资源服务器集群中的资源服务装置的工作状态和资源服务装置中的图形处理装置的工作状态;该方法还可以包括:在更新周期到达时,原子更新所述资源动态表中资源服务装置的工作状态和图形处理装置的工作状态,所述工作状态包括工作和非工作。In another preferred embodiment of the present application, the resource dynamic table further includes an operation status of the resource service device in the resource server cluster and an operation status of the graphics processing device in the resource service device; the method may further include: updating When the cycle arrives, the atom updates the working state of the resource service device in the resource dynamic table and the working state of the graphics processing device, the working state including work and non-work.
由上述实施例可以看出,与现有技术相比,本申请的优点在于: As can be seen from the above embodiments, the advantages of the present application over the prior art are:
由于逻辑单元是最小的GPU资源调度单元,因此,可以将一个图形处理装置中不同的逻辑单元调度给不同的任务进程,使不同的用户作业共同占用同一个图形处理装置,保证图形处理装置中GPU资源的利用率。同时,本申请利用GPU-MPS技术,使一个任务进程成为GPU-MPS的一个客户端,这样,GPU-MPS就可以像管理客户端一样管理任务进程。由于一个GPU-MPS中的所有客户端共享一个GPU上下文,因此,在一个GPU-MPS中,作为其客户端的多个任务进程也就只需共享一个GPU上下文。Since the logical unit is the smallest GPU resource scheduling unit, different logical units in one graphics processing device can be scheduled to different task processes, so that different user jobs share the same graphics processing device to ensure the GPU in the graphics processing device. Utilization of resources. At the same time, this application utilizes GPU-MPS technology to make a task process a client of GPU-MPS, so that GPU-MPS can manage the task process just like the management client. Since all clients in a GPU-MPS share a GPU context, in a GPU-MPS, multiple task processes as their clients only need to share a single GPU context.
另外,在资源调度时,基于各GPU的实际使用率调度逻辑单元,还可以避免出现GPU过度共享的问题。In addition, when resource scheduling, the logic unit is scheduled based on the actual usage rate of each GPU, and the problem of excessive GPU sharing may also be avoided.
所述领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。A person skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the system, the device and the unit described above can refer to the corresponding process in the foregoing method embodiment, and details are not described herein again.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述到的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性、机械或其它的形式。In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be combined. Or it can be integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
所述作为分离部件说明的单元可以是或者也可以是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may be or may be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware and can be implemented in the form of a software functional unit.
需要说明的是,本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。It should be noted that those skilled in the art can understand that all or part of the process of implementing the foregoing embodiments can be completed by a computer program to instruct related hardware, and the program can be stored in a computer readable storage. In the medium, the program, when executed, may include the flow of an embodiment of the methods as described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
以上对本申请所提供的图形处理装置、资源服务装置、资源调度方法和装置进行了 详细介绍,本文中应用了具体实施例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。 The graphics processing device, the resource service device, the resource scheduling method, and the device provided by the present application have been DETAILED DESCRIPTION OF THE INVENTION The principles and embodiments of the present application have been described with reference to the specific embodiments herein. The description of the above embodiments is only for the purpose of helping to understand the method of the present application and its core idea; and, for a person skilled in the art, In view of the idea of the present application, there are variations in the specific embodiments and the scope of application, and the contents of the present specification should not be construed as limiting the present application.

Claims (13)

  1. 一种图形处理装置,其特征在于,在所述图形处理装置中,逻辑单元是最小的图形处理器GPU资源调度单元,所述图形处理装置映射至少一个GPU多进程代理服务器GPU-MPS,所述GPU-MPS为调度所述图形处理装置的代理,GPU-MPS的一个客户端可调度至少一个所述逻辑单元,一个任务进程为GPU-MPS的一个客户端,所述图形处理装置可包含的最大逻辑单元数为M×N×K个;A graphics processing device, wherein in the graphics processing device, a logic unit is a minimum graphics processor GPU resource scheduling unit, the graphics processing device mapping at least one GPU multi-process proxy server GPU-MPS, GPU-MPS is a proxy for scheduling the graphics processing device. One client of the GPU-MPS can schedule at least one of the logical units, and one task process is a client of the GPU-MPS, and the graphics processing device can include the largest The number of logical units is M × N × K;
    其中,M为GPU-MPS的一个客户端可调度的逻辑单元数,N为一个GPU-MPS包含的最大客户端数,K为所述图形处理装置映射的GPU-MPS数,M、N和K均为非零正整数。Where M is the number of logical units that can be scheduled by one client of the GPU-MPS, N is the maximum number of clients included in one GPU-MPS, and K is the number of GPU-MPS mapped by the graphics processing device, and M, N, and K are both Is a non-zero positive integer.
  2. 根据权利要求1所述的图形处理装置,其特征在于,GPU-MPS的一个客户端可调度一个逻辑单元。The graphics processing device of claim 1 wherein a client of the GPU-MPS can schedule a logical unit.
  3. 根据权利要求1或2所述的图形处理装置,其特征在于,所述图形处理装置映射一个GPU多进程代理服务器。A graphics processing apparatus according to claim 1 or 2, wherein said graphics processing means maps a GPU multi-process proxy server.
  4. 根据权利要求1所述的图形处理装置,其特征在于,所述图形处理装置包含M×N×K个逻辑单元。A graphics processing apparatus according to claim 1, wherein said graphics processing means comprises M x N x K logical units.
  5. 一种资源服务装置,其特征在于,包括至少一个如权利要求1至4中任意一项所述的图形处理装置、监测单元和第一通信单元,其中,A resource service device, comprising: at least one graphics processing device, a monitoring unit, and a first communication unit according to any one of claims 1 to 4, wherein
    监测单元,用于在监测周期到达时,监测当前周期内所述图形处理装置中剩余的逻辑单元的数量;a monitoring unit, configured to monitor the number of remaining logic units in the graphics processing device during the current period when the monitoring period arrives;
    第一通信单元,用于将监测到的数据发送给集群中的监控节点,以便所述监控节点在更新周期到达时利用监测到的数据原子更新预设的资源动态表;a first communication unit, configured to send the monitored data to a monitoring node in the cluster, so that the monitoring node updates the preset resource dynamic table by using the monitored data atom when the update period arrives;
    其中,所述资源动态表至少包含图形处理装置中剩余的逻辑单元的数量。The resource dynamic table includes at least the number of logical units remaining in the graphics processing device.
  6. 根据权利要求5所述的资源服务装置,其特征在于,所述资源服务装置为集群中的一个从节点。The resource service apparatus according to claim 5, wherein said resource service apparatus is a slave node in a cluster.
  7. 根据权利要求5所述的资源服务装置,其特征在于,所述资源动态表还包含图形处理装置的实际使用率;所述监测单元还用于,在监测周期到达时,监测当前周期内本地的图形处理装置的实际使用率。The resource service device according to claim 5, wherein the resource dynamic table further comprises an actual usage rate of the graphics processing device; the monitoring unit is further configured to: monitor the local time in the current cycle when the monitoring period arrives The actual usage rate of the graphics processing device.
  8. 一种资源调度方法,其特征在于,应用在如权利要求5至7中任意一项所述的资源服务装置,所述方法包括: A resource scheduling method, characterized by the resource service device according to any one of claims 5 to 7, the method comprising:
    接收为目标作业调度图形处理器GPU资源的调度请求,所述调度请求中指示了请求调度的逻辑单元的数量;Receiving a scheduling request for scheduling a GPU resource of a graphics processor for a target job, where the number of logical units requesting scheduling is indicated in the scheduling request;
    响应于所述调度请求,从预设的资源动态表中查找剩余的逻辑单元的数量不为零的图形处理装置,并按照所述调度请求指示的数量,从查找到的图形处理装置中为所述目标作业调度逻辑单元;Responding to the scheduling request, searching for a graphics processing device whose number of remaining logical units is not zero from a preset resource dynamic table, and according to the number of the scheduling request indication, from the found graphics processing device The target job scheduling logic unit;
    其中,所述资源动态表至少包含图形处理装置中剩余的逻辑单元的数量。The resource dynamic table includes at least the number of logical units remaining in the graphics processing device.
  9. 根据权利要求8所述的方法,其特征在于,所述资源动态表还包含图形处理装置的实际使用率;The method according to claim 8, wherein the resource dynamic table further comprises an actual usage rate of the graphics processing device;
    所述响应于所述调度请求,从预设的资源动态表中查找剩余的逻辑单元的数量不为零的图形处理装置,并按照所述调度请求指示的数量,从查找到的图形处理装置中为所述目标作业调度逻辑单元为:And in response to the scheduling request, searching for, from the preset resource dynamic table, a graphics processing device whose number of remaining logical units is not zero, and according to the quantity indicated by the scheduling request, from the searched graphics processing device The scheduling logic unit for the target job is:
    响应于所述调度请求,从预设的资源动态表中查找实际使用率小于或等于预设的最大阈值且剩余的逻辑单元的个数不为零的图形处理装置,并按照所述调度请求指示的数量,从查找到的图形处理装置中为所述目标作业调度逻辑单元。And in response to the scheduling request, searching for, from the preset resource dynamic table, a graphics processing device whose actual usage rate is less than or equal to a preset maximum threshold and the number of remaining logical units is not zero, and according to the scheduling request indication The number of logical units that are scheduled for the target job from the found graphics processing device.
  10. 根据权利要求8或9所述的方法,其特征在于,所述资源动态表还包含资源服务器集群中的资源服务装置的工作状态和资源服务装置中的图形处理装置的工作状态;所述方法还包括:The method according to claim 8 or 9, wherein the resource dynamic table further comprises an operation state of the resource service device in the resource server cluster and an operation state of the graphics processing device in the resource service device; include:
    在更新周期到达时,原子更新所述资源动态表中资源服务装置的工作状态和图形处理装置的工作状态,所述工作状态包括工作和非工作。Upon arrival of the update cycle, the atom updates the operational state of the resource service device in the resource dynamics table and the operational state of the graphics processing device, the operational state including work and non-work.
  11. 一种资源调度装置,其特征在于,应用在如权利要求5至7中任意一项所述的资源服务装置,包括:A resource scheduling apparatus, comprising: the resource service apparatus according to any one of claims 5 to 7, comprising:
    第二通信单元,用于接收为目标作业调度图形处理器GPU资源的调度请求,所述调度请求中指示了请求调度的逻辑单元的数量;a second communication unit, configured to receive a scheduling request for scheduling a GPU resource of the graphics processor for the target job, where the number of logical units requesting scheduling is indicated in the scheduling request;
    响应单元,用于响应于所述调度请求,从预设的资源动态表中查找剩余的逻辑单元的数量不为零的图形处理装置,并按照所述调度请求指示的数量,从查找到的图形处理装置中为所述目标作业调度逻辑单元;a response unit, configured to, in response to the scheduling request, search for a graphics processing device whose number of remaining logical units is not zero from a preset resource dynamic table, and according to the number of indications of the scheduling request, from the found graphics Scheduling a logical unit for the target job in the processing device;
    其中,所述资源动态表至少包含图形处理装置中剩余的逻辑单元的数量。The resource dynamic table includes at least the number of logical units remaining in the graphics processing device.
  12. 根据权利要求11所述的装置,其特征在于,所述资源动态表还包含图形处理装置的实际使用率;The apparatus according to claim 11, wherein said resource dynamic table further comprises an actual usage rate of the graphics processing device;
    所述响应单元具体用于,响应于所述调度请求,从预设的资源动态表中查找实际使 用率小于或等于预设的最大阈值且剩余的逻辑单元的个数不为零的图形处理装置,并按照所述调度请求指示的数量,从查找到的图形处理装置中为所述目标作业调度逻辑单元。The response unit is specifically configured to: in response to the scheduling request, find an actual resource from a preset resource dynamic table. a graphics processing device having a usage rate less than or equal to a preset maximum threshold and the number of remaining logical units being non-zero, and scheduling the target job from the found graphics processing device according to the number indicated by the scheduling request Logical unit.
  13. 根据权利要求11或12所述的装置,其特征在于,所述资源动态表还包含资源服务器集群中的资源服务装置的工作状态和资源服务装置中的图形处理装置的工作状态;所述装置还包括:The apparatus according to claim 11 or 12, wherein the resource dynamic table further comprises an operation state of the resource service device in the resource server cluster and an operation state of the graphics processing device in the resource service device; include:
    更新单元,用于在更新周期到达时,原子更新所述资源动态表中资源服务装置的工作状态和图形处理装置的工作状态,所述工作状态包括工作和非工作。 And an update unit, configured to, when the update period arrives, atomically update an operation state of the resource service device in the resource dynamic table and an operation state of the graphics processing device, where the work state includes work and non-work.
PCT/CN2016/079865 2015-04-28 2016-04-21 Graphic processing device, resource service device, resource scheduling method and device thereof WO2016173450A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510208923.0A CN106155811B (en) 2015-04-28 2015-04-28 Resource service device, resource scheduling method and device
CN201510208923.0 2015-04-28

Publications (1)

Publication Number Publication Date
WO2016173450A1 true WO2016173450A1 (en) 2016-11-03

Family

ID=57198136

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/079865 WO2016173450A1 (en) 2015-04-28 2016-04-21 Graphic processing device, resource service device, resource scheduling method and device thereof

Country Status (2)

Country Link
CN (1) CN106155811B (en)
WO (1) WO2016173450A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107544845A (en) * 2017-06-26 2018-01-05 新华三大数据技术有限公司 GPU resource dispatching method and device

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106686352B (en) * 2016-12-23 2019-06-07 北京大学 The real-time processing method of the multi-path video data of more GPU platforms
CN107688495B (en) * 2017-06-22 2020-11-03 平安科技(深圳)有限公司 Method and apparatus for scheduling processors
CN107247629A (en) * 2017-07-04 2017-10-13 北京百度网讯科技有限公司 Cloud computing system and cloud computing method and device for controlling server
CN107329834A (en) * 2017-07-04 2017-11-07 北京百度网讯科技有限公司 Method and apparatus for performing calculating task
CN109936604B (en) * 2017-12-18 2022-07-26 北京图森智途科技有限公司 Resource scheduling method, device and system
CN112559164A (en) * 2019-09-25 2021-03-26 中兴通讯股份有限公司 Resource sharing method and device
CN110795249A (en) * 2019-10-30 2020-02-14 亚信科技(中国)有限公司 GPU resource scheduling method and device based on MESOS containerized platform
WO2021142614A1 (en) * 2020-01-14 2021-07-22 华为技术有限公司 Chip state determining method and device, and cluster resource scheduling method and device
CN111400051B (en) * 2020-03-31 2023-10-27 京东方科技集团股份有限公司 Resource scheduling method, device and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1538296A (en) * 2003-02-18 2004-10-20 Multithreaded kernal for graphics processing unit
CN101403983A (en) * 2008-11-25 2009-04-08 北京航空航天大学 Resource monitoring method and system for multi-core processor based on virtual machine
CN104407920A (en) * 2014-12-23 2015-03-11 浪潮(北京)电子信息产业有限公司 Data processing method and system based on inter-process communication

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8803892B2 (en) * 2010-06-10 2014-08-12 Otoy, Inc. Allocation of GPU resources across multiple clients
US20120188259A1 (en) * 2010-12-13 2012-07-26 Advanced Micro Devices, Inc. Mechanisms for Enabling Task Scheduling
US8370283B2 (en) * 2010-12-15 2013-02-05 Scienergy, Inc. Predicting energy consumption
CN102541640B (en) * 2011-12-28 2014-10-29 厦门市美亚柏科信息股份有限公司 Cluster GPU (graphic processing unit) resource scheduling system and method
KR20150043377A (en) * 2012-08-07 2015-04-22 어드밴스드 마이크로 디바이시즈, 인코포레이티드 System and method for tuning a cloud computing system
WO2014062730A1 (en) * 2012-10-15 2014-04-24 Famous Industries, Inc. Efficient manipulation of surfaces in multi-dimensional space using energy agents

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1538296A (en) * 2003-02-18 2004-10-20 Multithreaded kernal for graphics processing unit
CN101403983A (en) * 2008-11-25 2009-04-08 北京航空航天大学 Resource monitoring method and system for multi-core processor based on virtual machine
CN104407920A (en) * 2014-12-23 2015-03-11 浪潮(北京)电子信息产业有限公司 Data processing method and system based on inter-process communication

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107544845A (en) * 2017-06-26 2018-01-05 新华三大数据技术有限公司 GPU resource dispatching method and device

Also Published As

Publication number Publication date
CN106155811B (en) 2020-01-07
CN106155811A (en) 2016-11-23

Similar Documents

Publication Publication Date Title
WO2016173450A1 (en) Graphic processing device, resource service device, resource scheduling method and device thereof
CN109582425B (en) GPU service redirection system and method based on cloud and terminal GPU fusion
JP2020024722A (en) Session idle optimization for streaming server
US8584136B2 (en) Context-aware request dispatching in clustered environments
EP3200393B1 (en) Method and device for virtual network function management
WO2018006676A1 (en) Acceleration resource processing method and apparatus and network function virtualization system
WO2021098182A1 (en) Resource management method and apparatus, electronic device and storage medium
WO2018191849A1 (en) Cloud management platform, virtual machine management method and system thereof
US11411799B2 (en) Scalable statistics and analytics mechanisms in cloud networking
CN107015972B (en) Method, device and system for migrating machine room services
Arthi et al. Energy aware cloud service provisioning approach for green computing environment
WO2020024978A1 (en) Device, method, apparatus, and readable storage medium for virtual machine migration
CN109960579B (en) Method and device for adjusting service container
CN109697114B (en) Method and machine for application migration
CN104158833A (en) Method for constructing intelligent desktop system
CN110855739A (en) Container technology-based remote and heterogeneous resource unified management method and system
CN112764909B (en) Sharing method and system based on cloud architecture workstation
CN105653347B (en) A kind of server, method for managing resource and virtual machine manager
US11656914B2 (en) Anticipating future resource consumption based on user sessions
CN107528871A (en) Data analysis in storage system
CN115225645B (en) Service updating method, device, system and storage medium
CN115378937B (en) Distributed concurrency method, device, equipment and readable storage medium for tasks
CN111614702A (en) Edge calculation method and edge calculation system
CN104144176A (en) Method for connecting intelligent desktop system clients and servers
CN113703906A (en) Data processing method, device and system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16785881

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16785881

Country of ref document: EP

Kind code of ref document: A1