In existing graphics processing unit (GPU) architectures, machine learning arithmetic units (ML ALUs) are dedicated for use by one or more a compute units (CU). To accelerate matrix multiplication operations using the GPU (e.g., for machine learning operations), a general matrix multiply (GEMM) operation is partitioned across the CUs. With the ML ALUs consuming a significant portion of GPU power, increased power efficiency is possible by using separate voltage domains for the ML ALUs. However, the increased power efficiency comes with an area cost, requiring additional space on the GPU.
In some embodiments, a graphics processing unit (GPU) for clustering of machine learning (ML) functional components includes: a plurality of compute units; a plurality of ML clusters, wherein each of the ML clusters includes at least one arithmetic logic unit (ALU), and wherein each of the ML clusters is associated with a respective subset of the compute units; and a plurality of memory modules each positioned on the GPU adjacent to a respective ML cluster of the plurality of ML clusters, wherein each ML cluster is configured to directly access one or more adjacent memory modules.
In some embodiments, the plurality of ML clusters are associated with a first voltage domain distinct from at least one second voltage domain of the GPU. In some embodiments, a first portion of the memory modules includes cache memory and a second portion of the memory modules includes scratchpad memory. In some embodiments, the plurality of memory modules include static random access memory (SRAM) modules. In some embodiments, each of the ML clusters include at least one direct memory access (DMA) engine. In some embodiments, each of the ML clusters include a controller configured to issue commands to the at least one ALU and the at least one DMA engine. In some embodiments, the GPU further includes at least one control processor configured to issue commands to the at least one ML cluster.
In some embodiments, an apparatus for clustering of machine learning (ML) functional components includes: a component; a graphics processing unit (GPU) operatively coupled to the component, the GPU including: a plurality of compute units; a plurality of ML clusters, wherein each of the ML clusters includes at least one arithmetic logic unit (ALU), and wherein each of the ML clusters is associated with a respective subset of the compute units; and a plurality of memory modules each positioned on the GPU adjacent to a respective ML cluster of the plurality of ML clusters, wherein each ML cluster is configured to directly access one or more adjacent memory modules.
In some embodiments, the plurality of ML clusters are associated with a first voltage domain distinct from at least one second voltage domain of the GPU. In some embodiments, a first portion of the memory modules includes cache memory and a second portion of the memory modules includes scratchpad memory. In some embodiments, the plurality of memory modules include static random access memory (SRAM) modules. In some embodiments, each of the ML clusters include at least one direct memory access (DMA) engine. In some embodiments, each of the ML clusters include a controller configured to issue commands to the at least one ALU and the at least one DMA engine. In some embodiments, the GPU further includes at least one control processor configured to issue commands to the at least one ML cluster.
A method of clustering of machine learning (ML) functional components, including: directly accessing, by a ML cluster of a plurality of ML clusters of a GPU, at least one memory module of the GPU adjacent to the ML cluster; and performing, by the ML cluster, at least a portion of a general matric multiply (GEMM) operation using the directly accessed at least one memory module.
In some embodiments, directly accessing the at least one memory module includes storing, by a DMA engine of the ML cluster, data into a scratchpad portion of the at least one memory module; and performing the at least a portion of the GEMM operation includes performing, by an arithmetic logic unit (ALU) of the ML cluster, the at least one operation on the data stored in the scratchpad portion of the at least one memory module. In some embodiments, the method further includes comprising maintaining a first voltage domain separate for the plurality of ML clusters separate from at least one second voltage domain of the GPU. In some embodiments, the method further includes: receiving, by a controller of the ML cluster, a first command; and issuing, based on the first command, at least one second command to the ALU and the DMA engine of the ML cluster. In some embodiments, the first command is received from a control processor of the GPU. In some embodiments, the first command is received from a compute unit of a plurality of compute units of the GPU.
In existing graphics processing unit (GPU) architectures, machine learning arithmetic units (ML ALUs) are dedicated for use by one or more a compute units (CU). A compute unit as the term is used in this specification refers to a collection of one or more cores that share a common local cache. The ML ALUs are logical blocks configured for performing matrix arithmetic operations. To accelerate matrix multiplication operations using the GPU (e.g., for machine learning operations), a general matrix multiply (GEMM) operation is partitioned across the CUs. Data is brought from memory through a cache hierarchy to the ML ALUs. With the ML ALUs consuming a significant portion of GPU power, increased power efficiency is possible by using separate voltage domains for the ML ALUs. However, the increased power efficiency comes with an area cost, requiring additional space on the GPU. Accordingly, there is a need to both improve the power efficiency of the ML ALUs, reduce the data delivery power cost to the ML ALUs from memory and cache, and reduce data access latency.
To address these needs,
Also included in the GPU 100 are a plurality of static random access memory (SRAM) 104 modules. Although the GPU 100 shows SRAM 104 modules as an example, it is understood that other types of memory modules are usable in some embodiments. The SRAM 104 modules form a shared L2 cache for the GPU 100. In some embodiments, the SRAM 104 provides a shared L2 cache that is shared amongst CUs 102 and other components of the GPU 100 described below. In other embodiments, the SRAM 104 provides a shared L2 cache that is shared amongst other components operatively coupled to the GPU 100 in an apparatus or system, such as other GPUs 100, central processing units (CPUs), and the like. In some embodiments, the SRAM 104 is operatively coupled to a data fabric connecting the GPU 100 to other GPUs or CPUs to allow these other components to control and access the SRAM 104 and ML (machine learning) clusters 106, described in further detail below, thereby accelerating the machine learning capabilities of a system.
The GPU 100 also includes ML clusters 106. The ML clusters 106 are functional blocks for performing accelerated matrix arithmetic operations and associated memory access operations. Each ML cluster 106 includes one or more arithmetic logic units (ALUs) 108, including ML ALUs, that perform arithmetic operations on input data (e.g., input matrices). Each ML cluster 106 also includes one or more direct memory access (DMA) engines 110. The DMA engines 110 perform DMA operations on the SRAM 104, particularly as required to perform a portion of a general matrix multiply (GEMM) operation as instructed by a CU 102 or control processor (CP) 111, described below. A GEMM operation is a matrix multiplication operation expressed as X=aAB+bC, where A and B are optionally transposed or Hermitian-conjugated inside the routine. Ordinary matrix multiplication is achievable by setting “a” and “b” to one and C to an all-zero matrix of appropriate size. Although the following discussion describes functionality with respect to GEMM operations, it is understood that such functionality is applicable to other matrix operations, or other mathematical operations, as can be appreciated.
For example, the DMA engines 110 store data (e.g., operands of an instruction or data loaded from other memory sources) in the SRAM 104 for the ALUs 108 to operate on. The ML clusters 106 also include controllers 112. The controllers 112 receive commands from ML cluster 106 clients from a CU 102 or CP 111. For example, such commands are portions of a decomposed GEMM operation being performed by a particular CU 102. The controller 112 schedules operations for execution on the ALUs 108 or the DMA engines 110. For example, given a command to perform a particular operation on particular data, the controller 112 schedules the DMA engines 110 to load the particular data into SRAM 104 and for the ALU 108 to operate on the data as loaded into SRAM 104. Accordingly, the controller 112 maintains proper synchronization between the ALUs 108 and DMA engines 110 to perform their respective operations.
In some embodiments, the SRAM 104 is partitioned into cache memory and scratchpad memory. In other words, a first portion of the SRAM 104 is allocated as cache memory and a second portion of the SRAM 104 is allocated as scratchpad memory. The scratchpad memory is a portion of memory allocated for temporary storage of calculations or other data. For example, a portion of the SRAM 104 is allocated as scratchpad memory for storing inputs to the ALUs 108. For example, the DMA engines 110 store data in scratchpad memory for use as inputs to the ALUs. As the scratchpad is allocated distinctly from the cache portions of the SRAM 104, data stored in the scratchpad memory is not maintained according to cache coherency protocols, nor is the data stored in the scratchpad memory necessarily stored in main memory, in contrast to cache memory. The use of scratchpad memory reduces latency for ALU 108 inputs and minimized data delivery power required for ALU 108 operations.
The ML clusters 106 are positioned in the GPU 100 adjacent to the SRAM 104 (e.g., adjacent to the L2 cache). By reducing the distance between the ML clusters 106 and SRAM 104, data delivery costs between the ML clusters 106 and SRAM 104 are reduced. In some embodiments, the ML clusters 106 are operatively coupled to the SRAM 104 using private buses (e.g., buses dedicated for data transfer between ML clusters 106 and SRAM 104 and inaccessible to other components of the GPU 100). For example, the GPU 100 includes private, short distance, high bandwidth buses to minimize data access latency and increase performance per watt. As was described above, the ML clusters 106 access the SRAM 104 using private, short distance buses (e.g., via the DMA engines 110). To facilitate access to the SRAM 104 by CUs 102, in some embodiments, the GPU 100 includes one or more memory interfaces 114. The memory interfaces 114 provide an interconnect between the CUs 102 and SRAM 104.
The GPU 100 also includes one or more control processors (CPs) 111. The CPs 111 schedule workload for the GPU 100. Accordingly, the CPs 111 receive work or commands from other components of a system (e.g., CPUs) and schedule the work for execution on the various portions of the GPU 100. For example, the CPs 111 decompose problems such as GEMM problems for distributed execution across CUs 102. The CPs 111 also issues commands or instructions to the ML clusters 106 for execution.
In some embodiments, the GPU 100 maintains different voltage domains for the ML clusters 106 relative to other components of the GPU 100. Components within a given voltage domain receive a same voltage. Thus, the GPU 100 includes components such as voltage regulators (not shown) or other components to control voltage distribution such that the ML clusters 106 receive a different voltage relative to the remaining components of the GPU 100. It is understood that the remaining components of the GPU 100 may also receive voltages according to a single voltage domain, or multiple voltage domains. As the ML clusters 106 will use a significant amount of power relative to the entire GPU 100, the use of separate voltage domains increases overall power efficiency of the GPU 100 and increases the overall performance of the GPU 100 per watt of power consumed.
One skilled in the art will appreciate that the particular configuration of the GPU 100 and the arrangement, layout, and geometries of the GPU 100 components are examples and that other arrangements or configurations are included in other embodiments. For example, while the GPU 100 shows four columns of CUs 102, it is understood that fewer or additional columns of CUs 102 are possible. As another example, while the GPU 100 shows two CPs 111, one skilled in the art will appreciate that, in other embodiments, fewer or greater CPs 111 are possibly included in the GPU 100. As a further example, while the GPU 100 shows two ML clusters 106, one skilled in the art will appreciate that other embodiments will include fewer or greater numbers of ML clusters 106. Accordingly, the particular layout and configuration of SRAM 104 will be adjusted according to the number of ML clusters 106 in the GPU.
For further explanation,
The ML cluster 106 directly accesses the at least one memory module in that the ML cluster 106 accesses the at least one memory module without the use of any intervening components other than a direct connection, such as the private bus described above. In some embodiments, directly accessing 202 the at least one memory module of the GPU 100 is performed by a DMA engine 110 of the ML cluster 106. Accordingly, directly accessing 202 the at least one memory module includes performing a DMA operation by the DMA engine 110 on the at least one memory module. Directly accessing 202 the at least one memory module includes a read operation directed to the at least one memory module or a write operation directed to the at least one memory module.
The method of
For further explanation,
The method of
The method of
For further explanation,
The method of
For further explanation,
The method of
The method of
In view of the explanations set forth above, readers will recognize that the benefits of clustering of machine learning (ML) functional components include:
Exemplary embodiments of the present disclosure are described largely in the context of a fully functional computer system for clustering of machine learning (ML) functional components. Readers of skill in the art will recognize, however, that the present disclosure also can be embodied in a computer program product disposed upon computer readable storage media for use with any suitable data processing system. Such computer readable storage media can be any storage medium for machine-readable information, including magnetic media, optical media, or other suitable media. Examples of such media include magnetic disks in hard drives or diskettes, compact disks for optical drives, magnetic tape, and others as will occur to those of skill in the art. Persons skilled in the art will immediately recognize that any computer system having suitable programming means will be capable of executing the steps of the method of the disclosure as embodied in a computer program product. Persons skilled in the art will recognize also that, although some of the example embodiments described in this specification are oriented to software installed and executing on computer hardware, nevertheless, alternative embodiments implemented as firmware or as hardware are well within the scope of the present disclosure.
The present disclosure can be a system, a method, and/or a computer program product. The computer program product can include a computer readable storage medium (or media) having computer readable program instructions thereon for causing a processor to carry out aspects of the present disclosure.
The computer readable storage medium can be a tangible device that can retain and store instructions for use by an instruction execution device. The computer readable storage medium can be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. A non-exhaustive list of more specific examples of the computer readable storage medium includes the following: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanically encoded device such as punch-cards or raised structures in a groove having instructions recorded thereon, and any suitable combination of the foregoing. A computer readable storage medium, as used herein, is not to be construed as being transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission media (e.g., light pulses passing through a fiber-optic cable), or electrical signals transmitted through a wire.
Computer readable program instructions described herein can be downloaded to respective computing/processing devices from a computer readable storage medium or to an external computer or external storage device via a network, for example, the Internet, a local area network, a wide area network and/or a wireless network. The network can include copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. A network adapter card or network interface in each computing/processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing/processing device.
Computer readable program instructions for carrying out operations of the present disclosure can be assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state-setting data, or either source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C++ or the like, and conventional procedural programming languages, such as the “C” programming language or similar programming languages. The computer readable program instructions can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate arrays (FPGA), or programmable logic arrays (PLA) can execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry, in order to perform aspects of the present disclosure.
Aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer readable program instructions.
These computer readable program instructions can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer readable program instructions can also be stored in a computer readable storage medium that can direct a computer, a programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer readable storage medium having instructions stored therein includes an article of manufacture including instructions which implement aspects of the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process, such that the instructions which execute on the computer, other programmable apparatus, or other device implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams can represent a module, segment, or portion of instructions, which includes one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block can occur out of the order noted in the figures. For example, two blocks shown in succession can, in fact, be executed substantially concurrently, or the blocks can sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts or carry out combinations of special purpose hardware and computer instructions.
It will be understood from the foregoing description that modifications and changes can be made in various embodiments of the present disclosure. The descriptions in this specification are for purposes of illustration only and are not to be construed in a limiting sense. The scope of the present disclosure is limited only by the language of the following claims.