TWI825315B - Assigning method and assigning system for graphic resource - Google Patents
Assigning method and assigning system for graphic resource Download PDFInfo
- Publication number
- TWI825315B TWI825315B TW109115353A TW109115353A TWI825315B TW I825315 B TWI825315 B TW I825315B TW 109115353 A TW109115353 A TW 109115353A TW 109115353 A TW109115353 A TW 109115353A TW I825315 B TWI825315 B TW I825315B
- Authority
- TW
- Taiwan
- Prior art keywords
- processing unit
- graphics processing
- graphics
- group
- processing units
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 14
- 238000013468 resource allocation Methods 0.000 claims description 23
- 230000010365 information processing Effects 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 10
- 230000008878 coupling Effects 0.000 description 8
- 238000010168 coupling process Methods 0.000 description 8
- 238000005859 coupling reaction Methods 0.000 description 8
- 230000000717 retained effect Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 230000007423 decrease Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000008054 signal transmission Effects 0.000 description 2
- 230000001934 delay Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Multi Processors (AREA)
Abstract
Description
本發明是有關於一種系統資源分配技術,且特別是有關於一種圖形資源的分配方法與分配系統。 The present invention relates to a system resource allocation technology, and in particular to a graphics resource allocation method and allocation system.
隨著科技的進步,對於電腦系統的運算速度之要求也越來越高。因此,部分電腦系統可配置多個圖形處理單元(Graphic Processing Unit,GPU)以協助中央處理單元(Central Processing Unit,CPU)進行與圖形相關的運算處理。然而,在現有的工作機制中,與某一中央處理單元有關的圖形處理工作往往是隨機地分配給一或多個圖形處理單元進行處理,而並未考慮到接收到此圖形處理工作的圖形處理單元與此中央處理單元之間的溝通路徑(或訊號傳遞路徑)是否過於複雜,進而導致系統效能降低。 With the advancement of technology, the requirements for the computing speed of computer systems are becoming higher and higher. Therefore, some computer systems can be configured with multiple graphics processing units (Graphic Processing Units, GPUs) to assist the central processing unit (Central Processing Unit, CPU) in performing graphics-related operations. 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 taking into account the graphics processing unit that receives the graphics processing work. Whether the communication path (or signal transmission path) between the unit and the central processing unit is too complex, resulting in reduced system performance.
本發明提供一種圖形資源的分配方法與分配系統,可有 效提高圖形處理效率。 The present invention provides a graphics resource allocation method and allocation system, which can be Effectively improve graphics processing efficiency.
本發明的實施例提供一種圖形資源的分配方法,其包括:獲得多個圖形處理單元中的第一圖形處理單元與至少一中央處理單元之間的第一關聯資訊;獲得所述第一圖形處理單元與所述多個圖形處理單元中的至少一第二圖形處理單元之間的第二關聯資訊;根據所述第一關聯資訊與所述第二關聯資訊建立所述多個圖形處理單元的分群拓墣結構;以及根據所述分群拓墣結構執行所述多個圖形處理單元的圖形資源分配。 Embodiments of the present invention provide a graphics resource allocation method, which includes: obtaining first association information between a first graphics processing unit among a plurality of graphics processing units and at least one central processing unit; obtaining the first graphics processing unit Second association information between the unit and at least one second graphics processing unit among the plurality of graphics processing units; establishing a group of the plurality of graphics processing units based on the first association information and the second association information a topology structure; and performing graphics resource allocation of the plurality of graphics processing units according to the grouped topology structure.
本發明的實施例另提供一種圖形資源的分配系統,其包括至少一中央處理單元、多個圖形處理單元、儲存裝置及圖形資源分配器。所述多個圖形處理單元耦接至所述至少一中央處理單元。所述儲存裝置耦接至所述至少一中央處理單元與所述多個圖形處理單元。所述圖形資源分配器耦接至所述儲存裝置。所述圖形資源分配器用以從所述儲存裝置獲得所述多個圖形處理單元中的第一圖形處理單元與所述至少一中央處理單元之間的第一關聯資訊。所述圖形資源分配器更用以從所述儲存裝置獲得所述第一圖形處理單元與所述多個圖形處理單元中的至少一第二圖形處理單元之間的第二關聯資訊。所述圖形資源分配器更用以根據所述第一關聯資訊與所述第二關聯資訊建立所述多個圖形處理單元的分群拓墣結構。所述圖形資源分配器更用以根據所述分群拓墣結構執行所述多個圖形處理單元的圖形資源分配。 Embodiments of the present invention further provide a graphics resource allocation system, which includes at least one central processing unit, multiple graphics processing units, a storage device, and a graphics resource allocator. The plurality of graphics processing units are coupled to the at least one central processing unit. The storage device is coupled to the at least one central processing unit and the plurality of graphics processing units. The graphics resource allocator is coupled to the storage device. The graphics resource allocator is used 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. 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 among the plurality of graphics processing units from the storage device. The graphics resource allocator is further configured to establish a group topology structure of the plurality of graphics processing units according to the first association information and the second association information. The graphics resource allocator is further configured to perform graphics resource allocation of the plurality of graphics processing units according to the group topology structure.
基於上述,根據第一圖形處理單元與中央處理單元之間 的第一關聯資訊與所述第一圖形處理單元與至少一第二圖形處理單元之間的第二關聯資訊後,多個圖形處理單元的分群拓墣結構可被建立。爾後,根據所述分群拓墣結構,所述多個圖形處理單元的圖形資源可被妥善分配,從而有效提升圖形處理效率。 Based on the above, according to the relationship between the first graphics processing unit and the central processing unit After obtaining the first association information and the second association information between the first graphics processing unit and at least one second graphics processing unit, a grouping topology structure of multiple graphics processing units may be established. Then, according to the group topology, the graphics resources of the multiple graphics processing units can be properly allocated, thereby effectively improving graphics processing efficiency.
10:圖形資源的分配系統 10: Graphics resource allocation system
11(1)~11(n):中央處理單元 11(1)~11(n): Central processing unit
12(1)~12(m):圖形處理單元 12(1)~12(m): Graphics processing unit
13:儲存裝置 13:Storage device
131,132:表格資訊 131,132: Form information
14:圖形資源分配器 14: Graphics resource allocator
21(1)~21(4):介面 21(1)~21(4):Interface
31,41:關聯資訊 31,41:Related information
51~53:分群拓墣結構 51~53: Group topology structure
S601~S604:步驟 S601~S604: steps
圖1是根據本發明的一實施例所繪示的圖形資源的分配系統的示意圖。 FIG. 1 is a schematic diagram of a graphics resource allocation system according to an embodiment of the present invention.
圖2是根據本發明的一實施例所繪示的中央處理單元與圖形處理單元的實體耦接關係的示意圖。 FIG. 2 is a schematic diagram illustrating the physical coupling relationship between a central processing unit and a graphics processing unit according to an embodiment of the present invention.
圖3是根據本發明的一實施例所繪示的第一關聯資訊的示意圖。 FIG. 3 is a schematic diagram of first associated information according to an embodiment of the present invention.
圖4是根據本發明的一實施例所繪示的第二關聯資訊的示意圖。 FIG. 4 is a schematic diagram of second associated information according to an embodiment of the present invention.
圖5是根據本發明的一實施例所繪示的分群拓墣結構的示意圖。 FIG. 5 is a schematic diagram of a grouping topology according to an embodiment of the present invention.
圖6是根據本發明的一實施例所繪示的圖形資源的分配方法的流程圖。 FIG. 6 is a flowchart of a graphics resource allocation method according to an embodiment of the present invention.
圖1是根據本發明的一實施例所繪示的圖形資源的分配 系統的示意圖。請參照圖1,系統(亦稱為圖形資源的分配系統)10可實作於筆記型電腦、桌上型電腦、工業電腦或伺服器等各式具有資料處理與圖形處理功能的電子裝置(或電腦裝置)中。 Figure 1 illustrates the allocation of graphics resources according to an embodiment of the present invention. Schematic diagram of the system. Referring to Figure 1, the system (also known as the graphics resource allocation system) 10 can be implemented on various electronic devices with data processing and graphics processing functions (or computer device).
系統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 central processing units (CPUs) 11(1)˜11(n), graphics processing units (GPUs) 12(1)˜12(m), a storage device 13 and a graphics resource allocator 14. Each of the central processing units (CPU) 11(1)~11(n) may refer to a central processing unit chip. Each of the graphics processing units 12(1)~12(m) may refer to a graphics processing unit chip. In terms of operation, the central processing units 11(1)~11(n) and the graphics processing units 12(1)~12(m) can operate cooperatively to jointly complete data processing and graphics processing tasks. The total number of central processing units 11(1)~11(n) and the total number of graphics processing units 12(1)~12(m) are determined by practical needs and are not limited by the present invention.
儲存裝置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 volatile memory modules and non-volatile memory modules. Volatile memory modules may include random access memory (RAM) and other memory media that can store data volatilely. Non-volatile memory modules may include memory media that can store data in a non-volatile manner, such as read-only memory (ROM) and/or flash memory.
圖形資源分配器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 coupled to the central processing units 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 may be implemented as a programmable general-purpose or special-purpose microprocessor, a digital signal processor (Digital Signal Processor, DSP), a programmable controller, or a special application integrated device. Application Specific Integrated Circuits, ASIC), programmable logic device (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 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等系統工具自行掃描相關的硬體資訊而自動產生。 Table information 131 and 132 are stored in the storage device 13 . For example, the table information 131 and 132 are obtained by the system after the central processing units 11(1)~11(n) and the graphics processing units 12(1)~12(m) are installed on the motherboard (not shown) of the system 10. 10's operating system (such as Windows operating system) or system tools such as BIOS automatically scan related hardware information and automatically generate it.
表格資訊131記載了中央處理單元11(1)~11(n)與圖形處理單元12(1)~12(m)之間的關聯資訊。特別是,表格資訊131可記載圖形處理單元12(1)~12(m)中的某一圖形處理單元(亦稱為第一圖形處理單元)與中央處理單元11(1)~11(n)之間的關聯資訊(亦稱為第一關聯資訊)。例如,第一關聯資訊可包括第一圖形處理單元在中央處理單元11(1)~11(n)中所預設優先使用的某一中央處理單元(亦稱為第一中央處理單元)的核心號碼(core number)資訊。 The table information 131 records the related 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 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). The associated information between them (also known as the first associated information). For example, the first associated information may include the core of a certain central processing unit (also referred to as the first central processing unit) that the first graphics processing unit presets to preferentially use among the central processing units 11(1)˜11(n). Number (core number) information.
表格資訊132記載了圖形處理單元12(1)~12(m)彼此間的關聯資訊。特別是,表格資訊132可記載所述第一圖形處理單元與圖形處理單元12(1)~12(m)中的其餘圖形處理單元(亦稱為第二圖形處理單元)之間的關聯資訊(亦稱為第二關聯資訊)。例如,第二關聯資訊可包括第一圖形處理單元與所述第二圖形處理單元之間的鄰近等級資訊。 The table information 132 records the related information between the graphics processing units 12(1)~12(m). In particular, the table information 132 may record the association information (also referred to as the second graphics processing unit) between the first graphics processing unit and the remaining graphics processing units (also referred to as the second graphics processing units) among the graphics processing units 12(1)˜12(m). Also known as second associated information). For example, the second association information may include proximity level information between the first graphics processing unit and the second graphics processing unit.
圖形資源分配器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 from the storage device 13 and 132 to obtain the first associated information and the second associated information. According to the first correlation information and the second correlation information, the graphics resource allocator 14 can establish a group topology structure of the graphics processing units 12(1)˜12(m). Thereafter, the graphics resource allocator 14 may perform graphics resource allocation for the graphics processing units 12(1)˜12(m) according to the established group topology structure. For example, when it is necessary to perform a graphics processing task related to at least one of the central processing units 11(1)˜11(n), the graphics resource allocator 14 can obtain the data from the graphics processing unit 12 ( Select the appropriate graphics processing unit among 1)~12(m) and assign this 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)。 FIG. 2 is a schematic diagram illustrating the physical coupling relationship between a central processing unit and a graphics processing unit according to an embodiment of the present invention. Please refer to Figures 1 and 2, assuming that the central processing units 11(1)~11(n) include central processing units 11(1) and 11(2) and the graphics processing units 12(1)~12(m) include graphics processing units. Units 12(1)~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交換器或其他類型的實體連接介面。 Central processing units 11(1) and 11(2) are connected to graphics processing units 12(1)~12(8) via interfaces 21(1)~21(4). For example, central processing unit 11(1) is connected to graphics processing units 12(1) and 12(2) via interface 21(1) and to graphics processing units 12(3) and 12(4) via interface 21(2). . Central processing unit 11(2) is connected to graphics processing units 12(5) and 12(6) via interface 21(3) and to graphics processing units 12(7) and 12(8) via interface 21(4). The interfaces 21(1)~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-layer central processing units 11(1) and 11(2) allocate graphics processing tasks to the lower-layer graphics processing units 12(1)~12(8) or when the upper-layer central processing units 11(1) and 11(2) receive the processing results of the graphics processing tasks from the lower-layer graphics processing units 12(1)~12(8), the central processing The unit 11(1) can directly communicate with the graphics processing units 12(1)~12(4) via the interfaces 21(1) and 21(2), and the central processing unit 11(2) can directly communicate with the graphics processing units 12(1) through the interface 21(3). 21(4) communicates with the graphics processing units 12(5)~12(8). However, if it involves the exchange of tasks and/or processing results across central processing units, the central processing unit 11(1) must communicate with the graphics processing units 12(5)~12(8) through the central processing unit 11(2). , and the central processing unit 11(2) must communicate with the graphics processing units 12(1)~12(4) through the central processing unit 11(1).
基於上述通訊方面的限制,若隨機選擇圖形處理單元來輔助特定中央處理單元進行圖形處理,則可能因為圖形處理單元的選擇不佳,而導致訊號傳遞發生延遲,進而導致整體的圖形處理效能下降。在一實施例中,所建立的分群拓墣結構可至少部分反映上層的中央處理單元與下層的圖形處理單元之間的實體耦接關係。因此,當需要分配圖形處理資源時,圖形資源分配器14可根據此分群拓墣結構選擇較為合適的一或多個圖形處理單元來輔助特定的中央處理單元進行圖形運算,從而提升整體圖形處理效能下降。 Based on the above communication limitations, if a graphics processing unit is randomly selected to assist a specific central processing unit in graphics processing, poor selection of the graphics processing unit may cause delays in signal transmission, which in turn leads to a decrease in overall graphics processing performance. In one embodiment, the established grouping topology may at least partially reflect the physical coupling relationship between the upper-layer central processing unit and the lower-layer graphics processing unit. Therefore, when graphics processing resources need to be allocated, the graphics resource allocator 14 can select one or more appropriate graphics processing units according to this group topology to assist a specific central processing unit in performing graphics operations, thereby improving the overall graphics processing performance. decline.
為了說明方便,以下假設中央處理單元11(1)與11(2)的編號分別為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 convenience of explanation, it is assumed below that the numbers of the central processing units 11(1) and 11(2) are
圖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、CPU core#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 associated information according to an embodiment of the present invention. FIG. 4 is a schematic diagram of second associated information according to an embodiment of the present invention. Referring to FIGS. 1 to 3 , it is assumed that the first related information includes
根據關聯資訊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
請參照圖1至圖4,假設第二關聯資訊包括關聯資訊41。關聯資訊41可反映圖形處理單元12(1)~12(8)彼此之間的關聯。例如,關聯資訊41可反映特定圖形處理單元(即第一圖形處理單元)
與其餘圖形處理單元(即第二圖形處理單元)之間的鄰近等級資訊。
Referring to FIGS. 1 to 4 , it is assumed that the second related information includes
在一實施例中,鄰近等級資訊可以多個圖形處理單元之間距離較近的等級(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 can be represented by
須注意的是,關聯資訊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
因此,在一實施例中,在建立分群拓墣結構時,圖形資源分配器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 a group topology, the graphics resource allocator 14 can select, for each graphics processing unit, graphics processing units that belong to the same group and are close to each other (also known as the third graphics unit). processing unit). For example, according to
圖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中移除。
FIG. 5 is a schematic diagram of a grouping topology according to an embodiment of the present invention. Please refer to FIGS. 1 to 5 . According to the associated
在建立屬於群組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
爾後,當欲分配圖形運算所需的圖形資源時,圖形資源分配器14可選擇同屬於分群拓墣結構51的圖形處理單元GPU#1以及圖形處理單元GPU#2、GPU#4及GPU#5中的至少一者來協同進行圖形運算,或者選擇同屬於分群拓墣結構53的圖形處理單元GPU#3以及圖形處理單元GPU#6、GPU#7及GPU#8中的至少一者來協同進行圖形運算等。相較於隨機選擇可用的圖形處理單元來進行圖形處理,根據前述實施例中所建立的分群拓墣結構來選擇圖形處理單元可有效提高整體的圖形運算效能。
Thereafter, when wanting to allocate graphics resources required for graphics operations, the graphics resource allocator 14 may select the graphics processing
須注意的是,雖然在前述實施例中是以圖2作為上層的中央處理單元與下層的圖形處理單元之間的實體耦接關係之範例,但本發明不限於此。在另一實施例中,上層的中央處理單元與下層的圖形處理單元之間的實體耦接關係還可以具有其他耦接形態,例如更多層或經由更多或更少的介面連接等等,本發明不加以限制。此外,無論上層的中央處理單元與下層的圖形處理單元之間的實體耦接關係為何,一旦將中央處理單元與圖形處理單元安裝至主機板後,圖1的表格資訊131與132即可自動產生。爾後,相應的分群拓墣結構即可根據表格資訊131與132而建立,在此不重複贅述。 It should be noted that although FIG. 2 is used as an example of the physical coupling relationship between the upper-layer central processing unit and the lower-layer graphics processing unit in the foregoing embodiments, the present invention is not limited thereto. In another embodiment, the physical coupling relationship between the upper-layer central processing unit and the lower-layer graphics processing unit may also have other coupling forms, such as more layers or connections via more or less interfaces, etc., The invention is not limited. In addition, regardless of the physical coupling relationship between the upper central processing unit and the lower graphics processing unit, once the central processing unit and the graphics processing unit are installed on the motherboard, the table information 131 and 132 of Figure 1 can be automatically generated . Thereafter, the corresponding grouping 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中,根據所述分群拓墣結構執行所述多個圖形處理單元的圖形資源分配。 FIG. 6 is a flowchart of a graphics resource allocation method according to an embodiment of the present invention. Referring to FIG. 6 , 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 group 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 group topology structure.
然而,圖6中各步驟已詳細說明如上,在此便不再贅述。值得注意的是,圖6中各步驟可以實作為多個程式碼或是電路,本發明不加以限制。此外,圖6的方法可以搭配以上範例實施例使用,也可以單獨使用,本發明不加以限制。 However, each step in Figure 6 has been described in detail above and will not be described again here. It is worth noting that each step in Figure 6 can be implemented as multiple program codes or circuits, and the present invention is not limited thereto. In addition, the method in Figure 6 can be used in conjunction with the above example embodiments or can be used alone, and is not limited by the present invention.
綜上所述,本發明的實施例可根據第一關聯資訊對圖形處理單元進行分組。接著,根據分組結果與第二關聯資訊,圖形處理單元的分群拓墣結構可被建立。根據所建立的分群拓墣結構,多個圖形處理單元的圖形資源可被妥善分配與使用,從而有效提升往後的圖形處理效率。 In summary, embodiments of the present invention can group graphics processing units according to the first association information. Then, according to the grouping result and the second association information, the grouping topology structure of the graphics processing unit can be established. According to the established group topology, the graphics resources of multiple graphics processing units can be properly allocated and used, thereby effectively improving future graphics processing efficiency.
雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。 Although the present invention has been disclosed above through embodiments, they are not intended to limit the present invention. Anyone with ordinary knowledge in the technical field may make some modifications and modifications without departing from the spirit and scope of the present invention. Therefore, The protection scope of the present invention shall be determined by the appended patent application scope.
S601~S604:步驟S601~S604: steps
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW109115353A TWI825315B (en) | 2020-05-08 | 2020-05-08 | Assigning method and assigning system for graphic resource |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW109115353A TWI825315B (en) | 2020-05-08 | 2020-05-08 | Assigning method and assigning system for graphic resource |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| TW202143036A TW202143036A (en) | 2021-11-16 |
| TWI825315B true TWI825315B (en) | 2023-12-11 |
Family
ID=80783336
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| TW109115353A TWI825315B (en) | 2020-05-08 | 2020-05-08 | Assigning method and assigning system for graphic resource |
Country Status (1)
| Country | Link |
|---|---|
| TW (1) | TWI825315B (en) |
Citations (7)
| 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 |
| US20160094509A1 (en) * | 2013-12-30 | 2016-03-31 | Tencent Technology (Shenzhen) Company Limited | Method and system for presenting a listing of message logs |
| WO2016091164A1 (en) * | 2014-12-12 | 2016-06-16 | 上海芯豪微电子有限公司 | Multilane/multicore system and method |
| TWI610269B (en) * | 2014-12-23 | 2018-01-01 | 英特爾公司 | Apparatus,method and non-transitory machine-readable medium for managing virtual graphics processor unit (vgpu) |
| US20180276044A1 (en) * | 2017-03-27 | 2018-09-27 | International Business Machines Corporation | Coordinated, topology-aware cpu-gpu-memory scheduling for containerized workloads |
| CN108874539A (en) * | 2018-03-13 | 2018-11-23 | Oppo广东移动通信有限公司 | Resource allocation method, device, terminal and storage medium |
| 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 |
-
2020
- 2020-05-08 TW TW109115353A patent/TWI825315B/en active
Patent Citations (7)
| 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 |
| US20160094509A1 (en) * | 2013-12-30 | 2016-03-31 | Tencent Technology (Shenzhen) Company Limited | Method and system for presenting a listing of message logs |
| WO2016091164A1 (en) * | 2014-12-12 | 2016-06-16 | 上海芯豪微电子有限公司 | Multilane/multicore system and method |
| TWI610269B (en) * | 2014-12-23 | 2018-01-01 | 英特爾公司 | Apparatus,method and non-transitory machine-readable medium for managing virtual graphics processor unit (vgpu) |
| US20180276044A1 (en) * | 2017-03-27 | 2018-09-27 | International Business Machines Corporation | Coordinated, topology-aware cpu-gpu-memory scheduling for containerized workloads |
| 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 |
| CN108874539A (en) * | 2018-03-13 | 2018-11-23 | Oppo广东移动通信有限公司 | Resource allocation method, device, terminal and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| TW202143036A (en) | 2021-11-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9026766B2 (en) | Memory management method, memory management apparatus and NUMA system | |
| CN116431530B (en) | CXL memory module, memory processing method and computer system | |
| CN1274123A (en) | Peripheral component interlink slot controller of partition system with dynamic arrangement | |
| CN103324533B (en) | distributed data processing method, device and system | |
| WO2018137529A1 (en) | Data transmission method, device, apparatus, and system | |
| CN115712594B (en) | Channel allocation method and device, storage system and equipment and medium | |
| JP7317727B2 (en) | Methods, apparatus, electronics and computer storage media that support communication between multiple chips | |
| CN114238156A (en) | Processing system and method of operating a processing system | |
| US20180048559A1 (en) | Apparatus assigning controller and apparatus assigning method | |
| WO2022063273A1 (en) | Resource allocation method and apparatus based on numa attribute | |
| CN112148226A (en) | A data storage method and related device | |
| JP7330694B2 (en) | Computer system and method of operation | |
| CN112099728A (en) | A method and device for performing write operation and read operation | |
| TW202315360A (en) | Microservice allocation method, electronic equipment, and storage medium | |
| TWI825315B (en) | Assigning method and assigning system for graphic resource | |
| US12321637B2 (en) | Data storage device for guaranteeing that system resources meet performance requirements, method of operating the same, and memory controller for the same | |
| CN116301645A (en) | A transmission channel distribution method, device, electronic equipment and storage medium | |
| US11093422B2 (en) | Processor/endpoint communication coupling configuration system | |
| CN120336226A (en) | Method, device, electronic equipment and medium for optimizing time delay of network interconnection system | |
| CN113722085B (en) | Graphics resource allocation method and allocation system | |
| TWI629638B (en) | Storage device and task execution method thereof, corresponding host and task execution method thereof, and control unit applied therein | |
| CN116069508A (en) | Resource allocation method, device, chip and electronic equipment of thread cluster | |
| CN104793905A (en) | Storage method of multi-server and multi-server | |
| TWI728571B (en) | Resource management method and system for blockchain service | |
| CN209911891U (en) | AI calculation server |