[go: up one dir, main page]

CN113722085B - Graphics resource allocation method and allocation system - Google Patents

Graphics resource allocation method and allocation system Download PDF

Info

Publication number
CN113722085B
CN113722085B CN202010457620.3A CN202010457620A CN113722085B CN 113722085 B CN113722085 B CN 113722085B CN 202010457620 A CN202010457620 A CN 202010457620A CN 113722085 B CN113722085 B CN 113722085B
Authority
CN
China
Prior art keywords
processing unit
graphic
graphics
association information
graphics processing
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202010457620.3A
Other languages
Chinese (zh)
Other versions
CN113722085A (en
Inventor
吕理钰
周思婷
王志能
郭立辰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Artus Technologies Co ltd
Original Assignee
Artus Technologies Co ltd
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 Artus Technologies Co ltd filed Critical Artus Technologies Co ltd
Priority to CN202010457620.3A priority Critical patent/CN113722085B/en
Publication of CN113722085A publication Critical patent/CN113722085A/en
Application granted granted Critical
Publication of CN113722085B publication Critical patent/CN113722085B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multi Processors (AREA)

Abstract

The invention provides a graphic resource distribution method and a graphic resource distribution system. The method comprises the following steps: obtaining first association information between a first graphic processing unit and at least one central processing unit in the plurality of graphic processing units; obtaining second association information between the first graphics processing unit and at least one second graphics processing unit of the plurality of graphics processing units; establishing a grouping and rubbing structure of the plurality of graphic processing units according to the first association information and the second association information; and executing the graphic resource allocation of the graphic processing units according to the grouping and rubbing structure. Therefore, the image processing efficiency can be effectively improved.

Description

图形资源的分配方法与分配系统Graphics resource allocation method and allocation system

技术领域Technical Field

本发明涉及一种系统资源分配技术,尤其涉及一种图形资源的分配方法与分配系统。The present invention relates to a system resource allocation technology, and in particular to a graphic resource allocation method and allocation system.

背景技术Background technique

随着科技的进步,对于计算机系统的运算速度的要求也越来越高。因此,部分计算机系统可配置多个图形处理单元(Graphic Processing Unit,GPU)以协助中央处理单元(Central Processing Unit,CPU)进行与图形相关的运算处理。然而,在现有的工作机制中,与某一中央处理单元有关的图形处理工作往往是随机地分配给一或多个图形处理单元进行处理,而并未考虑到接收到此图形处理工作的图形处理单元与此中央处理单元之间的沟通路径(或信号传递路径)是否过于复杂,进而导致系统效能降低。With the advancement of technology, the requirements for the computing speed of computer systems are getting higher and higher. Therefore, some computer systems can be configured with multiple Graphics Processing Units (GPUs) to assist the Central Processing Unit (CPU) in performing graphics-related computing. However, in the existing working mechanism, the graphics processing work related to a certain central processing unit is often randomly assigned to one or more graphics processing units for processing, without considering whether the communication path (or signal transmission path) between the graphics processing unit that receives the graphics processing work and the central processing unit is too complicated, thereby reducing system performance.

发明内容Summary of the invention

本发明提供一种图形资源的分配方法与分配系统,可有效提高图形处理效率。The present invention provides a method and system for allocating graphic resources, which can effectively improve the efficiency of graphic processing.

本发明的实施例提供一种图形资源的分配方法,其包括:获得多个图形处理单元中的第一图形处理单元与至少一中央处理单元之间的第一关联信息;获得所述第一图形处理单元与所述多个图形处理单元中的至少一第二图形处理单元之间的第二关联信息;根据所述第一关联信息与所述第二关联信息建立所述多个图形处理单元的分群拓墣结构;以及根据所述分群拓墣结构执行所述多个图形处理单元的图形资源分配。An embodiment of the present invention provides a method for allocating graphics resources, which includes: obtaining first association information between a first graphics processing unit among multiple graphics processing units and at least one central processing unit; obtaining second association information between the first graphics processing unit and at least one second graphics processing unit among the multiple graphics processing units; establishing a cluster topology structure of the multiple graphics processing units based on the first association information and the second association information; and executing graphics resource allocation of the multiple graphics processing units based on the cluster topology structure.

本发明的实施例另提供一种图形资源的分配系统,其包括至少一中央处理单元、多个图形处理单元、存储装置及图形资源分配器。所述多个图形处理单元连接至所述至少一中央处理单元。所述存储装置连接至所述至少一中央处理单元与所述多个图形处理单元。所述图形资源分配器连接至所述存储装置。所述图形资源分配器用以从所述存储装置获得所述多个图形处理单元中的第一图形处理单元与所述至少一中央处理单元之间的第一关联信息。所述图形资源分配器更用以从所述存储装置获得所述第一图形处理单元与所述多个图形处理单元中的至少一第二图形处理单元之间的第二关联信息。所述图形资源分配器更用以根据所述第一关联信息与所述第二关联信息建立所述多个图形处理单元的分群拓墣结构。所述图形资源分配器更用以根据所述分群拓墣结构执行所述多个图形处理单元的图形资源分配。An embodiment of the present invention further provides a system for allocating graphics resources, which includes at least one central processing unit, multiple graphics processing units, a storage device, and a graphics resource allocator. The multiple graphics processing units are connected to the at least one central processing unit. The storage device is connected to the at least one central processing unit and the multiple graphics processing units. The graphics resource allocator is connected to the storage device. The graphics resource allocator is used to obtain first association information between a first graphics processing unit among the multiple graphics processing units and the at least one central processing unit from the storage device. The graphics resource allocator is further used to obtain second association information between the first graphics processing unit and at least one second graphics processing unit among the multiple graphics processing units from the storage device. The graphics resource allocator is further used to establish a cluster topology structure of the multiple graphics processing units based on the first association information and the second association information. The graphics resource allocator is further used to perform graphics resource allocation of the multiple graphics processing units based on the cluster topology structure.

基于上述,根据第一图形处理单元与中央处理单元之间的第一关联信息与所述第一图形处理单元与至少一第二图形处理单元之间的第二关联信息后,多个图形处理单元的分群拓墣结构可被建立。尔后,根据所述分群拓墣结构,所述多个图形处理单元的图形资源可被妥善分配,从而有效提升图形处理效率。Based on the above, according to the first association information between the first graphics processing unit and the central processing unit and the second association information between the first graphics processing unit and at least one second graphics processing unit, a cluster topology structure of multiple graphics processing units can be established. Thereafter, according to the cluster topology structure, the graphics resources of the multiple graphics processing units can be properly allocated, thereby effectively improving the graphics processing efficiency.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1是根据本发明的一实施例所示出的图形资源的分配系统的示意图;FIG1 is a schematic diagram of a system for allocating graphics resources according to an embodiment of the present invention;

图2是根据本发明的一实施例所示出的中央处理单元与图形处理单元的实体连接关系的示意图;2 is a schematic diagram showing a physical connection relationship between a central processing unit and a graphics processing unit according to an embodiment of the present invention;

图3是根据本发明的一实施例所示出的第一关联信息的示意图;FIG3 is a schematic diagram of first association information according to an embodiment of the present invention;

图4是根据本发明的一实施例所示出的第二关联信息的示意图;FIG4 is a schematic diagram of second association information according to an embodiment of the present invention;

图5是根据本发明的一实施例所示出的分群拓墣结构的示意图;FIG5 is a schematic diagram of a cluster topology structure according to an embodiment of the present invention;

图6是根据本发明的一实施例所示出的图形资源的分配方法的流程图。FIG. 6 is a flow chart of a method for allocating graphics resources according to an embodiment of the present invention.

具体实施方式Detailed ways

现将详细地参考本发明的示范性实施例,示范性实施例的实例说明于附图中。只要有可能,相同元件符号在附图和描述中用来表示相同或相似部分。Reference will now be made in detail to exemplary embodiments of the present invention, examples of which are illustrated in the accompanying drawings. Whenever possible, the same reference numerals are used in the drawings and the description to refer to the same or like parts.

图1是根据本发明的一实施例所示出的图形资源的分配系统的示意图。请参照图1,系统(亦称为图形资源的分配系统)10可实作于笔记本电脑、台式电脑、工业计算机或服务器等各式具有数据处理与图形处理功能的电子装置(或计算机装置)中。FIG1 is a schematic diagram of a system for allocating graphics resources according to an embodiment of the present invention. Referring to FIG1 , the system (also referred to as a system for allocating graphics resources) 10 can be implemented in various electronic devices (or computer devices) having data processing and graphics processing functions, such as notebook computers, desktop computers, industrial computers, or servers.

系统10包括中央处理单元(CPU)11(1)~11(n)、图形处理单元(GPU)12(1)~12(m)、存储装置13及图形资源分配器14。中央处理单元(CPU)11(1)~11(n)中的每一者可以是指一个中央处理单元芯片。图形处理单元12(1)~12(m)中的每一者可以是指一个图形处理单元芯片。在运作上,中央处理单元11(1)~11(n)与图形处理单元12(1)~12(m)可协同运作,以共同完成数据处理与图形处理任务。中央处理单元11(1)~11(n)的总数与图形处理单元12(1)~12(m)的总数皆可是实务需求决定,本发明不加以限制。The system 10 includes a central processing unit (CPU) 11 (1) to 11 (n), a graphics processing unit (GPU) 12 (1) to 12 (m), a storage device 13, and a graphics resource allocator 14. Each of the central processing units (CPU) 11 (1) to 11 (n) can refer to a central processing unit chip. Each of the graphics processing units 12 (1) to 12 (m) can refer to a graphics processing unit chip. In operation, the central processing units 11 (1) to 11 (n) and the graphics processing units 12 (1) to 12 (m) can work together to jointly complete data processing and graphics processing tasks. The total number of the central processing units 11 (1) to 11 (n) and the total number of the graphics processing units 12 (1) to 12 (m) can be determined by practical needs and the present invention is not limited thereto.

存储装置13用以存储数据。存储装置13可包括易失性存储器模块与非易失性存储器模块。易失性存储器模块可包括随机存取存储器(Random Access Memory,RAM)等可易失性地存储数据的存储器媒体。非易失性存储器模块可包括只读存储器(Read Only Memory,ROM)和/或快闪存储器(flash memory)等可非易失性地存储数据的存储器媒体。The storage device 13 is used to store data. The storage device 13 may include a volatile memory module and a non-volatile memory module. The volatile memory module may include a memory medium such as a random access memory (RAM) that can store data volatilely. The non-volatile memory module may include a memory medium such as a read-only memory (ROM) and/or a flash memory that can store data non-volatilely.

图形资源分配器14连接至中央处理单元11(1)~11(n)、图形处理单元12(1)~12(m)及存储装置13。在一实施例中,图形资源分配器14可实作为可程序化的一般用途或特殊用途的微处理器、数字信号处理器(Digital Signal Processor,DSP)、可程序化控制器、特殊应用集成电路(Application Specific Integrated Circuits,ASIC)、可程序化逻辑装置(Programmable Logic Device,PLD)或其他类似装置或这些装置的组合。在一实施例中,图形资源分配器14亦可实作为程序码并存储于存储装置13中。The graphics resource allocator 14 is connected to the CPUs 11(1)-11(n), the graphics processing units 12(1)-12(m) and the storage device 13. In one embodiment, the graphics resource allocator 14 can be implemented as a programmable general-purpose or special-purpose microprocessor, a digital signal processor (DSP), a programmable controller, an application specific integrated circuit (ASIC), a programmable logic device (PLD) or other similar devices or a combination of these devices. In one embodiment, the graphics resource allocator 14 can also be implemented as a program code and stored in the storage device 13.

存储装置13中存储有表格信息131与132。表格信息131与132例如是在将中央处理单元11(1)~11(n)与图形处理单元12(1)~12(m)安装至系统10的主机板(未示出)后,由系统10的作业系统(例如Windows作业系统)或BIOS等系统工具自行扫描相关的硬体信息而自动产生。The storage device 13 stores table information 131 and 132. The table information 131 and 132 are automatically generated by, for example, scanning related hardware information by the operating system (e.g., Windows operating system) or system tools such as BIOS of the system 10 after the central processing units 11(1)-11(n) and the graphics processing units 12(1)-12(m) are installed on a motherboard (not shown) of the system 10.

表格信息131记载了中央处理单元11(1)~11(n)与图形处理单元12(1)~12(m)之间的关联信息。特别是,表格信息131可记载图形处理单元12(1)~12(m)中的某一图形处理单元(亦称为第一图形处理单元)与中央处理单元11(1)~11(n)之间的关联信息(亦称为第一关联信息)。例如,第一关联信息可包括第一图形处理单元在中央处理单元11(1)~11(n)中所预设优先使用的某一中央处理单元(亦称为第一中央处理单元)的核心号码(corenumber)信息。The table information 131 records the association information between the central processing units 11(1)-11(n) and the graphics processing units 12(1)-12(m). In particular, the table information 131 may record the association information (also referred to as the first association information) between a certain graphics processing unit (also referred to as the first graphics processing unit) among the graphics processing units 12(1)-12(m) and the central processing units 11(1)-11(n). For example, the first association information may include the core number information of a certain central processing unit (also referred to as the first central processing unit) that is preset and preferentially used by the first graphics processing unit among the central processing units 11(1)-11(n).

表格信息132记载了图形处理单元12(1)~12(m)彼此间的关联信息。特别是,表格信息132可记载所述第一图形处理单元与图形处理单元12(1)~12(m)中的其余图形处理单元(亦称为第二图形处理单元)之间的关联信息(亦称为第二关联信息)。例如,第二关联信息可包括第一图形处理单元与所述第二图形处理单元之间的邻近等级信息。The table information 132 records the association information between the GPUs 12(1)-12(m). In particular, the table information 132 may record the association information (also referred to as second association information) between the first GPU and the remaining GPUs (also referred to as second GPUs) in the GPUs 12(1)-12(m). For example, the second association information may include the proximity level information between the first GPU and the second GPU.

图形资源分配器14可从存储装置13中读取表格信息131与132以获得所述第一关联信息与所述第二关联信息。根据第一关联信息与第二关联信息,图形资源分配器14可建立图形处理单元12(1)~12(m)的分群拓墣结构。尔后,图形资源分配器14可根据所建立的分群拓墣结构执行图形处理单元12(1)~12(m)的图形资源分配。例如,当需要执行与中央处理单元11(1)~11(n)中的至少一者有关的图形处理任务时,图形资源分配器14可根据所建立的分群拓墣结构从图形处理单元12(1)~12(m)中选择合适的图形处理单元并将此图形处理任务分配给所选择的图形处理单元进行处理。The graphics resource allocator 14 can read the table information 131 and 132 from the storage device 13 to obtain the first association information and the second association information. Based on the first association information and the second association information, the graphics resource allocator 14 can establish a cluster topology structure of the graphics processing units 12 (1) to 12 (m). Thereafter, the graphics resource allocator 14 can perform graphics resource allocation of the graphics processing units 12 (1) to 12 (m) according to the established cluster topology structure. For example, when it is necessary to execute a graphics processing task related to at least one of the central processing units 11 (1) to 11 (n), the graphics resource allocator 14 can select a suitable graphics processing unit from the graphics processing units 12 (1) to 12 (m) according to the established cluster topology structure and allocate the graphics processing task to the selected graphics processing unit for processing.

图2是根据本发明的一实施例所示出的中央处理单元与图形处理单元的实体连接关系的示意图。请参照图1与图2,假设中央处理单元11(1)~11(n)包括中央处理单元11(1)与11(2)且图形处理单元12(1)~12(m)包括图形处理单元12(1)~12(8)。FIG2 is a schematic diagram showing the physical connection relationship between a central processing unit and a graphics processing unit according to an embodiment of the present invention. Referring to FIG1 and FIG2 , it is assumed that the central processing units 11(1) to 11(n) include central processing units 11(1) and 11(2) and the graphics processing units 12(1) to 12(m) include graphics processing units 12(1) to 12(8).

中央处理单元11(1)与11(2)经由接口21(1)~21(4)连接至图形处理单元12(1)~12(8)。例如,中央处理单元11(1)经由接口21(1)连接至图形处理单元12(1)与12(2)并经由接口21(2)连接至图形处理单元12(3)与12(4)。中央处理单元11(2)经由接口21(3)连接至图形处理单元12(5)与12(6)并经由接口21(4)连接至图形处理单元12(7)与12(8)。接口21(1)~21(4)可分别包括PCIe交换器或其他类型的实体连接接口。The central processing units 11(1) and 11(2) are connected to the graphics processing units 12(1) to 12(8) via interfaces 21(1) to 21(4). For example, the central processing unit 11(1) is connected to the graphics processing units 12(1) and 12(2) via interface 21(1) and is connected to the graphics processing units 12(3) and 12(4) via interface 21(2). The central processing unit 11(2) is connected to the graphics processing units 12(5) and 12(6) via interface 21(3) and is connected to the graphics processing units 12(7) and 12(8) via interface 21(4). The interfaces 21(1) to 21(4) may respectively include PCIe switches or other types of physical connection interfaces.

须注意的是,在图2的实施例中,当上层的中央处理单元11(1)与11(2)分配图形处理任务给下层的图形处理单元12(1)~12(8)或者上层的中央处理单元11(1)与11(2)从下层的图形处理单元12(1)~12(8)接收图形处理任务的处理结果时,中央处理单元11(1)可直接经由接口21(1)与21(2)与图形处理单元12(1)~12(4)通信,且中央处理单元11(2)可直接经由接口21(3)与21(4)与图形处理单元12(5)~12(8)通信。然而,若涉及跨中央处理单元的任务和/或处理结果的交换时,中央处理单元11(1)须经由中央处理单元11(2)才能与图形处理单元12(5)~12(8)通信,且中央处理单元11(2)须经由中央处理单元11(1)才能与图形处理单元12(1)~12(4)通信。It should be noted that in the embodiment of FIG. 2 , when the upper-level central processing units 11(1) and 11(2) assign graphics processing tasks to the lower-level graphics processing units 12(1) to 12(8) or when the upper-level central processing units 11(1) and 11(2) receive processing results of graphics processing tasks from the lower-level graphics processing units 12(1) to 12(8), the central processing unit 11(1) can communicate directly with the graphics processing units 12(1) to 12(4) via interfaces 21(1) and 21(2), and the central processing unit 11(2) can communicate directly with the graphics processing units 12(5) to 12(8) via interfaces 21(3) and 21(4). However, when it comes to the exchange of tasks and/or processing results across central processing units, central processing unit 11(1) must communicate with graphics processing units 12(5) to 12(8) via central processing unit 11(2), and central processing unit 11(2) must communicate with graphics processing units 12(1) to 12(4) via central processing unit 11(1).

基于上述通信方面的限制,若随机选择图形处理单元来辅助特定中央处理单元进行图形处理,则可能因为图形处理单元的选择不佳,而导致信号传递发生延迟,进而导致整体的图形处理效能下降。在一实施例中,所建立的分群拓墣结构可至少部分反映上层的中央处理单元与下层的图形处理单元之间的实体连接关系。因此,当需要分配图形处理资源时,图形资源分配器14可根据此分群拓墣结构选择较为合适的一或多个图形处理单元来辅助特定的中央处理单元进行图形运算,从而提升整体图形处理效能下降。Based on the above-mentioned communication limitations, if a graphics processing unit is randomly selected to assist a specific central processing unit in performing graphics processing, the signal transmission may be delayed due to poor selection of the graphics processing unit, thereby causing a decrease in the overall graphics processing performance. In one embodiment, the established cluster topology structure can at least partially reflect the physical connection relationship between the upper-level central processing unit and the lower-level graphics processing unit. Therefore, when it is necessary to allocate graphics processing resources, the graphics resource allocator 14 can select a more suitable one or more graphics processing units according to this cluster topology structure to assist a specific central processing unit in performing graphics operations, thereby improving the overall graphics processing performance.

为了说明方便,以下假设中央处理单元11(1)与11(1)的编号分别为CPU#1与CPU#2。此外,假设图形处理单元12(1)~12(8)的编号分别为GPU#1、GPU#2、GPU#4、GPU#5、GPU#3、GPU#6、GPU#7及GPU#8。For the sake of convenience, it is assumed that the central processing units 11(1) and 11(1) are numbered CPU#1 and CPU#2, respectively. In addition, it is assumed that the graphics processing units 12(1) to 12(8) are numbered GPU#1, GPU#2, GPU#4, GPU#5, GPU#3, GPU#6, GPU#7, and GPU#8, respectively.

图3是根据本发明的一实施例所示出的第一关联信息的示意图。图4是根据本发明的一实施例所示出的第二关联信息的示意图。请参照图1至图3,假设第一关联信息包括关联信息31。关联信息31可反映中央处理单元11(1)~11(2)与图形处理单元12(1)~12(8)之间的关联。例如,关联信息31可反映图形处理单元GPU#1~GPU#8所预设优先使用的中央处理单元的核心号码编号分别为CPU core#1、CPU core#1、CPU core#2、CPU core#1、CPUcore#1、CPU core#2、CPU core#2及CPU core#2。其中,CPU core#1例如是中央处理单元11(1)的核心号码编号,而CPU core#2例如是中央处理单元11(2)的核心号码编号。FIG. 3 is a schematic diagram of first association information according to an embodiment of the present invention. FIG. 4 is a schematic diagram of second association information according to an embodiment of the present invention. Referring to FIGS. 1 to 3 , it is assumed that the first association information includes association information 31. Association information 31 may reflect the association between central processing units 11(1) to 11(2) and graphics processing units 12(1) to 12(8). For example, association information 31 may reflect that the core numbers of the central processing units that are preset for priority use by graphics processing units GPU#1 to GPU#8 are CPU core#1, CPU core#1, CPU core#2, CPU core#1, CPU core#1, CPU core#2, CPU core#2, and CPU core#2, respectively. Among them, CPU core#1 is, for example, the core number of the central processing unit 11(1), and CPU core#2 is, for example, the core number of the central processing unit 11(2).

根据关联信息31,图形资源分配器14可获得每一图形处理单元所属的群组。例如,根据关联信息31,图形资源分配器14可决定图形处理单元GPU#1~GPU#8分别属于群组1、群组1、群组2、群组1、群组1、群组2、群组2及群组2。属于群组1的图形处理单元可包含至少部分预设优先使用中央处理单元CPU#1的图形处理单元(例如图形处理单元GPU#1、GPU#2、GPU#4、GPU#5)。属于群组2的图形处理单元可包含至少部分预设优先使用中央处理单元CPU#2的图形处理单元(例如图形处理单元GPU#3、GPU#6、GPU#7、GPU#8)。According to the association information 31, the graphics resource allocator 14 can obtain the group to which each graphics processing unit belongs. For example, according to the association information 31, the graphics resource allocator 14 can determine that the graphics processing units GPU#1 to GPU#8 belong to group 1, group 1, group 2, group 1, group 1, group 2, group 2, and group 2, respectively. The graphics processing units belonging to group 1 may include at least some of the graphics processing units that are preset to give priority to the use of the central processing unit CPU#1 (for example, graphics processing units GPU#1, GPU#2, GPU#4, GPU#5). The graphics processing units belonging to group 2 may include at least some of the graphics processing units that are preset to give priority to the use of the central processing unit CPU#2 (for example, graphics processing units GPU#3, GPU#6, GPU#7, GPU#8).

请参照图1至图4,假设第二关联信息包括关联信息41。关联信息41可反映图形处理单元12(1)~12(8)彼此之间的关联。例如,关联信息41可反映特定图形处理单元(即第一图形处理单元)与其余图形处理单元(即第二图形处理单元)之间的邻近等级信息。1 to 4, it is assumed that the second association information includes association information 41. The association information 41 may reflect the association between the GPUs 12(1) to 12(8). For example, the association information 41 may reflect the proximity level information between a specific GPU (i.e., the first GPU) and the remaining GPUs (i.e., the second GPU).

在一实施例中,邻近等级信息可以多个图形处理单元之间距离较近的等级(Rank)1与多个图形处理单元之间距离较远的等级2来表示。例如,关联信息41可记载图形处理单元GPU#1与图形处理单元GPU#2、GPU#3、GPU#4及GPU#5之间的距离较近,且其与图形处理单元GPU#6、GPU#7及GPU#8之间的距离较远;图形处理单元GPU#2与图形处理单元GPU#1、GPU#4及GPU#5之间的距离较近,且其与图形处理单元GPU#3、GPU#6、GPU#7及GPU#8之间的距离较远;图形处理单元GPU#3与图形处理单元GPU#1、GPU#6、GPU#7及GPU#8之间的距离较近,且其与图形处理单元GPU#2、GPU#4及GPU#5之间的距离较远等。In one embodiment, the proximity rank information may be represented by Rank 1 where the distances between the multiple GPUs are relatively close and Rank 2 where the distances between the multiple GPUs are relatively far. For example, the association information 41 may record that the distances between GPU#1 and GPU#2, GPU#3, GPU#4 and GPU#5 are relatively close, and the distances between GPU#1 and GPU#6, GPU#7 and GPU#8 are relatively far; the distances between GPU#2 and GPU#1, GPU#4 and GPU#5 are relatively close, and the distances between GPU#3, GPU#6, GPU#7 and GPU#8 are relatively far; the distances between GPU#3 and GPU#1, GPU#6, GPU#7 and GPU#8 are relatively close, and the distances between GPU#2, GPU#4 and GPU#5 are relatively far, etc.

须注意的是,关联信息41所记载的信息可能无法完全正确地反映上层的中央处理单元11(1)与11(2)与下层的图形处理单元12(1)~12(8)之间真正的实体连接关系。例如,对于图形处理单元GPU#1而言,关联信息41反映图形处理单元GPU#3是属于距离较近的图形处理单元,但是,实际上,图形处理单元GPU#3是连接至另一中央处理单元11(2),而非中央处理单元11(1)。因此,若单纯根据关联信息41来建立分群拓墣结构,可能会发生误判,进而影响后续的图形处理效能。It should be noted that the information recorded in the association information 41 may not fully and correctly reflect the actual physical connection relationship between the upper-level central processing units 11(1) and 11(2) and the lower-level graphics processing units 12(1) to 12(8). For example, for graphics processing unit GPU#1, the association information 41 reflects that graphics processing unit GPU#3 is a graphics processing unit that is closer, but in fact, graphics processing unit GPU#3 is connected to another central processing unit 11(2), not central processing unit 11(1). Therefore, if the cluster topology structure is established based solely on the association information 41, misjudgment may occur, thereby affecting the subsequent graphics processing performance.

因此,在一实施例中,在建立分群拓墣结构时,图形资源分配器14可针对每一个图形处理单元筛选出属于同一个群组且距离较近的图形处理单元(亦称为第三图形处理单元)。例如,根据关联信息41,图形资源分配器14可选择图形处理单元GPU#2、GPU#3、GPU#4及GPU#5作为与图形处理单元GPU#1最邻近的图形处理单元,选择图形处理单元GPU#1、GPU#4及GPU#5作为与图形处理单元GPU#2最邻近的图形处理单元,并选择图形处理单元GPU#1、GPU#6、GPU#7及GPU#8作为与图形处理单元GPU#3最邻近的图形处理单元。然后,根据所筛选出的第三图形处理单元与对应的第一图形处理单元是否属同一个群组,图形资源分配器14可决定最终建立的分群拓墣结构中与第一图形处理单元有关的分群拓墣结构(亦称为第一分群拓墣结构)。Therefore, in one embodiment, when establishing the cluster topology structure, the graphics resource allocator 14 may select the graphics processing units (also referred to as the third graphics processing units) that belong to the same group and are closer to each graphics processing unit. For example, according to the association information 41, the graphics resource allocator 14 may select the graphics processing units GPU#2, GPU#3, GPU#4 and GPU#5 as the graphics processing units that are closest to the graphics processing unit GPU#1, select the graphics processing units GPU#1, GPU#4 and GPU#5 as the graphics processing units that are closest to the graphics processing unit GPU#2, and select the graphics processing units GPU#1, GPU#6, GPU#7 and GPU#8 as the graphics processing units that are closest to the graphics processing unit GPU#3. Then, according to whether the selected third graphics processing unit and the corresponding first graphics processing unit belong to the same group, the graphics resource allocator 14 may determine the cluster topology structure related to the first graphics processing unit in the finally established cluster topology structure (also referred to as the first cluster topology structure).

图5是根据本发明的一实施例所示出的分群拓墣结构的示意图。请参照图1至图5,根据关联信息31与41,在建立属于群组1的图形处理单元GPU#1的分群拓墣结构51时,属于相同的群组1且最邻近图形处理单元GPU#1的图形处理单元GPU#2、GPU#4及GPU#5会被保留于分群拓墣结构51中,而属于不同的群组2但被误记为也是最邻近图形处理单元GPU#1的图形处理单元GPU#3则会从分群拓墣结构51中移除。FIG5 is a schematic diagram of a cluster topology structure according to an embodiment of the present invention. Referring to FIGS. 1 to 5, based on the association information 31 and 41, when establishing the cluster topology structure 51 of the GPU#1 belonging to group 1, the GPU#2, GPU#4 and GPU#5 belonging to the same group 1 and being the closest to the GPU#1 will be retained in the cluster topology structure 51, while the GPU#3 belonging to a different group 2 but being mistakenly recorded as also being the closest to the GPU#1 will be removed from the cluster topology structure 51.

在建立属于群组1的图形处理单元GPU#2的分群拓墣结构52时,属于相同的群组1且最邻近图形处理单元GPU#2的图形处理单元GPU#1、GPU#4及GPU#5会被保留于分群拓墣结构52中。在建立属于群组2的图形处理单元GPU#3的分群拓墣结构53时,属于相同的群组2且最邻近图形处理单元GPU#3的图形处理单元GPU#6、GPU#7及GPU#8会被保留于分群拓墣结构53中,而属于不同的群组1但被误记为也是最邻近图形处理单元GPU#3的图形处理单元GPU#1则会从分群拓墣结构53中移除。依此类推,其余图形处理单元GPU#4~GPU#8所对应的分群拓墣结构也可被建立。When establishing the cluster topology structure 52 of the GPU#2 belonging to group 1, the GPU#1, GPU#4 and GPU#5 belonging to the same group 1 and being the closest GPU#2 are retained in the cluster topology structure 52. When establishing the cluster topology structure 53 of the GPU#3 belonging to group 2, the GPU#6, GPU#7 and GPU#8 belonging to the same group 2 and being the closest GPU#3 are retained in the cluster topology structure 53, while the GPU#1 belonging to a different group 1 but being mistakenly recorded as also being the closest GPU#3 is removed from the cluster topology structure 53. Similarly, the cluster topology structures corresponding to the remaining GPU#4 to GPU#8 can also be established.

尔后,当欲分配图形运算所需的图形资源时,图形资源分配器14可选择同属于分群拓墣结构51的图形处理单元GPU#1以及图形处理单元GPU#2、GPU#4及GPU#5中的至少一者来协同进行图形运算,或者选择同属于分群拓墣结构53的图形处理单元GPU#3以及图形处理单元GPU#6、GPU#7及GPU#8中的至少一者来协同进行图形运算等。相较于随机选择可用的图形处理单元来进行图形处理,根据前述实施例中所建立的分群拓墣结构来选择图形处理单元可有效提高整体的图形运算效能。Thereafter, when it is desired to allocate graphics resources required for graphics computing, the graphics resource allocator 14 may select the graphics processing unit GPU#1 and at least one of the graphics processing units GPU#2, GPU#4 and GPU#5 belonging to the cluster topology structure 51 to collaborate in graphics computing, or select the graphics processing unit GPU#3 and at least one of the graphics processing units GPU#6, GPU#7 and GPU#8 belonging to the cluster topology structure 53 to collaborate in graphics computing, etc. Compared with randomly selecting available graphics processing units for graphics processing, selecting graphics processing units according to the cluster topology structure established in the aforementioned embodiment can effectively improve the overall graphics computing performance.

须注意的是,虽然在前述实施例中是以图2作为上层的中央处理单元与下层的图形处理单元之间的实体连接关系的范例,但本发明不限于此。在另一实施例中,上层的中央处理单元与下层的图形处理单元之间的实体连接关系还可以具有其他连接形态,例如更多层或经由更多或更少的接口连接等等,本发明不加以限制。此外,无论上层的中央处理单元与下层的图形处理单元之间的实体连接关系为何,一旦将中央处理单元与图形处理单元安装至主机板后,图1的表格信息131与132即可自动产生。尔后,相应的分群拓墣结构即可根据表格信息131与132而建立,在此不重复赘述。It should be noted that, although FIG. 2 is used as an example of the physical connection relationship between the upper-layer central processing unit and the lower-layer graphics processing unit in the aforementioned embodiment, the present invention is not limited thereto. In another embodiment, the physical connection relationship between the upper-layer central processing unit and the lower-layer graphics processing unit may also have other connection forms, such as more layers or via more or fewer interfaces, etc., which are not limited by the present invention. In addition, no matter what the physical connection relationship between the upper-layer central processing unit and the lower-layer graphics processing unit is, once the central processing unit and the graphics processing unit are installed on the motherboard, the table information 131 and 132 of FIG. 1 can be automatically generated. Thereafter, the corresponding cluster topology structure can be established based on the table information 131 and 132, which will not be repeated here.

图6是根据本发明的一实施例所示出的图形资源的分配方法的流程图。请参照图6,在步骤S601中,获得多个图形处理单元中的第一图形处理单元与至少一中央处理单元之间的第一关联信息。在步骤S602中,获得所述第一图形处理单元与所述多个图形处理单元中的至少一第二图形处理单元之间的第二关联信息。在步骤S603中,根据所述第一关联信息与所述第二关联信息建立所述多个图形处理单元的分群拓墣结构。在步骤S604中,根据所述分群拓墣结构执行所述多个图形处理单元的图形资源分配。FIG6 is a flow chart of a method for allocating graphics resources according to an embodiment of the present invention. Referring to FIG6, in step S601, first association information between a first graphics processing unit among a plurality of graphics processing units and at least one central processing unit is obtained. In step S602, second association information between the first graphics processing unit and at least one second graphics processing unit among the plurality of graphics processing units is obtained. In step S603, a cluster topology structure of the plurality of graphics processing units is established according to the first association information and the second association information. In step S604, graphics resource allocation of the plurality of graphics processing units is performed according to the cluster topology structure.

然而,图6中各步骤已详细说明如上,在此便不再赘述。值得注意的是,图6中各步骤可以实作为多个程序码或是电路,本发明不加以限制。此外,图6的方法可以搭配以上范例实施例使用,也可以单独使用,本发明不加以限制。However, each step in FIG6 has been described in detail above, and will not be repeated here. It is worth noting that each step in FIG6 can be implemented as multiple program codes or circuits, and the present invention is not limited thereto. In addition, the method of FIG6 can be used in conjunction with the above exemplary embodiments, or can be used alone, and the present invention is not limited thereto.

综上所述,本发明的实施例可根据第一关联信息对图形处理单元进行分组。接着,根据分组结果与第二关联信息,图形处理单元的分群拓墣结构可被建立。根据所建立的分群拓墣结构,多个图形处理单元的图形资源可被妥善分配与使用,从而有效提升往后的图形处理效率。In summary, the embodiment of the present invention can group the graphics processing units according to the first association information. Then, according to the grouping result and the second association information, a grouping topology structure of the graphics processing units can be established. According to the established grouping topology structure, the graphics resources of multiple graphics processing units can be properly allocated and used, thereby effectively improving the graphics processing efficiency in the future.

最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims (6)

1. A method for allocating graphics resources, comprising:
Obtaining first association information between a first graphic processing unit and at least one central processing unit in a plurality of graphic processing units, wherein the first association information reflects that a central processing unit preset for use by the first graphic processing unit is a first central processing unit in the at least one central processing unit;
Obtaining second association information between the first graphics processing unit and at least one second graphics processing unit of the plurality of graphics processing units, wherein the second association information reflects a distance between the first graphics processing unit and the at least one second graphics processing unit;
establishing a grouping and rubbing structure of the plurality of graphic processing units according to the first association information and the second association information; and
Executing the graphic resource allocation of the plurality of graphic processing units according to the grouping topology,
The step of establishing the grouping topology structure of the plurality of graphic processing units according to the first association information and the second association information comprises the following steps:
obtaining a first group to which the first graphic processing unit belongs according to the first association information;
selecting at least one of the at least one second graphic processing unit as a third graphic processing unit nearest to the first graphic processing unit according to the second association information; and
Determining a first group topology related to the first graphic processing unit in the group topology according to whether the third graphic processing unit belongs to the first group,
Wherein determining the first group topology related to the first graphic processing unit in the group topology according to whether the third graphic processing unit belongs to the first group comprises:
If the third graphic processing unit belongs to the first group, reserving the third graphic processing unit in the first grouping roller structure; and
If the third GPU does not belong to the first group, removing the third GPU from the first split-cluster-topology,
Wherein the step of executing the graphic resource allocation of the plurality of graphic processing units according to the group topology comprises:
And selecting at least one graphic processing unit belonging to the first grouping and cleaning structure to cooperatively perform graphic operation.
2. The allocation method of graphic resources according to claim 1, wherein the first association information records core number information of the first central processing unit, and the core number information includes a core number of the first central processing unit.
3. The method of allocating graphics resources according to claim 1, wherein the second association information records proximity level information between the first graphics processing unit and the at least one second graphics processing unit, and the proximity level information reflects the distance between the first graphics processing unit and the at least one second graphics processing unit.
4. A graphics resource allocation system, comprising:
at least one central processing unit;
a plurality of graphic processing units connected to the at least one central processing unit;
A storage device; and
A graphics resource allocator coupled to said at least one central processing unit, said storage device, and said plurality of graphics processing units,
Wherein the graphics resource allocator is configured to obtain first association information between a first graphics processing unit of the plurality of graphics processing units and the at least one central processing unit from the storage device, wherein the first association information reflects that a central processing unit preset for use by the first graphics processing unit is a first central processing unit of the at least one central processing unit,
The graphics resource allocator is further configured to obtain second association information between the first graphics processing unit and at least one second graphics processing unit of the plurality of graphics processing units from the storage device, wherein the second association information reflects a distance between the first graphics processing unit and the at least one second graphics processing unit,
The graphic resource allocator is further configured to establish a packet topology of the plurality of graphic processing units according to the first association information and the second association information, and
The graphic resource allocator is further configured to perform the graphic resource allocation of the plurality of graphic processing units according to the grouping topology,
The operation of establishing the grouping topology structure of the plurality of graphic processing units according to the first association information and the second association information comprises the following steps:
obtaining a first group to which the first graphic processing unit belongs according to the first association information;
selecting at least one of the at least one second graphic processing unit as a third graphic processing unit nearest to the first graphic processing unit according to the second association information; and
Determining a first group topology related to the first graphic processing unit in the group topology according to whether the third graphic processing unit belongs to the first group,
Wherein determining the first group topology related to the first graphic processing unit in the group topology according to whether the third graphic processing unit belongs to the first group comprises:
If the third graphic processing unit belongs to the first group, reserving the third graphic processing unit in the first grouping roller structure; and
If the third GPU does not belong to the first group, removing the third GPU from the first split-cluster-topology,
Wherein performing the graphic resource allocation of the plurality of graphic processing units according to the grouping topology comprises:
And selecting at least one graphic processing unit belonging to the first grouping and cleaning structure to cooperatively perform graphic operation.
5. The graphic resource allocation system according to claim 4, wherein the first association information records core number information of the first central processing unit, and the core number information includes a core number of the first central processing unit.
6. The graphics resource allocation system according to claim 4, wherein said second association information records proximity level information between said first graphics processing unit and said at least one second graphics processing unit, and said proximity level information reflects said distance between said first graphics processing unit and said at least one second graphics processing unit.
CN202010457620.3A 2020-05-26 2020-05-26 Graphics resource allocation method and allocation system Active CN113722085B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010457620.3A CN113722085B (en) 2020-05-26 2020-05-26 Graphics resource allocation method and allocation system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010457620.3A CN113722085B (en) 2020-05-26 2020-05-26 Graphics resource allocation method and allocation system

Publications (2)

Publication Number Publication Date
CN113722085A CN113722085A (en) 2021-11-30
CN113722085B true CN113722085B (en) 2024-04-30

Family

ID=78672150

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010457620.3A Active CN113722085B (en) 2020-05-26 2020-05-26 Graphics resource allocation method and allocation system

Country Status (1)

Country Link
CN (1) CN113722085B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7561163B1 (en) * 2005-12-16 2009-07-14 Nvidia Corporation Detecting connection topology in a multi-processor graphics system
CN103262035A (en) * 2010-12-15 2013-08-21 超威半导体公司 Device discovery and topology reporting in a combined CPU/GPU architecture system
WO2016091164A1 (en) * 2014-12-12 2016-06-16 上海芯豪微电子有限公司 Multilane/multicore system and method
US10325343B1 (en) * 2017-08-04 2019-06-18 EMC IP Holding Company LLC Topology aware grouping and provisioning of GPU resources in GPU-as-a-Service platform
CN110389843A (en) * 2019-07-29 2019-10-29 广东浪潮大数据研究有限公司 A kind of business scheduling method, device, equipment and readable storage medium storing program for executing

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8797332B2 (en) * 2010-12-15 2014-08-05 Ati Technologies Ulc Device discovery and topology reporting in a combined CPU/GPU architecture system
US9342366B2 (en) * 2012-10-17 2016-05-17 Electronics And Telecommunications Research Institute Intrusion detection apparatus and method using load balancer responsive to traffic conditions between central processing unit and graphics processing unit
US10896064B2 (en) * 2017-03-27 2021-01-19 International Business Machines Corporation Coordinated, topology-aware CPU-GPU-memory scheduling for containerized workloads
US10235182B2 (en) * 2017-06-20 2019-03-19 Palo Alto Research Center Incorporated System and method for hybrid task management across CPU and GPU for efficient data mining
US11025456B2 (en) * 2018-01-12 2021-06-01 Apple Inc. Time domain resource allocation for mobile communication
US10728091B2 (en) * 2018-04-04 2020-07-28 EMC IP Holding Company LLC Topology-aware provisioning of hardware accelerator resources in a distributed environment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7561163B1 (en) * 2005-12-16 2009-07-14 Nvidia Corporation Detecting connection topology in a multi-processor graphics system
CN103262035A (en) * 2010-12-15 2013-08-21 超威半导体公司 Device discovery and topology reporting in a combined CPU/GPU architecture system
WO2016091164A1 (en) * 2014-12-12 2016-06-16 上海芯豪微电子有限公司 Multilane/multicore system and method
US10325343B1 (en) * 2017-08-04 2019-06-18 EMC IP Holding Company LLC Topology aware grouping and provisioning of GPU resources in GPU-as-a-Service platform
CN110389843A (en) * 2019-07-29 2019-10-29 广东浪潮大数据研究有限公司 A kind of business scheduling method, device, equipment and readable storage medium storing program for executing

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Fabrizio Angiulli ; Stefano Basta ; Stefano Lodi ; Claudio Sartori.GPU Strategies for Distance-Based Outlier Detection.Parallel and Distributed Systems, IEEE Transactions on.2016,(第11期),全文. *
Ye Tian ; Yong Hu ; Xukun Shen.A multi‐GPU finite element computation and hybrid collision handling process framework for brain deformation simulation.Computer Animation and Virtual Worlds.2019,第30卷(第1期),全文. *
基于多核CPU-GPU异构平台的并行Agent仿真;余文广;王维平;侯洪涛;李群;;系统工程与电子技术;20120815(第08期);全文 *
面向节点异构GPU集群的能量有效调度方案;霍洪鹏;胡新明;盛冲冲;吴百锋;;计算机应用与软件;20130315(第03期);全文 *

Also Published As

Publication number Publication date
CN113722085A (en) 2021-11-30

Similar Documents

Publication Publication Date Title
US9244842B2 (en) Data storage device with copy command
CN1274123A (en) Peripheral component interlink slot controller of partition system with dynamic arrangement
CN101896896B (en) Efficient interrupt message definition
US11379127B2 (en) Method and system for enhancing a distributed storage system by decoupling computation and network tasks
CN105892955B (en) Method and device for managing a storage system
CN115712594B (en) Channel allocation method and device, storage system and equipment and medium
US11461024B2 (en) Computing system and operating method thereof
CN117111830A (en) Storage devices, memory devices and computing systems including the same
CN114003528A (en) OCP switching card, switching system and switching method
CN119938321A (en) Resource allocation method, device, storage medium and device for PCIe device
CN115834689A (en) Microservice distribution method, electronic device and storage medium
CN108628760B (en) Method and device for atomic write command
CN115793983B (en) Addressing methods, devices, systems, computing devices and storage media
CN113722085B (en) Graphics resource allocation method and allocation system
CN116360995A (en) A PCIE resource allocation method, device and medium
US11093422B2 (en) Processor/endpoint communication coupling configuration system
CN110581869B (en) Resource allocation method, TLP packet processing method, equipment and storage medium
TWI825315B (en) Assigning method and assigning system for graphic resource
CN114528123B (en) Data access method, device, equipment and computer readable storage medium
CN110989936A (en) A storage space allocation method, device and storage medium
CN116302476A (en) Method and device for determining calculation force node
CN112612733A (en) Device and method for sharing RAID (redundant array of independent disks) function by multiple machines
CN104977527A (en) Integrated circuit IC test device and test method thereof
CN119003410B (en) A method, device, equipment and storage medium for optimizing communication between storage controllers
CN119025032B (en) Data access control method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant