Hardware-implemented point-to-point communication primitives for machine learning
By introducing multi-core processors and efficient communication protocols into graphics processing units (GPUs), combined with SIMT architecture and GPGPU technology, the problems of low graphics pipeline processing efficiency and poor multi-thread synchronization in the existing technology are solved, and efficient graphics data is achieved Processing and machine learning computing power.
Patent Information
- Application Number
- CN201810419238.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-01-12
- Filing Date
- 2018-05-04
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2038-05-04
AI Technical Summary
When the existing parallel graphics data processing system processes graphics pipelines, the fixed function computing unit limits the processing efficiency, and the SIMT architecture has synchronization problems when processing multithreading, resulting in low processing efficiency.
By introducing multi-core processors and efficient communication protocols such as PCIe or NVLink in the graphics processing unit (GPU), combining SIMT architecture and GPGPU technology, the graphics processing pipeline is optimized, parallel processing and multi-threading synchronization are achieved, and processing efficiency is improved.
It improves the processing efficiency and multi-threaded synchronization capabilities of the graphics processor, enhances the performance of graphics data processing, and is suitable for high computing needs such as graphics operations and machine learning.
Smart Images

Figure CN108805795B_ABST
Abstract
Description
[0001] Cross-references
[0002] This application claims the benefit of U.S. Provisional Patent Application No. 62 / 502,447, filed on June 5, 2017, the disclosure of which is incorporated herein by reference in its entirety. Technical Field
[0003] Embodiments relate generally to data processing, and more particularly to data processing via a general purpose graphics processing unit. Background Art
[0004] Current parallel graphics data processing includes systems and methods developed to perform specific operations on image data (e.g., linear interpolation, tessellation, rasterization, texture mapping, depth testing, etc.). Traditionally, graphics processors have used fixed-function compute units to process graphics data; however, recently, portions of graphics processors have become programmable, enabling such processors to support a wide variety of operations for processing vertex and fragment data.
[0005] In order to further increase performance, graphics processors generally implement processing techniques, such as pipelines, which attempt to process as much graphics data as possible in parallel throughout different parts of the graphics pipeline. Parallel graphics processors with a single instruction multiple thread (SIMT) architecture are designed to maximize the amount of parallel processing in the graphics pipeline. In the SIMT architecture, several groups of parallel threads attempt to execute program instructions together synchronously as often as possible to increase processing efficiency. A general overview of the software and hardware of the SIMT architecture can be found in Shane Cook's "CUDA Programming" (Chapter 3, 37-51 pages (2013)) and / or Nicholas Wilt's CUDA Handbook "A Comprehensive Guide to GPU Programming" (Chapter 2.6.2 to 3.1.2) (June 2013). BRIEF DESCRIPTION OF THE DRAWINGS
[0006] In order that the features of the present invention can be understood in detail, a more particular description of the present invention can be made by reference to embodiments, some of which are shown in the accompanying drawings. It should be noted, however, that the accompanying drawings only show typical embodiments and therefore should not be considered as limiting the scope of all embodiments.
[0007] Figure 1 is a block diagram illustrating a computer system configured to implement one or more aspects of the embodiments described herein;
[0008] Figure 2A-2D shows a parallel processor component according to an embodiment;
[0009] Figure 3A-3B is a block diagram of a graphics microprocessor according to an embodiment;
[0010] Figure 4A-4F An exemplary architecture is shown in which multiple GPUs are communicatively coupled to multiple multi-core processors;
[0011] Figure 5 shows a graphics processing pipeline according to an embodiment;
[0012] Figure 6 illustrates a machine learning software stack according to an embodiment;
[0013] Figure 7 A highly parallel general purpose graphics processing unit is shown according to an embodiment;
[0014] Figure 8 A multi-GPU computing system according to an embodiment is shown;
[0015] Figure 9A-9B The layers of an exemplary deep neural network are shown;
[0016] Fig.10 An exemplary recurrent neural network is shown;
[0017] Fig.11 shows the training and deployment of a deep neural network;
[0018] Fig.12 is a block diagram illustrating distributed learning;
[0019] Fig.13 An exemplary inference system-on-chip (SOC) suitable for performing inference using a trained model is shown;
[0020] Figure 14A-14E illustrates a communication pattern used during a distributed machine learning computation operation performed on multiple computation nodes according to embodiments described herein;
[0021] Figure 15A-Figure 15C Architectural details of a machine learning scaling library provided by embodiments described herein are shown;
[0022] Figure 16A-16B Distributed machine learning training enabled by the embodiments described herein is shown;
[0023] Fig. 16C illustrates inter-node communication using point-to-point primitives according to an embodiment;
[0024] Fig.17A A multi-node computing system according to an embodiment is shown;
[0025] Fig. 17Billustrates a peer-to-peer network with distributed virtual addresses according to an embodiment;
[0026] Fig.18 An optional MLSL architecture according to an embodiment is shown;
[0027] Fig.19A Tensor computation operations suitable for fine-grained computation and communication overlap are shown;
[0028] Fig.19B illustrates synchronized memory access between a multi-node system according to an embodiment;
[0029] Fig.19C Memory communication semantics extended to implement coarse-grained cache coherence for cache memory data are shown;
[0030] Figure 20A-20B A flowchart describing operations for implementing distributed machine learning via the MLSL API is shown;
[0031] Figure 21A-21B A method of performing distributed training of a neural network according to an embodiment is shown;
[0032] Fig. 22 is a block diagram of a data processing system according to an embodiment described herein;
[0033] Fig.23 is a block diagram of a processing system according to an embodiment;
[0034] Fig.24 is a block diagram of a processor according to an embodiment;
[0035] Fig.25 is a block diagram of a graphics processor according to an embodiment;
[0036] Fig.26 is a block diagram of a graphics processing engine of a graphics processor according to some embodiments;
[0037] Fig. 27 is a block diagram of a graphics processor provided by additional embodiments;
[0038] Fig.28 shows thread execution logic including an array of processing elements employed in some embodiments;
[0039] Fig.29 is a block diagram illustrating a graphics processor instruction format according to some embodiments;
[0040] Fig.30 is a block diagram of a graphics processor according to another embodiment;
[0041] Figure 31A-Figure 31B shows a graphics processor command format and command sequence according to some embodiments;
[0042] Fig.32 An exemplary graphics software architecture for a data processing system according to some embodiments is shown;
[0043] Fig.33 is a block diagram showing an IP core development system according to an embodiment;
[0044] Fig.34 is a block diagram illustrating an exemplary system-on-chip integrated circuit according to an embodiment;
[0045] Fig.35 is a block diagram illustrating an additional graphics processor according to an embodiment; and
[0046] Fig.36 is a block diagram illustrating an additional exemplary graphics processor of a system-on-chip integrated circuit according to an embodiment. DETAILED DESCRIPTION
[0047] In some embodiments, a graphics processing unit (GPU) is communicatively coupled to a host / processor core to accelerate graphics operations, machine learning operations, pattern analysis operations, and various general purpose GPU (GPGPU) functions. The GPU may be communicatively coupled to the host processor / core via a bus or another interconnect (e.g., a high-speed interconnect, such as PCIe or NVLink). In other embodiments, the GPU may be integrated with the core on the same package or chip and communicatively coupled to the core via an internal processor bus / interconnect (i.e., inside the package or chip). Regardless of the manner in which the GPU is connected, the processor core may assign jobs to the GPU in the form of a sequence of commands / instructions contained in a job descriptor. The GPU then uses dedicated circuitry / logic to efficiently process these commands / instructions.
[0048] In the following description, many specific details are set forth to provide a more thorough understanding. However, it will be apparent to those skilled in the art that the embodiments described herein may be practiced without one or more of these specific details. In other instances, well-known features are not described to avoid obscuring the details of the current embodiments.
[0049] System Overview
[0050] Figure 11 is a block diagram illustrating a computing system 100 configured to implement one or more aspects of the embodiments described herein. The computing system 100 includes a processing subsystem 101 having one or more processors 102 and a system memory 104 communicating via an interconnect path that may include a memory hub 105. The memory hub 105 may be a separate component within a chipset component or may be integrated within the one or more processors 102. The memory hub 105 is coupled to an I / O subsystem 111 via a communication link 106. The I / O subsystem 111 includes an I / O hub 107 that may enable the computing system 100 to receive input from one or more input devices 108. In addition, the I / O hub 107 may implement a display controller that may be included in the one or more processors 102 to provide output to one or more display devices 110A. In one embodiment, the one or more display devices 110A coupled to the I / O hub 107 may include local, internal, or embedded display devices.
[0051] In one embodiment, the processing subsystem 101 includes one or more parallel processors 112 coupled to the memory hub 105 via a bus or other communication link 113. The communication link 113 can be one of any number of standard-based communication link technologies or protocols, such as but not limited to PCI Express, or can be a vendor-specific communication interface or communication structure. In one embodiment, the one or more parallel processors 112 form a computationally focused parallel or vector processing system including a large number of processing cores and / or processing clusters, such as a multi-core integrated (MIC) processor. In one embodiment, the one or more parallel processors 112 form a graphics processing subsystem that can output pixels to one of the one or more display devices 110A coupled via the I / O hub 107. The one or more parallel processors 112 may also include a display controller and a display interface (not shown) to enable direct connection to one or more display devices 110B.
[0052] Within the I / O subsystem 111, a system storage unit 114 may be connected to the I / O hub 107 to provide a storage mechanism for the computing system 100. An I / O switch 116 may be used to provide an interface mechanism to enable connections between the I / O hub 107 and other components, such as a network adapter 118 and / or a wireless network adapter 119 that may be integrated into the platform and various other devices that may be added via one or more accessory devices 120. The network adapter 118 may be an Ethernet adapter or another wired network adapter. The wireless network adapter 119 may include one or more of Wi-Fi, Bluetooth, near field communication (NFC), or other network devices that include one or more radio devices.
[0053] The computing system 100 may include other components not explicitly shown, including USB or other port connections, optical storage drives, video capture devices, etc., which may also be connected to the I / O hub 107. The use of the I / O hub 107 may be implemented using any suitable protocol, such as a PCI (Peripheral Component Interconnect) based protocol (e.g., PCI Express) or any other bus or point-to-point communication interface and / or protocol (e.g., NV-Link high-speed interconnect) or interconnect protocol known in the art. Figure 1 The communication paths that interconnect the various components in a
[0054] In one embodiment, one or more parallel processors 112 incorporate circuits optimized for graphics and video processing, including, for example, video output circuits, and constitute a graphics processing unit (GPU). In another embodiment, one or more parallel processors 112 incorporate circuits optimized for general processing while maintaining the basic computing architecture described in more detail herein. In yet another embodiment, the components of the computing system 100 may be integrated on a single integrated circuit with one or more other systems. For example, one or more parallel processors 112, memory hub 105, processor 102, and I / O hub 107 may be integrated into a system-on-chip (SoC) integrated circuit. Alternatively, the components of the computing system 100 may be integrated into a single package to form a system-in-package (SIP) configuration. In one embodiment, at least a portion of the components of the computing system 100 may be integrated into a multi-chip module (MCM), which may be interconnected with other multi-chip modules into a modular computing system.
[0055] It will be appreciated that the computing system 100 shown herein is illustrative, and variations and modifications are possible. The connection topology may be modified as desired, including the number and arrangement of bridges, the number of processors 102, and the number of parallel processors 112. For example, in some embodiments, the system memory 104 is directly connected to the processor 102 rather than through a bridge, while other devices communicate with the system memory 104 via the memory hub 105 and the processor 102. In other optional topologies, the parallel processors 112 are connected to the I / O hub 107 or directly connected to one of the one or more processors 102 rather than being connected to the memory hub 105. In other embodiments, the I / O hub 107 and the memory hub 105 may be integrated into a single chip. Some embodiments may include two or more groups of processors 102 attached via multiple slots, and the slots may be coupled to two or more instances of the parallel processor 112.
[0056] Some of the specific components described herein are optional and may not be included in all implementations of computing system 100. For example, any number of add-in cards or peripherals may be supported, or some components may be eliminated. In addition, some architectures may be specific to the Figure 1Different terminology is used for similar components shown. For example, in some architectures memory hub 105 may be referred to as a north bridge, while I / O hub 107 may be referred to as a south bridge.
[0057] Figure 2A 200 according to an embodiment. Various components of the parallel processor 200 may be implemented using one or more integrated circuit devices (e.g., a programmable processor, an application specific integrated circuit (ASIC), or a field programmable gate array (FPGA)). According to an embodiment, the parallel processor 200 shown is Figure 1 Variations of the one or more parallel processors 112 are shown.
[0058] In one embodiment, parallel processor 200 includes parallel processing unit 202. Parallel processing unit includes I / O unit 204, which enables communication with other devices including other instances of parallel processing unit 202. I / O unit 204 can be directly connected to other devices. In one embodiment, I / O unit 204 is connected to other devices via the use of a hub or switch interface (e.g., memory hub 105). The connection between memory hub 105 and I / O unit 204 forms communication link 113. Within parallel processing unit 202, I / O unit 204 is connected to host interface 206 and memory cross switch 216, wherein host interface 206 receives commands related to performing processing operations, and memory cross switch 216 receives commands related to performing memory operations.
[0059] When the host interface 206 receives the command buffer via the I / O unit 204, the host interface 206 may direct job operations for executing those commands to the front end 208. In one embodiment, the front end 208 is coupled with a scheduler 210, which is configured to distribute commands or other job items to the processing cluster array 212. In one embodiment, before tasks are distributed to the processing clusters of the processing cluster array 212, the scheduler 210 ensures that the processing cluster array 212 is properly configured and in a valid state. In one embodiment, the scheduler 210 is implemented via firmware logic executed on a microcontroller. The microcontroller-implemented scheduler 210 may be configured to perform complex scheduling and job distribution operations at coarse and fine granularity, enabling fast preemption and context switching of threads executing on the processing array 212. In one embodiment, the host software may prove a workload for scheduling on the processing array 212 via one of a plurality of graphics processing doorbells. The workload may then be automatically distributed throughout the processing array 212 by the logic of the scheduler 210 within the scheduler microcontroller.
[0060] The processing cluster array 212 may include up to "N" processing clusters (e.g., cluster 214A, cluster 214B, through cluster 214N). Each cluster 214A-214N of the processing cluster array 212 may execute a large number of concurrent threads. The scheduler 210 may use various scheduling and / or job allocation algorithms to allocate jobs to the clusters 214A-214N of the processing cluster array 212, which may vary depending on the workload generated for each type of program or calculation. The scheduling may be dynamically manipulated by the scheduler 210, or may be partially assisted by compiler logic during the compilation of program logic configured for execution by the processing cluster array 212. In one embodiment, different clusters 214A-214N of the processing cluster array 212 may be allocated for processing different types of programs or for performing different types of calculations.
[0061] Processing cluster array 212 may be configured to perform various types of parallel processing operations. In one embodiment, processing cluster array 212 is configured to perform general-purpose parallel computing operations. For example, processing cluster array 212 may include logic for performing processing tasks including filtering of video and / or audio data, performing modeling operations including physical operations, and performing data transformations.
[0062] In one embodiment, processing cluster array 212 is configured to perform parallel graphics processing operations. In embodiments where parallel processor 200 is configured to perform graphics processing operations, processing cluster array 212 may include additional logic for supporting the execution of such graphics processing operations, including but not limited to texture sampling logic for performing texture operations and tessellation logic and other vertex processing logic. In addition, processing cluster array 212 may be configured to execute graphics processing related shader programs, such as but not limited to vertex shaders, tessellation shaders, geometry shaders, and pixel shaders. Parallel processing unit 202 may transfer data from system memory via I / O unit 204 for processing. During processing, the transferred data may be stored in on-chip memory (e.g., parallel processor memory 222) during processing and then written back to system memory.
[0063] In one embodiment, when parallel processing unit 202 is used to perform graphics processing, scheduler 210 may be configured to divide the processing workload into tasks of approximately equal size to better achieve the distribution of graphics processing operations to multiple clusters 214A-214N of processing cluster array 212. In some embodiments, portions of processing cluster array 212 may be configured to perform different types of processing. For example, a first portion may be configured to perform vertex shading and topology generation, a second portion may be configured to perform tessellation and geometry shading, and a third portion may be configured to perform pixel shading or other screen space operations to produce a rendered image for display. Intermediate data generated by one or more of clusters 214A-214N may be stored in a buffer to allow the intermediate data to be transferred between clusters 214A-214N for further processing.
[0064] During operation, the processing cluster array 212 may receive processing tasks to be executed via the scheduler 210, which receives commands specifying the processing tasks from the front end 208. For graphics processing operations, the processing tasks may include indices of data to be processed (e.g., surface (patch) data, primitive data, vertex data, and / or pixel data) as well as state parameters and commands specifying how the data is to be processed (e.g., what program is to be executed). The scheduler 210 may be configured to fetch an index corresponding to a task, or may receive an index from the front end 208. The front end 208 may be configured to ensure that the processing cluster array 212 is configured to a valid state before a workload specified by an incoming command buffer (e.g., a batch buffer, a push buffer, etc.) is initiated.
[0065] Each of the one or more instances of the parallel processing unit 202 may be coupled to a parallel processor memory 222. The parallel processor memory 222 may be accessed via a memory crossbar 216, which may receive memory requests from the processing cluster array 212 and the I / O unit 204. The memory crossbar 216 may access the parallel processor memory 222 via a memory interface 218. The memory interface 218 may include a plurality of partition units (e.g., partition unit 220A, partition unit 220B to partition unit 220N), each of which may be coupled to a portion (e.g., memory cells) of the parallel processor memory 222. In one implementation, the number of partition units 220A-220N is configured to be equal to the number of memory cells, such that a first partition unit 220A has a corresponding first memory cell 224A, a second partition unit 220B has a corresponding second memory cell 224B, and an Nth partition unit 220N has a corresponding Nth memory cell 224N. In other embodiments, the number of partition units 220A-220N may not be equal to the number of memory devices.
[0066] In various embodiments, the memory units 224A-224N may include various types of memory devices, including dynamic random access memory (DRAM) or graphics random access memory, such as synchronous graphics random access memory (SGRAM), including graphics double data rate (GDDR) memory. In one embodiment, the memory units 224A-224N may also include 3D stacked memory, including but not limited to high bandwidth memory (HBM). Those skilled in the art will recognize that the specific implementation of the memory units 224A-224N may vary and may be selected from one of a variety of conventional designs. Render targets (such as frame buffers or texture maps) may be stored in the memory units 224A-224N, allowing the partitioning units 220A-220N to write portions of each render target in parallel to efficiently use the available bandwidth of the parallel processor memory 222. In some embodiments, it may be advantageous to utilize a unified memory design of system memory in conjunction with local cache memory and eliminate local instances of the parallel processor memory 222.
[0067] In one embodiment, any of the clusters 214A-214N of the processing cluster array 212 may process data to be written to any of the memory units 224A-224N within the parallel processor memory 222. The memory crossbar 216 may be configured to transmit the output of each cluster 214A-214N to any of the partition units 220A-220N or another cluster 214A-214N, which may perform additional processing operations on the output. Each cluster 214A-214N may communicate with a memory interface 218 through the memory crossbar 216 to read from or write to various external memory devices. In one embodiment, the memory crossbar 216 has a connection to the memory interface 218 to communicate with the I / O unit 204, and has a connection to a local instance of the parallel processor memory 222, enabling the processing units within different processing clusters 214A-214N to communicate with the system memory or other memory that is not local to the parallel processing unit 202. In one embodiment, the memory crossbar switch 216 may use virtual channels to separate traffic flows between the clusters 214A-214N and the partition units 220A-220N.
[0068] Although a single instance of parallel processing unit 202 is shown within parallel processor 200, any number of instances of parallel processing unit 202 may be included. For example, multiple instances of parallel processing unit 202 may be provided on a single add-on card, or multiple add-on cards may be interconnected. Different instances of parallel processing unit 202 may be configured to interoperate, even if different instances have different numbers of processing cores, different amounts of local parallel processor memory, and / or other configuration differences. For example, and in one embodiment, some instances of parallel processing unit 202 may include higher precision floating point units relative to other instances. Systems that incorporate one or more instances of row processing unit 202 or parallel processor 200 may be implemented in various configurations and form factors, including but not limited to desktop computers, laptop computers or handheld personal computers, servers, workstations, game consoles, and / or embedded systems.
[0069] Figure 2B is a block diagram of the division unit 220 according to an embodiment. In one embodiment, the division unit 220 is Figure 2A 2 is an example of one of the partition units 220A-220N of FIG. As shown, the partition unit 220 includes an L2 cache 221, a frame buffer interface 225, and an ROP 226 (raster operation unit). The L2 cache 221 is a read / write cache configured to perform load and store operations received from the memory crossbar switch 216 and the ROP 226. Read misses and urgent write-back requests are output by the L2 cache 221 to the frame buffer interface 225 for processing. Updates may also be sent to the frame buffer via the frame buffer interface 225 for processing. In one embodiment, the frame buffer interface 225 is coupled to one of the memory units in the parallel processor memory (e.g., the memory units 224A-224N of FIG. 2 (e.g., within the parallel processor memory 222)).
[0070] In graphics applications, ROP 226 is a processing unit that performs raster operations (e.g., stencil printing, z-testing, blending, etc.). ROP 226 then outputs processed graphics data stored in graphics memory. In some embodiments, ROP 226 includes compression logic for compressing depth or color data written to memory and decompressing depth or color data read from memory. The compression logic can be lossless compression logic using one or more of a plurality of compression algorithms. The type of compression performed by ROP 226 can be changed based on the statistical characteristics of the data to be compressed. For example, in one embodiment, incremental color compression is performed on depth and color data on a per-tile basis.
[0071] In some embodiments, ROP 226 is included within each processing cluster (e.g., clusters 214A-214N of FIG. 2 ) rather than within partition unit 220. In such embodiments, read and write requests for pixel data rather than pixel fragment data are transmitted through memory crossbar 216. The processed graphics data may be displayed on a display device (e.g., Figure 1 100), is routed for further processing by the processor 102, or is routed for further processing by the processor 102. Figure 2A A process in a processing entity within parallel processor 200.
[0072] Figure 2C It is a block diagram of a processing cluster 214 in a parallel processing unit according to an embodiment. In one embodiment, the processing cluster is an instance of one of the processing clusters 214A-214N of Figure 2. The processing cluster 214 can be configured to execute many threads in parallel, wherein the term "thread" refers to an instance of a specific program executed on a specific set of input data. In some embodiments, a single instruction multiple data (SIMD) instruction issuing technology is used to support the parallel execution of a large number of threads without providing multiple independent instruction units. In other embodiments, a single instruction multiple thread (SIMT) technology is used to support the parallel execution of a large number of threads that are usually synchronized using a common instruction unit, and the common instruction unit is configured to issue instructions to a group of processing engines in each of the processing clusters. Different from the SIMD execution regime (wherein all processing engines generally execute the same instruction), SIMT execution allows different threads to more easily follow divergent execution paths through a given thread program. It will be appreciated by those skilled in the art that the SIMD processing regime represents a functional subset of the SIMT processing regime.
[0073] The operation of the processing cluster 214 can be controlled via a pipeline manager 232, which distributes processing tasks to SIMT parallel processors. The pipeline manager 232 receives instructions from the scheduler 210 of Figure 2 and manages the execution of those instructions via a graphics multiprocessor 234 and / or a texture unit 236. The illustrated graphics multiprocessor 234 is an exemplary instance of a SIMT parallel processor. However, various types of SIMT parallel processors of different architectures can be included in the processing cluster 214. One or more instances of the graphics multiprocessor 234 can be included in the processing cluster 214. The graphics multiprocessor 234 can process data, and the data crossbar 240 can be used to distribute the processed data to one of a plurality of possible destinations, including other shader units. The pipeline manager 232 can facilitate the distribution of processed data by specifying the destination of the processed data distributed via the data crossbar 240.
[0074] Each graphics multiprocessor 234 within a processing cluster 214 may include an identical set of function execution logic (e.g., arithmetic logic units, load-store units, etc.). The function execution logic may be configured in a pipelined manner, where new instructions may be issued before previous instructions are completed. The function execution logic supports a variety of operations, including integer and floating point arithmetic, comparison operations, Boolean operations, shifts, and calculations of various algebraic functions. In one embodiment, the same function-unit hardware may be employed to perform different operations, and any combination of function units may exist.
[0075] The instructions sent to the processing cluster 214 constitute threads. A group of threads executed on this set of parallel processing engines is a thread group. The thread group executes the same program on different input data. Each thread in the thread group can be assigned to a different processing engine in the graphics multiprocessor 234. The thread group may include fewer threads than the number of processing engines in the graphics multiprocessor 234. When the thread group includes fewer threads than the number of processing engines, one or more of the processing engines may be idle during the cycle when that thread group is being processed. The thread group may also include more threads than the number of processing engines in the graphics multiprocessor 234. When the thread group includes more threads than the number of processing engines in the graphics multiprocessor 234, processing may be performed during continuous clock cycles. In one embodiment, multiple thread groups may be executed simultaneously on the graphics multiprocessor 234.
[0076] In one embodiment, the graphics multiprocessor 234 includes an internal cache memory to perform load and store operations. In one embodiment, the graphics multiprocessor 234 may abandon the internal cache and use the cache memory (e.g., L1 cache 308) within the processing cluster 214. Each graphics multiprocessor 234 also accesses the L2 cache within the partition unit (e.g., partition unit 220A-220N of Figure 2) shared among all processing clusters 214, and can be used to transfer data between threads. The graphics multiprocessor 234 can also access off-chip global memory, which may include one or more of the local parallel processor memory and / or system memory. Any memory external to the parallel processing unit 202 can be used as global memory. In which the processing cluster 214 includes multiple instances of the graphics multiprocessor 234, embodiments can share common instructions and data that can be stored in the L1 cache 308.
[0077] Each processing cluster 214 may include an MMU 245 (memory management unit) configured to map virtual addresses to physical addresses. In other embodiments, one or more instances of the MMU 245 may be present in the memory interface 218 of Figure 2. The MMU 245 includes a set of page table entries (PTEs) for mapping virtual addresses to physical addresses of tiles and optionally cache line indexes. The MMU 245 may include an address translation buffer (TLB) or a cache or L1 cache or processing cluster 214 that may be present in the graphics multiprocessor 234. The physical address is processed to distribute the surface data access location to allow valid requests to be interleaved among the partition units. The cache line index can be used to determine whether a request for a cache line is a hit or a miss.
[0078] In graphics and computing applications, the processing clusters 214 may be configured such that each graphics multiprocessor 234 is coupled to a texture unit 236 for performing texture mapping operations, such as determining texture sample locations, reading texture data, and filtering texture data. Texture data is read from an internal texture L1 cache (not shown) or in some embodiments from an L1 cache within the graphics multiprocessor 234 and fetched from an L2 cache, local parallel processor memory, or system memory as needed. Each graphics multiprocessor 234 outputs processed tasks to a data crossbar 240 to provide the processed tasks to another processing cluster 214 for further processing or to store the processed tasks in an L2 cache, local parallel processor memory, or system memory via a memory crossbar 216. A pre-ROP 242 (pre-raster operation unit) is configured to receive data from the graphics multiprocessor 234, direct the data to the ROP unit, and may be located with a partition unit (e.g., partition units 220A-220N of FIG. 2 ) as described herein. The units of pre-ROP 242 may perform optimizations for color blending, organize pixel color data, and perform address translations.
[0079] It will be appreciated that the core architecture described herein is illustrative, and variations and modifications are possible. Any number of processing units (e.g., graphics multiprocessor 234, texture unit 236, pre-ROP 242, etc.) may be included within a processing cluster 214. Furthermore, while only one processing cluster 214 is shown, a parallel processing unit as described herein may include instances of any number of processing clusters 214. In one embodiment, each processing cluster 214 may be configured to operate independently of other processing clusters 214 using separate and distinct processing units, L1 caches, etc.
[0080] Figure 2DA graphics multiprocessor 234 is shown according to one embodiment. In such an embodiment, the graphics multiprocessor 234 is coupled to the pipeline manager 232 of the processing cluster 214. The graphics multiprocessor 234 has an execution pipeline including, but not limited to, an instruction cache 252, an instruction unit 254, an address mapping unit 256, a register file 258, one or more general purpose graphics processing unit (GPGPU) cores 262, and one or more load / store units 266. The GPGPU cores 262 and the load / store units 266 are coupled to a cache memory 272 and a shared memory 270 via a memory and cache memory interconnect 268.
[0081] In one embodiment, the instruction cache 252 receives a stream of instructions to be executed from the pipeline manager 232. Instructions are cached in the instruction cache 252 and scheduled for execution by the instruction unit 254. The instruction unit 254 can dispatch instructions as thread groups (e.g., warps), each thread of the thread group is assigned to a different execution unit within the GPGPU core 262. Instructions can access any of the local, shared, or global address spaces by specifying an address within the unified address space. The address mapping unit 256 can be used to convert addresses in the unified address space into different memory addresses that can be accessed by the load / store unit 266.
[0082] Register file 258 provides a set of registers for the functional units of graphics multiprocessor 234. Register file 258 provides temporary storage of operands for data paths connected to the functional units of graphics multiprocessor 234 (e.g., GPGPU core 262, load / store unit 266). In one embodiment, register file 258 is divided between each functional unit such that each functional unit is assigned a dedicated portion of register file 258. In one embodiment, register file 258 is divided between different warps executed by graphics multiprocessor 234.
[0083] Each of the GPGPU cores 262 may include a floating point unit (FPU) and / or an integer arithmetic logic unit (ALU) for executing instructions of the graphics multiprocessor 234. Depending on the embodiment, the GPGPU cores 262 may be similar in architecture, or may be different in architecture. For example, in one embodiment, a first portion of the GPGPU core 262 includes a single-precision FPU and an integer ALU, while a second portion of the GPGPU core 262 includes a double-precision FPU. In one embodiment, the FPU may implement the IEEE 754-2008 standard for floating-point arithmetic or implement variable-precision floating-point arithmetic. The graphics multiprocessor 234 may additionally include one or more fixed-function or special-function units to perform specific functions, such as copying rectangles or pixel blending operations. In one embodiment, one or more of the GPGPU cores may also include fixed or special-function logic.
[0084] In one embodiment, GPGPU core 262 includes SIMD logic capable of executing a single instruction to multiple groups of data. In one embodiment, GPGPU core 262 can physically execute SIMD4, SIMD8 and SIMD16 instructions, and logically execute SIMD1, SIMD2 and SIMD32 instructions. The SIMD instructions of GPGPU core can be generated by a shader compiler at compile time or automatically generated when executing a program written and compiled for a single program multiple data (SPMD) or SIMT architecture. Multiple threads of a program configured for a SIMT execution model can be executed via a single SIMD instruction. For example, and in one embodiment, eight SIMT threads performing the same or similar operation can be executed in parallel via a single SIMD8 logic unit.
[0085] The memory and cache interconnect 268 is an interconnect network that connects each functional unit of the graphics multiprocessor 234 to the register file 258 and the shared memory 270. In one embodiment, the memory and cache interconnect 268 is a crossbar interconnect that allows the load / store unit 266 to implement load and store operations between the shared memory 270 and the register file 258. The register file 258 can operate at the same frequency as the GPGPU core 262, so the data transfer between the GPGPU core 262 and the register file 258 is very low latency. The shared memory 270 can be used to implement communication between threads executing on the functional units within the graphics multiprocessor 234. The cache memory 272 can be used as, for example, a data cache to cache texture data passed between the functional units and the texture unit 236. The shared memory 270 can also be used as a program managed cache. In addition to the automatically cached data stored in the cache memory 272, threads executing on the GPGPU core 262 can also programmatically store data in the shared memory.
[0086] Figure 3A-3B Additional graphics multiprocessors are shown according to an embodiment. Graphics multiprocessors 325, 350 are shown as Figure 2C The illustrated graphics multiprocessors 320, 350 may be configured as streaming multiprocessors (SMs) capable of executing a large number of execution threads simultaneously.
[0087] Figure 3A A graphics multiprocessor 325 is shown according to an additional embodiment. The graphics multiprocessor 325 includes Figure 2D The graphics multiprocessor 325 may include multiple additional instances of execution resource units of the graphics multiprocessor 234. For example, the graphics multiprocessor 325 may include multiple instances of instruction units 332A-332B, register files 334A-334B, and texture units 344A-344B. The graphics multiprocessor 325 also includes multiple groups of graphics or compute execution units (e.g., GPGPU cores 336A-336B, GPGPU cores 337A-337B, GPGPU cores 338A-338B) and multiple groups of load / store units 340A-340B. In one embodiment, the execution resource units have a common instruction cache 330, texture and / or data cache memory 342, and shared memory 346.
[0088] The various components may communicate via the interconnect structure 327. In one embodiment, the interconnect structure 327 includes one or more crossbar switches to enable communication between the various components of the graphics multiprocessor 325. In one embodiment, the interconnect structure 327 is a separate, high-speed network fabric layer on which each component of the graphics multiprocessor 325 is stacked. Components of the graphics multiprocessor 325 communicate with remote components via the interconnect structure 327. For example, the GPGPU cores 336A-336B, 337A-337B, and 3378A-338B may each communicate with the shared memory 346 via the interconnect structure 327. The interconnect structure 327 may arbitrate communications within the graphics multiprocessor 325 to ensure fair bandwidth allocation between components.
[0089] Figure 3B A graphics multiprocessor 350 is shown according to an additional embodiment. The graphics processor includes multiple sets of execution resources 356A-356D, where each set of execution resources includes multiple instruction units, register files, GPGPU cores, and load storage units, such as Figure 2D and Figure 3A Execution resources 356A-356D may work in conjunction with texture units 360A-360D for texture operations while sharing instruction cache 354 and shared memory 362. In one embodiment, execution resources 356A-356D may share multiple instances of instruction cache 354 and shared memory 362 as well as texture and / or data cache memories 358A-358B. The various components may be communicated with via Figure 3A The interconnect structure 327 communicates with a similar interconnect structure 352 .
[0090] Those skilled in the art will understand that Figure 1 , Figure 2A-2D and Figure 3A-3B The architecture described in is illustrative and not limiting with respect to the scope of the current embodiments. Thus, the techniques described herein may be implemented on any appropriately configured processing unit, including but not limited to one or more mobile application processors, one or more desktop or server central processing units (CPUs) including multi-core GPUs, one or more parallel processing units such as parallel processing unit 202 of FIG. 2 , and one or more graphics processors or special purpose processing units, without departing from the scope of the embodiments described herein.
[0091] In some embodiments, a parallel processor or GPGPU as described herein is communicatively coupled to a host / processor core to accelerate graphics operations, machine learning operations, pattern analysis operations, and various general-purpose GPU (GPGPU) functions. The GPU may be communicatively coupled to the host processor / core via a bus or another interconnect (e.g., a high-speed interconnect, such as PCIe or NVLink). In another embodiment, the GPU may be integrated with the core on the same package or chip and communicatively coupled to the core via an internal processor bus / interconnect (i.e., inside the package or chip). Regardless of the manner in which the GPU is connected, the processor core may distribute jobs to the GPU in the form of a sequence of commands / instructions contained in a job descriptor. The GPU then uses dedicated circuits / logic to efficiently process these commands / instructions.
[0092] Technologies for GPU to host processor interconnect
[0093] Figure 4A An exemplary architecture is shown in which multiple GPUs 410-413 are communicatively coupled to multiple multi-core processors 405-406 via high-speed links 440-443 (e.g., buses, point-to-point interconnects, etc.). In one embodiment, the high-speed links 440-443 are dependent on implementing a communication throughput that supports 4GB / s, 30GB / s, 80GB / s, or higher speeds. Various interconnect protocols may be used, including, but not limited to, PCIe 4.0 or 5.0 and NVLink. However, the underlying principles of the invention are not limited to any particular communication protocol or throughput.
[0094] Furthermore, in one embodiment, two or more of GPUs 410-413 are interconnected via high-speed links 444-445, which may be implemented using the same or different protocols / links as used for high-speed links 440-443. Similarly, two or more of multi-core processors 405-406 may be connected via high-speed link 433, which may be a symmetric multiprocessor (SMP) bus operating at 20 GB / s, 30 GB / s, 120 GB / s, or higher. Alternatively, the same protocol / links may be used (e.g., via a common interconnect fabric) to implement the interconnection between the processors. Figure 4A All communications between the various system components are shown. However, as mentioned, the underlying principles of the invention are not limited to any particular type of interconnect technology.
[0095] In one embodiment, each multi-core processor 405-406 is communicatively coupled to processor memory 401-402 via memory interconnects 430-431, respectively, and each GPU 410-413 is communicatively coupled to GPU memory 420-423 via GPU memory interconnects 450-453, respectively. Memory interconnects 430-431 and 450-453 may utilize the same or different memory access technologies. By way of example and not limitation, processor memory 401-402 and GPU memory 420-423 may be volatile memory, such as dynamic random access memory (DRAM) (including stacked DRAM), graphics DDR SDRAM (GDDR) (e.g., GDDR5, GDDR6), or high bandwidth memory (HBM) and / or may be non-volatile memory, such as 3D XPoint or Nano-Ram. In one embodiment, a portion of the memory may be volatile memory, while another portion may be non-volatile memory (e.g., using a two-level memory (2LM) hierarchy).
[0096] As described below, although the various processors 405-406 and GPUs 410-413 may be physically coupled to specific memories 401-402, 420-423, respectively, a unified memory architecture may be implemented in which the same virtual system address space (also referred to as an "effective address" space) is distributed throughout the various physical memories. For example, the processor memories 401-402 may each include 64GB of system memory address space, and the GPU memories 420-423 may each include 32GB of system memory address space (resulting in a total of 256GB of addressable memory in this example).
[0097] Figure 4B Additional details are shown for the interconnection between the multi-core processor 407 and the graphics acceleration module 446 according to one embodiment. The graphics acceleration module 446 may include one or more GPU chips integrated on a line card that is coupled to the processor 407 via a high-speed link 440. Alternatively, the graphics acceleration module 446 may be integrated with the processor 407 on the same package or chip.
[0098] The processor 407 shown includes a plurality of cores 460A-460D, each core having a bypass translation buffer 461A-461D and one or more caches 462A-462D. The core may include various other components (e.g., instruction fetching unit, branch prediction unit, decoder, execution unit, recorder buffer, etc.) for executing instructions and processing data, which are not shown to avoid obscuring the basic principles of the present invention. Caches 462A-462D may include level 1 (L1) and level 2 (L2) caches. In addition, one or more shared caches 426 may be included in the cache hierarchy and shared by several groups of cores 460A-460D. For example, one embodiment of the processor 407 includes 24 cores, each core having its own L1 cache, 12 shared L2 caches, and 12 shared L3 caches. In this embodiment, one of the L2 and L3 caches is shared by two adjacent cores. The processor 407 and the graphics accelerator integrated module 446 are connected to the system memory 441 , which may include the processor memories 401 - 402 .
[0099] Coherence is maintained for data and instructions stored in the various caches 462A-460D, 456 and the system memory 441 via inter-core communication over the coherence bus 464. For example, each cache may have cache coherence logic / circuitry associated therewith to communicate over the coherence bus 464 in response to a detected read or write to a particular cache line. In one implementation, a cache snooping protocol is implemented over the coherence bus 464 to snoop cache accesses. Cache snooping / coherence techniques are well understood by those skilled in the art and will not be described in detail herein to avoid obscuring the underlying principles of the invention.
[0100] In one embodiment, the proxy circuit 425 communicatively couples the graphics acceleration module 446 to the coherence bus 464, allowing the graphics acceleration module 446 to participate in the cache coherence protocol as a core's peer. In particular, the interface 435 provides connectivity to the proxy circuit 425 via a high-speed link 440 (e.g., a PCIe bus, NVLink, etc.), and the interface 437 connects the graphics acceleration module 446 to the link 440.
[0101] In one implementation, the accelerator integrated circuit 436 provides cache management, memory access, context management, and interrupt management services on behalf of the multiple graphics processing engines 431, 432, N of the graphics acceleration module 446. The graphics processing engines 431, 432, N may each include a separate graphics processing unit (GPU). Optionally, the graphics processing engines 431, 432, N may include different types of graphics processing engines, media processing engines (e.g., video encoders / decoders), samplers, and blit engines within a GPU (e.g., a graphics execution unit). In other words, the graphics acceleration module may be a GPU with multiple graphics processing engines 431-432, N, or the graphics processing engines 431-432, N may be separate GPUs integrated on a common package, line card, or chip.
[0102] In one embodiment, the accelerator integrated circuit 436 includes a memory management unit (MMU) 439 for performing various memory management functions, such as virtual to physical memory translation (also known as effective to real memory translation) and memory access protocols for accessing the system memory 441. The MMU 439 may also include a translation lookaside buffer (TLB) (not shown) for caching virtual / effective to physical / real address translations. In one embodiment, the accelerator integrated circuit 436 includes a fetch unit 491 to fetch commands, instructions, job descriptors, etc. that define operations to be performed. In one implementation, the cache 438 stores commands and data for efficient access by the graphics processing engines 431-432, N. In one embodiment, the data stored in the cache 438 and the graphics memories 433-434, N remain consistent with the core caches 462A-462D, 456 and the system memory 441. As mentioned, this may be accomplished via proxy circuitry 425, which participates in cache coherence mechanisms on behalf of cache 438 and memories 433-434, N (e.g., sending updates related to modifications / accesses of cache lines on processor caches 462A-462D, 456 to cache 438 and receiving updates from cache 438).
[0103] A set of registers 449 stores context data for threads executed by the graphics processing engines 431-432, N, and context management circuitry 448 manages thread contexts. For example, context management circuitry 448 may perform save and restore operations to save and restore contexts of various threads during context switches (e.g., where a first thread is saved and a second thread is stored so that the second thread can be executed by the graphics processing engine). For example, upon context switch, context management circuitry 448 may store current register values to a designated area in memory (e.g., identified by a context pointer). It may then restore the register values upon return to the context. In one embodiment, interrupt management circuitry 447 receives and processes interrupts received from system devices.
[0104] In one implementation, virtual / effective addresses from the graphics processing engine 431 are converted by the MMU 439 into real / physical addresses in the system memory 411. One embodiment of the accelerator integrated circuit 436 supports multiple (e.g., 4, 8, 16) graphics accelerator modules 446 and / or other accelerator devices. The graphics accelerator module 446 may be dedicated to a single application executed on the processor 407 or may be shared between multiple applications. In one embodiment, a virtualized graphics execution environment is presented in which the resources of the graphics processing engines 431-432, N are shared with multiple applications or virtual machines (VMs). The resources may be subdivided into "slices" that are allocated to different VMs and / or applications based on the processing requirements and priorities associated with the VMs and / or applications.
[0105] Thus, the accelerator integrated circuit acts as a bridge to the system for graphics acceleration module 446 and provides address translation and system memory cache services. In addition, the accelerator integrated circuit 436 can provide virtualization facilities for the host processor to manage virtualization of the graphics processing engine, interrupts, and memory management.
[0106] Because the hardware resources of the graphics processing engines 431-432, N are explicitly mapped to the real address space visible to the host processor 407, any host processor can directly use the effective address values to manipulate these resources. In one embodiment, one function of the accelerator integrated circuit 436 is the physical separation of the graphics processing engines 431-432, N so that they appear to the system as independent units.
[0107] As mentioned, in the illustrated embodiment, one or more graphics memories 433-434, M are respectively coupled to each of the graphics processing engines 431-432, N. The graphics memories 433-434, M store instructions and data processed by each of the graphics processing engines 431-432, N. The graphics memories 433-434, M may be volatile memory, such as DRAM (including stacked DRAM), GDDR memory (e.g., GDDR5, GDDR6), or HBM, and / or may be non-volatile memory, such as 3DXPoint or Nano-Ram.
[0108] In one embodiment, to reduce data traffic on link 440, biasing techniques are used to ensure that data stored in graphics memory 433-434, M is data that is most frequently used by graphics processing engines 431-432, N and preferably not used (at least not frequently) by cores 460A-460D. Similarly, the biasing mechanism attempts to keep data needed by the cores (and preferably not graphics processing engines 431-432, N) within the cores' caches 462A-462D, 456 and system memory 411.
[0109] Figure 4C Another embodiment is shown in which an accelerator integrated circuit 436 is integrated within the processor 407. In this embodiment, the graphics processing engines 431-432, N communicate directly with the accelerator integrated circuit 436 via the high-speed link 440 via the interface 437 and the interface 435 (which again can utilize any form of bus or interface protocol). The accelerator integrated circuit 436 can perform operations related to Figure 4B The same operation as described, but possibly at higher throughput, assuming it is in close proximity to the coherency bus 462 and caches 462A-462D, 456.
[0110] One embodiment supports different programming models, including a dedicated process programming model (without graphics acceleration module virtualization) and a shared programming model (with virtualization). The latter may include a programming model controlled by the accelerator integrated circuit 436 and a programming model controlled by the graphics acceleration module 446.
[0111] In one embodiment of a dedicated process model, graphics processing engines 431-432, N are dedicated to a single application or process under a single operating system. A single application can send other application requests to virtualized graphics processing engines 431-432, N provided within a VM / partition.
[0112] In a dedicated process programming model, graphics processing engines 431-432, N can be shared by multiple VM / application partitions. The shared model requires a hypervisor to virtualize graphics processing engines 431-432, N to allow access by each operating system. For a single-partition system without a hypervisor, graphics processing engines 431-432, N are owned by the operating system. In both cases, the operating system can virtualize graphics processing engines 431-432, N to provide access to each process or application.
[0113] For the shared programming model, the graphics acceleration module 446 or the individual graphics processing engines 431-432, N use a process handle to select a process element. In one embodiment, the process element is stored in the system memory 411 and is addressable using the effective address to real address translation techniques described herein. The process handle may be an implementation-specific value provided to the host process when registering its context with the graphics processing engine 431-432, N (that is, calling the system software to add the process element to the process element linked list). The lower 16 bits of the process handle may be the offset of the process element within the process element linked list.
[0114] Figure 4D An exemplary accelerator integrated slice 490 is shown. As used herein, a "slice" includes a specific portion of the processing resources of the accelerator integrated circuit 436. The application effective address space 482 within the system memory 411 stores process elements 483. In one embodiment, the process element 483 is stored in response to a GPU call 481 from an application 480 executed on the processor 407. The process element 483 contains the process state of the corresponding application 480. The job descriptor (WD) 484 contained in the process element 483 can be a single job requested by the application, or can contain a pointer to a queue of jobs. In the latter case, the WD 484 is a pointer to a job request queue in the address space 482 of the application.
[0115] Graphics acceleration module 446 and / or individual graphics processing engines 431-432, N may be shared by all or a subset of processes in the system. Embodiments of the present invention include infrastructure for establishing process state and sending WD 484 to graphics acceleration module 446 to start a job in a virtualized environment.
[0116] In one implementation, the dedicated process programming model is implementation specific. In this model, a single process owns the graphics acceleration module 446 or a separate graphics processing engine 431. Because the graphics acceleration module 446 is owned by a single process, the hypervisor initializes the accelerator integrated circuit 436 for the owning partition, and the operating system initializes the accelerator integrated circuit 436 for the owning process at the time when the graphics acceleration module 446 is allocated.
[0117] In operation, the WD fetch unit 491 in the accelerator integrated slice 490 fetches the next WD 484, which includes an indication of a job completed by one of the graphics processing engines of the graphics acceleration module 446. The data from the WD 484 may be stored in registers 449 and used by the MMU 439, interrupt management circuit 447, and / or context management circuit 446 as shown. For example, one embodiment of the MMU 439 includes a fragment / page walk circuit for accessing a fragment / page table 486 within the OS virtual address space 485. The interrupt management circuit 447 may process an interrupt event 492 received from the graphics acceleration module 446. When performing graphics operations, the effective address 493 generated by the graphics processing engine 431-432, N is converted into a real address by the MMU 439.
[0118] In one embodiment, the same set of registers 449 is repeated for each graphics processing engine 431-432, N and / or graphics acceleration module 446 and can be initialized by a hypervisor or operating system. Each of these repeated registers can be included in an accelerator integrated slice 490. Exemplary registers that can be initialized by a hypervisor are shown in Table 1.
[0119] Table 1 - Registers initialized by the hypervisor
[0120] 1 Chip Control Register 2 Real address (RA) dispatched process area pointer 3 Permission Mask Override Register 4 Interrupt vector table entry offset 5 Interrupt Vector Table Entry Limit 6 Status Register 7 Logical Partition ID 8 Real Address (RA) Hypervisor Accelerator Utilizing Record Pointers 9 Storage Description Register
[0121] Exemplary registers that may be initialized by the operating system are shown in Table 2.
[0122] Table 2 - Registers initialized by the operating system
[0123]
[0124]
[0125] In one embodiment, each WD 484 is specific to a particular graphics acceleration module 446 and / or graphics processing engine 431-432, N. It contains all the information that the graphics processing engine 431-432, N needs to complete its job, or it may be a pointer to a memory location of a command queue where the application has established jobs to be completed.
[0126] Figure 4E Additional details of one embodiment of the sharing model are shown. This embodiment includes a hypervisor real address space 498 in which a process element list 499 is stored. The hypervisor real address space 498 is accessible via a hypervisor 496, which virtualizes the graphics acceleration module engine of the operating system 495.
[0127] The shared programming model allows all or a subset of processes from all or a subset of partitions in the system to use the graphics acceleration module 446. There are two programming models where the graphics acceleration module 446 is shared by multiple processes and partitions: time slice sharing and graphics pointer sharing.
[0128] In this model, the hypervisor 496 owns the graphics acceleration module 446 and makes its functionality available to all operating systems 495. In order for the graphics acceleration module 446 to support virtualization through the hypervisor 496, the graphics acceleration module 446 may adhere to the following requirements: 1) The application's job requests must be autonomous (that is, state does not need to be maintained between jobs), or the graphics acceleration module 446 must provide a context save and restore mechanism. 2) The application's job requests are guaranteed by the graphics acceleration module 446 to be completed within a specified amount of time, including any conversion errors, or the graphics acceleration module 446 provides the ability to preempt the processing of jobs. 3) The graphics acceleration module 446 must be guaranteed fairness between processes when operating in a direct sharing programming model.
[0129] In one embodiment, for the shared model, the application 480 needs to use the graphics acceleration module 446 type, the job descriptor (WD), the permission mask register (AMR) value and the context save / restore region pointer (CSRP) to make an operating system 495 system call. The graphics acceleration module 446 type describes the target acceleration function of the system call. The graphics acceleration module 446 type can be a system-specific value. The WD is formatted specifically for the graphics acceleration module 446 and can describe the job to be completed by the graphics acceleration module 446 in the form of a graphics acceleration module 446 command, an effective address pointer to a user-defined structure, an effective address pointer to a queue of commands, or any other data structure. In one embodiment, the AMR value is the AMR state for the current process. The value passed to the operating system is similar to the application of setting the AMR. If the accelerator integrated circuit 436 and the graphics acceleration module 446 implementation do not support the user permission mask override register (UAMOR), the operating system can apply the current UAMOR value to the AMR value before passing the AMR in the hypervisor call. The hypervisor 496 may optionally apply the current privilege mask override register (AMOR) value before placing the AMR into the process element 483. In one embodiment, the CSRP is one of the registers 449 that contains the effective address of an area in the address space 482 of the application of the graphics acceleration module 446 to save and restore context state. This pointer is optional if no state needs to be saved between jobs or when a job is preempted. The context save / restore area may be fixed system memory.
[0130] When the system call is received, the operating system 495 can verify that the application 480 has been registered and given permission to use the graphics acceleration module 446. The operating system 495 then calls the hypervisor 496 using the information shown in Table 3.
[0131] Table 3 - OS to Hypervisor Call Parameters
[0132] 1 Job Descriptor (WD) 2 The value of the authority mask register (AMR) (may be masked) 3 Effective Address (EA) Context Save / Restore Region Pointer (CSRP) 4 Process ID (PID) and optional thread ID (TID) 5 Virtual Address (VA) Accelerator Utilization Record Pointer (AURP) 6 Virtual pointer to the storage segment table pointer (SSTP) 7 Logical Interrupt Service Number (LISN)
[0133] When the hypervisor call is received, the hypervisor 496 verifies that the operating system 495 has been registered and given permission to use the graphics acceleration module 446. The hypervisor 496 then places the process element 483 in a linked list of process elements of the corresponding graphics acceleration module 446 type. The process element may include the information shown in Table 4.
[0134] Table 4 - Process element information
[0135]
[0136]
[0137] In one embodiment, the hypervisor initializes the plurality of registers 449 of the accelerator integrated slice 490 .
[0138] like Figure 4F As shown, one embodiment of the present invention employs a unified memory addressable via a common virtual address space, which is used to access physical processor memory 401-402 and GPU memory 420-423. In this implementation, operations executed on GPU 410-413 utilize the same virtual / effective memory address space to access processor memory 401-402, and vice versa, thereby simplifying programmability. In one embodiment, a first portion of the virtual / effective address space is allocated to processor memory 401, a second portion is allocated to second processor memory 402, a third portion is allocated to GPU memory 420, and so on. The entire virtual / effective memory space (sometimes referred to as the effective address space) is thus distributed across each of processor memory 401-402 and GPU memory 40-423, allowing any processor or GPU to access that memory using a virtual address mapped to any physical memory.
[0139] In one embodiment, bias / coherency management circuits 494A-494E within one or more of MMUs 439A-439E ensure cache coherency between the caches of a host processor (e.g., 405) and GPUs 410-413 and implement biasing techniques that indicate the physical memory in which certain types of data should be stored. Figure 4FMultiple instances of bias / consistency management circuits 494A- 494E are shown in , but the bias / consistency circuits may be implemented within an MMU of one or more host processors 405 and / or within an accelerator integrated circuit 436 .
[0140] One embodiment allows GPU-attached memory 420-423 to be mapped as part of system memory and accessed using shared virtual memory (SVM) technology, but without suffering from the general performance drawbacks associated with full system cache coherence. The ability of GPU-attached memory 420-423 to be accessed as system memory without heavy cache coherence overhead provides a beneficial operating environment for GPU offloading. This arrangement allows host processor 405 software to establish operands and access calculation results without the overhead of traditional I / O DMA data copying. Such traditional copies involve driver calls, interrupts, and memory-mapped I / O (MMIO) accesses, which are all inefficient relative to simple memory accesses. At the same time, the ability to access GPU-attached memory 420-423 without cache coherence overhead may be critical to the execution time of offloaded calculations. In the case of a large amount of streaming write memory business, for example, cache coherence overhead can significantly reduce the effective write bandwidth seen by GPU 410-413. The efficiency of operand establishment, the efficiency of result access, and the efficiency of GPU calculation all play a role in determining the effectiveness of GPU offloading.
[0141] In one implementation, the selection between GPU bias and host processor bias is driven by a bias tracker data structure. For example, a bias table may be used, which may be a page granular structure comprising 1 or 2 bits per GPU attached memory page (i.e., controlled at the granularity of a memory page). The bias table may be implemented in the stolen memory range of one or more GPU attached memories 420-423 with or without a bias cache in the GPUs 410-413 (e.g., to cache frequently / recently used entries of the bias table). Alternatively, the entire bias table may be maintained within the GPU.
[0142] In one implementation, the bias table entries associated with each access to the GPU-attached memory 420-423 are accessed before the actual access to the GPU memory, resulting in the following operations. First, local requests from GPUs 410-413 to find their pages in the GPU bias are forwarded directly to the corresponding GPU memory 420-423. Local requests from the GPU to find their pages in the host bias are forwarded to the processor 405 (e.g., via a high-speed link as discussed above). In one embodiment, requests from processors 405 to find their requested pages in the host processor bias complete requests such as normal memory reads. Optionally, requests pointing to pages in the GPU bias may be forwarded to GPUs 410-413. If the GPU is not currently using a page, it can then convert the page to the host processor bias.
[0143] The bias state of a page may be changed by a software-based mechanism, a hardware-assisted software-based mechanism, or, for a limited set of circumstances, by a purely hardware-based mechanism.
[0144] One mechanism for changing the bias state employs an API call (e.g., OpenCL), which in turn calls the GPU's device driver, which in turn sends a message (or queues a command descriptor) to the GPU, which directs it to change the bias state, and for some transitions, performs a cache flush operation in the host. The cache flush operation is required for a transition from the host processor 405 to the GPU bias, but not for the reverse transition.
[0145] In one embodiment, cache coherency is maintained by temporarily rendering GPU-biased pages that are not cacheable by host processor 405. To access these pages, processor 405 may request access from GPU 410, which may or may not immediately grant access, depending on the implementation. Therefore, to reduce communication between processor 405 and GPU 410, it is beneficial to ensure that GPU-biased pages are pages that are needed by the GPU but not host processor 405, and vice versa.
[0146] Graphics processing pipeline
[0147] Figure 5 2. A graphics processing pipeline 500 is shown according to an embodiment. In one embodiment, a graphics processor may implement the illustrated graphics processing pipeline 500. The graphics processor may be included in a parallel processing subsystem as described herein (e.g., parallel processor 200 of FIG. 2), which in one embodiment is Figure 12 . Various parallel processing systems may implement the graphics processing pipeline 500 via one or more instances of a parallel processing unit (e.g., parallel processing unit 202 of FIG. 2 ) as described herein. For example, a shader unit (e.g., graphics multiprocessor 234 of FIG. 3 ) may be configured to perform the functions of one or more of a vertex processing unit 504, a tessellation control processing unit 508, a tessellation evaluation processing unit 512, a geometry processing unit 516, and a fragment / pixel processing unit 514. The functions of the data assembler 502, the primitive assemblers 506, 514, 516, the tessellation unit 510, the rasterizer 522, and the raster operation unit 526 may also be performed by other processing engines within a processing cluster (e.g., processing cluster 214 of FIG. 3 ) and corresponding partitioning units (e.g., partitioning units 220A-220N of FIG. 2 ). The graphics processing pipeline 500 may also be implemented using one or more dedicated processing units for the functions. In one embodiment, one or more portions of graphics processing pipeline 500 may be executed by parallel processing logic within a general purpose processor (e.g., a CPU). In one embodiment, one or more portions of graphics processing pipeline 500 may access on-chip memory (e.g., parallel processor memory 222 as in FIG. 2 ) via memory interface 528, which may be an example of memory interface 218 of FIG. 2 .
[0148] In one embodiment, data assembler 502 is a processing unit that collects vertex data for surfaces and primitives. Data assembler 502 then outputs vertex data including vertex attributes to vertex processing unit 504. Vertex processing unit 504 is a programmable execution unit that executes vertex shader programs, which illuminates and transforms vertex data as specified by the vertex shader programs. Vertex processing unit 504 reads data stored in cache, local or system memory for use in processing vertex data, and can be programmed to transform vertex data from an object-based coordinate representation to a world space coordinate space or a normalized device coordinate space.
[0149] A first instance of primitive assembler 506 receives vertex attributes from vertex processing unit 504. Primitive assembler 506 reads the stored vertex attributes as needed and constructs graphics primitives for processing by tessellation control processing unit 508. Graphics primitives include triangles, line segments, points, patches, etc., as supported by various graphics processing application programming interfaces (APIs).
[0150] The tessellation control processing unit 508 processes the input vertices into control points for the geometry patch. The control points are transformed from an input representation from the patch (e.g., the basis of the patch) into a representation suitable for use by the tessellation evaluation processing unit 512 in surface evaluation. The tessellation control processing unit 508 may also calculate tessellation factors for the edges of the geometry patch. The tessellation factors are applied to individual edges and quantize the view-dependent level of detail associated with the edge. The tessellation unit 510 is configured to receive the tessellation factors for the edges of the patch and to subdivide the patch into a plurality of geometric primitives, such as line, triangle, or quadrilateral primitives, which are sent to the tessellation evaluation processing unit 512. The tessellation evaluation processing unit 512 operates on the parameterized coordinates of the tessellated patch to generate a surface representation and vertex attributes for each vertex associated with the geometric primitive.
[0151] A second instance of primitive assembler 514 receives vertex attributes from tessellation evaluation processing unit 512, reads stored vertex attributes as needed, and constructs graphics primitives for processing by geometry processing unit 516. Geometry processing unit 516 is a programmable execution unit that executes geometry shader programs to transform graphics primitives received from primitive assembler 514 as specified by the geometry shader programs. In one embodiment, geometry processing unit 516 is programmed to subdivide a graphics primitive into one or more new graphics primitives and compute parameters for rasterizing the new graphics primitives.
[0152] In some embodiments, the geometry processing unit 516 may add or delete elements in the geometry stream. The geometry processing unit 516 outputs parameters and vertices that specify new graphics primitives to the primitive assembler 518. The primitive assembler 518 receives the parameters and vertices from the geometry processing unit 516 and constructs graphics primitives for processing by the viewport scaling, culling, and clipping unit 520. The geometry processing unit 516 reads data stored in the parallel processor memory or the system memory for use in processing the geometry data. The viewport scaling, culling, and clipping unit 520 performs clipping, culling, and viewport scaling, and outputs the processed graphics primitives to the rasterizer 522.
[0153] The rasterizer 522 may perform depth culling and other depth-based optimizations. The rasterizer 522 also performs scan conversion on new graphics primitives to generate fragments, and outputs those fragments and associated coverage data to the fragment / pixel processing unit 524. The fragment / pixel processing unit 524 is a programmable execution unit configured to execute a fragment shader program or a pixel shader program. The fragment / pixel processing unit 524 transforms the fragments or pixels received from the rasterizer 522 as specified by the fragment or pixel shader program. For example, the fragment / pixel processing unit 524 may be programmed to perform operations, including but not limited to texture mapping, shading, blending, texture correction, and perspective correction to generate shaded fragments or pixels output to the raster operation unit 526. The fragment / pixel processing unit 524 may read data stored in a parallel processor memory or system memory for use in processing fragment data. The fragment or pixel shader program may be configured to shade at a sample, pixel, tile, or other granularity depending on the sampling rate configured for the processing unit.
[0154] Raster operations unit 526 is a processor that performs raster operations (including but not limited to stenciling, z-testing, blending, etc.) and outputs pixel data as processed graphics data to be stored in graphics memory (e.g., parallel processor memory 222 in FIG. 2 and / or in FIG. 3 ). Figure 1 Raster operations unit 526 may be configured to compress z or color data written to memory and decompress z or color data read from memory.
[0155] Machine Learning Overview
[0156] A machine learning algorithm is an algorithm that can learn based on a set of data. Embodiments of machine learning algorithms can be designed to model high-level abstractions within a data set. For example, image recognition algorithms can be used to determine which of several categories a given input belongs to; given an input, a regression algorithm can output a numerical value; and pattern recognition algorithms can be used to generate converted text or perform text-to-speech and / or speech recognition.
[0157] An exemplary type of machine learning algorithm is a neural network. There are many types of neural networks; a simple type of neural network is a feedforward network. A feedforward network can be implemented as a non-periodic curve in which nodes are arranged in layers. In general, a feedforward network topology includes an input layer and an output layer separated by at least one hidden layer. The hidden layer transforms the input received by the input layer into a representation useful for generating the output in the output layer. The network nodes are fully connected to the nodes in the adjacent layers via edges, but there are no edges between the nodes within each layer. Data received at the nodes of the input layer of the feedforward network is propagated (i.e., "forward fed") to the nodes of the output layer via an activation function, which calculates the state of the nodes in each successive layer in the network based on coefficients ("weights") associated with each edge connecting the layers. Depending on the specific model represented by the algorithm being executed, the output from the neural network algorithm can take various forms.
[0158] Before a machine learning algorithm can be used to model a particular problem, the algorithm is trained using a training data set. Training a neural network involves selecting a network topology, using a set of training data representing the problem modeled by the network, and adjusting weights until the network model performs with minimal error for all instances of the training data set. For example, during a supervised learning training process for a neural network, the output generated by the network in response to an input representing an instance in the training data set is compared to the "correct" labeled output for that instance, an error signal representing the difference between the output and the labeled output is calculated, and the weights associated with the connections are adjusted to minimize that error as the error signal propagates backward through the layers of the network. The network is considered "trained" when the error for each output generated according to an instance of the training data set is minimized.
[0159] The accuracy of a machine learning algorithm can be significantly affected by the quality of the data set used to train the algorithm. The training process can be computationally intensive and may require a significant amount of time on a conventional general purpose processor. Therefore, parallel processing hardware is used to train many types of machine learning algorithms. This is particularly useful for optimizing the training of neural networks, as the calculations performed when adjusting the coefficients in a neural network are naturally suitable for parallel implementation. In particular, many machine learning algorithms and software applications are suitable for utilizing the parallel processing hardware within general purpose graphics processing devices.
[0160] Figure 6is a generalized diagram of a machine learning software stack 600. Machine learning applications 602 may be configured to train a neural network using a training data set or to implement machine intelligence using a trained deep neural network. Machine learning applications 602 may include training and reasoning capabilities for a neural network and / or specialized software that may be used to train a neural network prior to deployment. Machine learning applications 602 may implement any type of machine intelligence, including but not limited to image recognition, mapping and localization, automatic navigation, speech synthesis, medical imaging, or language translation.
[0161] Hardware acceleration of the machine learning application 602 can be achieved via the machine learning framework 604. The machine learning framework 604 can provide a library of machine learning primitives. Machine learning primitives are basic operations typically performed by machine learning algorithms. Without the machine learning framework 604, the developer of the machine learning algorithm would need to create and optimize the main computational logic associated with the machine learning algorithm, and then re-optimize the computational logic when a new parallel processor is developed. Alternatively, the machine learning application can be configured to use the primitives provided by the machine learning framework 604 to perform the necessary calculations. Exemplary primitives include tensor convolutions, activation functions, and pools, which are computational operations performed when training a convolutional neural network (CNN). The machine learning framework 604 can also provide primitives to implement basic linear algebra subroutines performed by many machine learning algorithms (e.g., matrix and vector operations).
[0162] The machine learning framework 604 may process input data received from the machine learning application 602 and generate appropriate inputs to the computation framework 606. The computation framework 606 may abstract the basic instructions provided to the GPGPU driver 608 to enable the machine learning framework 604 to take advantage of hardware acceleration via the GPGPU hardware 610 without requiring the machine learning framework 604 to have detailed knowledge of the architecture of the GPGPU hardware 610. Furthermore, the computation framework 606 may enable hardware acceleration for the machine learning framework 604 across various types and generations of GPGPU hardware 610.
[0163] GPGPU machine learning acceleration
[0164] Figure 7 A highly parallel general purpose graphics processing unit 700 is shown in accordance with an embodiment. In one embodiment, a general purpose processing unit (GPGPU) 700 may be configured to be particularly efficient at processing the type of computational workload associated with training deep neural networks. In addition, GPGPU 700 may be directly linked to other instances of GPGPU to create a multi-GPU cluster to increase the speed of training, in particular, deep neural networks.
[0165] GPGPU 700 includes a host interface 702 to enable connection to a host processor. In one embodiment, host interface 702 is a fast PCI interface. However, the host interface can also be a vendor-specific communication interface or communication structure. GPGPU 700 receives commands from the host processor and uses a global scheduler 704 to distribute execution threads associated with those commands to a group of computing clusters 706A-706H. Computing clusters 706A-706H share cache memory 708. Cache memory 708 can be used as a higher-level cache of cache memory within computing clusters 706A-706H.
[0166] GPGPU 700 includes memory 714A-714B coupled to computing clusters 706A-706H via a set of memory controllers 712A-712B. In various embodiments, memory 714A-714B may include various types of memory devices, including dynamic random access memory (DRAM) or graphics random access memory, such as synchronous graphics random access memory (SGRAM), including graphics double data rate (GDDR) memory. In one embodiment, memory units 224A-224N may also include 3D stacked memory, including but not limited to high bandwidth memory (HBM).
[0167] In one embodiment, each computing cluster 706A-706H includes a set of graphics multiprocessors, such as Figure 4A The graphics multiprocessors of the compute clusters may include multiple types of integer and floating point logic units to perform computational operations with a range of precision suitable for machine learning computations. For example, and in one embodiment, at least a subset of the floating point units in each of the compute clusters 706A-706H may be configured to perform 16-bit or 32-bit floating point operations, although a different subset of the floating point units may be configured to perform 64-bit floating point operations.
[0168] Multiple instances of GPGPU 700 may be configured to operate as a computing cluster. The communication mechanisms used by the computing cluster for synchronization and data exchange are different in all embodiments. In one embodiment, multiple instances of GPGPU 700 communicate through a host interface 702. In one embodiment, GPGPU 700 includes an I / O hub 709 that couples GPGPU 700 with a GPU link 710, and GPU link 710 implements direct connection with other instances of GPGPU. In one embodiment, GPU link 710 is coupled to a dedicated GPU to GPU bridge, which implements communication and synchronization between multiple instances of GPGPU 700. In one embodiment, GPU link 710 is coupled to a high-speed interconnect to send data to other GPGPUs or parallel processors and receive data. In one embodiment, multiple instances of GPGPU 700 are located in separate data processing systems and communicate via network devices accessible through host interface 702. In one embodiment, in addition to host interface 702 or as an alternative to host interface 702, GPU link 710 may be configured to implement connection to a host processor.
[0169] Although the illustrated configuration of GPGPU 700 may be configured to train a neural network, one embodiment provides an optional configuration of GPGPU 700 that may be configured for deployment within a high-performance or low-power inference platform. In the inference configuration, GPGPU 700 includes fewer of the compute clusters 706A-706H relative to the training configuration. In addition, the memory technology associated with memory 714A-714B may be different between the inference and training configurations. In one embodiment, the inference configuration of GPGPU 700 may support inference specific instructions. For example, the inference configuration may provide support for one or more 8-bit integer dot product instructions that are typically used during inference operations of a neural network for deployment.
[0170] Figure 8 800 according to an embodiment. The multi-GPU computing system 800 may include a processor 802 coupled to a plurality of GPGPUs 806A-D via a host interface switch 804. In one embodiment, the host interface switch 804 is a PCI Express switch device that couples the processor 802 to a PCI Express bus, through which the processor 802 can communicate with the set of GPGPUs 806A-D. Each of the plurality of GPGPUs 806A-806D may be Figure 7 GPGPU 700 of FIG. 806A-D may be interconnected via a set of high-speed point-to-point GPU-to-GPU links 816. The high-speed GPU-to-GPU links may be connected via dedicated GPU links (e.g., Figure 7806D). The P2P GPU link 816 enables direct communication between each of the GPGPUs 806A-806D without the need to communicate through a host interface bus to which the processor 802 is connected. In the case where GPU-to-GPU traffic is directed to the P2P GPU link, the host interface bus remains available for access to system memory or communicates with other instances of the multi-GPU computing system 800, for example, via one or more network devices. Although in the illustrated embodiment, the GPGPUs 806A-806D are connected to the processor 802 via the host interface switch 804, in one embodiment, the processor 802 includes direct support for the P2P GPU link 816 and can be directly connected to the GPGPUs 806A-806D.
[0171] Machine Learning Neural Network Implementation
[0172] The computing architecture provided by the embodiments described herein can be configured to perform a type of parallel processing that is particularly suitable for training and deploying neural networks for machine learning. Neural networks can be generalized as networks with functions that have curvilinear relationships. As is known in the art, there are various types of neural network implementations used in machine learning. One exemplary type of neural network is a feedforward network as described above.
[0173] A second exemplary type of neural network is a convolutional neural network (CNN). A CNN is a specialized feedforward neural network for processing data (e.g., image data) with a known grid-like topology. Therefore, CNNs are commonly used for computational vision and image recognition applications, but they can also be used for other types of pattern recognition, such as speech and language processing. The nodes in the input layer of a CNN are organized into a set of "filters" (feature detectors stimulated by the receptive fields found in the retina), and the output of each set of filters is propagated to the nodes in the successive layers of the network. The calculation for a CNN includes applying a convolution mathematical operation to each filter to produce the output of that filter. Convolution is a specialized type of mathematical operation performed by two functions to produce a third function, which is a modified version of one of the two original functions. In convolutional network terminology, the first function used for convolution can be referred to as the input, and the second function can be referred to as the convolution kernel. The output can be referred to as a feature map. For example, the input for a convolutional layer can be a multidimensional array of data defining the various color components of the input graphic. The convolution kernel can be a multidimensional array of parameters, where the parameters are adapted by the training process for the neural network.
[0174] A recurrent neural network (RNN) is a series of feedforward neural networks that include feedback connections between layers. RNNs enable modeling of sequence data by sharing reference data among different parts of the neural network. The architecture of an RNN includes loops. A loop represents the effect of the current value of a variable on its own value at a future time, because at least a portion of the output data from the RNN is used as feedback to process subsequent inputs in the sequence. This feature makes RNNs particularly useful for language processing due to the variable nature that language data can have.
[0175] The figures described below present exemplary feedforward, CNN, and RNN networks and describe the general process for training and deploying each of those types of networks, respectively. It will be understood that these descriptions are exemplary and not limiting of any particular embodiment described herein, and that the concepts shown can be generally applied to deep neural networks and machine learning techniques in general.
[0176] The exemplary neural network described above can be used to perform deep learning. Deep learning is machine learning using deep neural networks. The deep neural network used in deep learning is an artificial neural network composed of multiple hidden layers, unlike shallow neural networks that only include a single hidden layer. Deeper neural networks are generally more computationally intensive to train. However, the additional hidden layers of the network enable multi-step pattern recognition, which results in reduced output errors relative to shallow machine learning techniques.
[0177] The deep neural network used in deep learning generally includes a front-end network to perform feature recognition coupled to a back-end network representing a mathematical model that can perform operations (such as object classification, speech recognition, etc.) based on the feature representation provided to the model. Deep learning enables machine learning to be performed without the need for hand-crafted feature engineering performed on the model. Alternatively, a deep neural network can learn features based on statistical structures or associations within the input data. The learned features can be provided to a mathematical model that can map the detected features to an output. The mathematical model used by the network is typically dedicated to a specific task to be performed, and different models will be used to perform different tasks.
[0178] Once a neural network is constructed, a learning model can be applied to the network to train the network to perform a specific task. The learning model describes how to adjust the weights within the model to reduce the output error of the network. Backward propagation of errors is a common method for training neural networks. An input vector is presented to the network for processing. A loss function is used to compare the output of the network with the expected output, and an error value is calculated for each neuron in the output layer. The error value is then propagated backward until each neuron has an associated error value that roughly represents its contribution to the original output. The network can then learn from those errors using an algorithm (such as a stochastic gradient descent algorithm) to update the weights of the neural network.
[0179] Figure 9A-9B An exemplary convolutional neural network is shown. Fig. 9A Various layers within a CNN are shown. As shown in Figure 9, an exemplary CNN for modeling image processing may receive an input 902 describing the red, green, and blue (RGB) components of an input image. The input 902 may be processed by a plurality of convolutional layers (e.g., convolutional layer 904, convolutional layer 906). The output from a plurality of convolutional layers may optionally be processed by a set of fully connected layers 908. The neurons in the fully connected layers have full connections with all activations in the previous layers, as described above for feed-forward networks. The output from the fully connected layers 908 may be used to generate output results according to the network. Matrix multiplication may be used instead of convolution to calculate the activations within the fully connected layers 908. Not all CNN implementations utilize fully connected layers 908. For example, in some implementations, convolutional layers 906 may generate outputs for CNN.
[0180] The convolutional layers are sparsely connected, which is different from the traditional neural network configuration found in the fully connected layer 908. Traditional neural network layers are fully connected so that each output unit interacts with each input unit. However, the convolutional layers are sparsely connected because the output of the convolution of the domain is input (rather than the corresponding state value of each node in the domain) to the nodes of the subsequent layer, as shown. The kernel associated with the convolutional layer performs the convolution operation, and its output is sent to the next layer. The dimensionality reduction performed within the convolutional layer is one aspect that enables CNNs to scale to process larger images.
[0181] Fig. 9B Exemplary computational stages within a convolutional layer of a CNN are shown. The input to a convolutional layer 912 of the CNN may be processed in three stages of a convolutional layer 914. The three stages may include a convolutional stage 916, a detector stage 918, and a pooling stage 920. The convolutional layer 914 may then output data to a subsequent convolutional layer. The last convolutional layer of the network may generate output feature map data or provide input to a fully connected layer, for example to generate a classification value for the input to the CNN.
[0182] The convolution stage 916 performs several convolutions in parallel to produce a set of linear activations. The convolution stage 916 may include an affine transformation, which is any transformation that can be defined as a linear transformation plus a translation. Affine transformations include rotations, translations, scaling, and combinations of these transformations. The convolution stage calculates the output of a function (e.g., a neuron) connected to a specific region in the input, which can be determined as a local region associated with the neuron. The neuron calculates the dot product between the weight of the neuron and the region in the local input to which the neuron is connected. The output from the convolution stage 916 defines a set of linear activations processed by the subsequent stages of the convolution layer 914.
[0183] The linear activations may be processed by the detector stage 918. In the detector stage 918, each linear activation is processed by a nonlinear activation function. The nonlinear activation function increases the nonlinearity of the overall network without affecting the receptive field of the convolutional layer. Several types of nonlinear activation functions may be used. One particular type is the rectified linear unit (ReLU), which uses an activation function defined as f(x) = max(0, x) so that the activation is thresholded at zero.
[0184] Pooling stage 920 uses a pooling function that replaces the output of convolutional layer 906 with summary statistics of nearby outputs. Pooling functions can be used to introduce translation invariance into a neural network so that small translations of the input do not change the output of the pooling. Invariance to local translations may be useful in situations where the presence of features in the input data is more important than the precise location of the features. Various types of pooling functions can be used during pooling stage 920, which includes maximum pooling, average pooling, and 12 standard pooling. In addition, some CNN implementations do not include a pooling stage. Alternatively, such an implementation replaces an additional convolution stage with an increased stride relative to the previous convolution stage.
[0185] The output from the convolutional layer 914 may then be processed by the next layer 922. The next layer 922 may be an additional convolutional layer or one of the fully connected layers 908. For example, Fig. 9A The first convolutional layer 904 may output to the second convolutional layer 906 , and the second convolutional layer may output to the first layer of the fully connected layer 908 .
[0186] Fig.10An exemplary recurrent neural network 1000 is shown. In a recurrent neural network (RNN), the previous state of the network affects the output of the current state of the network. RNNs can be constructed in various ways using various functions. The use of RNNs is usually based on mathematical models to predict the future based on previous sequences of inputs. For example, given a previous sequence of words, RNNs can be used to perform statistical language modeling to predict upcoming words. The RNN 1000 shown can be described as having an input layer 1002 that receives an input vector, a hidden layer 1004 for implementing a recursive function, a feedback mechanism 1005 for implementing a "memory" of a previous state, and an output layer 1006 for outputting a result. RNN 1000 operates based on time steps. The state of the RNN at a given time step is affected via a feedback mechanism 1005 based on the previous time step. For a given time step, the state of the hidden layer 1004 is defined by the previous state and the input at the current time step. The initial input (x1) at the first time step can be processed by the hidden layer 1004. The second input (x2) may be processed by the hidden layer 1004 using the state information determined during the processing of the initial input (x1). A given state may be calculated as st = f(Ux t +Ws t-1 ), where U and W are parameter matrices. The function f is typically nonlinear, such as a hyperbolic tangent function (Tanh) or a variation of a corrector function f(x)=max(0,x). However, the specific mathematical function used in the hidden layer 1004 may vary depending on the specific implementation details of the RNN 1000.
[0187] In addition to the basic CNN and RNN networks described, variations on those networks may also be possible. An example RNN deformation is the long short-term memory (LSTM) RNN. LSTM RNN is able to learn long-term dependencies that may be necessary for processing longer sequences of language. A deformation on CNN is a convolutional deep belief network, which has a similar structure to CNN and is trained in a similar manner to a deep belief network. A deep belief network (DBN) is a generative neural network composed of multiple layers of random variables. Greedy unsupervised learning can be used to train DBN layer by layer. The learned weights of the DBN can then be used to provide a pre-trained neural network by determining the best initial set of weights for the neural network.
[0188] Fig.11 The training and deployment of a deep neural network is shown. Once a given network is constructed for a task, the neural network is trained using a training data set 1102. Various training frameworks 1104 have been developed to enable hardware acceleration of the training process. For example, Figure 6The machine learning framework 604 may be configured as a training framework 604. The training framework 604 may be hooked into the untrained neural network 1106 and use the parallel processing resources described herein to train the untrained neural network to generate a trained neural network 1108.
[0189] To start the training process, initial weights can be chosen randomly or by pre-training using a deep belief network. A training cycle is then performed in a supervised or unsupervised manner.
[0190] Supervised learning is a learning method in which training is performed as an intermediate operation, such as when the training data set 1102 includes inputs paired with the expected outputs of the inputs, or where the training data set includes inputs with known outputs and the outputs of the neural network are manually graded. The network processes the inputs and compares the resulting outputs with a set of expected or desired outputs. Errors are then propagated back through the system. The training framework 1104 is adjustable to adjust the weights that control the untrained neural network 1106. The training framework 1104 can provide tools to monitor how well the untrained neural network 1106 focuses on the following model, which is suitable for generating the correct answer based on the known input data. The training process occurs repeatedly when the weights of the network are adjusted to improve the output generated by the neural network. The training process can continue until the neural network reaches the statistically expected accuracy associated with the trained neural network 1108. The trained neural network 1108 can then be deployed to implement any number of machine learning algorithms.
[0191] Unsupervised learning is a learning method in which a network attempts to train itself using unlabeled data. Thus, for unsupervised learning, the training data set 1102 will include input data without any associated output data. The untrained neural network 1106 can learn the groupings within the unlabeled inputs and can determine how the individual inputs relate to the overall data set. Unsupervised training can be used to generate a self-organizing map, which is a type of trained neural network 1107 that can perform operations useful in reducing the dimensionality of the data. Unsupervised training can also be used to perform anomaly detection, which allows identification of data points in the input data set that deviate from the normal pattern of the data.
[0192] Variations on supervised and unsupervised training may also be employed. Semi-supervised learning is a technique in which the training data set 1102 includes a mixture of labeled and unlabeled data from the same distribution. Incremental learning is a variation of supervised learning in which input data is used continuously to further train the model. Incremental training enables a trained neural network 1108 to adapt to new data 1112 without forgetting the instructions instilled in the network during initial training.
[0193] Whether supervised or unsupervised, the training process for a particular deep neural network may be too computationally intensive for a single computing node. Instead of using a single computing node, a distributed network of computing nodes can be used to speed up the training process.
[0194] Fig.12 700 ). 1202 , data parallelism 1204 , or a combination of model and data parallelism 1204 .
[0195] In model parallelism 1202, different computing nodes in a distributed system may perform training computations for different parts of a single network. For example, each layer of a neural network may be trained by a different processing node of the distributed system. The benefits of model parallelism include the ability to scale to particularly large models. Partitioning the computations associated with different layers of a neural network enables the training of very large neural networks, where the weights of all layers will not fit into the memory of a single computing node. In some instances, model parallelism may be particularly useful when performing unsupervised training of large neural networks. In another example of model parallelism, computations in one or more layers of a neural network model may be partitioned among multiple computing nodes spanning the dimension of a feature graph to reduce the size of the model parameters per node.
[0196] In data parallelism 1204, different nodes of the distributed network have complete instances of the model, and each node receives a different portion of the data. The results from different nodes are then combined. Although different methods for data parallelism are possible, data parallel training methods all require techniques for combining results and synchronizing model parameters between each node. Exemplary methods for combining data include parameter averaging and update-based data parallelism. Parameter averaging trains each node on a subset of the training data and sets global parameters (e.g., weights, biases) to the average of the parameters from each node. Parameter averaging uses a central parameter server that maintains parameter data. Update-based data parallelism is similar to parameter averaging, except that instead of transmitting parameters from nodes to parameter servers, updates to the model are transmitted. In addition, update-based data parallelism can be performed in a decentralized manner, where updates are compressed and transmitted between nodes.
[0197] Combined model and data parallelism 1206 can be implemented, for example, in a distributed system where each computing node includes multiple GPUs. Each node can have a complete instance of the model, with separate GPUs within each node used to train different parts of the model.
[0198] Distributed training increases overhead relative to training on a single machine. However, each of the parallel processors and GPGPUs described herein can implement various techniques to reduce the overhead of distributed training, including techniques to implement high-bandwidth GPU-to-GPU data transfer and accelerated remote data synchronization.
[0199] Example Machine Learning Applications
[0200] Machine learning can be applied to solve a variety of technical problems, including but not limited to computer vision, autonomous driving and navigation, speech recognition, and language processing. Computer vision has traditionally been one of the most active research areas for machine learning applications. Applications of computer vision range from replicating human visual capabilities (e.g., facial recognition) to creating new categories of visual capabilities. For example, a computer vision application can be configured to identify sound waves from vibrations induced in an object visible in a video. Parallel processor-accelerated machine learning enables computer vision applications to be trained using significantly larger training data sets than were previously feasible, and enables reasoning systems to be deployed using low-power parallel processors.
[0201] Parallel processor-accelerated machine learning has autonomous driving applications, including lane and road sign recognition, obstacle avoidance, navigation, and driving control. Accelerated machine learning techniques can be used to train driving models based on data sets that define appropriate responses to specific training inputs. The parallel processors described herein can enable rapid training of increasingly complex neural networks for autonomous driving solutions and enable deployment of low-power inference processors in mobile platforms suitable for integration into autonomous vehicles.
[0202] Parallel processor accelerated deep neural networks enable machine learning methods to be implemented into automatic speech recognition (ASR). ASR includes creating a function that computes the most likely speech sequence given a random sequence of inputs. Accelerated machine learning implementations using deep neural networks replace the Hidden Markov (HMM) and Gaussian Mixture Models (GMM) previously used for ASR.
[0203] Parallel processor-accelerated machine learning can also be used to accelerate natural language processing. The automated learning process can utilize statistical inference algorithms to produce models that are robust to erroneous or unfamiliar inputs. Exemplary natural language processor applications include automatic machine translation between human languages.
[0204] Parallel processing platforms for machine learning can be divided into training platforms and deployment platforms. Training platforms are typically highly parallel and include optimizations to accelerate multi-GPU single-node training and multi-node multi-GPU training. Exemplary parallel processors suitable for training include Figure 7 The highly parallel general purpose graphics processing unit 700 and Figure 8 The multi-GPU computing system 800 of FIG. In contrast, the deployed machine learning platform typically includes lower-power parallel processors suitable for use in products (e.g., cameras, autonomous robots, and autonomous vehicles).
[0205] Fig.13 An exemplary inference system-on-chip (SOC) 1300 suitable for performing inference using a trained model is shown. The SOC 1300 may integrate processing components, including a media processor 1302, a vision processor 1304, a GPGPU 1306, and a multi-core processor 1308. The SOC 1300 may further include an on-chip memory 1305 that implements a shared on-chip data pool accessible by each processing component. The processing components may be optimized for low-power operation to enable deployment to various machine learning platforms including autonomous vehicles and autonomous robots. For example, an implementation of the SOC 1300 may be used as part of a master control system for an autonomous vehicle. Where the SOC 1300 is configured for use in an autonomous vehicle, the SOC is designed and configured to be compatible with the relevant functional safety standards of the deployment jurisdiction.
[0206] During operation, the media processor 1302 and the visual processor 1304 can work together to accelerate computer vision operations. The media processor 1302 can implement low-latency decoding of multiple high-resolution (e.g., 4K, 8K) video streams. The decoded video streams can be written to a buffer in the on-chip memory 1305. The visual processor 1304 can then parse the decoded video and use the trained image recognition model to perform preparatory processing operations on the frames of the decoded video in preparation for processing the frames. For example, the visual processor 1304 can accelerate the convolution operations of a CNN for performing image recognition on high-resolution video data, while the back-end model calculations are performed by the GPGPU 1306.
[0207] The multi-core processor 1308 may include control logic to facilitate sequencing and synchronization of data transfers and shared memory operations performed by the media processor 1302 and the vision processor 1304. The multi-core processor 1308 may also be used as an application processor to execute software applications that may utilize the inference computing capabilities of the GPGPU 1306. For example, at least a portion of navigation and driving logic may be implemented in software executed on the multi-core processor 1308. Such software may issue computational workloads directly to the GPGPU 1306, or computational workloads may be issued to the multi-core processor 1308, which may offload at least a portion of those operations to the GPGPU 1306.
[0208] GPGPU 1306 may include a compute cluster, such as a low-power configuration of compute clusters 706A-706H within a highly parallel general purpose graphics processing unit 700. The compute cluster within GPGPU 1306 may support instructions that are specifically optimized to perform inference computations on trained neural networks. For example, GPGPU 1306 may support instructions for performing low-precision computations (e.g., 8-bit and 4-bit integer vector operations).
[0209] Abstraction layer for scalable distributed machine learning
[0210] Currently, data scientists who develop applications that utilize distributed deep learning need to explicitly implement communication systems between computing nodes. Implementing a basic communication system for distributed deep learning requires some knowledge of distributed or networked computing node communication technology, including libraries required to implement such technology. For example, in order to implement distributed deep learning models, such as data parallelism, model parallelism, or hybrid parallelism (mixed data and model parallelism), application developers may need to use low-level communication libraries (such as message passing interface (MPI) libraries) to explicitly construct the communication infrastructure. Next, the application developer will need to determine the specific units of data to be transmitted and the specific nodes that will transmit and receive such information. Because deep learning application developers may not be experts in specific fields in the construction of distributed computing infrastructure, many best practices and optimizations may not be included in the communication implementation developed for a given deep learning application.
[0211] Distributed machine learning can be implemented using various parallel patterns (e.g., data parallelism, model parallelism, or a mix of data and model parallelism), such as Fig.12 As shown in Fig.12 As mentioned above, data parallelism uses the same model for each computing node, and each node processes a different part of the data. Model parallelism uses the same data for each computing node, and the model is divided among the computing nodes.
[0212] To achieve communication, various types of low-level communication modes are used to transfer data between nodes. The low-level communication modes used are shown in Table 5 below.
[0213] Table 5 - Low-level communication operations
[0214]
[0215] Figure 14A-14E A communication pattern used during a distributed machine learning computing operation performed by multiple computing nodes according to an embodiment described herein is shown. Fig.14A Data transfer for machine learning computations using data parallelism is shown. Fig. 14B Data transfer for distributed machine learning computation using model parallelism is shown. Fig. 14C Shown is the partitioning of machine learning computations across multiple nodes using hybrid parallelism. Fig.14D Distributed machine learning computation using hybrid parallelism on multiple nodes and multiple layers is shown. Fig.14E A set of exemplary message sending mode operations that can be used for distributed machine learning are shown. Figure 14A-14E In each of , input data 1402 is processed by a machine learning model having a set of weights 1404 to produce a set of activations 1408 or partial activations 1406.
[0216] like Fig.14A As shown, data parallelism can be achieved, where the input data 1402 is divided along the mini-batch dimension and the same model is replicated in the node. The mini-batch is divided among several computing nodes, and each node is responsible for calculating the gradient with respect to all model parameters using a subset of the samples in the mini-batch. Forward propagation is performed independently on each node. In one embodiment, only one communication is performed during the backward pass to calculate the average of the gradients of the learnable parameters. The allreduce operation 1405 is used to update the weights of each layer for the next forward pass. In one embodiment, distributed weight updates can be enabled, where reduce_scatter is used to calculate the average of the gradients before stochastic gradient descent is performed, and the allgather operation is used to synchronize the weights on the nodes after stochastic gradient descent.
[0217] like Fig. 14B As shown in , model parallelism can be achieved where a model or a set of weights is partitioned across multiple nodes. Typically, model parallelism executes different parts of the model, performing computations on the same batch of examples simultaneously on different nodes. For model parallelism, the input data is also partitioned (e.g., along the channel dimension), as Fig. 14BAs shown. Using the method shown, a reduce operation is performed to sum the activations to get the actual output, and then the activations are scattered for use in calculating the activations for the next layer. A reduce_scatter 1407 operation can be performed to transmit data in a single communication operation. In the backward pass, an allgather operation is performed to combine the gradient bands calculated at each node.
[0218] like Fig. 14C As shown, hybrid parallelism can be performed, wherein partitioning is performed on activation and weight to minimize tilted matrices. For the layer of the neural network, input data 1402, weight data 1404 and / or activation data 1406 are divided and distributed on multiple computing nodes (e.g., node 0-node 3). Node 0 receives the first block of input data 1402A and weight data 1404A. Calculation operations are performed at node 0 to generate the first partial activation 1406A. Similarly, node 1 receives the second block of input data 1402B and weight data 1404B. Calculation operations are performed at node 1 to generate the second partial activation 1406B. Node 2 can perform calculation operations on the third input data 1402C and weight data 1404C to generate the third partial activation 1406C. Node 3 can perform calculation operations on the fourth input data 1402D and weight data 1404D to generate the fourth partial activation 1406D.
[0219] Fig.14D The transmission of partial activation data 1406A-1406B for a given layer (layer N-1) of a neural network to a subsequent layer (layer N) of the neural network is shown. A set of partial activations 1406A-1406B are generated based on the application of a mathematical operation (e.g., convolution) to input data 1402A-1402B and weight data 1404A-1404B via multiple nodes (node 0, node 1). For example, in one embodiment, a reduce_scatter operation 1410 is used, which performs a reduction operation on the partial activations 1406A-1406B of layer N-1 from multiple nodes and scatters the results to multiple nodes as activations for use in layer N of the neural network.
[0220] Fig.14EExemplary communication operations for transmitting data for distributed training of a neural network for machine learning operations are shown. A low-level messaging library is used to implement data transmission for weights and activation data during distributed training of a neural network. An exemplary neural network having N layers 1421A, 1421B, 1421N (e.g., layers 1, 2, to N) can be trained in a distributed manner by performing continuous forward computation operations on successive layers to propagate activation data forward 1426 through the neural network. During the forward propagation 1426, for example, an Alltoall 1409 communication operation is used to transmit activation data from a first layer 1421A to a successive layer 1421B, where the first and successive layers are hidden layers or non-output layers. The Alltoall 1409 operation transmits different data from a computational node that generates activation or partial activation data to all available receivers, which use the activation data as input data for operating on successive layers. When transmitting data to the final layer (e.g., layer N), a communication operation regarding Fig. 14B The reduction dispersion operation 1410 described. During the back propagation 1428, a distributed stochastic gradient descent is performed to generate updated weight data. An initial Allreduce operation 1412 is performed for layer N, and a set of Allreduce operations 1411A, 1411B, 1411N are performed to update the weights of each layer for the next forward pass. The Allreduce operation is a reduction operation, and its results are broadcast or transmitted to the receiving buffers of all processes in the computing group. Back propagation 1428 may also include Allgather 1413 and Alltoall 1414 communication operations. For the Allgather operation 1413, data is gathered from all tasks, and the combined data is distributed to all tasks. For the Alltoall operation 1414, data from all processes is transmitted to all processes.
[0221] Any low-level messaging library (e.g., MPI, gRPC, or zeroMQ) can be used to implement the data transfer required to perform distributed computing operations for machine learning. However, it may be difficult to implement the exemplary communication operations without domain-level expertise in multiprocessor communication libraries. In addition, it may be difficult to scale these operations to a very large number of nodes. Without domain-specific knowledge of distributed computing techniques, implementing a scalable communication system for machine learning that can handle communications between hundreds or thousands of nodes can significantly extend the development time for machine learning applications.
[0222] Embodiments described herein provide various techniques to abstract the details of distributed communication systems for deep learning applications. In one embodiment, a machine learning scaling library (MLSL) is provided that enables deep learning application developers to develop distributed deep learning applications without requiring knowledge of the specific communication details required to implement multi-node deep learning. Application developers for deep learning applications can use deep learning domain-specific terminology to specify the type of distributed computing system used by the application, and the library techniques provided by the embodiments described herein can implement the specific basic communication methods required to implement the requested distributed computing system.
[0223] Figure 15A-Figure 15C Architectural details of the machine learning scaling library provided by the embodiments described herein are shown. Fig.15A An exemplary machine learning architecture stack 1500 is shown. Fig. 15B Details of the MLSL architecture 1511 are shown. Fig. 15C Exemplary communication endpoints implemented by an embodiment are shown.
[0224] Fig.15A An exemplary machine learning architecture stack 1500 is shown, which may be Figure 6 The machine learning architecture stack 1500 includes multiple software and hardware layers ranging from input data 1502 provided by an array of sensors to hardware 1514 elements that perform various computational, storage, or communication operations. Each layer of the exemplary machine learning architecture stack 1500 can be an opaque abstraction layer that hides implementation details from higher layers, while using functionality provided by lower layers to implement functions required by higher layers.
[0225] Input data 1502 is provided to a layer 1504 of the application. In one embodiment, the input data 1502 is a multimodal input, including but not limited to video and / or image data, data from multiple sensors, and external signal data. Application 1504 includes a multimodal fusion and decision application that can process input to implement machine learning tasks, such as image understanding, video summarization, speech and natural language processing, path planning, navigation, or any other machine learning implementation described herein. Application 1504 communicates with one or more machine learning frameworks 1506 (for example, but not limited to Caffe, Theano, Torch, TensorFlow, or any other script based on a machine learning framework) to implement machine learning specific operations. The machine learning framework 1506 can use one of any number of neural network topologies 1508 (including but not limited to CNN, RNN, LSTM, general deep neural network, and reinforcement learning network) to implement the machine learning operation to be performed. The machine learning framework 1506 implements the neural network topology 1508 via one or more building blocks. Exemplary building blocks 1510 include single precision floating point general matrix multiplication (SGEMM) blocks, convolution building blocks, fast Fourier transform / Winograd blocks, single source shortest path (SSSP) computation blocks, sparse matrix-matrix multiplication (SpGEMM) blocks, and machine learning scaling libraries (MLSL) 1511 provided by embodiments described herein. Each of the building blocks 1510 can implement a variety of algorithms 1512 to enable computational operations requested by the framework 1506 to implement a neural network topology 1508. The algorithms 1512 include optimizations to enhance statistical and architectural efficiency, enable cloud deployment, and enable scaling to a large number of nodes. In one embodiment, the MLSL 1511 includes algorithms 1512 to enable scaling of machine learning operations to a large number of nodes. In one embodiment, the building blocks 1510 can be implemented via a software library that can be accelerated by one or more elements of the hardware 1514. In one embodiment, at least a portion of the building blocks 1510 can be implemented within the hardware 1514. For example, an FPGA or ASIC based accelerator may include custom logic to implement portions of MLSL 1511 or one or more GEMM libraries.
[0226] Various components of hardware 1514 can be used to implement the functions of the higher layers of the machine learning architecture stack 1500. The components of hardware 1514 include, but are not limited to, a CPU or another dedicated processor assigned with the task of performing calculations and / or operating system related calculations. Hardware 1514 also includes many parallel processing systems based on integrated cores (MIC) or general-purpose GPUs. In some embodiments, hardware 1514 includes a deep learning accelerator based on FPGA or ASIC. The structural interconnect components of hardware 1514 are used to implement high-speed communication between various components and high-bandwidth volatile or non-volatile memory. Volatile memory technology may include any of the graphics memory technologies described herein, including HBM and GDDR memory. Non-volatile memory technology may include flash memory, including 3D NAND flash memory or other memory technologies, such as 3D Xpoint memory.
[0227] Fig. 15B Details of the MLSL architecture 1511 according to an embodiment are shown. The MLSL architecture 1511 includes an abstraction layer with machine learning specific abstractions 1513 and non-machine learning specific abstractions 1515. The abstractions interface with a communication module 1517 that drives a basic messaging library 1519. The messaging library 1519 uses optimized low-level communication routines to send data through a high-performance communication structure 1521.
[0228] The MLSL architecture 1511 enables developers of machine learning software to develop scalable machine learning applications using machine learning specific abstractions 1513. In one embodiment, the machine learning specific abstractions 1513 enable application developers to use machine learning domain specific knowledge to drive scalable performance of computational operations of neural network layers. The machine learning abstractions 1513 enable applications to be developed in a manner that is transparent to the underlying architecture, enabling machine learning applications to automatically adapt to any number of hardware 1514 elements, including multiple types of computational and structural elements. In addition to the machine learning specific abstractions 1513, a set of non-machine learning specific abstractions 1515 may also be provided by the MLSL architecture 1511. The non-machine learning specific abstractions 1515 enable developers of machine learning applications to define one or more non-machine learning details of the application at a higher level of abstraction, such as one or more implementation specific details or operating system details that are not related to machine learning.
[0229] In one embodiment, machine learning specific abstractions 1513 implement appropriate support for neural network layers for multiple types of parallelism (e.g., data, machine, hybrid). Machine learning specific abstractions 1513 also enable layer-to-layer communication abstractions allowing developers to easily implement communication patterns for different layer types and parallelism. Different layer types and parallelism are defined using machine learning specific techniques with machine learning specific abstractions 1513, and communication for those layer types is implemented via communication module 1517, messaging library 1519, and high performance communication structure 1521. Machine learning specific abstractions 1513 also implement intelligent message scheduling on the defined neural network layers while abstracting the data layout and transformations required to implement machine learning techniques at the application level.
[0230] In one embodiment, the communication module 1517 includes logic for driving the basic message sending library 1519. The communication module 1517 includes various optimizations to enable the network to be driven efficiently while sending machine learning data between various computing nodes for performing distributed machine learning. The communication module 1517 includes logic for optimizing network bandwidth and for implementing low-latency communication. The machine learning specific abstraction 1513 and / or the non-machine learning specific abstraction 1515 may specify or demonstrate an interface for enabling application developers to specify processor resources assigned with the task of managing distributed communication. In one embodiment, a specific processor may be specified. In one embodiment, the number of processors associated with communication is specified. In one embodiment, a mix between computing and communication resources may be specified. In one embodiment, the communication module 1517 includes logic for adaptively assigning processor cores for use in driving and executing operations for the communication module 1517 and / or the message sending library 1519. In one embodiment, the communication module 1517 may adaptively assign processing resources for communication without explicit instructions from the machine learning specific abstraction 1513 or the non-machine learning specific abstraction 1515. In one embodiment, communication module 1517 can adaptively adjust or allocate processing resources in an attempt to fully penetrate available network resources in an attempt to minimize the delay effect of communication in a distributed system. For example, if the total throughput of a distributed computing system will increase, if communication module 1517 determines that high-performance communication structure 1521 is not completely full of data, additional processors or processor cores may be assigned to perform network tasks. In one embodiment, the number of computing resources assigned to drive message sending library 1519 can be changed based on the bandwidth of high-performance communication structure. For higher bandwidth structures, larger computing resources may be required to saturate the network. High-performance communication structure 1521 can be realized via any number of high-speed network connection technologies (including but not limited to Ethernet, InfiniBand, OmniPath interconnection) or via a point-to-point interconnected network (e.g., NvLink).
[0231] In one embodiment, the communication module 1517 includes logic for ensuring forward progress of distributed computing operations by implementing asynchronous communications between processing nodes. The asynchronous communications implemented by the communication module 1517 allow overlapping computing and communication operations, which are effectively interleaved to optimize technical and communication efficiency and throughput. In one embodiment, the communication module 1517 also supports prioritized communication channels to achieve priority resolution of competing communication requests.
[0232] The message sending library 1519 uses optimized low-level communication routines to send data through a high-performance communication structure 1521. The MLSL architecture 1511 is agnostic relative to the basic message sending library 1519 and the high-performance communication structure 1521. In one embodiment, the message sending library is an MPI-based library. In such an embodiment, MPI functions (such as MPI_Alltoall, MPI_Allreduce, MPI_Allgather, etc.) are used to implement the communication mode used by the machine learning application. In some embodiments, gRPC or zeroMQ libraries and associated functions are used for message sending. In one embodiment, NCCL aggregate communication routines can also be used. NCCL provides communication routines such as all-gather, reduction, and broadcasting to accelerate multi-GPU machine learning training on multiple GPGPUs.
[0233] Fig. 15C An exemplary communication endpoint implemented by the embodiments described herein is shown. The concepts provided by these embodiments are shown with respect to the MPI library, but the technology is not limited to MPI implementation. In a conventional communicator 1525, a process is associated with a rank or another communication ID. The process can support communication for multiple threads, and each thread is associated with the rank or identifier of the process. The embodiments described herein utilize network endpoints to implement communication between various computing nodes in a distributed computing system. Each endpoint communicator 1530 allows flexible arrangement between various threads in progress, communication rank or ID and using endpoints for communication. The endpoint communicator 1530 can be dynamically configured so that a process can be associated with multiple ranks, and each rank can be associated with a separate process. In such a configuration, each thread can send data via a multiprocessor message sending system without considering thread contention among ranks. Optionally, a thread can be associated with multiple ranks, enabling a single thread to have multiple communication channels.
[0234] In one embodiment, one or more instances of endpoint communicator 1530 are explicitly specified via machine learning specific abstractions 1513. In one embodiment, the number of instances of endpoint communicator 1530 is directly related to the number of cores assigned to perform network communications. In one embodiment, machine learning specific abstractions 1513 enable programmers to specify the type of network and the degree of parallelism required using machine learning specific techniques, and MLSL framework 1511 can dynamically construct the communication infrastructure, including the number of cores assigned to networking operations and the associated number of communication endpoints 1530.
[0235] In various embodiments, Fig. 15C The communication system may be constructed explicitly using developer defined variables or dynamically based on a machine learning infrastructure defined by an application developer. In one embodiment, a machine learning application may define multiple application processes 1536 that perform computational operations for the machine learning application. MLSL 1534 may expose an interface to the application process 1536 that implements a communication system that is scalable to a very large number of computing nodes. In such a configuration, multiple communication levels or identifiers are supported for each of the application processes 1536 (e.g., process 0, process 1, process 2), and in one embodiment, each of the application processes 1536 may be an MPI process. A set of endpoint processes 1532 may be initialized by MLSL 1534, with a separate endpoint process defined to support each level or identifier of a process within the application process 1536. In one embodiment, machine learning domain-specific awareness may be combined with a global view of the communication operation to determine how many endpoints to use. The number of endpoint processes 1532 may be dynamically scaled by MLSL 1534 based on communication needs.
[0236] Figure 16A-16B Distributed machine learning training enabled by the embodiments described herein is shown. Fig.16A A training process for a neural network is shown that is performed using multiple nodes. The MLSL API can be used to define a distributed training system including multiple nodes. In one embodiment, the multiple nodes may include a first node 1610 (node 0) and a second node 1620 (node 1). Each node 1610, 1620 is configured to perform forward calculation operations 1612, 1622 and backward calculation operations 1614, 1624. For backward calculations 1614, 1624, weight increments 1616, 1625 are calculated and stochastic gradient descent 1618, 1628 is performed to generate weight value updates. The communication operations implemented by the MLSL API are shown as blocks of letters / numbers that perform the operations shown in Table 6.
[0237] Table 6 - MLSL communication operations
[0238] Communications Action Communication Phase 1. Activation a. Start communication 2. Activation Gradient b. Wait for the communication to complete 3. Weight Gradient 4. Updated weights
[0239] like Fig.16A As shown, the MLSL API uses distributed forward computations 1612, 1622 processed by a first communication block and a second communication block to implement forward propagation, the first communication block waiting for the completion of the transfer for the incoming data before starting the forward computation operation, and the second communication block starting the transfer for the computation data. For example, a developer can use a first MLSL API command (node 0[1b]) to configure a forward computation operation 1612 for the first layer at a first node 1610 to wait for the completion of the communication to receive activation data, and the activation data will be used as input data for the forward computation 1612. When the transfer of the activation data is completed, the forward computation 1612 automatically starts. When the forward computation 1612 is completed, the second MLSL API command (node 0[1a]) can be used to start the transfer of activation data. The transferred activation data output from the first node 1610 is the activation data generated by the first layer and is used as input data for the second layer having the forward computation 1622 performed at the second node 1620. The forward computation 1622 at the second node 1620 waits for the transfer of activation data to complete before starting the computation operation (node 1[1b]), and upon completion begins transferring the activation data generated by the forward computation 1622 (node 1[1b]).
[0240] In one embodiment, the MLSL API implements backward propagation using distributed backward computation 1624, 1612 handled by a third communication block implementing the MLSL API (node 1 [2b]) and a fourth communication block implementing the MLSL API (node 1 [2a]), the third communication block implementing the MLSL API waiting for the transfer of incoming activation gradients to complete before starting backward computation 1624, while the fourth communication block implementing the MLSL API starts the transfer of the calculated activation gradients. In a similar manner, the MLSL API implements the sending and receiving of weight gradients for weight increment computation 1626, 1616 and updated weights determined via distributed stochastic gradient updates 1628, 1618.
[0241] like Fig. 16B As shown, each node 1610, 1620 can also be used to perform computational operations on multiple layers of the neural network. In one embodiment, Fig.16A The forward computation operations 1612, 1622 are shown to be performed as multiple computation operations 1612A-1612B, 1622A-1622B on multiple layers (layer N, layer N+1). Fig.16AThe backward calculation operations 1624, 1614 shown can be performed as multiple calculation operations 1624A-1624B, 1614A-1614B. For each node 1610, 1620, the MLSL API can enable activations 1602, 1604 to be transmitted between multiple neural network layers on each node, and updated weights 1606, 1608 are distributed after the backward calculation operations 1624A-1624B, 1614A-1614B.
[0242] In one embodiment, the MLSL AP implements the use of different types of parallelism for different layers of the same neural network. The choice of parallelism can be made automatically by MLSL based on layer characteristics (such as the number of learnable parameters and the number of activations). Based on the parallelism determined for the layer, the type of communication required can also be determined. For example, when the previous layer uses data parallelism and the next layer uses model parallelism, a many-to-many communication mode is called to redistribute the data. Often, changes in communication modes and situations are important. By abstracting the communication details, the MLSL API can significantly simplify the life of machine learning framework developers. Various machine learning structures can be implemented via the MLSL API.
[0243] Hardware-implemented point-to-point primitives for machine learning
[0244] Load and store operations are sufficient to implement higher-order distributed shared memory operations in software. However, load and store primitives alone may not be sufficient to implement appropriate hardware solutions for point-to-point communications. The embodiments described herein may extend simple point-to-point primitives known in the art to implement richer semantics, such as but not limited to support for remote atomics, remote procedure calls (RPCs), load and gather lists, stores and scatter lists, and stores and notifications (including synchronization with communications) to allow more efficient communication and synchronization between nodes and between GPGPUs, MICs, or parallel processor cards within a node, particularly when point-to-point communication protocols (e.g., versions of NVLink interconnects / protocols) are in use.
[0245] Fig. 16C Node-to-node communication using point-to-point primitives is shown in accordance with an embodiment. In one embodiment, computing cluster 1630 may perform a distributed neural network training process on multiple nodes. For a number P of nodes, each node 1631A-1631P (e.g., node 1 to node P) may perform forward propagation and backward propagation as described herein. In one embodiment, each node processes a respective group of layers 1632A-1632P, one group per node, and each group has layers L. 0–Ln. During forward propagation (FP) and backward propagation (BP) operations for the neural network, data associated with layers 1632A-1632P may be exchanged between nodes. The exact model of data exchange may change based on the parallel model in use (e.g., data, model, hybrid, etc.). For example and in one embodiment, each node 1631A-1631P may have a copy of the neural network model, and different data data may be provided to each node. Weight increments 1634 may be generated by each node 1631A-1631P. In one embodiment, an allreduce operation may be performed, in which a summing unit 1636 receives a set of weight increments in a receiving buffer and generates a sum of weight increment data 1637. The summing unit 1636 may be any one of the nodes 1631A-1631P or a separate control node. The stochastic gradient descent logic unit (SGD 1638) may generate a set of new weights 1640, which are then sent to each node.
[0246] In one embodiment, to facilitate the exchange of information between nodes 1631A-1631P, each node may include a hardware-implemented point-to-point primitive unit (PPP 1634A-1634P) to enable the nodes to exchange data in a synchronous manner. The point-to-point technology described herein is used in Fig. 15B 1641A-1641P) and receive buffers (RX 1642A-1642P). In order to exchange data between node 1 1631A and node P 1631P, the point-to-point primitive unit 1634P of node P can send a request to node 1 to send a specific block of data to node P. Once the correlation for the block of data is met, for example, when the computing operation associated with the data is completed, node 1 1631A then sends the block of data to node P 1631P (e.g., via transmit buffer 1641A). Node P 1631P can continue to perform other operations until notified by node 1 1631A. Once the computational operation for the requested data is completed, node 11631A may perform a remote write to receive buffer 1642P on node P to write the requested data. In one embodiment, node 11631A may notify node P 1631P that the write is complete. In one embodiment, node P 1631P may monitor the address of receive buffer 1642P provided to node 1 1631A for memory updates, and once node P 1631P notifies receive buffer 1642P that a memory write has occurred, the written memory is copied out.
[0247] Various basic methods can be used to implement point-to-point communication. In one embodiment, remote procedure calls can be used to enable nodes to remotely perform logic operations on different nodes. The remote logic can monitor the address space associated with the data required by the receiving node and initiate a transfer from the transmitting node once the computation operation is completed. In addition to having store and notify and remote procedure call support, various additional primitives can also be implemented, as described above, where such primitives include but are not limited to remote atomics, load and gather lists, store and scatter lists, and other types of synchronous communication.
[0248] For example, in one embodiment, a remote atomic store from node 1 1631A to node P 1631P may be performed so that data in the memory of node 1 is stored in the memory of node P as a single, indivisible operation. Atomic storage may be performed using hardware primitives supported by the interface logic of node 1 and node P. Node 1 may send a message to node P to implement atomic storage, which may be received by the interface logic of node P. The interface logic in node P may then lock a memory address in the memory of node P, perform a store operation, and release the lock on the memory address, enabling the memory of node P to be automatically updated with data supplied from node 1. In one embodiment, such an operation may be performed entirely within the structural interface logic of the node. In various embodiments, primitive operations perform load and gather lists, store and gather lists, or other types of synchronous communication operations within the interface logic of the node.
[0249] In computing nodes arranged in meshes, tori, and hypercubes, routers at each node allow messages to be directed along the most efficient path to the destination of messages between nodes that are not directly connected. Embodiments described herein provide fabric interconnect logic that can be configured to route memory writes or messages between indirectly connected nodes. Rather than using node identifiers, in one embodiment, the fabric interconnect logic can route data based on a target memory address associated with a message, write, or packet to be relayed. Such techniques can implement an efficient distributed memory system in hardware, particularly for point-to-point fabric interconnects.
[0250] Fig.17A A multi-node computing system 1700 according to an embodiment is shown. Each node of the multi-node computing system 700 is similar to Figure 8The multi-GPU computing system 800 of FIG. 806A-806D is interconnected via a set of P2P GPU links 816. Each of GPGPUs 1706A-1706D is interconnected via P2P GPU links 1716. Each of GPGPUs 1706A-1706D can communicate with processor 1702 via host interface switch 1704. GPGPUs 806A-806D and GPGPUs 1706A-1706D are not directly interconnected. However, GPGPU 806B can communicate with GPGPU 1706A via P2P GPU bridge link 1708. In some existing implementations, in order to transfer data between indirectly connected GPGPUs (e.g., between GPGPU 806A to GPGPU 1706D), multiple manual transfers may be required. The embodiments described herein implement automatic routing of communications between GPGPUs connected via point-to-point links. In one embodiment, automatic routing is performed by mapping nodes to a distributed virtual memory system.
[0251] Fig. 17BA peer-to-peer network with distributed virtual addresses according to an embodiment is shown. In one embodiment, a group of nodes 1721 (nodes 1-3) may participate in the distributed training of a multi-layer neural network 1722 (layers 0-3). Negotiation may be performed so that a memory address within each node is associated with a virtual address within a distributed virtual address space 1730. In one embodiment, a specific physical address range in each node is mapped to a virtual address associated with the node so that the same physical address in each node is mapped to a distributed virtual address space 1730. Distributed virtual address mappings are exchanged between nodes so that each node knows the address range for each other node. For example, node 1 may be assigned a memory address within a first memory address range 1723 ([0x1000 to 0x1500]). Node 2 may be assigned a memory address within a second memory address range 1725 ([0x2000 to 0x2500]). Node 3 may be assigned a memory address within a third memory address range 1727 ([0x2000 to 0x3500]). Node 1 may request data from node 3 by issuing a request for data to node 3 and providing an address within the first address range 1723 to node 3. Node 1 knows that node 3 has an address range of [0x3000 to 0x3500] and has a receive buffer in memory at an address defined by the following formula: node-based address + receive buffer offset. Node 1 may request a synchronous write to the receive buffer at node 3, where a write is a message requesting a read of data at a given read address within the address space of node 3 (e.g., third address range 1727). The fabric interface on node 1 may determine a message to node 3 based on the write address. The fabric interface may then determine that, in order to communicate with node 3, the message may be routed via node 2. Node 1 may then request a relay via node 2. The fabric interface on node 2 may determine that the message is to node 3 based on the destination address and relay the message to the receive buffer in node 3. Such a technique may significantly improve the efficiency of communication operations (e.g., allreduce or allgather operations) involving communication exchanges between all nodes.
[0252] Fine-grained computing communication
[0253] The embodiments described herein provide a unified API for expressing computation and communication operations together with corresponding implementations that enable computation and communication operations to be overlapped in a fine-grained manner. Fine-grained overlapping computation provides benefits to machine learning computation frameworks and helps achieve higher computation and communication efficiency in multi-card and / or multi-node environments. For example and in one embodiment, during deep learning training backpropagation, data parallelism is used in weight update operations. As described above, for example, in Fig.16ABackward propagation includes weight increment calculation, inter-node / inter-card weight increment communication and the updated weight calculation using stochastic gradient descent. Using different computing and communication APIs and the implementation of implementation may not be able to realize the parallelism of the maximum number of utilizations in computing nodes or parallel processor cards and on computing nodes or parallel processor cards, because those operations are performed sequentially in fixed order and at the coarse-grained level. Embodiments described herein realize improved computing and communication parallelism by realizing the scheduling and execution of computing and communication operations at fine-grained details. Execution by realizing fine-grained computing and communication can realize more effective computing and communication overlap, realize the parallelism of the increase of computing and communication resources and improved utilization.
[0254] Fig.18 An optional MLSL architecture 1811 according to an embodiment is shown. The optional MLSL architecture 1811 is similar to Fig. 15B The MLSL architecture 1511 is similar to that of the MLSL architecture 1511, except that the machine learning specific abstractions and communication modules 1816 are merged into a single module. The merging of abstracted machine learning compute functionality and communication functionality enables fine-grained overlap of compute and communication. Consumer threads and / or cores locked on pending operations can be put to sleep and woken up once the lock operation is completed. Compute operations can be performed at the granularity of individual data dependencies, so that once the dependencies for a unit of compute are met, the unit of compute can be executed and immediately sent to other nodes. A merged API can be provided that combines compute and communication operations, so that compute operations can be associated with communication or synchronization operations or primitives, and once a unit of compute is completed, the computed data can be sent.
[0255] Fig.19A A tensor computation operation suitable for fine-grained computation and communication overlap is shown. The combined computation and communication API described herein enables larger computation operations to be broken down into smaller chunks, and rather than waiting for the entire communication operation to complete before the result is passed to other nodes, the results can be passed at a finer granularity once the individual parts of the computation operation are completed. For example, Fig.19AA fine-grained locked xGEMM operation is shown, which is formatted as multiple small-block-GEMM operations using parallelism in M, N, and K dimensions. The inter-mode GEMM kernel optimized for peak architecture performance can be applied in parallel to sub-units of computational operations. For example and in one embodiment, a first data block 1902 and a second data block 1904 can be used to perform a portion of a computational operation to generate a portion of an NxM matrix 1906. Operations can be performed on the first data block 1902 and the second data block 1904, and the results can be distributed before the entire matrix operation is completed. In such an embodiment, an output [m, n] 1916 can be generated based on a set (e.g., sum) of multiple fine-grained computational operations between weights 1912 and inputs 1914. Such a technique allows computational and communication operations to overlap not only between layers but also within layers during training of a neural network distribution. When a sub-computational operation is completed, those operations can be sent to the relevant nodes, for example, using the point-to-point primitives described herein, to achieve a larger overlap between computational and communication operations and increase overall system efficiency. This technique differs from existing computation and communication solutions, which perform the entire set of computation operations for a layer before sending the results to other nodes.
[0256] Fine-grained execution of computation and communication requires flexible synchronization mechanisms that enable the scheduler to coordinate the efficient use of computation and communication resources. In one embodiment, fine-grained execution and communication are achieved via extended memory semantics at the granularity of arbitrary tensors. Rather than relying on polling, consumer threads and / or cores that are locked on pending operations can be put to sleep and awakened once the blocking operation is completed. Traditional full / empty bits defined at the memory / cache line granularity are too fine and not optimal for this purpose. Other solutions (e.g., monitor / wait) can track consecutive addresses, and any memory write within the range of addresses wakes up the consumer. As an improvement to existing solutions, one embodiment provides a method and apparatus for associating tensor operations with synchronization semantics that allows consumer threads to be awakened only when all operations defined on the tensor are completed.
[0257] Fig.19BSynchronous memory access within a multi-node system 1920 according to an embodiment is shown. As shown, producer nodes 1930 and consumer nodes 1940 each access shared memory 1950, which can be a distributed and shared virtual address space mapped on multiple nodes. Producer node 1930 produces data to be consumed by consumer node 1940. When consumer node 1940 has a dependency on tensor data 1955 calculated by producer node 1930, consumer node 1940 can be locked and dormant until all required tensor data 1955 are written to memory 1950. Using existing semantics, consumer node 1940 can be interrupted when any write to an address is performed. However, when consumer node 1940 has a dependency on data to be written, the use of such semantics may not be appropriate. If consumer node 1940 depends on all tensor data 1955, unlike any given unit of tensor data, waking up at any memory access within tensor data 1955 will result in many false wakeups. Furthermore, in one embodiment, tensors are stored as multi-dimensional arrays in memory without contiguous addresses. Existing semantics may not be able to monitor data that does not exist within a set of contiguous memory addresses. Therefore, existing semantics (e.g., monitor and wait semantics) cannot be easily used to monitor tensors.
[0258] Embodiments described herein are presented that enable a consumer node 1940 to monitor a set of non-contiguous addresses associated with a tensor stored in memory as a multi-dimensional array. In such an embodiment, the consumer node 1940 may indicate that the tensor data 1955 is to be monitored, and all memory addresses associated with the tensor data 1955 may be monitored for updates. In one embodiment, the consumer node 1940 may request that monitoring be applied to specific types of updates, such as remote writes from the producer node 1930 to the tensor data 1955 memory address. In addition, semantics are provided that allow the consumer node 1940 to request to be notified when all monitored addresses are written. In addition, this mechanism can be used to adjust the granularity and maintenance of hardware cache coherence at synchronization boundaries, such as Fig.19C shown.
[0259] Fig.19C Shows Fig.19BThe memory communication semantics of can be extended to achieve coarse-grained cache consistency for cache memory data. Because tensor data may span multiple cache lines on producer nodes and consumer nodes, the techniques described herein enable cache consistency to be performed at a coarse granularity more suitable for tensor data, rather than cache line consistency used in conventional systems. For example, in one embodiment, producer node 1930 includes cache memory 1935, which can cache tensor data 1955 generated by computing cluster 1932A-1932B within producer node 1930 before the tensor data 1955 is stored in shared memory 1950. In addition, low-latency access to tensor data 1955 for computing cluster 1942A-1942B of consumer node 1940 can be achieved by cache memory 1945 in consumer node 1940. Rather than maintaining cache coherence at a cache line granularity, coherence updates between the cache memory 1935 of the producer node 1930 and the cache memory 1945 of the consumer node 1940 may be performed at the monitored granularity of the tensor data 1955. These batched coherence updates may result in more efficient use of memory bus bandwidth in the use case of coarse memory updates within a multi-node, cache coherent system (e.g., a multi-GPU system coupled via a cache coherent interconnect).
[0260] Figure 20A-20B A flowchart describing operations for implementing distributed machine learning via the MLSL API is shown. Fig. 20A The general operation is shown in Fig. 20B The MLSL setup is shown in FIG.
[0261] like Fig. 20A As shown, general MLSL operations include operations for creating a global view of communication operations performed between multiple computing nodes of a distributed computing system, as shown at block 2002. The global view is constructed using a machine learning specific language within the domain knowledge of an application developer for a machine learning application. In one embodiment, the global view is internal to the MLSL machine learning abstraction layer and is specified using API commands provided by the MLSL machine learning abstraction layer. The internal global view enables MLSL to perform an operation known as self-measurement. Self-measurement implements the use of a global view to obtain communications performed for a machine learning implementation.
[0262] In one embodiment, self-measurement is used to determine the communication cost of communication operations and track the overlap of computation and communication operations in a curve, as shown in block 2004. In one embodiment, communication loss is quantified in terms of computational delay introduced by data communication between computing nodes. In addition, self-measurement records the computational cost on two consecutive communication operations. This information can then be used to effectively schedule communication operations. For example, if there is a large computational cost, multiple communication operations can be scheduled during this time. For smaller computational costs, scheduling can be selected to send shorter communication operations or to divide large communication operations into smaller pieces that can be hidden behind useful computational operations.
[0263] Tracking this overlap can be used to determine the extent to which communication time overlaps with useful computation. In one embodiment, computation and communication times can be obtained by running an actual machine learning topology for some stages or using a database pre-populated with delays for different message sizes and layer types for that platform. In one embodiment, the overlap is quantified in terms of the number of cycles that overlap computation and communication time or the amount of time that overlaps computation and communication operations. In some embodiments, a combination of such operations may be performed. In one embodiment, the self-measurement capability may be exposed to application developers to enable identification of performance bottlenecks and / or for performing debugging operations.
[0264] In one embodiment, an application developer may explicitly specify the type of parallelism to use for each layer of a neural network. In one embodiment, a global view and self-measurement may be used to automatically determine the type of parallelism to use for a given layer and a given platform, as shown at block 2006. The best type of parallelism to use may be determined by trying different combinations at runtime or using heuristics. For example, a heuristic may indicate that data parallelism is used when the size of the activation is greater than the size of the weight, or that model parallelism is used when the size of the weight is greater than the size of the activation. The size of the weight or activation is determined based in part on a comparison of the x and y dimensions of the activation and weight data. In one embodiment, multiple types of parallelism may be evaluated for each layer of a neural network at runtime during distributed training. The parallelism used for the neural network layer may then be determined based on the communication efficiency indicated by the runtime evaluation.
[0265] In one embodiment, the general MLSL logic additionally performs operations to automatically determine the scheduling and prioritization of messages using a global view, as shown at block 2008. For example, the self-measurement capability enables the MLSL logic to perform operations to try various combinations and select the best combination of scheduling and prioritization. Scheduling mechanisms include the use of priority channels, delaying low priority messages, and / or dividing large messages. Such techniques may be implemented at least in part via software logic included in the MLSL library object. The MLSL logic may be implemented at least in part in hardware (e.g., within a network interface controller or host structure interface). Although some embodiments implement automatic determination of scheduling and priority for communications, in one embodiment, an application developer may explicitly schedule and prioritize message sending by arranging communication start and wait operations for optimal performance, as optimal scheduling and prioritization may differ across platforms and neural network topologies.
[0266] In one embodiment, the general MLSL logic further performs operations for automatically determining the optimal number of network endpoints and the number of cores based on machine learning specific information specified using the MLSL API, as shown at block 2010. In one embodiment, the MLSL API can use a machine learning topology (including a neural network topology and the number of layers of an associated machine learning network) to implement the specification of a distributed machine learning system. In one embodiment, the number of endpoints and network communication cores can be inferred using the MLSL global view and platform data. For example, when more cores are used to drive the network, communication performance can be improved. However, the allocation of network cores is performed taking into account the tradeoff between the number of cores used for computing and the number of cores used for communication. Therefore, in one embodiment, the MLSL self-measurement allows computing and communication time to be balanced to optimize overall system performance. For example, the number of cores used for communication can be changed dynamically, and the optimal number of cores can be selected based on the impact on the total computing time. Optionally, the automatic determination can be bypassed, and the application developer can explicitly specify the number of cores and the associated number of network endpoints for communication.
[0267] like Fig. 20B As shown, the operations for MLSL setup include a first operation for initializing the MLSL library to enable use of the MLSL API, as shown at block 2012. The MLSL logic may then be used to create a session object and set the global mini-batch size, as shown at block 2014. The global mini-batch size may be determined based on the sum of the local batch sizes. The MLSL logic may then be used to create a distribution object that indicates the number of partitions for data parallelism and the number of partitions for model parallelism, as shown at block 2106.
[0268] The MLSL logic may then be used to create an operation object for each layer of the neural network, as shown at block 208. In one embodiment, creating an operation object for each layer includes creating an auxiliary OperationRegInfo object that holds information about learnable parameters and activation shapes. Parameters define specific relationships between input and output activations and parameters of an operation. The MLSL API enables developers to add input / output activation shapes and parameter shapes to the OperationRegInfo object. Using the MLSL API, developers may then create operation objects, delete OperationRegInfo objects, and set dependencies between operations. Using information about batch size and shape, developers may then use the MLSL API to allocate buffers for gradients about parameters, input activations, and gradients about input activations. When linked operations share common activations, linked operations may be allocated on one side of a transaction and reused on the other side of the transaction. They should only be allocated on one side and reused on the other side. In one embodiment, the MLSL library provides a dedicated allocator that implements dedicated optimizations. In one embodiment, the session object created at block 2014 includes a submit method that can be used to complete the creation of the operation object.
[0269] The MLSL logic can then be used to execute the machine learning framework workflow, the computational portion of the workflow being wrapped with MLSL API calls, as shown at block 2020. In one embodiment, the MLSL API calls implement automatic exchange of activations, gradients about activations, and gradients about parameters. The MLSL logic can then be used to update the parameters based on the machine learning framework workflow executed at block 2022.
[0270] Figure 21A-21B A method of performing distributed training of a neural network according to an embodiment is shown. Distributed training of a neural network may be performed using a graph processing logic as described herein, wherein the graph processing logic is included within a plurality of interconnected worker nodes. In various embodiments, the plurality of interconnected worker nodes may be within a single computing device or housing, or may be distributed across a plurality of computing devices or housings. For example, the plurality of interconnected worker nodes may be configured in a manner similar to the multi-node computing system 1700 shown in FIG. 17 .
[0271] In one embodiment, as in Fig.21AAs shown at block 2102, the method includes storing a library in a memory, wherein the library is configured to facilitate the transmission of data during distributed training of a neural network, as shown at block 2102. The data may be associated with a trainable parameter of the neural network. During training, a plurality of nodes may send and receive gradient data associated with the trainable parameter via a network interface, as shown at block 2104. The node may execute instructions provided by the library via a general-purpose processor, as shown at block 2106. The instructions may cause the general-purpose processor to configure the network interface to send and receive gradient data related to the trainable parameter during the workflow of the machine learning framework. In addition, the worker node may perform a computational operation associated with the machine learning framework workflow via a graphics processor to generate gradient data associated with the trainable parameter, as shown at block 2108. The computational operation may be interleaved with the sending and receiving of the gradient data via the network interface. The interleaved computational operations may overlap, so that a first portion of the data may be sent while a computational operation is performed on a second portion of the data.
[0272] Fig. 21B A distributed training method for a neural network that can be performed using graphics processing logic as described herein is shown. In various embodiments, multiple interconnected worker nodes can be within a single computing device or chassis, or can be distributed across multiple computing devices or chassis. The method can be implemented by one or more processing devices within a general purpose processor, a graphics processor, or a processor within a fabric interface. The first or second instructions described below can be executed by, for example, Fig. 15B , Fig.18 Instructions provided by a library within the machine learning scaling architecture 1511, 1811, or an equivalent library described herein (e.g., the NCCL library).
[0273] In one embodiment, as shown at block 2112, the method includes storing a first set of instructions in a first memory, the first set of instructions including a machine learning framework. The first memory may be a system memory accessible by all or most components within the data processing system. For example, the first memory may be a memory such as a Figure 1 The method further includes enabling transmission and reception of data associated with the set of trainable machine learning parameters via a fabric interface, as shown at block 2114. The transmission and reception of data may be accomplished by a messaging library (e.g., messaging library 1519 and Fig. 15B High performance communication structure 1521) is performed or promoted.
[0274] In one embodiment, as shown at block 2116, the method further includes executing a first set of instructions via a set of general purpose processor cores. Executing the first set of instructions includes providing a training workflow for calculating gradients of trainable machine learning parameters and communicating with a second set of instructions. The second set of instructions may facilitate the transmission and reception of gradients via a fabric interface. As shown at block 2118, the method further includes executing computational operations associated with the training workflow via a graphics processor. Executing computational operations may include generating gradients for trainable machine learning parameters. In one embodiment, the gradients may be stored in a memory shared between the graphics processor and the fabric interface, allowing the gradient data to be sent without requiring the data to be stored in system memory prior to transmission.
[0275] Fig. 22 2 is a block diagram of a data processing system 2200 according to an embodiment described herein. The data processing system 2200 is a heterogeneous processing system having a processor 2202, a unified memory 2210, and a GPGPU 2220 including machine learning acceleration logic. The processor 2202 and the GPGPU 2220 may be any of the processors and GPGPU / parallel processors described herein. The processor 2202 may execute instructions for a compiler 2215 stored in a system memory 2212. The compiler 2215 is executed on the processor 2202 to compile source code into compiled code 2214B. The compiled code 2214B may include code that can be executed by the processor 2202 and / or code that can be executed by the GPGPU 2220. During compilation, the compiler 2215 may perform operations for inserting metadata (including hints about the level of data parallelism present in the compiled code 2214B and / or hints about the data location associated with threads dispatched based on the compiled code 2214B). The compiler 2215 may include the information necessary to perform such operations, or the operations may be performed with the aid of a runtime library 2216 (e.g., the Machine Learning Scaling Library (MLSL) described herein). The runtime library 2216 may also facilitate the compiler 2115 to compile the source code 2214A, and include instructions that are linked to the compiled code 2215B at runtime to facilitate the compiled instructions to be executed on the GPGPU 2220.
[0276] Unified memory 2210 represents a unified address space accessible by processor 2202 and GPGPU 2220. Unified memory includes system memory 2212 and GPGPU memory 2218. GPGPU memory 2218 includes GPGPU local memory 2228 within GPGPU 2220, and may also include some or all of system memory 2212. For example, compiled code 2214B stored within system memory 2212 may also be mapped into GPGPU memory 2218 for access by GPGPU 2220.
[0277] GPGPU 2220 includes a plurality of computing blocks 2224A-2224N, each of which includes one or more instances of processing array 212 or one or more of processing clusters 214A-214N as in FIG. 2. GPGPU 2220 also includes a set of registers 2224, a cache memory 2226, and a power and performance module 2225 that can be used as a shared resource for computing blocks 2224A-2224N. The power and performance module 2225 can be configured to adjust the power delivery and clock frequency for computing blocks 2224A-2224N to power the gate idle components within computing blocks 2224A-2224N under heavy workloads. GPGPU 2220 includes GPGPU local memory 2228, which is physical memory that shares a graphics card or multi-chip module with GPGPU 2220.
[0278] In one embodiment, GPGPU 2220 includes graphics and computation acceleration logic including an instruction fetch and decode unit 2221, a scheduler unit 2222, and a machine learning fixed function unit 2223. Fetch and decode unit 2221 is a fetch and decode unit including logic for fetching and decoding instructions computed by GPGPU 220. In one embodiment, the executed instructions may be sequenced and / or serialized via the scheduler unit 2222 to a set of operations and / or micro-operations executed via the computation blocks 2224A-2224N and / or the machine learning fixed function unit 2223.
[0279] In one embodiment, the machine learning fixed function unit 2223 is an application specific integrated circuit that is explicitly and exclusively configured to perform a large number of parallel matrix multiplication operations. In one embodiment, the machine learning fixed function unit 2223 is configured to perform matrix multiplication for convolution filters with non-power-of-two filter sizes. In one embodiment, the machine learning fixed function unit 2223 is a field programmable gate array (FPGA) that provides fixed function logic that can be updated between workloads.
[0280] In some embodiments, GPGPU 2220 includes an integrated fabric interface 2230 and a fabric interface cache 2232. In one embodiment, integrated fabric interface 2230 further includes an MLSL fabric module 2231 that enables the fabric interface to provide hardware acceleration for certain MLSL operations. Fabric interface 2230 may enable communication with high-performance communication fabrics (e.g., Fig. 15B The fabric interface 2230 has an address space mapped to at least a portion of the GPGPU local memory 2228, and in one embodiment may participate in the unified memory 2210 shared by the processor 2202 and the GPGPU 2220. The fabric interface cache 2232 is used to cache data received from or transmitted to the communication fabric, which implements data communication between computing nodes. In one embodiment, when the calculation result is calculated by the GPGPU 2220 and stored in the GPGPU local memory 2228, the fabric interface 2230 may send the data from the GPGPU local memory 2228 to other computing nodes. In such an embodiment, the data does not need to be sent to the system memory 2212 unless the data needs to be used by the application executed on the processor 2202.
[0281] The MLSL structure module 2231 is configured to facilitate low-latency transmission of data between nodes. In various embodiments, the MLSL structure module 2231 may be a firmware module configured to execute firmware provided by the MLSL or equivalent machine learning scaling library. In one embodiment, the MLSL structure module 2231 is a processor or microcontroller configured to execute instructions to implement point-to-point communication primitives as described herein. In one embodiment, the MLSL structure module 2231 may receive a set of addresses within the GPGPU local memory 2228, which is associated with a data object managed by the MLSL runtime (e.g., runtime library 2216). For example, an address range of an output buffer for storing activation data generated by the GPGPU 2220 may be provided to the MLSL structure module 2231. The MLSL structure module 2231 may then be configured to monitor the address range for updating. When the address range receives a write of activation data output by the GPGPU 2220, the MLSL structure module 2231 may schedule a transmission directly to the structure interface 2230 to transmit the output activation data. The MLSL structure module 2231 can also be used to implement the fine-grained communication and point-to-point hardware communication techniques described in this article.
[0282] The protocols supported by fabric interface 2230 may vary. In one embodiment, fabric interface 2230 is a high-speed Ethernet interface. In one embodiment, fabric interface 2230 is an Omni-Path interconnect interface. In one embodiment, fabric interface 2230 is an InfiniBand interface. In one embodiment, fabric interface 2230 is a version of the NVLink interface or another NVHS-based interconnect. Other fabric interface technologies may also be supported.
[0283] It should be appreciated that systems with fewer or more equipment than the examples described above may be preferred for certain implementations. Therefore, the configuration of data processing system 2000 may be different in implementation depending on many factors, such as price constraints, performance requirements, technology improvements or other conditions. The embodiments described herein can find extended use in high-performance computing and machine learning training environments. Therefore, this description expects that data processing system 2000 described herein and other data processing and computing systems are implemented as high-performance servers or server arrays in distributed computing systems. Such distributed computing systems can be implemented in data centers or server farms. However, embodiments are not limited to such implementations, and the technology described herein can also be used in large-scale distributed computing systems (such as but not limited to mobile or handheld devices, tablet computing devices or connected consumer electronic devices) of lower performance devices.
[0284] Additional Exemplary Graphics Processing Systems
[0285] Details of the embodiments described above may be incorporated into the graphics processing systems and devices described below. Figure 22-Figure 35 The graphics processing systems and devices illustrate optional systems and graphics processing hardware that can implement any and all of the techniques described above.
[0286] Fig. 22 2200 is a block diagram of a processing system 2300 according to an embodiment. In various embodiments, the system 2200 includes one or more processors 2202 and one or more graphics processors 2208, and may be a single processor desktop system, a multi-processor workstation system, or a server system with a large number of processors 2202 or processor cores 2207. In one embodiment, the system 2200 is a processing platform incorporated within a system-on-chip (SoC) integrated circuit for use in a mobile, handheld, or embedded device.
[0287] Embodiments of system 2200 may include or be incorporated in the following items: a server-based game platform, a game console, including a game and media console, a mobile game console, a handheld game console, or an online game console. In some embodiments, system 2200 is a mobile phone, a smart phone, a tablet computing device, or a mobile Internet device. Data processing system 2200 may also include, be coupled with, or be integrated in the following items: a wearable device such as a smart watch wearable device, a smart glasses device, an augmented reality device, or a virtual reality device. In some embodiments, data processing system 2200 is a television or set-top box device having one or more processors 2202 and a graphics interface generated by one or more graphics processors 2208.
[0288] In some embodiments, each of the one or more processors 2202 includes one or more processor cores 2207 to process instructions that, when executed, perform operations for system and user software. In some embodiments, each of the one or more processor cores 2207 is configured to process a specific instruction set 2209. In some embodiments, the instruction set 2209 may be advantageous for complex instruction set computing (CISC), reduced instruction set computing (RISC) or computing via very long instruction set words (VLIW). Each of the multiple processor cores 2207 may process different instruction sets 2209, which may include instructions that are advantageous for the simulation of other instruction sets. The processor core 2207 may also include other processing devices, such as a digital signal processor (DSP).
[0289] In some embodiments, the processor 2202 includes a cache memory 2204. Depending on the architecture, the processor 2202 may have a single internal cache or multiple levels of internal cache. In some embodiments, the cache memory is shared among various components of the processor 2202. In some embodiments, the processor 2202 also uses an external cache (e.g., a level 3 (L3) cache or a last level cache (LLC) (not shown)), which can be shared among the processor core 2207 using known cache coherence techniques. In addition, a register file 2206 is included in the processor 2202, and the processor 2202 may include different types of registers (e.g., integer registers, floating point registers, status registers, and instruction pointer registers) for storing different types of data. Some registers may be general purpose registers, while other registers may be specific to the design of the processor 2202.
[0290] In some embodiments, the processor 2202 is coupled to the processor bus 2210 to send communication signals, such as address, data, or control signals, between the processor 2202 and other components in the system 2200. In one embodiment, the system 2200 uses an exemplary "hub" system architecture, including a memory controller hub 2216 and an input output (I / O) controller hub 2230. The memory controller hub 2216 facilitates communication between memory devices and other components of the system 2200, while the I / O controller hub (ICH) 2230 provides connections to I / O devices via a local I / O bus. In one embodiment, the logic of the memory controller hub 2216 is integrated within the processor.
[0291] The memory device 2220 may be a dynamic random access memory (DRAM) device, a static random access memory (SRAM) device, a flash memory device, a phase change memory device, or some other memory device having suitable properties for use as process memory. In one embodiment, the memory device 2220 may operate as system memory for the system 2200 to store data 2222 and instructions 2221 for use when one or more processors 2202 execute applications or processes. The memory controller hub 2216 is also coupled to an optional external graphics processor 2212, which may communicate with one or more graphics processors 2208 in the processor 2202 to perform graphics and media operations.
[0292] In some embodiments, the ICH 2230 enables peripheral devices to connect to the memory device 2220 and the processor 2202 via a high-speed I / O bus. The I / O peripherals include, but are not limited to, an audio controller 2246, a firmware interface 2228, a wireless transceiver 2226 (e.g., Wi-Fi, Bluetooth), a data storage device 2224 (e.g., a hard drive, flash memory, etc.), and a traditional I / O controller 2240 for coupling traditional (e.g., Personal System 2 (PS / 2)) devices to the system. One or more Universal Serial Bus (USB) controllers 2242 connect input devices, such as a combination of a keyboard and mouse 2244. A network controller 2234 may also be coupled to the ICH 2230. In some embodiments, a high-performance network controller (not shown) is coupled to the processor bus 2210. It will be appreciated that the system 2200 shown is exemplary and not limiting, as other types of data processing systems configured differently may also be used. For example, the I / O controller hub 2230 may be integrated within one or more of the processors 2202 , or the memory controller hub 2216 and the I / O controller hub 2230 may be integrated into a discrete external graphics processor (eg, external graphics processor 2212 ).
[0293] Fig.232300 having one or more processor cores 2302A-2302N, an integrated memory controller 2314, and an integrated graphics processor 2308. Elements having the same reference numerals (or names) as elements of any other figure herein Fig.23 Those elements of the processor 2300 may operate or run in any manner similar to that described elsewhere herein, but are not limited thereto. The processor 2300 may include additional cores, and includes an additional core 2302N represented by a dashed box. Each of the processor cores 2302A-2302N includes one or more internal cache units 2302A-2304N. In some embodiments, each processor core also accesses one or more shared cache units 2306.
[0294] Internal cache units 2304A-2304N and shared cache unit 2306 represent a cache memory hierarchy within processor 2300. The cache memory hierarchy may include at least one level of instruction and data cache within each processor core and one or more levels of shared mid-level cache, such as level 2 (L2), level 3 (L3), level 4 (L4), or other levels of cache, where the highest level of cache before external memory is classified as LLC. In some embodiments, cache coherency logic maintains coherency between the various cache units 2306 and 2304A-2304N.
[0295] In some embodiments, the processor 2300 may also include a set of one or more bus controller units 2316 and a system agent core 2310. The one or more bus controller units 2316 manage a set of peripheral buses, such as one or more peripheral component internet buses (e.g., PCI, PCI Express). The system agent core 2310 provides management functions for various processor components. In some embodiments, the system agent core 2310 includes one or more integrated memory controllers 2314 to manage access to various external memory devices (not shown).
[0296] In some embodiments, one or more of the processor cores 2302A-2302N include support for simultaneous multithreading. In such embodiments, the system agent core 2310 includes components for coordinating and operating the cores 2302A-2302N during multithreaded processing. The system agent core 2310 may additionally include a power control unit (PCU) that includes logic and components to regulate the power state of the processor cores 2302A-2302N and the image processor 2308.
[0297] In some embodiments, the processor 2300 additionally includes a graphics processor 2308 to perform graphics processing operations. In some embodiments, the graphics processor 2308 is coupled to the set of shared cache units 2306 and a system agent core 2310 including one or more integrated memory controllers 2314. In some embodiments, a display controller 2311 is coupled to the graphics processor 2308 to output graphics processing to one or more coupled displays. In some embodiments, the display controller 2311 can be a separate module coupled to the graphics processor via at least one interconnect, or can be integrated within the graphics processor 2308 or the system agent core 2310.
[0298] In some embodiments, a ring-based interconnect unit 2312 is used to couple the internal components of the processor 2300. However, alternative interconnect units may be used, such as point-to-point interconnects, switched interconnects, or other technologies, including those known in the art. In some embodiments, the graphics processor 2308 is coupled to the ring interconnect 2312 via an I / O link 2313.
[0299] Exemplary I / O link 2313 represents at least one of a variety of I / O interconnects, including an on-package I / O interconnect, that facilitates communication between various processor components and high-performance embedded memory module 2318 (e.g., eDRAM module). In some embodiments, each of processor cores 2302A-2302N and graphics processor 2308 uses embedded memory module 2318 as a shared last level cache.
[0300] In some embodiments, the processor cores 2302A-2302N are homogeneous cores that execute the same instruction set architecture. In another embodiment, the processor cores 2302A-2302N are heterogeneous in terms of instruction set architecture (ISA), wherein one or more of the processor cores 2302A-2302N execute a first instruction set, while at least one of the other cores executes a subset of the first instruction set or a different instruction set. In one embodiment, the processor cores 2302A-2302N are heterogeneous in terms of microarchitecture, wherein one or more cores with relatively high power consumption are coupled with one or more power cores with relatively low power consumption. In addition, the processor 2300 may be implemented on one or more chips or as a SoC integrated circuit also having the components, etc.
[0301] Fig.2424 is a block diagram of a graphics processor 2400, which may be a discrete graphics processing unit or may be a graphics processor integrated with multiple processing cores. In some embodiments, the graphics processor communicates via a memory-mapped I / O interface to registers on the graphics processor and using commands placed into the processor memory. In some embodiments, the graphics processor 2400 includes a memory interface 2414 to access memory. The memory interface 2414 may be an interface to local memory, one or more internal caches, one or more shared external caches, and / or to system memory.
[0302] In some embodiments, the graphics processor 2400 also includes a display controller 2402 to drive display output data to a display device 2420. The display controller 2402 includes hardware for one or more overlay planes for display and composition of multiple layers of video or user interface elements. In some embodiments, the graphics processor 2400 includes a video codec engine 2406 to encode, decode or transcode media to, from or between one or more media encoding formats, including but not limited to Moving Picture Experts Group (MPEG) formats such as MPEG-2, Advanced Video Coding (AVC) formats such as H.264 / MPEG-4 AVC, and Society of Motion Picture and Television Engineers (SMPTE) 421M / VC-1 and Joint Photographic Experts Group (JPEG) formats such as JPEG, and Motion JPEG (MJPEG) formats.
[0303] In some embodiments, graphics processor 2400 includes a block image transfer (BLIT) engine 2404 to perform two-dimensional (2D) rasterizer operations, including, for example, bit boundary block transfers. However, in one embodiment, 2D graphics operations are performed using one or more components of a graphics processing engine (GPE) 2410. In some embodiments, GPE 2410 is a computational engine for performing graphics operations including three-dimensional (3D) graphics operations and media operations.
[0304] In some embodiments, GPE 310 includes a 3D pipeline 2412 for performing 3D operations (e.g., rendering three-dimensional images and scenes) using processing functions that act on 3D primitive shapes (e.g., rectangles, triangles, etc.). 3D pipeline 2412 includes programmable and fixed function elements that perform various tasks within the elements and / or generate execution threads for 3D / media subsystem 2415. While 3D pipeline 2412 can be used to perform media operations, embodiments of GPE 2410 also include a media pipeline 2416 that is specifically used to perform media operations, such as video post-processing and image enhancement.
[0305] In some embodiments, the media pipeline 2416 includes fixed-function or programmable logic units to perform one or more specialized media operations, such as video decoding acceleration, video deinterlacing, and video encoding acceleration, instead of or on behalf of the video codec engine 2406. In some embodiments, the media pipeline 2416 additionally includes a thread generation unit to generate threads for execution on the 3D / media subsystem 1415. The generated threads perform calculations for the media operations on one or more graphics execution units included in the 3D / media subsystem 2415.
[0306] In some embodiments, the 3D / media subsystem 2415 includes logic for executing threads generated by the 3D pipeline 2412 and the media pipeline 2416. In one embodiment, the pipeline sends thread execution requests to the 3D / media subsystem 2415, which includes thread dispatch logic for arbitrating various requests and dispatching various requests to available thread execution resources. The execution resources include an array of graphics execution units to handle 3D and media threads. In some embodiments, the 3D / media subsystem 2415 includes one or more internal caches for thread instructions and data. In some embodiments, the subsystem also includes shared memory, including registers and addressable memory, to share data between threads and store output data.
[0307] Exemplary Additional Graphics Processing Engines
[0308] Fig.25 is a block diagram of a graphics processing engine 2510 of a graphics processor according to some embodiments. In one embodiment, the graphics processing engine (GPE) 2510 is Fig.24 The GPE 2410 shown in FIG. 2 is a version of the GPE 2410 shown in FIG. 2. Elements having the same reference numerals (or names) as elements of any other figure herein Fig.25 The elements of may operate or function in any manner similar to, but not limited to, those described elsewhere herein. Fig.24 2412 and media pipeline 2416. The media pipeline 2416 is optional in some embodiments of the GPE 2510 and may not be explicitly included in the GPE 2510. For example and in at least one embodiment, separate media and / or image processors are coupled to the GPE 2510.
[0309] In some embodiments, the GPE 2510 is coupled to or includes a command stream sender 2503, which provides a command stream to the 3D pipeline 2412 and / or the media pipeline 2416. In some embodiments, the command stream sender 2503 is coupled to a memory, which may be a system memory, or one or more of an internal cache memory and a shared cache memory. In some embodiments, the command stream sender 2503 receives commands from the memory and sends the commands to the 3D pipeline 2412 and / or the media pipeline 2416. The commands are taken directly from a ring buffer, which stores commands for the 3D pipeline 2412 and the media pipeline 2416. In one embodiment, the ring buffer may additionally include a batch command buffer that stores a batch of multiple commands. Commands for the 3D pipeline 2412 may also include references to data stored in memory, such as, but not limited to, vertex and geometry data for the 3D pipeline 2412 and / or image data and memory objects for the media pipeline 2416. The 3D pipeline 2412 and the media pipeline 2416 process the commands and data by performing operations via logic within the respective pipelines or by dispatching one or more execution threads to the graphics core array 2514.
[0310] In various embodiments, the 3D pipeline 2412 can execute one or more shader programs, such as vertex shaders, geometry shaders, pixel shaders, fragment shaders, compute shaders, or other shader programs, by processing instructions and dispatching execution threads to the graphics core array 2514. The graphics core array 2514 provides a unified block of execution resources. The multi-purpose execution logic (e.g., execution unit) within the graphics core array 2514 includes support for various 3D API shader languages and can execute multiple simultaneous execution threads associated with multiple shaders.
[0311] In some embodiments, graphics core array 2514 also includes execution logic to perform media functions, such as video and / or image processing. In one embodiment, the execution units additionally include general purpose logic that can be programmed to perform parallel general purpose computing operations in addition to performing graphics processing operations. The general purpose logic can be combined in parallel or in Fig. 22 Processor core 2207 or as in Fig.23 The general logic within cores 2302A-2302N performs processing operations.
[0312] Output data generated by threads executing on graphics core array 2314 may output data to memory in unified return buffer (URB) 2518. URB 2518 may store data for multiple threads. In some embodiments, URB 2518 may be used to send data between different threads executing on graphics core array 2514. In some embodiments, URB 2518 may additionally be used for synchronization between threads on the graphics core array and fixed function logic within shared function logic 2520.
[0313] In some embodiments, graphics core array 2514 is scalable such that the array includes a variable number of graphics cores, each with a variable number of execution units based on the target power and performance level of GPE 2510. In one embodiment, execution resources are dynamically scalable such that execution resources can be enabled or disabled as needed.
[0314] The graphics core array 2514 is coupled to shared function logic 2520, which includes a plurality of resources shared between the graphics cores in the graphics core array. The shared functions within the shared function logic 2520 are hardware logic units that provide specialized supplemental functions to the graphics core array 2514. In various embodiments, the shared function logic 2520 includes, but is not limited to, samplers 2521, math 2522, and inter-thread communication (ITC) 2523 logic. In addition, some embodiments implement one or more caches 2525 within the shared function logic 2520. The shared functions are implemented where the demand for a given specialized function is insufficient for inclusion within the graphics core array 2514. Alternatively, a single instantiation of that specialized function is implemented as an independent entity in the shared function logic 2520 and shared among the execution resources within the graphics core array 2514. The exact set of functions that are shared between the graphics core array 2514 and included within the graphics core array 2514 varies between embodiments.
[0315] Fig.26 is a block diagram of a graphics processor 2600 provided by an additional embodiment. Elements having the same reference numerals (or names) as elements of any other figure herein Fig.26 The elements of may operate or function in any manner similar to that described elsewhere herein, but are not limited thereto.
[0316] In some embodiments, graphics processor 2600 includes ring interconnect 2602, pipeline front end 2604, media engine 2637, and graphics cores 2680A-2680N. In some embodiments, ring interconnect 2602 couples the graphics processor to other processing units, including other graphics processors or one or more general-purpose processor cores. In some embodiments, the graphics processor is one of many processors integrated into a multi-core processing system.
[0317] In some embodiments, the graphics processor 2600 receives batches of commands via a ring interconnect 2602. Incoming commands are interpreted by a command streamer 2603 in a pipeline front end 2604. In some embodiments, the graphics processor 2600 includes scalable execution logic to perform 3D geometry processing and media processing via graphics cores 2680A-2680N. For 3D geometry processing commands, the command streamer 2603 supplies the commands to a geometry pipeline 2636. For at least some media processing commands, the command streamer 2603 supplies the commands to a video front end 2634, which is coupled to a media engine 2637. In some embodiments, the media engine 2637 includes a video quality engine (VQE) 2630 for video and graphics post-processing and a multi-format encoding / decoding (MFX) 2633 for providing hardware accelerated media data encoding and decoding. In some embodiments, the geometry pipeline 2636 and the media engine 2637 each generate execution threads for thread execution resources provided by at least one graphics core 2680A.
[0318] In some embodiments, the graphics processor 2600 includes scalable thread execution resources featuring modular cores 2680A-2680N (sometimes referred to as core slices), each modular core having multiple sub-cores 2650A-550N, 2660A-2660N (sometimes referred to as core sub-slices). In some embodiments, the graphics processor 2600 may have any number of graphics cores 2680A to 2680N. In some embodiments, the graphics processor 2600 includes a graphics core 2680A having at least a first sub-core 2650 and a second sub-core 2660A. In other embodiments, the graphics processor is a low-power processor having a single sub-core (e.g., 2650A). In some embodiments, the graphics processor 2600 includes multiple graphics cores 2680A-2680N, each graphics core including a group of first sub-cores 2650A-2650N and a group of second sub-cores 2660A-2660N. Each sub-core in the set of first sub-cores 2650A-2650N includes at least a first set of execution units 2652A-2652N and a media / texture sampler 2654A-2654N. Each sub-core in the set of second sub-cores 2660A-2660N includes at least a second set of execution units 2662A-2662N and a sampler 2664A-2664N. In some embodiments, each sub-core 2650A-2650N, 2660A-2660N shares a set of shared resources 2670A-2670N. In some embodiments, the shared resources include a shared cache memory and pixel operation logic. Other shared resources may also be included in various embodiments of the graphics processor.
[0319] Additional Exemplary Execution Units
[0320] Fig. 27 Thread execution logic 2700 is shown including an array of processing elements employed in some embodiments. Elements having the same reference numerals (or names) as elements of any other figure herein Fig. 27 The elements of may operate or function in any manner similar to that described elsewhere herein, but are not limited thereto.
[0321] In some embodiments, thread execution logic 2700 includes a shader processor 2702, a thread scheduler 2704, an instruction cache 2706, a scalable execution unit array including a plurality of execution units 2708A-2708N, a sampler 2710, a data cache 2712, and a data port 2714. In one embodiment, the scalable execution unit array can be dynamically scaled by enabling or disabling one or more execution units (e.g., any of execution units 2708A, 2708B, 2708C, 2708D to 2708N-1 and 2708N) based on the computational requirements of the workload. In one embodiment, the included components are interconnected via an interconnect structure linked to each of the components. In some embodiments, thread execution logic 2700 includes one or more interconnects to a memory (e.g., system memory or cache memory) through one or more of the instruction cache 2706, the data port 2714, the sampler 2710, and the execution units 2708A-2708N. In some embodiments, each execution unit (e.g., 2708A) is an independently programmable general-purpose computing unit capable of executing multiple simultaneous hardware threads while processing multiple data elements for each thread in parallel. In various embodiments, the array of execution units 2708A-2708N is scalable to include any number of separate execution units.
[0322] In some embodiments, execution units 2708A-2708N are primarily used to execute shader programs. Shader processor 2702 can process various shader programs and dispatch execution threads associated with the shader programs via thread dispatcher 2704. In one embodiment, thread dispatcher includes logic for arbitrating thread initiation requests from graphics and media pipelines and instantiating the requested threads on one or more of execution units 2708A-2708N. For example, geometry pipelines (e.g., Fig.26 2636) can dispatch vertex, tessellation or geometry shaders to thread execution logic 2700 ( Fig. 27 ) for processing. In some embodiments, thread dispatcher 2704 may also process runtime thread generation requests from executing shader programs.
[0323] In some embodiments, execution units 2708A-2708N support the following instruction set, which includes inherent support for many standard 3D graphics shader instructions, so that shader programs from graphics libraries (such as Direct 3D and OpenGL) are executed with minimal conversion. The execution unit supports vertex and geometry processing (such as vertex programs, geometry programs, vertex shaders), pixel processing (such as pixel shaders, fragment shaders) and general processing (such as calculation and media shaders). Each execution unit 2708A-2708N is capable of multi-issue single instruction multiple data (SIMD) execution, and multi-threaded operations face high latency memory access to achieve an effective execution environment. Each hardware thread in each execution unit has a dedicated high-bandwidth register file and an associated independent thread state. Execution is multi-issue per clock for pipelines capable of integer, single and double precision floating point operations, SIMD branching capabilities, logical operations, transcendental operations and other tessellation operations. When waiting for data from memory or one of the shared functions, dependency logic within execution units 2708A-2708N puts the waiting thread to sleep until the requested data is returned. While the waiting thread is sleeping, hardware resources can be devoted to processing other threads. For example, during a delay associated with a vertex shader operation, an execution unit can perform operations for a pixel shader, a fragment shader, or another type of shader program including a different vertex shader.
[0324] Each execution unit in execution units 2708A-2708N operates on an array of data elements. The number of data elements is the "execution size" or number of lanes for an instruction. An execution lane is a logical unit used for the execution of data element access, masking, and flow control within an instruction. The number of lanes may be independent of the number of physical arithmetic logic units (ALUs) or floating point units (FPUs) of a particular graphics processor. In some embodiments, execution units 2708A-2708N support integer and floating point data types.
[0325] The execution unit instruction set includes SIMD instructions. Various data elements can be stored in registers as encapsulated data types, and the execution unit will process various elements based on the data size of the element. For example, when operating on a 256-bit wide vector, 256 bits of the vector are stored in registers, and the execution unit operates on the vector as four separate 64-bit encapsulated data elements (quad word (QW) size data elements), eight separate 32-bit encapsulated data elements (double word (DW) size data elements), sixteen separate 16-bit encapsulated data elements (word (W) size data elements) or thirty-two separate 8-bit encapsulated data elements (byte (B) size data elements). However, different vector widths and register sizes are possible.
[0326] One or more internal instruction caches (e.g., 2706) are included in the thread execution logic 2700 to cache thread instructions for the instruction unit. In some embodiments, one or more data caches (e.g., 2712) are included to cache thread data during thread execution. In some embodiments, a sampler 2710 is included to provide texture sampling for 3D operations and media sampling for media operations. In some embodiments, the sampler 2710 includes a dedicated texture or media sampling function to process the texture or media data during the sampling process before providing the sampled data to the execution unit.
[0327] During execution, the graphics and media pipeline sends thread initiation requests to the thread execution logic 2700 via thread generation and dispatch logic. Once a set of geometric objects are processed and rasterized into pixel data, the pixel processor logic (e.g., pixel shader logic, fragment shader logic, etc.) within the shader processor 2702 is called to further calculate output information and cause the results to be written to the output surface (e.g., color buffer, depth buffer, template buffer, etc.). In some embodiments, the pixel shader or fragment shader calculates the values of various vertex attributes interpolated on the rasterized object. In some embodiments, the pixel processor logic within the shader processor 2702 then executes the pixel or fragment shader program supplied by the application programming interface (API). In order to execute the shader program, the shader processor 2702 dispatches the thread to the execution unit (e.g., 2708A) via the thread dispatcher 2704. In some embodiments, the pixel shader 2702 uses the texture sampling logic in the sampler 2710 to access the texture data stored in the texture map in the memory. Arithmetic operations on texture data and input geometry data compute pixel color data for each geometry fragment, or discard one or more pixels for further processing.
[0328] In some embodiments, data port 2714 provides a memory access mechanism for thread execution logic 2700 to output processed data to memory for execution on the graphics processor output pipeline. In some embodiments, data port 2714 includes or is coupled to one or more cache memories (e.g., data cache 2712) to cache data via the data port for memory access.
[0329] Fig.282800 is a block diagram illustrating a graphics processor instruction format 2800 according to some embodiments. In one or more embodiments, a graphics processor execution unit supports an instruction set having instructions in a variety of formats. Solid line boxes illustrate components that are typically included in execution unit instructions, while dashed lines include components that are optional or included only in a subset of instructions. In some embodiments, the instruction format 2800 described and illustrated are macroinstructions in that they are instructions that are supplied to the execution unit, as opposed to micro-operations that are generated from instruction decode once the instruction is processed.
[0330] In some embodiments, the graphics processor execution unit natively supports instructions in the 128-bit instruction format 2810. Based on the selected instruction, instruction options, and the number of operands, a 64-bit compressed instruction format 2830 is available for some instructions. The native 128-bit instruction format 710 provides access to all instruction options, while some options and operations are restricted to the 64-bit format 2830. The native instructions available in the 64-bit format 2830 vary according to the embodiment. In some embodiments, the instructions are partially compressed using a set of index values in the index field 2813. The execution unit hardware references a set of compression tables based on the index values and uses the compression table output to reconstruct the native instructions in the 128-bit instruction format 2810.
[0331] For each format, the instruction opcode 2812 defines the operation that the execution unit will perform. The execution unit executes each instruction in parallel among multiple data elements of each operand. For example, in response to an addition instruction, the execution unit performs simultaneous addition operations on each color channel representing a texture element or a picture element. By default, the execution unit executes each instruction on all data channels of the operand. In some embodiments, the instruction control field 2814 implements control by certain execution options (such as channel selection (such as prediction) and data channel order (such as swizzle)). For instructions in the 128-bit instruction format 2810, the exec size field 2816 limits the number of data channels that will be executed in parallel. In some embodiments, the exec size field 2816 is not available for use in the 64-bit compressed instruction format 2830.
[0332] Some execution unit instructions have up to three operands, including two source operands src0 2820, src1 2822, and one destination 2818. In some embodiments, the execution unit supports dual destination instructions, where one of the destinations is implied. Data manipulation instructions may have a third source operand (e.g., SRC2 2824), where the instruction opcode 2812 determines the number of source operands. The last source operand of an instruction may be an immediate (hard-coded) value passed along with the instruction.
[0333] In some embodiments, the 128-bit instruction format 2810 includes an access / address mode field 2816 that specifies, for example, whether direct register addressing mode or indirect register addressing mode is used. When direct register addressing mode is used, the register address of one or more operands is provided directly by bits in the instruction.
[0334] In some embodiments, the 128-bit instruction format 2810 includes an access / address mode field 2826 that specifies the address mode and / or access mode of the instruction. In one embodiment, the access mode is used to define the data access alignment for the instruction. Some embodiments support access modes including a 16-byte aligned access mode and a 1-byte aligned access mode, wherein the byte alignment of the access mode determines the access alignment of the instruction operand. For example, when in a first mode, the instruction may use byte-aligned addressing for source and destination operands, and when in a second mode, the instruction may use 16-byte aligned addressing for all source and destination operands.
[0335] In one embodiment, the address mode portion of the access / address mode field 2826 determines whether the instruction uses direct addressing or indirect addressing. When direct register addressing mode is used, the bits in the instruction directly provide the register address of one or more operands. When indirect register addressing mode is used, the register address of one or more operands can be calculated based on the address register value and the address immediate field in the instruction.
[0336] In some embodiments, instructions are grouped based on the opcode 2812 bit field to simplify opcode decoding 2840. For 8-bit opcodes, bits 4, 5, and 6 allow the execution unit to determine the type of opcode. The precise opcode grouping shown is just an example. In some embodiments, the move and logic opcode group 2842 includes data movement and logic instructions (e.g., move (mov), compare (cmp)). In some embodiments, the move and logic group 2842 shares five most significant bits (MSBs), where the move (mov) instruction is in the form of 0000xxxxb, and the logic instruction is in the form of 0001xxxxb. The flow control instruction group 2944 (e.g., call, jump (jmp)) includes instructions in the form of 0010xxxxb (e.g., 0x20). The tessellation instruction group 2846 includes a mixture of instructions, including synchronization instructions (e.g., wait, send) in the form of 0011xxxxb (e.g., 0x30). The parallel math instruction group 2848 includes component-by-component arithmetic instructions (e.g., addition, multiplication (mul)) in the form of 0100xxxxb (e.g., 0x40). The parallel math group 2848 performs arithmetic operations in parallel on the data paths. The vector math group 2850 includes arithmetic instructions (e.g., dp4) in the form of 0101xxxxb (e.g., 0x50). The vector math group performs arithmetic on vector operands, such as dot product calculations.
[0337] Additional Exemplary Graphics Pipeline
[0338] Fig.29 2900 is a block diagram of another embodiment of a graphics processor. Elements having the same reference numerals (or names) as elements of any other figure herein Fig.29 The elements of may operate or function in any manner similar to that described elsewhere herein, but are not limited thereto.
[0339] In some embodiments, the graphics processor 2900 includes a graphics pipeline 2920, a media pipeline 2930, a display engine 2940, a thread execution logic 2950, and a rendering output pipeline 2970. In some embodiments, the graphics processor 2900 is a graphics processor within a multi-core processing system that includes one or more general-purpose processing cores. The graphics processor is controlled by register writes to one or more control registers (not shown) or via commands issued to the graphics processor 2900 through the ring interconnect 2902. In some embodiments, the ring interconnect 2902 couples the graphics processor 2900 to other processing components, such as other graphics processors or general-purpose processors. Commands from the ring interconnect 2902 are interpreted by a command stream sender 2903, which supplies instructions to individual components of the graphics pipeline 2920 or the media pipeline 2930.
[0340] In some embodiments, command streamer 2903 directs the operation of vertex fetcher 2905, which reads vertex data from memory and executes vertex processing commands provided by command streamer 2903. In some embodiments, vertex fetcher 2905 provides vertex data to vertex shader 2907, which performs coordinate space transformation and lighting operations for each vertex. In some embodiments, vertex fetcher 2905 and vertex shader 2907 execute vertex processing instructions by dispatching execution threads to execution units 2952A-2952B via thread dispatcher 2931.
[0341] In some embodiments, execution units 2952A-2952B are arrays of vector processors with instruction sets for performing graphics and media operations. In some embodiments, execution units 2952A-2952B have an attached L1 cache 2951 that is specific to each array or shared between arrays. The cache can be configured as a data cache, an instruction cache, or a single cache that is partitioned to contain data and instructions in different partitions.
[0342] In some embodiments, the graphics pipeline 2920 includes a tessellation component to perform hardware-accelerated tessellation of 3D objects. In some embodiments, a programmable hull shader 811 configures the tessellation operation. A programmable domain shader 817 provides back-end evaluation of the tessellation output. The refiner 2913 operates at the direction of the hull shader 2911 and contains dedicated logic to generate a set of detailed geometric objects based on a coarse geometric model provided as input to the graphics pipeline 2920. In some embodiments, if tessellation is not used, the tessellation components (e.g., the hull shader 2911, refiner 2913, and domain shader 2917) may be bypassed.
[0343] In some embodiments, the complete geometric object may be processed by the geometry shader 2919 via one or more threads dispatched to execution units 2952A-2952B, or may proceed directly to the slicer 2929. In some embodiments, the geometry shader operates on the entire geometric object rather than on vertices or patches of vertices as in previous stages of the graphics pipeline. If tessellation is disabled, the geometry shader 2919 receives input from the vertex shader 2907. In some embodiments, if the tessellation unit is disabled, the geometry shader 2919 is programmable by a geometry shader program to perform geometry tessellation.
[0344] Prior to rasterization, a limiter 2929 processes the vertex data. The limiter 2929 may be a fixed function limiter or a programmable limiter with limit and geometry shader functionality. In some embodiments, a rasterizer and depth test component 2973 in a render output pipeline 2970 dispatches a pixel shader to convert geometric objects into their per-pixel representations. In some embodiments, the pixel shader logic is included in the thread execution logic 2950. In some embodiments, an application may bypass the rasterizer and depth test component 2973 and access unrasterized vertex data via a stream output unit 2923.
[0345] The graphics processor 2900 has an interconnect bus, interconnect structure, or some other interconnect mechanism that allows data and messages to pass through the main components of the processor. In some embodiments, the execution units 2952A-2952B and associated caches 2951, texture and media samplers 2954, and texture / sampler caches 2958 are interconnected via data ports 2956 to perform memory accesses and communicate with the rendering output pipeline components of the processor. In some embodiments, the samplers 2954, caches 2951, 2958, and execution units 2952A-2952B each have separate memory access paths.
[0346] In some embodiments, the render output pipeline 2970 includes a rasterizer and depth test component 2973 that converts vertex-based objects into associated pixel-based representations. In some embodiments, the rasterizer logic includes a windower / masker unit to perform fixed-function triangle and line rasterization. In some embodiments, an associated render cache 2978 and depth cache 2979 are also available. A pixel operation component 2977 performs pixel-based operations on data, although in some instances, pixel operations associated with 2D operations (e.g., using hybrid bit-block image transfers) are performed by the 2D engine 2941, or are replaced by the display controller 2943 using an overlay display plane at display time. In some embodiments, a shared L3 cache 2975 is available for all graphics components, allowing sharing of data without using main system memory.
[0347] In some embodiments, the graphics processor media pipeline 2930 includes a media engine 2937 and a video front end 2934. In some embodiments, the video front end 2934 receives pipeline commands from the command stream sender 2903. In some embodiments, the media pipeline 2930 includes a separate command stream sender. In some embodiments, the video front end 2934 processes the media commands before sending the commands to the media engine 2937. In some embodiments, the media engine 2937 includes a thread generation function to generate threads for dispatching to the thread execution logic 2950 via the thread dispatcher 2931.
[0348] In some embodiments, the graphics processor 2900 includes a display engine 2940. In some embodiments, the display engine 2940 is external to the graphics processor 2900 and is coupled to the graphics processor via a ring interconnect 2902 or some other interconnect bus or structure. In some embodiments, the display engine 2940 includes a 2D engine 2941 and a display controller 2943. In some embodiments, the display engine 2940 contains dedicated logic that can operate independently of the 3D pipeline. In some embodiments, the display controller 2943 is coupled to a display device (not shown), which can be a system-integrated display device, such as in a laptop computer, or an external display device attached via a display device connector.
[0349] In some embodiments, graphics pipeline 2920 and media pipeline 2930 can be configured to perform operations based on multiple graphics and media programming interfaces, and are not specific to any one application programming interface (API). In some embodiments, the driver software for graphics processor converts API calls that are unique to specific graphics or media libraries into commands that can be processed by graphics processor. In some embodiments, support is provided for open graphics library (OpenGL), open computing voice (OpenCL) and / or Vulkan graphics and computing APIs all from Khronos Group. In some embodiments, support for Direct3D library from Microsoft Corporation can also be provided. In some embodiments, the combination of these libraries can be supported. Support for open source computing vision library (OpenCV) can also be provided. If a mapping from the pipeline of future API to the pipeline of graphics processor can be made, future APIs with compatible 3D pipelines will also be supported.
[0350] Additional Example Graphics Pipeline Programming
[0351] Fig.31A is a block diagram illustrating a graphics processor command format 3000 according to some embodiments. Fig.31B is a block diagram illustrating a graphics processor command sequence 3010 according to an embodiment. Fig.31A The solid-line boxes in show components that are typically included in the graphics commands, while the dashed lines include components that are optional or included only in a subset of the graphics commands. Fig.31A An exemplary graphics processor command format 3000 includes a data field to identify the target client of the command 3002, a command operation code (opcode) 3004, and associated data for the command 3006. A sub-opcode 3005 and a command size 3008 are also included in some commands.
[0352] In some embodiments, client 3002 specifies the client unit of the graphics device that processes the command data. In some embodiments, the graphics processor command parser checks the client field of each command to adjust the further processing of the command and routes the command data to the appropriate client unit. In some embodiments, the graphics processor client unit includes a memory interface unit, a rendering unit, a 2D unit, a 3D unit, and a media unit. Each client unit has a corresponding processing pipeline for processing commands. Once the command is received by the client unit, the client unit reads the opcode 3004, and if present, the sub-opcode 3005 determines the operation to be performed. The client unit uses the information in the data field 3006 to execute the command. For some commands, the explicit command size 3008 is expected to be the size of the specified command. In some embodiments, the command parser automatically determines the size of at least some of the commands based on the opcode. In some embodiments, the command is aligned via multiple double words.
[0353] Fig.31B An exemplary graphics processor command sequence 3010 is shown in the flowchart of FIG. 3010. In some embodiments, software or firmware of a data processing system featuring an embodiment of a graphics processor uses a version of a command sequence that is shown to establish, execute, and terminate a set of graphics operations. For purposes of example only, a sample command sequence is shown and described, as embodiments are not limited to these particular commands or this command sequence. Moreover, commands may be issued as batch commands in a command sequence so that the graphics processor will process a sequence of commands that are at least partially concurrent.
[0354] In some embodiments, the graphics processor command sequence 3010 may begin with a pipeline refresh command 3012 to cause any active graphics pipeline to complete currently pending commands for the pipeline. In some embodiments, the 3D pipeline 3022 and the media pipeline 3024 do not operate concurrently. A pipeline refresh is performed to cause the active graphics pipeline to complete any pending commands. In response to a pipeline refresh, the command parser for the graphics processor will suspend command processing until the active drawing engine completes pending operations and the associated read cache is invalidated. Optionally, any data marked as "dirty" in the render cache may be flushed to memory. In some embodiments, the pipeline refresh command 3012 may be used for pipeline synchronization or before placing the graphics processor in a low power state.
[0355] In some embodiments, when a command sequence requires the graphics processor to explicitly switch between pipelines, a pipeline select command 3013 is used. In some embodiments, a pipeline select command 3013 is only required once within an execution context before issuing a pipeline command, unless the context is used to issue commands for two pipelines. In some embodiments, a pipeline flush command 3012 is required immediately before a pipeline switch is made via a pipeline select command 3013.
[0356] In some embodiments, pipeline control commands 3014 configure the graphics pipeline for operation and are used to program the 3D pipeline 3022 and the media pipeline 3024. In some embodiments, pipeline control commands 3014 configure the pipeline state for the active pipeline. In one embodiment, pipeline control commands 3014 are used for pipeline synchronization and to clear data from one or more cache memories within the active pipeline before processing a batch of commands.
[0357] In some embodiments, the return buffer state command 3016 is used to configure a set of return buffers for a corresponding pipeline to write data. Some pipeline operations require the allocation, selection, or configuration of one or more return buffers into which intermediate data is written during the processor operation. In some embodiments, the graphics processor also uses one or more return buffers to store output data and perform cross-thread communication. In some embodiments, the return buffer state 3016 includes selecting the size and number of return buffers for a set of pipeline operations.
[0358] The remaining commands in the command sequence differ based on the active pipeline for the operation. Based on the pipeline determination 3020 , the command sequence is tailored to either the 3D pipeline 3022 starting at the 3D pipeline state 3030 or the media pipeline 3024 starting at the media pipeline state 3040 .
[0359] The commands for configuring the 3D pipeline state 3030 include 3D state setting commands for vertex buffer state, vertex element state, constant color state, depth buffer state, and other state variables that are configured before 3D primitive commands are processed. The values of these commands are determined based at least in part on the specific 3D API in use. In some embodiments, the 3D pipeline state 3030 commands can also selectively disable or bypass certain pipeline elements if those elements will not be used.
[0360] In some embodiments, 3D primitive 3032 commands are used to submit 3D primitives to be processed by the 3D pipeline. The commands and associated parameters passed to the graphics processor via the 3D primitive 3032 commands are forwarded to the vertex fetching function in the graphics pipeline. The vertex fetching function uses the 3D primitive 3032 command data to generate a vertex data structure. The vertex data structure is stored in one or more return buffers. In some embodiments, 3D primitive 3032 commands are used to perform vertex operations on 3D primitives via vertex shaders. In order to process vertex shaders, the 3D pipeline 3022 dispatches the shader execution thread to the graphics processor execution unit.
[0361] In some embodiments, the 3D pipeline 3022 is triggered via an execution 3034 command or event. In some embodiments, a register write triggers the command execution. In some embodiments, the execution is triggered via a "go" or "kick" command in a command sequence. In one embodiment, a pipeline synchronization command is used to trigger the command execution to refresh the command sequence through the graphics pipeline. The 3D pipeline will perform geometry processing for 3D primitives. Once the operation is completed, the resulting geometric object is rasterized and the pixel engine colors the resulting pixels. Additional commands for controlling pixel shading and pixel backend operations may also be included for those operations.
[0362] In some embodiments, the graphics processor command sequence 3010 follows the media pipeline 3024 path when performing media operations. Generally, the specific use and manner of programming for the media pipeline 3024 depends on the media or computing operations to be performed. Specific media decoding operations can be offloaded to the media pipeline during media decoding. In some embodiments, the media pipeline can also be bypassed, and the media decoding can be performed in whole or in part using resources provided by one or more general processing cores. In one embodiment, the media pipeline also includes elements for general purpose graphics processor unit (GPGPU) operations, where the graphics processor is used to perform SIMD vector operations using compute shader programs that are not explicitly related to the rendering of graphics primitives.
[0363] In some embodiments, the media pipeline 3024 is configured in a similar manner to the 3D pipeline 3022. A set of commands for configuring the media pipeline state 3040 are dispatched or placed into a command queue before the media object commands 3024. In some embodiments, the media pipeline state commands 3040 include data for configuring the media pipeline elements that will be used to process the media objects. This includes data for configuring the video decoding and video encoding logic (e.g., encoding or decoding formats) within the media pipeline. In some embodiments, the media pipeline state commands 3040 also support the use of one or more pointers to "indirect" state elements that contain batch state settings.
[0364] In some embodiments, media object command 3042 provides a pointer to a media object for processing by the media pipeline. The media object includes a memory buffer that contains video data to be processed. In some embodiments, all media pipeline states must be valid before issuing media object command 3042. Once the pipeline state is configured and media object command 3042 is queued, media pipeline 3042 is triggered via execution command 3044 or an equivalent execution event (e.g., register write). The output from media pipeline 3042 can then be post-processed by the operations provided by 3D pipeline 3022 or media pipeline 3024. In some embodiments, GPGPU operations are configured and executed in a manner similar to media operations.
[0365] Additional Exemplary Graphics Software Architecture
[0366] 31 illustrates an exemplary graphics software architecture for a data processing system 3100 according to some embodiments. In some embodiments, the software architecture includes a 3D graphics application 3110, an operating system 3120, and at least one processor 3130. In some embodiments, processor 3130 includes a graphics processor 3132 and one or more general purpose processor cores 3134. Graphics application 3110 and operating system 3120 each execute in a system memory 3150 of the data processing system.
[0367] In some embodiments, the 3D graphics application 3110 includes one or more shader programs that include shader instructions 3112. The shader language instructions may be in a high-level shader language, such as High Level Shader Language (HLSL) or OpenGL Shader Language (GLSL). The application also includes executable instructions 3114 in a machine language suitable for execution by the general purpose processor core 3134. The application also includes graphics objects 3116 defined by vertex data.
[0368] In some embodiments, operating system 3120 is from Microsoft Corporation Operating system, dedicated UNIX-like operating system or open source UNIX-like operating system using the deformation of Linux kernel. Operating system 3120 can support graphics API 3122, such as Direct3D API, OpenGL API or Vulkan API. When using Direct3D API, operating system 3120 uses front-end shader compiler 3224 to compile any shader instruction 3112 in HLSL into a lower-level shader language. Compilation can be just-in-time (JIT) compilation or application of executable shader precompilation. In some embodiments, high-level shaders are compiled into low-level shaders during the compilation of 3D graphics operation 3110. In some embodiments, shader instructions 3112 are provided in an intermediate form (such as a version of the standard portable intermediate representation (SPIR) used by Vulkan API).
[0369] In some embodiments, the user mode graphics driver 3126 includes a backend shader compiler 3127 to convert shader instructions 3112 into hardware specific representations. When using the OpenGL API, shader instructions 3112 in the GLSL high level language are passed to the user mode graphics driver 3126 for compilation. In some embodiments, the user mode graphics driver 3126 uses the operating system kernel mode functions 3128 to communicate with the kernel mode graphics driver 3129. In some embodiments, the kernel mode graphics driver 3129 communicates with the graphics processor 3132 to dispatch commands and instructions.
[0370] Additional Example IP Core Implementations
[0371] One or more aspects of at least one embodiment may be implemented by representative code representing and / or defining logic within an integrated circuit (e.g., a processor) stored on a machine-readable medium. For example, a machine-readable medium may include instructions representing various logic within a processor. When read by a machine, the instructions may cause the machine to manufacture logic to perform the techniques described herein. Such representations, referred to as "IP cores," are reusable units of logic for an integrated circuit that may be stored on a tangible, machine-readable medium as a hardware model describing the structure of the integrated circuit. The hardware model may be supplied to various consumers or manufacturing facilities that load the hardware model on a manufacturing machine that manufactures the integrated circuit. The integrated circuit may be manufactured so that the circuit performs the operations associated with any of the embodiments described herein.
[0372] Fig.3232 is a block diagram showing an IP core development system 3200 that can be used to manufacture an integrated circuit to perform operations according to an embodiment. The IP core development system 3200 can be used to generate modular, reusable designs that can be incorporated into a larger design, or for constructing an entire integrated circuit (e.g., a SOC integrated circuit). The design facility 3230 can generate a software simulation 3210 of the IP core design in a high-level programming language (e.g., C++). The software simulation 3210 can be used to design, test, and verify the behavior of the IP core using a simulation model 3212. The simulation model 3212 may include functional, behavioral, and / or timing simulations. A register transfer level (RTL) design 3215 can then be created or synthesized based on the simulation model 3312. The RTL design 3215 is an abstraction of the behavior of an integrated circuit that models the flow of digital signals between hardware registers (including associated logic executed using the modeled digital signals). In addition to the RTL design 3215, a lower-level design at the logic level or transistor level can also be created, designed, or synthesized. Therefore, the specific details of the initial design and simulation can be changed.
[0373] The RTL design 3215 or equivalent may be further synthesized by the design facility into a hardware model 3220, which may be in a hardware description language (HDL) or some other representation of physical design data. The HDL may be further simulated or tested to verify the IP core design. The IP core design may be stored using a non-volatile memory 3240 (e.g., a hard disk, flash memory, or any non-volatile storage medium) for delivery to a third-party manufacturing facility 3265. Optionally, the IP core design may be sent (e.g., via the Internet) via a wired connection 3250 or a wireless connection 3260. The manufacturing facility 3265 may then manufacture an integrated circuit based at least in part on the IP core design. The manufactured integrated circuit may be configured to perform operations according to at least one embodiment described herein.
[0374] Additional Exemplary System-on-Chip Integrated Circuits
[0375] Figure 33-Figure 35 An exemplary integrated circuit and associated graphics processor that can be manufactured using one or more IP cores according to various embodiments described herein are shown. In addition to what is shown, other logic and circuits may also be included, including additional graphics processors / cores, peripheral interface controllers, and general-purpose processor cores.
[0376] Fig.333300 is an example system-on-chip integrated circuit 3300 that can be manufactured using one or more IP cores according to an embodiment. The example integrated circuit 3300 includes one or more application processors 3305 (e.g., CPUs), at least one graphics processor 3310, and may additionally include an image processor 3315 and / or a video processor 3320, any of which may be modular IP cores from the same or multiple different design facilities. The integrated circuit 3300 includes peripheral or bus logic, which includes a USB controller 3325, a UART controller 3330, an SPI / SDIO controller 3335, and an I 2 S / I 2 The integrated circuits may include a display device 3345 coupled to one or more of a high-definition multimedia interface (HDMI) controller 3350 and a mobile industry processor interface (MIPI) display interface 3355. Storage may be provided by a flash subsystem 3360 including flash memory and a flash controller. A memory interface may be provided via a memory controller 3365 for accessing SDRAM or SRAM memory devices. In addition, some integrated circuits include an embedded security engine 3370.
[0377] Fig.34 FIG. 34 is an exemplary graphics processor 3410 illustrating a system-on-chip integrated circuit that may be fabricated using one or more IP cores according to an embodiment. The graphics processor 3410 may be Fig.33 A variation of the graphics processor 3310 of FIG. The graphics processor 3410 includes a vertex processor 3405 and one or more fragment processors 3415A-3415N (e.g., 3415A, 3415B, 3415C, 3415D to 3415N-1 and 3415N). The graphics processor 3410 may execute different shader programs via separate logic, such that the vertex processor 3405 is optimized to perform operations for a vertex shader program, while one or more fragment processors 3415A-3415N perform fragment (e.g., pixel) shading operations for a fragment or pixel shader program. The vertex processor 3405 performs the vertex processing stage of the 3D graphics pipeline and generates primitives and vertex data. The fragment processors 3415A-3415N use the primitives and vertex data generated by the vertex processor 3405 to generate a frame buffer displayed on a display device. In one embodiment, the fragment processors 3415A-3415N are optimized to execute fragment shader programs as provided in the OpenGL API, which can be used to perform similar operations as pixel shader programs as provided in the Direct 3D API.
[0378] In addition, the graphics processor 3410 includes one or more memory management units (MMUs) 3420A-3420B, caches 3425A-3425B, and circuit interconnects 3430A-3430B. The one or more MMUs 3420A-3420B provide a virtual physical address mapping for the graphics processor 3410 (including for the vertex processor 3405 and / or the fragment processors 3415A-3415N), which can reference vertex or image / texture data stored in memory in addition to the vertex or image / texture data stored in the one or more caches 3425A-3425B. In one embodiment, the one or more MMUs 3420-3430B can be synchronized with other MMUs within the system, including with Fig.33 One or more MMUs associated with one or more application processors 3305, image processors 3315, and / or video processors 3320 enable each processor 3305-3320 to participate in a shared or unified virtual memory system. According to an embodiment, one or more circuit interconnects 3430A-3430B enable the graphics processor 3410 to communicate with other IP cores within the SoC via an internal bus of the SoC or via a direct connection.
[0379] Fig.35 is a block diagram illustrating an additional exemplary graphics processor 3510 of a system-on-chip integrated circuit that may be fabricated using one or more IP cores according to an embodiment. The graphics processor 3510 may be Fig.33 A variation of the graphics processor 3310. The graphics processor 3510 includes Fig.34 One or more MMUs 3420A-3420B, caches 3425A-3425B, and circuit interconnects 3430A-3430B of the integrated circuit 3400.
[0380] The graphics processor 3510 includes one or more shader cores 3515A-3515N (e.g., 3515A, 3515B, 3515C, 3515D, 3515E, 3515F to 3515N-1 and 3515N) that provide a unified shader core architecture, wherein a single core or type or core can execute all types of programmable shader code, including shader program code that implements vertex shaders, fragment shaders, and / or compute shaders. The exact number of shader cores present may vary among embodiments and implementations. In addition, the graphics processor 3510 includes an inter-core task manager 3505 that acts as a thread dispatcher for dispatching execution threads to one or more shader cores 3515A-3515N and a tiling unit 3518 for accelerating tiling operations for tile-based rendering, wherein rendering operations for a scene are subdivided in image space, for example to exploit local spatial coherence within a scene or to optimize the use of internal caches.
[0381] The embodiments described herein may be implemented as any one or combination of the following: one or more microchips or integrated circuits interconnected using a motherboard, hardwired logic, software stored by a memory device and executed by a microprocessor, firmware, an application specific integrated circuit (ASIC), and / or a field programmable gate array (FPGA). The term "logic" may include software or hardware and / or a combination of software and hardware as examples.
[0382] Embodiments may, for example, be provided as a computer program product, which may include one or more machine-readable media having machine-executable instructions stored thereon, which, when executed by one or more machines (e.g., a computer, a computer network, or other electronic device), may cause one or more machines to implement operations according to the embodiments described herein. Machine-readable media may include, but are not limited to, floppy disks, optical disks, CD-ROMs (Compact Disc Read Only Memory) and magneto-optical disks, ROMs, RAMs, EPROMs (Erasable Programmable Read Only Memory), EEPROMs (Electrically Erasable Programmable Read Only Memory), magnetic or optical cards, flash memory, or other types of non-transitory machine-readable media suitable for storing machine-executable instructions.
[0383] The statements and / or examples below belong to a specific embodiment or examples thereof. In one or more embodiments, the details in the examples may be used anywhere. The various features of different embodiments or examples may be combined with some included features and other excluded features to suit various applications. Examples may include the subject matter of the embodiments and examples described herein, such as methods, modules for performing actions of the methods, at least one machine-readable medium including instructions, which, when executed by a machine, cause the machine to perform the actions of the methods, or the actions of a device or system. Various components may be units for performing the operations or functions.
[0384] Other embodiments provide a method for sending data between multiple computing nodes in a distributed computing system, the method comprising creating a global view of communication operations to be performed between multiple computing nodes in the distributed computing system, the global view being created using information specific to a machine learning model associated with the distributed computing system; using the global view to determine communication costs of the communication operations; and automatically determining multiple network operations for use when sending data between multiple computing nodes in the distributed computing system.
[0385] One embodiment provides a system for computing and distributing data for distributed training of a neural network, the system comprising a system memory for storing a set of trainable machine learning parameters and a library for facilitating data transfer during distributed training of the neural network; a fabric interface for enabling transmission and reception of data associated with the set of trainable machine learning parameters; a first set of general-purpose processor cores for executing instructions provided by the library, the instructions controlling the data transfer library; and a general-purpose graphics processor for executing computational operations associated with a machine learning framework workflow to generate gradient data for the trainable machine learning parameters, wherein the first set of general-purpose processor cores controls the data transfer library to send and receive training data via the fabric interface during the machine learning framework workflow, the computational operations overlapping with communication operations to send and receive training data via the fabric interface, the communication operations being performed via point-to-point communication primitives provided through the fabric interface.
[0386] Those skilled in the art will recognize from the foregoing description that the broad techniques of the embodiments can be implemented in a variety of forms. Therefore, while the embodiments have been described in conjunction with specific examples thereof, the true scope of the embodiments should not be so limited, as other embodiments will become apparent to the skilled practitioner upon a study of the drawings, specification, and following claims.
Claims
1. A system for computing and distributing data for distributed training of a neural network, the system comprising: a first memory storing first instructions associated with a machine learning framework and second instructions associated with a point-to-point communication primitive for performing a predefined communication operation; a first set of general purpose processor cores that execute the first instructions, the first instructions causing the first set of general purpose processor cores to provide a training workflow for computation of gradients for trainable machine learning parameters and to facilitate transmission and reception of the gradients via the second instructions; as well as a fabric interface that enables transmission and reception of data associated with the trainable machine learning parameters, the fabric interface comprising a circuit module for accelerating execution of the predefined communication operation, wherein the fabric interface is configured to communicatively couple with a plurality of computing nodes configured for distributed training of the neural network, each of the plurality of computing nodes comprising: A graphics processor that performs computational operations associated with the training workflow to generate the gradients for the trainable machine learning parameters, the gradients for the trainable machine learning parameters being automatically exchanged via the fabric interface according to predefined communication operations specified by instructions via the second instructions.
2. The system of claim 1, wherein: The fabric interface is configured to perform the predefined communication operation in response to execution of the instruction of the second instruction.
3. The system of claim 2, the circuit module of the fabric interface comprising a processor for executing the instructions of the second instruction.
4. The system of claim 3, wherein the predefined communication operations include store-and-notify operations and remote procedure calls.
5. The system of claim 3, the predefined communication operations further comprising remote atomic memory operations.
6. The system of claim 3, the predefined communication operations additionally comprising load and gather lists and store and scatter lists.
7. The system of claim 3, wherein the plurality of computing nodes are interconnected via a point-to-point interconnect, at least two of the computing nodes are indirectly interconnected via the fabric interface, and wherein: The fabric interface routes messages between indirectly interconnected computing nodes.
8. The system of claim 7, the fabric interface to route the message between the indirectly interconnected computing nodes based on a target memory address associated with the message.
9. The system of claim 1, further comprising a second memory coupled to the graphics processor, the second memory storing the gradient for the trainable machine learning parameters.
10. The system of claim 9, the fabric interface having a virtual address space mapped to at least a portion of the second memory.
11. The system of claim 10, wherein: The second memory is a physical memory shared between the fabric interface and the graphics processor.
12. The system of claim 11, the graphics processor to store the gradients to the second memory, and the fabric interface to send the gradients from the second memory.
13. A graphics processing unit, comprising: a computation block comprising one or more processing clusters that perform computational operations associated with a machine learning framework workflow that generate gradient data associated with trainable parameters of a neural network; a memory device that stores gradient data during distributed training of the neural network; as well as a fabric interface coupled to the memory device, the fabric interface transmitting gradient data stored in the memory device, the fabric interface comprising a circuit module for accelerating execution of a predefined communication operation, wherein the gradient data is automatically exchanged via the fabric interface according to the predefined communication operation, wherein the memory device is a physical memory device shared with the computing block. 14 . The graphics processing unit of claim 13 , the structure interface comprising a cache that stores gradient data before transmission of the gradient data or after reception of the gradient data.
15. The graphics processing unit of claim 13, wherein: The fabric interface has an address space mapped to at least a portion of the memory device.
16. The graphics processing unit of claim 15, wherein: The computing block and the structural interface have a unified address space.
17. A method of computing and distributing data for distributed training of a neural network, the method comprising: storing first instructions in a first memory, the first instructions being associated with a machine learning framework; storing a second instruction in the first memory, the second instruction being associated with a point-to-point communication primitive for performing a predefined communication operation; enabling transmission and reception of data associated with trainable machine learning parameters via a fabric interface, the fabric interface comprising circuitry modules for accelerating performance of the predefined communication operations, wherein the fabric interface is configured to communicatively couple with a plurality of computing nodes configured for distributed training of the neural network, the plurality of computing nodes being interconnected via a point-to-point interconnect; executing the first instructions via a set of general purpose processor cores, wherein executing the first instructions comprises providing a training workflow for computation of gradients for the trainable machine learning parameters and facilitating transmission and reception of the gradients via the fabric interface using the second instructions; and and executing, via a graphics processor at a compute node among the plurality of compute nodes, computational operations associated with the training workflow, wherein executing the computational operations includes generating the gradients for the trainable machine learning parameters, the gradients for the trainable machine learning parameters being automatically exchanged via the fabric interface in accordance with a predefined communication operation specified by an instruction via the second instruction.
18. The method of claim 17, further comprising executing at least a portion of a second instruction via the fabric interface, the second instruction causing the fabric interface to send the gradient.
19. The method of claim 18, further comprising executing at least a portion of the second instruction via a processor on the fabric interface.
20. The method of claim 17, further comprising mapping a virtual address space of the fabric interface to a unified address space shared with the graphics processor.
21. A non-transitory machine-readable medium storing data which, when read by at least one machine, causes the at least one machine to assemble at least one integrated circuit to perform the calculations of any one of claims 17-20 and distribute data for a method of distributed training of a neural network.
22. A non-transitory machine-readable medium storing instructions that, when executed by one or more processors, cause the one or more processors to perform operations to compute and distribute data for distributed training of a neural network, the operations comprising: storing first instructions in a first memory, the first instructions being associated with a machine learning framework; storing a second instruction in the first memory, the second instruction being associated with a point-to-point communication primitive for performing a predefined communication operation; enabling transmission and reception of data associated with trainable machine learning parameters via a fabric interface, the fabric interface comprising circuitry modules for accelerating performance of the predefined communication operations, wherein the fabric interface is configured to communicatively couple with a plurality of computing nodes configured for distributed training of the neural network, the plurality of computing nodes being interconnected via a point-to-point interconnect; executing the first instructions via a set of general purpose processor cores, wherein executing the first instructions comprises providing a training workflow for computation of gradients for the trainable machine learning parameters and facilitating transmission and reception of the gradients via the fabric interface using the second instructions; and and executing, via a graphics processor at a compute node among the plurality of compute nodes, computational operations associated with the training workflow, wherein executing the computational operations includes generating the gradients for the trainable machine learning parameters, the gradients for the trainable machine learning parameters being automatically exchanged via the fabric interface in accordance with a predefined communication operation specified by an instruction via the second instruction.
23. The non-transitory machine-readable medium of claim 22, further comprising executing at least a portion of a second instruction via the fabric interface, the second instruction causing the fabric interface to send the gradient.
24. The non-transitory machine-readable medium of claim 23, further comprising executing at least a portion of the second instructions via a processor on the fabric interface.
25. The non-transitory machine-readable medium of claim 22, further comprising mapping a virtual address space of the fabric interface to a unified address space shared with the graphics processor.
26. A system for computing and distributing data for distributed training of a neural network, the system comprising: a first memory storing a first set of instructions comprising a machine learning framework and a second set of instructions comprising a set of point-to-point communication primitives for performing a set of predefined communication operations via a fabric interface; the structural interface that enables transmission and reception of data associated with a set of trainable machine learning parameters; a first set of general purpose processor cores that execute the first set of instructions that provide a training workflow for computation of gradients with respect to the trainable machine learning parameters and communicate with the second set of instructions that facilitate transmission and receipt of the gradients via the fabric interface; as well as a graphics processor that performs computational operations associated with the training workflow to generate the gradients for the trainable machine learning parameters, Therein, the fabric interface comprises hardware for accelerating at least a portion of the predefined communication operations or at least a subset of the set of point-to-point primitives.
27. The system of claim 26, the predefined communication operations additionally comprising remote atomic memory operations.
Citation Information
Patent Citations
Performing multi-convolution operations in a parallel processing system
US20160062947A1
System and method for predicting power plant operational parameters utilizing artificial neural network deep learning methodologies
US20170091615A1
