Topology-aware parallel reduction in an accelerator
10572421 ยท 2020-02-25
Assignee
Inventors
Cpc classification
G06F13/12
PHYSICS
International classification
Abstract
A topology-aware parallel reduction method, system, and recording medium including obtaining the GPU connection topology of each of the plurality of GPUs as a connection tree, transforming the connection tree into a three layer tree comprising an intra-root tree, an intra-node tree, and an inter-node tree, evenly partitioning each entry on each of the GPUS, and selectively transferring data either in either direction or in each direction, simultaneously, along the evenly partitioned three layer tree using a full-duplex configuration of a PCIe bandwidth.
Claims
1. A topology-aware parallel reduction system for parallel reduction of data on a plurality of graphical processing units (GPUs) in accordance with a GPU connection topology, the system comprising: a processor; and a memory, the memory storing instructions to cause the processor to perform: determining the GPU connection topology of each of the plurality of GPUs as a connection tree; transforming the connection tree into one of an intra-root tree, an intra-node tree, and an inter-node tree; evenly partitioning the data on each of the GPUs; and selectively transferring data either in either direction or in each direction, simultaneously, along the evenly partitioned tree using a full-duplex configuration of a PCIe bandwidth.
2. A topology-aware parallel reduction method for parallel reduction of data on a plurality of graphical processing units (GPUs) in accordance with a GPU connection topology, the method comprising: determining the CPU connection topology of each of the plurality of GPUs as a connection tree; transforming the connection tree into one of an intra-root tree, an intra-node tree, and an inter-node tree; evenly partitioning the data on each of the GPUs; and selectively transferring data either in either direction or in each direction, simultaneously, along the evenly partitioned tree using a full-duplex configuration of a PCIe bandwidth.
3. A non-transitory computer-readable recording medium recording a topology-aware parallel reduction program for parallel reduction of data on a plurality of graphical processing units (CPUs) in accordance with a CPU connection topology, the program causing a computer to perform: determining the GPU connection topology of each of the plurality of GPUs as a connection tree; transforming the connection tree into one of an intra-root tree, an intra-node tree, and an inter-node tree; evenly partitioning the data on each of the GPUs; and selectively transferring data either in either direction or in each direction, simultaneously, along the evenly partitioned tree using a full-duplex configuration of a PCIe bandwidth.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1) The exemplary aspects of the invention will be better understood from the following detailed description of the exemplary embodiments of the invention with reference to the drawings.
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
DETAILED DESCRIPTION
(10) The invention will now be described with reference to
(11) With reference now to
(12) It should be noted that the term Graphical Processing Unit (GPU) is used in exemplary illustrations of the invention as a specific type of accelerator, however, the invention it not limited thereto. That is, the disclosure and parallel reduction can be used for any type of accelerator.
(13) Although as shown in
(14) Further, the disclosure relates to a plurality of GPUs being connected to each other either via a PCIe root (e.g., see
(15) The topology determining device 101 determines the topology of the connections between the GPUs. The topology determining device 101 can determine the topology based on a user input from, for example, an admin of a system or from a Linux command prompt reading the connections between the GPUs. Further, the topology determining device 101 determines the connection topology of the GPUs as a tree (e.g., as exemplarily shown in
(16) For example, the topology determining device 101 can determine that one of the machines includes a single socket and has a plurality of GPUs connected via a PCIe bus as shown in
(17) The number of GPUs connected to each other is generally in multiples of two to increase efficiency of the GPU connections.
(18) The transformation device 102 transforms a GPU connection topology with, for example, a PCIe extension to have a single connection point such that the GPUs are represented as a tree having one connection point.
(19) The partitioning device 103 partitions the data to be reduced in each GPU into a number of partitions equal to the number of GPUs per machine. For example, as exemplarily shown in
(20) Based on the topology determined by the topology determining device 101, the control device 104 controls the topology-aware parallel reduction system 100 to utilize one of the intra-root reduction device 105, the intra-node reduction device 106, and the inter-node reduction device 107 to decrease the time spent during the reduction of data.
(21) More specifically, if the topology determining device 101 determines that the topology is a single PCIe root on a single machine, the control device 104 controls the system 100 to use the intra-root reduction device 105. If the topology determining device 101 determines that the topology is a machine with a multi-socket connected to an inter-socket node, the control device 104 controls the system 100 to use the intra-node reduction device 106. And, if the topology determining device 101 determines that the topology is a network connecting multiple machines, the control device 104 controls the system 100 to use inter-node reduction device 107.
(22) The intra-root reduction device 105 uses the full-duplex configuration of the PCIe bandwidth when available, such that each GPU of the plurality of connected GPU can transfer data in each direction simultaneously without affecting the other GPUs of the plurality of GPUs.
(23) As shown in
(24) Each GPU receives all of the data of the other GPUs for a particular partition such that data is synchronized quickly. That is, the intra-root reduction device 105 causes GPUs A.sup.(21), A.sup.(31), and A.sup.(41) to transfer partitions A.sub.1.sup.(21), A.sub.1.sup.(31), and A.sub.1.sup.(41) to the first partition A.sub.1.sup.(11) of the first GPU A.sup.(11). Also, the intra-root reduction device 105 causes GPU A.sup.(11), A.sup.(31), and A.sup.(41) to transfer partitions A.sub.2.sup.(11), A.sub.2.sup.(31), and A.sub.2.sup.(41) to partition A.sub.2.sup.(21) of the second GPU A.sup.(21). In this manner, as the data is continuously synchronized by intra-root reduction device 105 for the parallel GPUs A.sup.(11), A.sup.(21), A.sup.(31), and A.sup.(41), each GPU only stores data for one partition and synchronizes the data to the other GPUs until the process is done and then synchronizes all of the data together.
(25) Moreover, the intra-node reduction device 105 uses the full-duplex configuration of the PCIe bandwidth such that each GPU of the plurality of connected GPU can transfer data in each direction simultaneously without affecting the other GPUs of the plurality of GPUs. However, the intra-node reduction device 106 is determined to be used by the control device 105 only when there are multiple sockets on a single machine, each socket including a plurality of GPUs.
(26) As shown in
(27) During the first phase of the intra-node reduction, data is transferred between particular partitions of GPU and GPU.sub.2 of socket.sub.1 and GPU.sub.3 and GPU.sub.4 of socket.sub.2. That is, the first phase of the intra-node reduction device 105 causes GPU A.sup.(11) to transfer the partitions A.sub.2.sup.(11) and A.sub.4.sup.(11) to partitions A.sub.2.sup.(21) and A.sub.4.sup.(21) of A.sup.(21). Similarly, GPU A.sup.(21) to transfer the partitions A.sub.1.sup.(21) and A.sub.3.sup.(21) to partitions A.sub.1.sup.(11) and A.sub.3.sup.(11) of A.sup.(11).
(28) The intra-node reduction device 106 transfers data between sockets during the second phase. As shown in
(29) That is, there is only a single transfer between sockets of the machine for each partition using the intra-node reduction device 106 so as to reduce the time taken to synchronize the data.
(30) As shown in
(31) For machine.sub.1, GPU.sub.1 is assigned to synchronize data for the first partitions, GPU.sub.2 is assigned to synchronize data for the second partitions, GPU.sub.3 is assigned to synchronize data for the third partitions, and GPU.sub.4 is assigned to synchronize data for the fourth partitions. Differing from the intra-node reduction by the intra-node reduction device 106, the inter-node reduction by the inter-node reduction device 107 performs the inter-node reduction in a first phase, a second phase, and a third phase as shown by the KEY and the arrows in
(32) During the first phase of the inter-node reduction, data is transferred between particular partitions of GPU.sub.1 and GPU.sub.2 of socket.sub.1 and GPU.sub.3 and GPU.sub.1 of socket.sub.2 for each machine. That is, the first phase of the inter-node reduction device 106 causes GPU A.sup.(11) to transfer the partitions A.sub.2.sup.(11) and A.sub.4.sup.(11) to partitions A.sub.2.sup.(11) and A.sub.4.sup.(21) of A.sup.(21). Similarly, GPU A.sup.(21) to transfer the partitions A.sub.1.sup.(21) and A.sub.3.sup.(21) to partitions A.sub.1.sup.(11) and A.sub.3.sup.(11) of A.sup.(11) for each machine machine.sub.1 and machine.sub.2.
(33) The inter-node reduction device 107 transfers data between sockets during the second phase. As shown in
(34) That is, there is only a single transfer between sockets of the machine for each partition using the inter-node reduction device 107 so as to reduce the time taken to synchronize the data.
(35) During phase 3, the inter-node reduction device 107 causes machine.sub.1 and machine.sub.2 of the network to transfer the data to synchronize the data of a partition onto one machine. For example, the first partition of GPU.sub.1 of machine.sub.2 receives the data from the first partition of GPU.sub.1 of machine.sub.1 and the second partition of GPU.sub.2 of machine.sub.1 receives the data from the second partition of GPU.sub.2 of machine.sub.2. In this manner, each GPU of the network is sending data in a particular direction to maximize the utility of the interconnection bandwidth.
(36)
(37) Step 201 determines the topology of the connections between the GPUs. In some exemplary embodiments, this step is not necessary. Thus, if the invention is implemented in a known topology there is no need for a separate step to determine the topology.
(38) Step 202 transforms a GPU connection topology with, for example, a PCIe extension to have a single connection point such that the GPUs are represented as a tree having one connection point.
(39) Step 203 partitions the data in each GPU into a number of partitions equal to the number of GPUs per machine.
(40) Based on the topology determined by the determining topology of Step 201, step 204 controls the topology-aware parallel reduction method 200 to utilize one of the intra-root reduction 205, the intra-node reduction 206, and the inter-node reduction 207 to decrease the time spent during the reduction of data.
(41) Step 205 uses intra-root reduction by using the full-duplex configuration of the PCIe bandwidth such that each GPU of the plurality of connected GPU can transfer data in each direction simultaneously without affecting the other GPUs of the plurality of GPUs when step 205 determines that the GPUs are a single socket.
(42) Step 206 uses the intra-node reduction 206 when step 204 determines there are multiple sockets on a single machine, each socket including a plurality of GPUs.
(43) Step 207 uses the inter-node reduction when step 204 determines there are multiple sockets on a plurality of machines in a network.
(44) Exemplary Hardware Aspects, Using a Cloud Computing Environment
(45) It is understood in advance that although this disclosure includes a detailed description on cloud computing, implementation of the teachings recited herein are not limited to a cloud computing environment. Rather, embodiments of the present invention are capable of being implemented in conjunction with any other type of computing environment now known or later developed.
(46) Cloud computing is a model of service delivery for enabling convenient, on-demand network access to a shared pool of configurable computing resources (e.g. networks, network bandwidth, servers, processing, memory, storage, applications, virtual machines, and services) that can be rapidly provisioned and released with minimal management effort or interaction with a provider of the service. This cloud model may include at least five characteristics, at least three service models, and at least four deployment models.
(47) Characteristics are as follows:
(48) On-demand self-service: a cloud consumer can unilaterally provision computing capabilities, such as server time and network storage, as needed automatically without requiring human interaction with the service's provider.
(49) Broad network access: capabilities are available over a network and accessed through standard mechanisms that promote use by heterogeneous thin or thick client platforms (e.g., mobile phones, laptops, and PDAs).
(50) Resource pooling: the provider's computing resources are pooled to serve multiple consumers using a multi-tenant model, with different physical and virtual resources dynamically assigned and reassigned according to demand. There is a sense of location independence in that the consumer generally has no control or knowledge over the exact location of the provided resources but may be able to specify location at a higher level of abstraction (e.g., country, state, or datacenter).
(51) Rapid elasticity: capabilities can be rapidly and elastically provisioned, in some cases automatically, to quickly scale out and rapidly released to quickly scale in. To the consumer, the capabilities available for provisioning often appear to be unlimited and can be purchased in any quantity at any time.
(52) Measured service: cloud systems automatically control and optimize resource use by leveraging a metering capability at some level of abstraction appropriate to the type of service (e.g., storage, processing, bandwidth, and active user accounts). Resource usage can be monitored, controlled, and reported providing transparency for both the provider and consumer of the utilized service.
(53) Service Models are as follows:
(54) Software as a Service (SaaS): the capability provided to the consumer is to use the provider's applications running on a cloud infrastructure. The applications are accessible from various client devices through a thin client interface such as a web browser (e.g., web-based e-mail). The consumer does not manage or control the underlying cloud infrastructure including network, servers, operating systems, storage, or even individual application capabilities, with the possible exception of limited user-specific application configuration settings.
(55) Platform as a Service (PaaS): the capability provided to the consumer is to deploy onto the cloud infrastructure consumer-created or acquired applications created using programming languages and tools supported by the provider. The consumer does not manage or control the underlying cloud infrastructure including networks, servers, operating systems, or storage, but has control over the deployed applications and possibly application hosting environment configurations.
(56) Infrastructure as a Service (IaaS): the capability provided to the consumer is to provision processing, storage, networks, and other fundamental computing resources where the consumer is able to deploy and run arbitrary software, which can include operating systems and applications. The consumer does not manage or control the underlying cloud infrastructure but has control over operating systems, storage, deployed applications, and possibly limited control of select networking components (e.g., host firewalls).
(57) Deployment Models are as follows:
(58) Private cloud: the cloud infrastructure is operated solely for an organization. It may be managed by the organization or a third party and may exist on-premises or off-premises.
(59) Community cloud: the cloud infrastructure is shared by several organizations and supports a specific community that has shared concerns (e.g., mission, security requirements, policy, and compliance considerations). It may be managed by the organizations or a third party and may exist on-premises or off-premises.
(60) Public cloud: the cloud infrastructure is made available to the general public or a large industry group and is owned by an organization selling cloud services.
(61) Hybrid cloud: the cloud infrastructure is a composition of two or more clouds (private, community, or public) that remain unique entities but are bound together by standardized or proprietary technology that enables data and application portability (e.g., cloud bursting for load-balancing between clouds).
(62) A cloud computing environment is service oriented with a focus on statelessness, low coupling, modularity, and semantic interoperability. At the heart of cloud computing is an infrastructure comprising a network of interconnected nodes.
(63) Referring now to
(64) In cloud computing node 10 there is a computer system/server 12, which is operational with numerous other general purpose or special purpose computing system environments or configurations. Examples of well-known computing systems, environments, and/or configurations that may be suitable for use with computer system/server 12 include, but are not limited to, personal computer systems, server computer systems, thin clients, thick clients, hand-held or laptop devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputer systems, mainframe computer systems, and distributed cloud computing environments that include any of the above systems or devices, and the like.
(65) Computer system/server 12 may be described in the general context of computer system-executable instructions, such as program modules, being executed by a computer system. Generally, program modules may include routines, programs, objects, components, logic, data structures, and so on that perform particular tasks or implement particular abstract data types. Computer system/server 12 may be practiced in distributed cloud computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program modules may be located in both local and remote computer system storage media including memory storage devices.
(66) As shown in
(67) Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnects (PCI) bus.
(68) Computer system/server 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by computer system/server 12, and it includes both volatile and non-volatile media, removable and non-removable media.
(69) System memory 28 can include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and/or cache memory 32. Computer system/server 12 may further include other removable/non-removable, volatile/non-volatile computer system storage media. By way of example only, storage system 34 can be provided for reading from and writing to a non-removable, non-volatile magnetic media (not shown and typically called a hard drive). Although not shown, a magnetic disk drive for reading from and writing to a removable, non-volatile magnetic disk (e.g., a floppy disk), and an optical disk drive for reading from or writing to a removable, non-volatile optical disk such as a CD-ROM, DVD-ROM or other optical media can be provided. In such instances, each can be connected to bus 18 by one or more data media interfaces. As will be further depicted and described below, memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
(70) Program/utility 40, having a set (at least one) of program modules 42, may be stored in memory 28 by way of example, and not limitation, as well as an operating system, one or more application programs, other program modules, and program data. Each of the operating system, one or more application programs, other program modules, and program data or some combination thereof, may include an implementation of a networking environment. Program modules 42 generally carry out the functions and/or methodologies of embodiments of the invention as described herein.
(71) Computer system/server 12 may also communicate with one or more external devices 14 such as a keyboard, a pointing device, a display 24, etc.; one or more devices that enable a user to interact with computer system/server 12; and/or any devices (e.g., network card, modem, etc.) that enable computer system/server 12 to communicate with one or more other computing devices. Such communication can occur via Input/Output (I/O) interfaces 22. Still yet, computer system/server 12 can communicate with one or more networks such as a local area network (LAN), a general wide area network (WAN), and/or a public network (e.g., the Internet) via network adapter 20. As depicted, network adapter 20 communicates with the other components of computer system/server 12 via bus 18. It should be understood that although not shown, other hardware and/or software components could be used in conjunction with computer system/server 12. Examples, include, but are not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc.
(72) Referring now to
(73) Referring now to
(74) Hardware and software layer 60 includes hardware and software components. Examples of hardware components include: mainframes 61; RISC (Reduced Instruction Set Computer) architecture based servers 62; servers 63; blade servers 64; storage devices 65; and networks and networking components 66. In some embodiments, software components include network application server software 67 and database software 68.
(75) Virtualization layer 70 provides an abstraction layer from which the following examples of virtual entities may be provided: virtual servers 71; virtual storage 72; virtual networks 73, including virtual private networks; virtual applications and operating systems 74; and virtual clients 75.
(76) In one example, management layer 80 may provide the functions described below. Resource provisioning 81 provides dynamic procurement of computing resources and other resources that are utilized to perform tasks within the cloud computing environment. Metering and Pricing 82 provide cost tracking as resources are utilized within the cloud computing environment, and billing or invoicing for consumption of these resources. In one example, these resources may comprise application software licenses. Security provides identity verification for cloud consumers and tasks, as well as protection for data and other resources. User portal 83 provides access to the cloud computing environment for consumers and system administrators. Service level management 84 provides cloud computing resource allocation and management such that required service levels are met. Service Level Agreement (SLA) planning and fulfillment 85 provide pre-arrangement for, and procurement of, cloud computing resources for which a future requirement is anticipated in accordance with an SLA.
(77) Workloads layer 90 provides examples of functionality for which the cloud computing environment may be utilized. Examples of workloads and functions which may be provided from this layer include: mapping and navigation 91; software development and lifecycle management 92; virtual classroom education delivery 93; data analytics processing 94; transaction processing 95; and, more particularly relative to the present invention, the topology-aware parallel reduction 100 described herein.
(78) The descriptions of the various embodiments of the present invention have been presented for purposes of illustration, but are not intended to be exhaustive or limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein was chosen to best explain the principles of the embodiments, the practical application or technical improvement over technologies found in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.
(79) Further, Applicant's intent is to encompass the equivalents of all claim elements, and no amendment to any claim of the present application should be construed as a disclaimer of any interest in or right to an equivalent of any element or feature of the amended claim.
(80) In view of the foregoing and other problems, disadvantages, and drawbacks of the aforementioned conventional techniques, it is desirable to provide a new and improved topology-aware parallel reduction system, method, and non-transitory recording medium that, enables more efficient synchronization time by utilizing the entire configuration (i.e., paralleling and full-duplex PCIe bandwidth) of the GPU systems.