Systolic Arithmetic for Sparse Data
The systolic tensor array architecture in GPUs optimizes sparse data processing by bypassing zero-valued submatrices and using significance map encoding, addressing inefficiencies in existing GPU processing of sparse data and reducing power consumption.
Patent Information
- Application Number
- JP2020189645
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-11-11
- Filing Date
- 2020-11-13
- Publication Date
- 2024-10-16
- Estimated Expiration
- 2040-11-13
AI Technical Summary
Current graphics processing units (GPUs) face limitations in efficiently processing sparse data due to the need for extensive parallel processing techniques, which can lead to inefficiencies and increased power consumption.
Implementing a systolic tensor array architecture within GPUs that optimizes processing of sparse data by bypassing zero-valued submatrices and utilizing significance map encoding to facilitate clock/power gating, enabling efficient computation on compressed or encoded data.
The systolic tensor array architecture significantly enhances the processing efficiency of sparse data by reducing computational overhead and power consumption, allowing for faster and more effective handling of sparse neural network operations.
Smart Images

Figure 0007567149000007 
Figure 0007567149000008 
Figure 0007567149000009
Abstract
Description
[Technical field]
[0001] [Cross reference] This application claims priority to U.S. Provisional Patent Application No. 62 / 935,670, filed November 15, 2019, which is incorporated herein by reference.
[0002] The present disclosure relates generally to data processing, and more particularly, to data processing via general purpose graphics processing units. [Background technology]
[0003] Modern parallel graphics data processing includes systems and methods developed to perform specific operations on graphics data, such as, for example, linear interpolation, tessellation, rasterization, texture mapping, depth testing, etc. Traditionally, graphics processors have used fixed function computation units to process the graphics data. More recently, however, some graphics processors have become programmable, allowing such processors to support a wider range of operations for processing on vertex and fragment data.
[0004] To further increase performance, graphics processors typically implement processing techniques such as pipelining that attempt to process as much graphics data in parallel as possible across various parts of the graphics pipeline. Parallel graphics processors with single instruction, multiple thread (SIMT) architectures are designed to maximize the amount of parallelism within the graphics pipeline. In a SIMT architecture, a group of parallel threads attempts to synchronously execute multiple program instructions as often as possible to improve processing efficiency. A general overview of the software and hardware of the SIMT architecture can be found in Chapter 3, "CUDA Programming," pages 37-51 of Shane Cook (2013). [Brief description of the drawings]
[0005] To allow the above-described functions of the present embodiment to be understood in detail, more specific descriptions of the above-outlined embodiments are described with respect to the embodiments, some of which are illustrated in the accompanying drawings. However, it should be noted that the accompanying drawings illustrate only typical embodiments, and therefore should not be considered as limiting the scope of the embodiments.
[0006] [Figure 1] FIG. 1 is a block diagram illustrating a computer system configured to implement one or more aspects of the embodiments described herein.
[0007] [Figure 2A] 1 shows a parallel processor component. [Figure 2B] 1 shows a parallel processor component. [Figure 2C] 1 shows a parallel processor component. [Figure 2D] 1 shows a parallel processor component.
[0008] [Figure 3A] FIG. 1 is a block diagram of a graphics multiprocessor and a multiprocessor-based GPU. [Figure 3B] FIG. 1 is a block diagram of a graphics multiprocessor and a multiprocessor-based GPU. [Figure 3C] FIG. 1 is a block diagram of a graphics multiprocessor and a multiprocessor-based GPU.
[0009] [Figure 4A] 1 illustrates an exemplary architecture in which multiple GPUs are communicatively coupled to multiple multi-core processors. [Figure 4B] 1 illustrates an exemplary architecture in which multiple GPUs are communicatively coupled to multiple multi-core processors. [Figure 4C]1 illustrates an exemplary architecture in which multiple GPUs are communicatively coupled to multiple multi-core processors. [Figure 4D] 1 illustrates an exemplary architecture in which multiple GPUs are communicatively coupled to multiple multi-core processors. [Figure 4E] 1 illustrates an exemplary architecture in which multiple GPUs are communicatively coupled to multiple multi-core processors. [Figure 4F] 1 illustrates an exemplary architecture in which multiple GPUs are communicatively coupled to multiple multi-core processors.
[0010] [Diagram 5] 1 shows a graphics processing pipeline.
[0011] [Figure 6] Shown is a machine learning software stack.
[0012] [Figure 7] 1 illustrates a general purpose graphics processing unit.
[0013] [Figure 8] A multi-GPU computing system is shown.
[0014] [Figure 9A] 1 illustrates layers of an exemplary deep neural network. [Figure 9B] 1 illustrates layers of an exemplary deep neural network.
[0015] [Figure 10] 1 illustrates an exemplary recurrent neural network.
[0016] [Figure 11] We demonstrate training and deploying deep neural networks.
[0017] [Figure 12A]FIG. 2 is a block diagram illustrating distributed learning.
[0018] [Figure 12B] FIG. 1 is a block diagram illustrating a programmable network interface for accelerating distributed learning.
[0019] [Figure 13] 1 illustrates an exemplary inference system-on-chip (SOC) suitable for performing inference using a trained model.
[0020] [Figure 14] FIG. 1 is a block diagram of a processing system.
[0021] [Figure 15A] 1 illustrates a computing system and a graphics processor. [Figure 15B] 1 illustrates a computing system and a graphics processor. [Figure 15C] 1 illustrates a computing system and a graphics processor.
[0022] [Figure 16A] 1 illustrates a block diagram of an additional graphics processor and computational accelerator architecture. [Figure 16B] 1 illustrates a block diagram of an additional graphics processor and computational accelerator architecture. [Figure 16C] 1 illustrates a block diagram of an additional graphics processor and computational accelerator architecture.
[0023] [Figure 17] FIG. 2 is a block diagram of a graphics processing engine of the graphics processor.
[0024] [Figure 18A] 1 illustrates thread execution logic including an array of processing elements used in a graphics processor core. [Figure 18B] 1 illustrates thread execution logic including an array of processing elements used in a graphics processor core.
[0025] [Figure 19] Indicates additional execution units.
[0026] [Figure 20] FIG. 2 is a block diagram illustrating a graphics processor instruction format.
[0027] [Figure 21] FIG. 1 is a block diagram of an additional graphics processor architecture.
[0028] [Figure 22A] 2 shows a graphics processor command format and a command sequence. [Figure 22B] 2 shows a graphics processor command format and a command sequence.
[0029] [Diagram 23] 1 illustrates an exemplary graphics software architecture for a data processing system.
[0030] [Figure 24A] FIG. 1 is a block diagram showing an IP core development system.
[0031] [Figure 24B] 1 shows a cross-sectional view of an integrated circuit package assembly.
[0032] [Figure 24C] 1 illustrates a package assembly that includes multiple units of hardware logic chiplets connected to a substrate (e.g., a base die).
[0033] [Figure 24D] 1 illustrates a package assembly including replaceable chiplets.
[0034] [Diagram 25] FIG. 1 is a block diagram illustrating an exemplary system on a chip integrated circuit.
[0035] [Figure 26A] FIG. 1 is a block diagram illustrating an example graphics processor for use within a SoC. [Figure 26B] FIG. 1 is a block diagram illustrating an example graphics processor for use within a SoC.
[0036] [Figure 27] 1 illustrates an additional execution unit according to one embodiment.
[0037] [Figure 28] 4 illustrates a matrix operation performed by an instruction pipeline according to one embodiment.
[0038] [Figure 29A] 1 illustrates details of a hardware-based systolic tensor array in accordance with some embodiments. [Figure 29B] 1 illustrates details of a hardware-based systolic tensor array in accordance with some embodiments.
[0039] [Diagram 30] 1 illustrates a processing resource including a systolic tensor array with sparse optimization, according to one embodiment.
[0040] [Figure 31A] 1 illustrates a system for bypassing zero-valued sub-matrices, according to an embodiment. [Figure 31B] 1 illustrates a system for bypassing zero-valued sub-matrices, according to an embodiment.
[0041] [Diagram 32]1 illustrates a computational resource including logic for bypassing a systolic tensor array for operations on submatrices containing a single nonzero value.
[0042] [Diagram 33] 1 illustrates a computing architecture configured to enable compressed transmission of neural network data, according to one embodiment.
[0043] [Figure 34A] 1 illustrates significance map encoding for sparse neural network data, according to an embodiment. [Figure 34B] 1 illustrates significance map encoding for sparse neural network data, according to an embodiment.
[0044] [Diagram 35] We demonstrate the use of significance map data to facilitate bypass or clock / power gating of elements of a systolic tensor array.
[0045] [Diagram 36] 1 illustrates a system for transforming sparse neural network data to compact non-zero coefficients, according to one embodiment.
[0046] [Figure 37A] 1 shows a logic unit for performing transform and inverse transform on sparse neural network data. [Figure 37B] 1 shows a logic unit for performing transform and inverse transform on sparse neural network data.
[0047] [Figure 38A] We show how to generate and use transformation matrices on a graphics processor. [Figure 38B] We show how to generate and use transformation matrices on a graphics processor.
[0048] [Figure 39] 1 shows a version of a systolic tensor array configured to operate on compressed or encoded data.
[0049] [Diagram 40] A method for performing systolic arithmetic on compressed or encoded data is presented.
[0050] [Diagram 41] FIG. 1 is a block diagram of a computing device including a graphics processor, according to one embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0051] A graphics processing unit (GPU) is communicatively coupled to a host / processor core to, for example, accelerate graphics processing, machine learning processing, pattern analysis processing, and / or 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 NV link). Alternatively, the GPU may be integrated on the same package or chip as the core and communicatively coupled to the core via an internal processor bus / interconnect (i.e., internal to the package or chip). Regardless of how the GPU is connected, the processor core may assign work to the GPU in the form of a sequence of commands / instructions contained in a work descriptor. The GPU then uses dedicated circuitry / logic to efficiently process these commands / instructions.
[0052] In the following description, numerous specific details are set forth to provide a more thorough understanding. However, it will be apparent to one 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 embodiments. System Overview
[0053] 1 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 that communicate over an interconnect path that may include a memory hub 105. The memory hub 105 may be a separate component in 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 enables the computing system 100 to receive input from one or more input devices 108. Additionally, the I / O hub 107 may enable a display controller, which may be included within 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.
[0054] The processing subsystem 101 includes one or more parallel processors 112 coupled to the memory hub 105, for example, via a bus or other communication link 113. The communication link 113 may be one of any number of standard-based communication link technologies or protocols, such as, but not limited to, PCI Express, or may be a vendor-specific communication interface or fabric. The one or more parallel processors 112 may form a computationally intensive parallel or vector processing system that may include multiple processing cores and / or processing clusters, such as a Many Integrated Core (MIC) processor. For example, the one or more parallel processors 112 form a graphics processing subsystem that can output pixels to one of 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 display interface (not shown) that allows for direct connection to one or more display devices 110B.
[0055] 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 add-in devices 120. The add-in devices 120 may also include, for example, one or more external graphic processor devices, graphics cards, and / or computational accelerators. 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 a Wi-Fi, Bluetooth, Near Field Communication (NFC), or other network device including one or more wireless devices.
[0056] Computing system 100 may include other components not explicitly shown, including USB or other port connections, optical storage drives, video capture devices, and the like, which may also be connected to I / O hub 107. The communication paths interconnecting the various components in FIG. 1 may be implemented using any suitable protocol, such as a Peripheral Component Interconnect (PCI) based protocol (e.g., PCI-Express), or may be implemented using any suitable protocol, such as NV-Link high speed interconnect, Compute Express Link™ (CXL™) (e.g., CXL.mem), Infinity Fabric (IF), Ethernet (IEEE 802.3), remote direct memory access (RDMA), InfiniBand, Internet Wide Area RDMA Protocol (iWARP), Transmission Control Protocol (TCP), User Datagram Protocol (UDP), quick UDP Internet Connections (QUIC), RDMA over Converged Ethernet (RoCE), Intel QuickPath Interconnect (QPI), Intel Ultra Path Interconnect (UPI), Intel On-Chip System Fabric (IOSF), Omnipath, HyperTransport, Advanced Microcontroller Bus Architecture (AMBA) interconnect, OpenCAPI, Gen-Z, Cache Coherent Interconnect for Accelerators, or any other suitable protocol. (CCIX), 3GPP Long Term Evolution (LTE) (4G), 3GPP5G, or any other bus or point-to-point communication interface and / or protocol, as well as variations thereof, or wired or wireless interconnection protocols known in the art.In some examples, data may be copied or stored in a virtualized storage node using a protocol such as non-volatile memory express (NVMe) over Fabrics (NVMe-oF) or NVMe.
[0057] The one or more parallel processors 112 may incorporate circuitry optimized for graphics and video processing, including, for example, video output circuitry, constituting a graphics processing unit (GPU). Alternatively or additionally, the one or more parallel processors 112 may incorporate circuitry optimized for general purpose processing, while retaining an underlying computational architecture, as described in more detail later in this specification. The components of the computing system 100 may be integrated with one or more other system elements on a single integrated circuit. For example, the one or more parallel processors 112, the memory hub 105, the processor 102, and the 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 within a single package to form a system-in-package (SIP) configuration. In one embodiment, at least some 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 in a modular computing system.
[0058] It should be understood that the computing system 100 shown here is exemplary and that variations and modifications are possible. The connection topology, including the number and configuration of bridges, the number of processors 102, and the number of parallel processors 112, may be modified as desired. For example, the system memory 104 may be directly connected to the processors 102 without going through a bridge, while other devices communicate with the system memory 104 through the memory hub 105 and the processors 102. In other alternative topologies, the parallel processors 112 are connected to the I / O hub 107 rather than the memory hub 105, or directly to one of the one or more processors 102. In other embodiments, the I / O hub 107 and the memory hub 105 may be integrated into a single chip. It is also possible for two or more sets of processors 102 to be attached via multiple sockets, which may be coupled to two or more instances of the parallel processors 112.
[0059] Some of the specific components illustrated 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 omitted. Additionally, some architectures may use different terminology for components similar to those illustrated in FIG. 1. For example, in some architectures, memory hub 105 may be referred to as a northbridge, while I / O hub 107 may be referred to as a southbridge.
[0060] 2A illustrates a parallel processor 200. The parallel processor 200 may be a GPU, a GPGPU, or the like as described herein. Various components of the parallel processor 200 may be implemented using one or more integrated circuit devices, such as a programmable processor, an application specific integrated circuit (ASIC), or a field programmable gate array (FPGA). The illustrated parallel processor 200 may be one or more of the parallel processors 112 illustrated in FIG. 1.
[0061] Parallel processor 200 includes parallel processing units 202. The parallel processing units include I / O units 204 that enable communication with other devices, including other instances of parallel processing units 202. I / O units 204 may be directly connected to other devices. For example, I / O units 204 are connected to other devices through the use of a hub or switch interface, such as memory hub 105. The connection between memory hub 105 and I / O units 204 forms communication link 113. Within parallel processing units 202, I / O units 204 are connected to host interface 206 and memory crossbar 216, where host interface 206 receives commands directing the execution of processing operations and memory crossbar 216 receives commands directing the execution of memory operations.
[0062] When the host interface 206 receives command buffers via the I / O unit 204, the host interface 206 may direct work operations to the front end 208 to execute those commands. In one embodiment, the front end 208 is coupled to a scheduler 210, which is configured to distribute multiple commands or other work items to the processing cluster array 212. The scheduler 210 ensures that the processing cluster array 212 is properly configured and in a valid state before tasks are distributed to the processing clusters of the processing cluster array 212. The scheduler 210 may be implemented via firmware logic running on a microcontroller. The microcontroller-implemented scheduler 210 is configurable to perform complex scheduling and work distribution operations at a coarse-grained and fine-grained level, allowing for rapid preemption and context switching of threads running on the processing cluster array 212. Preferably, the host software may attest the workload to be scheduled to the processing cluster array 212 via one of multiple graphics processing doorbells. In other examples, polling for new workloads or interrupts may be used to identify or indicate the availability of work to be performed, and the workload may then be automatically distributed among the processing cluster arrays 212 by scheduler 210 logic in the scheduler microcontroller.
[0063] The processing cluster array 212 may include up to "N" processing clusters (e.g., cluster 214A, cluster 214B, up to cluster 214N). Each cluster 214A-214N of the processing cluster array 212 may execute multiple parallel threads. The scheduler 210 may assign work to the clusters 214A-214N of the processing cluster array 212 using various scheduling and / or work distribution algorithms that may vary depending on the workload encountered by each type of program or computation. Scheduling may be handled dynamically by the scheduler 210 or may be assisted in part by compiler logic during compilation of program logic configured for execution by the processing cluster array 212. Optionally, different clusters 214A-214N of the processing cluster array 212 may be assigned for processing different types of programs or for performing different types of computations.
[0064] The processing cluster array 212 may be configured to perform various types of parallel processing operations. For example, the processing cluster array 212 may be configured to perform general-purpose parallel computing operations. For example, the processing cluster array 212 may include logic for performing processing tasks including filtering video and / or audio data, performing modeling operations including physics operations, and performing data transformations.
[0065] The processing cluster array 212 is configured to perform parallel graphics processing operations. In such an embodiment in which the parallel processor 200 is configured to perform graphics processing operations, the processing cluster array 212 may include additional logic to support the execution of such graphics processing operations, including, for example, but not limited to, texture sampling logic for performing texture operations, as well as tessellation logic and other vertex processing logic. Additionally, the 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. The parallel processing units 202 may transfer data from the system memory for processing via the I / O units 204. During processing, the transferred data may be stored in an on-chip memory (e.g., the parallel processor memory 222) and then written back to the system memory during processing.
[0066] In embodiments that use parallel processing units 202 to perform graphics processing, scheduler 210 may be configured to divide the processing workload into tasks of approximately equal size so that graphics processing operations can be better distributed across multiple clusters 214A-214N of processing cluster array 212. In some of these 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 processing to generate 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 transmitted between clusters 214A-214N for further processing.
[0067] During operation, the processing cluster array 212 may receive processing tasks to be executed via the scheduler 210, which receives commands from the front end 208 that define the processing tasks. 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 that define how the data is to be processed (e.g., which program is to be executed). The scheduler 210 may be configured to fetch the index corresponding to the task or may receive the index from the front end 208. The front end 208 may be configured to ensure that the processing cluster array 212 is configured in a valid state before a workload specified by an incoming command buffer (e.g., a batch buffer, a push buffer, etc.) is initiated.
[0068] Each of the one or more instances of 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 multiple partition units (e.g., partition unit 220A, partition unit 220B, up to partition unit 220N), each of which may be coupled to a portion (e.g., a memory unit) of the parallel processor memory 222. The number of partition units 220A-220N may be configured to be equal to the number of memory units, such that a first partition unit 220A has a corresponding first memory unit 224A, a second partition unit 220B has a corresponding second memory unit 224B, and an Nth partition unit 220N has a corresponding Nth memory unit 224N. In other embodiments, the number of partition units 220A-220N may not be equal to the number of memory devices.
[0069] The memory units 224A-224N may include various types of memory devices, including dynamic random access memory (DRAM) or graphic random access memory, such as synchronous graphic random access memory (SGRAM), including graphic double data rate (GDDR) memory. Optionally, 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 appreciate 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 across the memory units 224A-224N, allowing the partition 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, the local instance of the parallel processor memory 222 may be eliminated in favor of a unified memory design that uses the system memory in conjunction with a local cache memory.
[0070] Optionally, any one of the clusters 214A-214N of the processing cluster array 212 is capable of processing data written to any of the memory units 224A-224N in the parallel processor memory 222. The memory crossbar 216 may be configured to forward the output of each cluster 214A-214N to any of the partition units 220A-220N or to another cluster 214A-214N, which may perform additional processing operations on the output. Each of the clusters 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 that includes a memory crossbar 216, the memory crossbar 216 has a connection to a memory interface 218 to communicate with the I / O units 204, and a connection to a local instance of a parallel processor memory 222, allowing processing units in different processing clusters 214A-214N to communicate with system memory or other memory that is not local to the parallel processing units 202. In general, the memory crossbar 216 may be capable of using virtual channels to separate traffic streams between the clusters 214A-214N and the partition units 220A-220N, for example.
[0071] While a single instance of parallel processing unit 202 is shown in 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-in card, or multiple add-in cards may be interconnected. For example, parallel processor 200 may be an add-in device, such as add-in device 120 of FIG. 1, which may be a graphics card, such as a separate graphics card including one or more GPUs, one or more memory devices, and a device-to-device interface or a network interface or a fabric interface. Different instances of parallel processing unit 202 may be configured to interoperate even if the different instances have different numbers of processing cores, different amounts of local parallel processor memory, and / or other configuration differences. Optionally, some instances of parallel processing unit 202 may include higher precision floating point units compared to other instances. Systems incorporating one or more instances of parallel processing unit 202 or parallel processor 200 may be implemented in a variety of configurations and form factors, including, but not limited to, desktop, laptop, or handheld personal computers, servers, workstations, game consoles, and / or embedded systems. An orchestrator may form composite nodes with one or more of non-aggregated processor resources, cache resources, memory resources, storage resources, and networking resources for workload performance.
[0072] FIG. 2B is a block diagram of partition unit 220. Partition unit 220 may be one instance of partition units 220A-220N of FIG. 2A. As shown, partition unit 220 includes L2 cache 221, frame buffer interface 225, and ROP 226 (raster processing unit). L2 cache 221 is a read / write cache configured to execute load and store operations received from memory crossbar 216 and ROP 226. Read misses and urgent writeback requests are output by L2 cache 221 to frame buffer interface 225 for processing. Updates may also be sent via frame buffer interface 225 to a frame buffer for processing. In one embodiment, frame buffer interface 225 communicates with a memory unit in a parallel processor memory, such as one of memory units 224A-224N of FIG. 2A (e.g., in parallel processor memory 222). Additionally or alternatively, the partition unit 220 may communicate with one of multiple memory units in the parallel processor memory via a memory controller (not shown).
[0073] In a graphics application, the ROP 226 is a processing unit that performs raster operations such as stencil, z-test, blending, etc. The ROP 226 then outputs the processed graphics data, which is stored in the graphics memory. In some embodiments, the ROP 226 includes or is coupled to a CODEC 227 that includes compression logic to compress depth or color data that is written to the memory or L2 cache 221 and to decompress depth or color data that is read from the memory or L2 cache 221. The compression logic may be lossless logic that utilizes one or more of a number of compression algorithms. The type of compression performed by the CODEC 227 may vary based on statistical characteristics of the data to be compressed. For example, in one embodiment, delta color compression is performed on the depth and color data on a tile-by-tile basis. In one embodiment, the CODEC 227 includes compression and decompression logic that may compress and decompress computational data associated with machine learning operations. The CODEC 227 may compress sparse matrix data for sparse machine learning operations, for example. CODEC 227 may also compress sparse matrix data encoded in a sparse matrix format (e.g., coordinate list encoding (COO), compressed sparse row (CSR), compressed sparse column (CSC), etc.) to generate compressed encoded sparse matrix data. The compressed encoded sparse matrix data may be decompressed and / or decoded before being processed by the processing elements, or the processing elements may be configured to use compressed data, encoded data, or compressed and encoded data for processing.
[0074] ROP 226 may be included within each processing cluster (e.g., clusters 214A-214N of FIG. 2A) instead of within partition unit 220. In such an embodiment, read and write requests to pixel data, instead of pixel fragment data, are transmitted via memory crossbar 216. The processed graphics data may be displayed on a display device, such as one of one or more display devices 110 of FIG. 1, may be routed by processor 102 for further processing, or may be routed by one of the processing entities in parallel processor 200 of FIG. 2A for further processing.
[0075] FIG. 2C is a block diagram of a processing cluster 214 in a parallel processing unit. For example, the processing cluster is an instance of one of the processing clusters 214A-214N of FIG. 2A. The processing cluster 214 may be configured to execute many threads in parallel, where the term "thread" refers to an instance of a particular program executing on a particular set of input data. Optionally, single-instruction, multiple-data (SIMD) instruction issue techniques may be used to support parallel execution of multiple threads without providing multiple independent instruction units. Alternatively, single-instruction, multiple-thread (SIMT) techniques may be used to support parallel execution of multiple threads that are generally synchronized, using a common instruction unit configured to issue instructions to a set of processing engines in each processing cluster. Unlike a SIMD execution regime, in which all processing engines typically execute identical instructions, SIMT execution allows different threads to more easily follow divergent execution paths through a particular thread program. Those skilled in the art will appreciate that a SIMD processing regime represents a functional subset of a SIMT processing regime.
[0076] The operation of the processing clusters 214 may be controlled through a pipeline manager 232 that distributes processing tasks to the SIMT parallel processors. The pipeline manager 232 receives instructions from the scheduler 210 of FIG. 2A and manages the execution of these instructions through the graphics multiprocessor 234 and / or the 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 may be included in the processing clusters 214. One or more instances of the graphics multiprocessor 234 may be included in the processing clusters 214. The graphics multiprocessor 234 may process data, and the data crossbar 240 may be used to distribute the processed data to one of several possible destinations, including other shader units. The pipeline manager 232 may facilitate the distribution of the processed data by specifying the destination of the processed data to be distributed via the data crossbar 240.
[0077] Each graphics multiprocessor 234 in a processing cluster 214 may include an identical set of function execution logic (e.g., arithmetic logic unit, load-store unit, etc.). The function execution logic may be configured in a pipelined manner such that a new instruction may be issued before a previous instruction is completed. The function execution logic supports a variety of operations including integer and floating point arithmetic, comparison operations, Boolean operations, bit shifts, and calculation of various algebraic functions. The same functional unit hardware may be utilized to perform different operations, and any combination of functional units may be present.
[0078] Instructions transmitted to the processing cluster 214 constitute a thread. A set of threads executed among a set of parallel processing engines is a thread group. A thread group executes the same program on different input data. Each thread in a thread group may be assigned to a different processing engine in the graphics multiprocessor 234. A thread group may include fewer threads than the number of processing engines in the graphics multiprocessor 234. When a thread group includes fewer threads than the number of processing engines, one or more of the processing engines may be idle during a cycle in which the thread group is being processed. A thread group may also include more threads than the number of processing engines in the graphics multiprocessor 234. When a thread group includes more threads than the number of processing engines in the graphics multiprocessor 234, processing may be executed over consecutive clock cycles. Optionally, multiple thread groups may be executed simultaneously on the graphics multiprocessor 234.
[0079] The graphics multiprocessor 234 may include an internal cache memory for performing load and store operations. Optionally, the graphics multiprocessor 234 may go beyond the internal cache and use a cache memory (e.g., a level 1 (L1) cache 248) in the processing cluster 214. Each graphics multiprocessor 234 may also access a level 2 (L2) cache in a partition unit (e.g., partition units 220A-220N in FIG. 2A) that is shared among all processing clusters 214, and may use each graphics multiprocessor 234 to transfer data between multiple threads. The graphics multiprocessor 234 may also access an off-chip global memory, which may include one or more of the local parallel processor memories and / or system memories. Any memory outside the parallel processing unit 202 may be used as a global memory. An embodiment in which the processing cluster 214 includes multiple instances of the graphics multiprocessor 234 may share common instructions and data, which may be stored in the L1 cache 248.
[0080] Each processing cluster 214 may include a memory management unit (MMU) 245 configured to map virtual addresses to physical addresses. In other embodiments, one or more instances of MMU 245 may reside in memory interface 218 of FIG. 2A. MMU 245 includes a set of page table entries (PTEs) used to map virtual addresses to physical addresses of tiles and, optionally, to cache line indexes. MMU 245 may include an address translation lookaside buffer (TLB) or cache or L1 cache that may reside in graphics multiprocessor 234 or processing cluster 214. The physical addresses are processed to distribute surface data access locality and enable efficient request interleaving across multiple partition units. The cache line index may be used to determine whether a request for a cache line is a hit or a miss.
[0081] 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-texture mapping operations, such as determining texture sample locations, reading texture data, and filtering the texture data. The texture data is read from an internal texture L1 cache (not shown), or in some embodiments, the texture data is read 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 provides the processed tasks to another processing cluster 214 for further processing, or outputs the processed tasks to the data crossbar 240 for storage in the L2 cache, local parallel processor memory, or system memory via the memory crossbar 216. A preROP 242 (pre-raster processing unit) is configured to receive data from the graphics multiprocessor 234 and send data to the ROP unit, which may be co-located with a partition unit as described herein (e.g., partition units 220A-220N of FIG. 2A). The preROP 242 unit may perform optimizations for color blending, organize pixel color data, and perform address conversion.
[0082] It should be understood that the core architecture described herein is illustrative and that variations and modifications are possible. Any number of processing units may be included within the processing clusters 214, such as, for example, a graphics multiprocessor 234, a texture unit 236, a preROP 242, etc. Additionally, while only one processing cluster 214 is shown, the parallel processing units described herein may include any number of instances of processing clusters 214. Optionally, each processing cluster 214 may be configured to operate independently of the other processing clusters 214, using separate and distinct processing units, L1 caches, L2 caches, etc.
[0083] 2D illustrates an example of a graphics multiprocessor 234, where the graphics multiprocessor 234 is coupled to a pipeline manager 232 of a 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 interconnect 268. Additionally, the graphics multiprocessor 234 may include a tensor and / or ray tracing core 263 that includes hardware logic for accelerating matrix and / or ray tracing operations.
[0084] The instruction cache 252 may receive a stream of instructions to be executed from the pipeline manager 232. The instructions are cached in the instruction cache 252 and dispatched for execution by the instruction unit 254. The instruction unit 254 may dispatch the instructions as thread groups (e.g., warps), with each thread of a thread group being assigned to a different execution unit in the GPGPU core 262. An instruction may access any address space, local, shared, or global, by specifying an address in the unified address space. An address mapping unit 256 may be used to translate addresses in the unified address space into separate memory addresses accessible by the load / store unit 266.
[0085] Register file 258 provides a set of registers for the functional units of graphics multiprocessor 234. Register file 258 provides temporary storage for operands connected to the data paths of the functional units (e.g., GPGPU cores 262, load / store unit 266) of graphics multiprocessor 234. Register file 258 may be divided among each of the functional units such that each functional unit is assigned a dedicated portion of register file 258. For example, register file 258 may be divided among different warps being executed by graphics multiprocessor 234.
[0086] Each of the GPGPU cores 262 may include a floating-point unit (FPU) and / or an integer arithmetic logic unit (ALU) used to execute instructions of the graphics multiprocessor 234. In some implementations, the GPGPU cores 262 may include hardware logic that may otherwise be present in the tensor and / or ray tracing cores 263. The GPGPU cores 262 may be similar in architecture or may differ in architecture. For example, in one embodiment, a first portion of the GPGPU cores 262 includes a single-precision FPU and an integer ALU, while a second portion of the GPGPU cores includes a double-precision FPU. Optionally, the FPUs may implement the IEEE 754-2008 standard for floating-point arithmetic or may enable variable-precision floating-point arithmetic. Additionally, the graphics multiprocessor 234 may include one or more fixed function units or special function units for performing special functions, such as rectangle copy operations or pixel blending operations. One or more of the GPGPU cores may also include fixed or special function logic.
[0087] GPGPU core 262 may include SIMD logic capable of executing a single instruction on multiple sets of data. Optionally, GPGPU core 262 may physically execute SIMD4, SIMD8, and SIMD16 instructions, and logically execute SIMD1, SIMD2, and SIMD32 instructions. SIMD instructions for the GPGPU core may be generated by a shader compiler at compile time, or may be generated automatically during execution of 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 may be executed via a single SIMD instruction. For example, in one embodiment, eight SIMT threads performing the same or similar operations may be executed in parallel via a single SIMD8 logic unit.
[0088] The memory and cache interconnect 268 is an interconnect network connecting each of the functional units of the graphics multiprocessor 234 to the register file 258 and the shared memory 270. For example, 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 may operate at the same frequency as the GPGPU cores 262, so that data transfers between the GPGPU cores 262 and the register file 258 are very low latency. The shared memory 270 may be used to enable communication between threads executing on the functional units in the graphics multiprocessor 234. The cache memory 272 may be used as a data cache, for example, to cache texture data communicated between the functional units and the texture unit 236. The shared memory 270 may also be used as a program-managed cache. The shared memory 270 and the cache memory 272 may be coupled to the data crossbar 240 to enable communication with other components of the processing cluster. Threads executing on GPGPU cores 262 may programmatically store data in shared memory in addition to the automatically cached data stored in cache memory 272.
[0089] 3A-3C show additional graphics multiprocessors according to embodiments. FIGS. 3A-3B show graphics multiprocessors 325, 350 that may be used in conjunction with and in place of one of the graphics multiprocessors 234 of FIG. 2C. Thus, any disclosure of any feature in combination with the graphics multiprocessor 234 also discloses the corresponding combination with the graphics multiprocessor 325, 350, but is not limited to such. FIG. 3C shows a graphics processing unit (GPU) 380 that includes a dedicated set of graphics processing resources arranged in multicore groups 365A-365N corresponding to the graphics multiprocessors 325, 350. The illustrated graphics multiprocessors 325, 350 and multicore groups 365A-365N may be streaming multiprocessors (SMs) capable of simultaneous execution of multiple execution threads.
[0090] The graphics multiprocessor 325 of FIG. 3A includes multiple additional instances of execution resource units compared to the graphics multiprocessor 234 of FIG. 2D. 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 sets of graphics or computation execution units (e.g., GPGPU cores 336A-336B, tensor cores 337A-337B, ray tracing cores 338A-338B), and multiple sets of load / store units 340A-340B. The execution resource units have a common instruction cache 330, texture and / or data cache memory 342, and shared memory 346.
[0091] Various components may communicate via an interconnect fabric 327. The interconnect fabric 327 may include one or more crossbar switches to enable communication between various components of the graphics multiprocessor 325. The interconnect fabric 327 may be a separate high-speed network fabric layer on which each component of the graphics multiprocessor 325 is stacked. Multiple components of the graphics multiprocessor 325 communicate with remote components via the interconnect fabric 327. For example, the cores 336A-336B, 337A-337B, and 338A-338B may each communicate with a shared memory 346 via the interconnect fabric 327. The interconnect fabric 327 may arbitrate communication within the graphics multiprocessor 325 to ensure fair bandwidth allocation between the components.
[0092] Graphics multiprocessor 350 of FIG. 3B includes multiple sets of execution resources 356A-356D, each set including multiple instruction units, register files, GPGPU cores, and load store units as shown in FIG. 2D and FIG. 3A. Execution resources 356A-356D may work in conjunction with texture units 360A-360D for texture processing while sharing shared instruction cache 354 and shared memory 353. For example, execution resources 356A-356D may share instruction cache 354 and shared memory 353, as well as multiple instances of texture and / or data cache memories 358A-358B. The various components may communicate via interconnect fabric 352, similar to interconnect fabric 327 of FIG. 3A.
[0093] Those skilled in the art will appreciate that the architectures depicted in Figures 1, 2A-2D, and 3A-3B are for illustrative purposes only and do not limit the scope of the present embodiments. Thus, the techniques described herein may be implemented on any suitably 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 CPUs, one or more parallel processing units, such as parallel processing unit 202 of Figure 2A, and one or more graphics processors or application-specific processing units, without departing from the scope of the embodiments described herein.
[0094] A parallel processor or GPGPU as described herein may be communicatively coupled to a host / processor core to accelerate graphics processing, machine learning processing, pattern analysis processing, and various general-purpose GPU (GPGPU) functions. The GPU may be communicatively coupled to the host processor / core via a bus or other interconnect (e.g., a high-speed interconnect such as PCIe, NV Link, or other known, standard, or proprietary protocols). In other embodiments, the GPU may be integrated on the same package or chip as the cores and communicatively coupled to the cores via an internal processor bus / interconnect (i.e., internal to the package or chip). Regardless of how the GPU is connected, the processor core may assign work to the GPU in the form of a sequence of commands / instructions contained in a work descriptor for the GPU. The GPU then uses dedicated circuitry / logic to efficiently process these commands / instructions.
[0095] 3C illustrates a graphics processing unit (GPU) 380 that includes a dedicated set of graphics processing resources arranged into multi-core groups 365A-365N. Although details of only a single multi-core group 365A are described, it should be understood that the other multi-core groups 365B-365N may be provided with the same or similar sets of graphics processing resources. The details described with respect to multi-core groups 365A-365N may also apply to any of the graphics multiprocessors 234, 325, 350 described herein.
[0096] As shown, multi-core group 365A may include a set of graphics cores 370, a set of tensor cores 371, and a set of ray tracing cores 372. Scheduler / dispatcher 368 schedules and dispatches the graphics threads to execute on the various cores 370, 371, 372. A set of register files 369 stores operand values used by cores 370, 371, 372 during execution of the graphics threads. These may include, for example, integer registers for storing integer values, floating point registers for storing floating point values, vector registers for storing packed data elements (integer and / or floating point data elements), and tile registers for storing tensor / matrix values. The tile registers may be implemented as a combined set of vector registers.
[0097] One or more combined level 1 (L1) cache and shared memory units 373 store graphics data such as texture data, vertex data, pixel data, ray data, bounding volume data, etc., locally within each multicore group 365A. One or more texture units 374 may also be used to perform texturing operations such as texture mapping and sampling. A level 2 (L2) cache 375, shared by all or a subset of the multicore groups 365A-365N, stores graphics data and / or instructions for multiple concurrent graphics threads. As shown, the L2 cache 375 may be shared among multiple multicore groups 365A-365N. One or more memory controllers 367 couple the GPU 380 to memory 366, which may be system memory (e.g., DRAM) and / or dedicated graphics memory (e.g., GDDR6 memory).
[0098] Input / output (I / O) circuitry 363 couples GPU 380 to one or more I / O devices 362, such as a digital signal processor (DSP), a network controller, or a user input device. An on-chip interconnect may be used to couple I / O device 362 to GPU 380 and memory 366. One or more I / O memory management units (IOMMUs) 364 of I / O circuitry 363 directly couple I / O device 362 to system memory 366. Optionally, IOMMU 364 manages multiple sets of page tables for mapping virtual addresses to physical addresses in system memory 366. I / O device 362, CPU 361, and GPU 380 may then share the same virtual address space.
[0099] In one implementation of IOMMU 364, IOMMU 364 supports virtualization. In this case, IOMMU 364 may manage a first set of page tables for mapping guest / graphics virtual addresses to guest / graphics physical addresses and a second set of page tables for mapping guest / graphics physical addresses to system / host physical addresses (e.g., in system memory 366). The base addresses of each of the first set of page tables and the second set of page tables may be stored in control registers and swapped out on a context switch (e.g., so that a new context is provided with access to the associated set of page tables). Although not shown in FIG. 3C, each of cores 370, 371, 372 and / or multicore groups 365A-365N may include a translation lookaside buffer (TLB) for caching guest virtual to guest physical, guest physical to host physical, and guest virtual to host physical translations.
[0100] The CPU 361, GPU 380 and I / O devices 362 may be integrated onto a single semiconductor chip and / or chip package. The depicted memory 366 may be integrated onto the same chip or may be coupled to a memory controller 367 via an off-chip interface. In one implementation, the memory 366 includes GDDR6 memory that shares the same virtual address space as other physical system-level memory, although the underlying principles described herein are not limited to this particular implementation.
[0101] Tensor cores 371 may include multiple execution units specifically designed to perform matrix operations, which are fundamental computational operations used to perform deep learning processes. For example, simultaneous matrix multiplication operations may be used for neural network training and inference. Tensor cores 371 may perform matrix operations using a variety of operand precisions, including single-precision floating point (e.g., 32 bits), half-precision floating point (e.g., 16 bits), integer word (16 bits), byte (8 bits), and half-byte (4 bits). For example, neural network implementations extract features of each rendered scene and combine them with detailed information from potentially multiple frames to build a high-quality final image.
[0102] In a deep learning implementation, parallel matrix multiplication work may be scheduled for execution on tensor cores 371. In particular, training a neural network requires a significant number of matrix dot product operations. To process the inner product formulation of an NxNxN matrix multiplication, tensor cores 371 may include at least N dot product processing elements. Before the matrix multiplication begins, an entire matrix is loaded into a tile register, and at least one column of a second matrix is loaded in each of the N cycles. In each cycle, there are N dot products to be processed.
[0103] Depending on the particular implementation, matrix elements may be stored in different precisions, including 16-bit words, 8-bit bytes (e.g., INT8), and 4-bit half-bytes (e.g., INT4). Different precision modes may be specified for tensor core 371 to ensure that the most efficient precision is used for different workloads (e.g., inference workloads that may tolerate quantization to bytes and half-bytes). Additionally, supported formats may include 64-bit floating-point format (FP64), as well as non-IEEE floating-point formats, such as bfloat16 format (e.g., Brain floating point), 16-bit floating-point format with one sign bit, 16-bit floating-point format with eight exponent bits, and 16-bit floating-point format with eight significant bits (seven of which are explicitly stored). One embodiment includes support for the low-precision tensor float format (TF32), which has a range of FP32 (8 bits) and a precision of FP16 (10 bits). Low-precision TF32 operations may be performed on FP32 inputs and may produce FP32 outputs with higher performance than FP32 and higher precision than FP16.
[0104] In one embodiment, tensor core 371 supports sparse mode operations on matrices with a vast majority of values being zero. Tensor core 371 includes support for sparse input matrices encoded into a sparse matrix representation (e.g., compressed coordinate list encoding (COO), compressed sparse row (CSR), compressed sparse column (CSC), etc.). Tensor core 371 also includes support for compressed sparse matrix representations where the sparse matrix representations may be further compressed. Compressed, encoded, and / or compressed and encoded matrix data may be prepared by tensor core 371 along with associated compression and / or encoding metadata, and non-zero values may be extracted (extracted). For example, for a particular input matrix A, non-zero values may be loaded from the compressed and / or encoded representation corresponding to at least a portion of matrix A. Based on the position of the non-zero values in matrix A, which may be determined from an index or coordinate metadata associated with the non-zero values, corresponding values in input matrix B may be loaded. Depending on the operation to be performed (e.g., multiplication), loading of values from input matrix B may be bypassed if the corresponding value is a zero value. In one embodiment, value pairings for a particular operation, such as a multiplication operation, may be pre-scanned by scheduler logic, and only operations between non-zero inputs are scheduled. Depending on the dimensions of matrices A and B and the operation to be performed, output matrix C may be dense or sparse. In the case where output matrix C is sparse, depending on the configuration of tensor core 371, output matrix C may be output in a compressed format, sparse encoding, or compressed sparse encoding.
[0105] Ray tracing core 372 may accelerate ray tracing processing for both real-time and non-real-time ray tracing implementations. In particular, ray tracing core 372 may include ray traversal / intersection circuitry to perform ray traversal using bounding volume hierarchies (BVH) and identify intersections between rays and primitives enclosed within the BVH volume. Ray tracing core 372 may also include circuitry for performing depth testing and culling (e.g., using a Z-buffer or similar configuration). In one implementation, ray tracing core 372 performs traversal and intersection processing in conjunction with image denoising techniques described herein, at least a portion of which may be executed on tensor core 371. For example, tensor core 371 may implement a deep learning neural network to perform denoising of frames generated by ray tracing core 372. However, the CPU 361, the graphics core 370 and / or the ray tracing core 372 may also implement all or part of the denoising and / or deep learning algorithms.
[0106] Also, as described above, a distributed approach to denoising may be used where the GPU 380 resides in a computing device that is coupled to other computing devices through a network or high-speed interconnect, in which the interconnected computing devices may share neural network learning / training data to improve the speed at which the overall system learns to perform denoising for different types of image frames and / or different graphics applications.
[0107] The ray tracing core 372 may handle all BVH traversal and / or ray primitive intersections, avoiding overloading the graphics core 370 with thousands of instructions per ray. For example, each ray tracing core 372 includes a first set of dedicated circuitry for performing bounding box tests (e.g., for traversal processing) and / or a second set of dedicated circuitry for performing ray triangle intersection tests (e.g., traversed intersecting rays). Thus, for example, the multi-core group 365A may simply launch ray probes, and the ray tracing core 372 performs ray traversal and intersections independently and returns hit data (e.g., hit, no hit, multiple hits, etc.) to the thread context. While the ray tracing core 372 performs traversal and intersection processing, the other cores 370, 371 are freed to perform other graphics or computational work.
[0108] Optionally, each ray tracing core 372 may include a traversal unit for performing BVH test processing and / or an intersection unit for performing ray primitive intersection testing. The intersection unit generates a "hit", "no hit" or "multiple hits" response, which the intersection unit provides to the appropriate thread. During traversal and intersection processing, the execution resources of other cores (e.g., graphics core 370 and tensor core 371) are freed to perform other forms of graphics work.
[0109] In one optional embodiment described below, a hybrid rasterization / ray tracing approach is used in which work is distributed between graphics core 370 and ray tracing core 372.
[0110] The ray tracing core 372 (and / or other cores 370, 371) may include hardware support for a ray tracing instruction set such as DirectX Ray Tracing (DXR), including Microsoft's DispatchRays command and ray generation, nearest hit, any hit and miss shaders, which allow for the assignment of a unique set of shaders and textures for each object. Another ray tracing platform that may be supported by the ray tracing core 372, graphics core 370 and tensor core 371 is Vulkan 1.1.85. However, it should be noted that the underlying principles described herein are not limited to any particular ray tracing ISA.
[0111] In general, the various cores 372, 371, 370 may support a ray tracing instruction set that includes instructions / functions for one or more of ray generation, nearest hit, any hit, ray primitive intersection, per-primitive and hierarchical bounding box construction, miss, visit and exception. More specifically, preferred embodiments include ray tracing instructions for performing one or more of the following functions:
[0112] "Ray Generation": Ray generation instructions may be executed per pixel, per sample, or other user-defined work allocation.
[0113] "Closest Hit": A closest hit instruction may be executed to locate the closest intersection point of a ray with a primitive in the scene.
[0114] "Any Hit": The any hit command identifies multiple intersections between a ray and a primitive in the scene to potentially identify a new closest intersection point.
[0115] "Intersection": The intersection instruction performs a ray primitive intersection test and outputs the result.
[0116] "Per-primitive Bounding box Construction": This command constructs a bounding box around a particular primitive or group of primitives (e.g., when constructing a new BVH or other acceleration data structure).
[0117] "Miss": Indicates that the ray misses all geometry in the scene or within a specified region of the scene.
[0118] "Visit": Indicates the child volume that the ray traverses.
[0119] "Exceptions": Includes various types of exception handlers (eg, called for various error conditions).
[0120] In one embodiment, the ray tracing core 372 may be adapted to accelerate general-purpose computational operations that may be accelerated using computational techniques similar to ray intersection testing. A computational framework may be provided that allows shader programs to be compiled into low-level instructions and / or primitives that perform general-purpose computational operations by the ray tracing core. Exemplary computational problems that may benefit from computational operations performed on the ray tracing core 372 include computations involving beam, wave, ray, or particle propagation in coordinate space. Interactions associated with this propagation may be calculated for geometry or meshes in the coordinate space. For example, computations related to electromagnetic signal propagation through an environment may be accelerated through the use of instructions or primitives executed by the ray tracing core. Diffraction and reflection of signals by objects in the environment may be calculated by a direct ray tracing analogy.
[0121] Ray tracing core 372 may also be used to perform computations that are not directly analogous to ray tracing. For example, ray tracing core 372 may be used to accelerate mesh projection, mesh refinement, and volume sampling computations. General-purpose coordinate space computations, such as nearest neighbor computations, may also be performed. For example, a set of points in the vicinity of a particular point may be found by defining a bounding box around the point in coordinate space. BVH and ray probe logic in ray tracing core 372 may then be used to determine a set of point intersections within the bounding box. The intersections constitute the origin and its nearest neighbors. Computations performed using ray tracing core 372 may be performed in parallel with computations performed by graphics core 372 and tensor core 371. A shader compiler may be configured to compile computation shaders or other general-purpose graphics processing programs into low-level primitives that can be processed in parallel between graphics core 370, tensor core 371, and ray tracing core 372. "Technology for GPU-hosted processor interconnects"
[0122] 4A illustrates an exemplary architecture in which multiple GPUs 410-413, such as the parallel processor 200 illustrated in FIG. 2A, are communicatively coupled to multiple multi-core processors 405-406 through high-speed links 440A-440D (e.g., buses, point-to-point interconnects, etc.). Depending on the implementation, the high-speed links 440A-440D may support communication throughputs of 4 GB / s, 30 GB / s, 80 GB / s, or more. Various interconnect protocols may be used, including, but not limited to, PCIe 4.0 or 5.0 and NVLink 2.0. However, the underlying principles described herein are not limited to any particular communication protocol or throughput.
[0123] Two or more of the GPUs 410-413 may be interconnected through high-speed links 442A-442B, which may be implemented using the same or different protocol / link as that used for the high-speed links 440A-440D. Similarly, two or more of the multi-core processors 405-406 may be connected through a high-speed link 443, which may be a symmetric multi-processor (SMP) bus operating at 20 GB / s, 30 GB / s, 120 GB / s, or slower or faster. Alternatively, all communications between the various system components shown in FIG. 4A may be achieved using the same protocol / link (e.g., through a common interconnect fabric). However, as previously mentioned, the underlying principles described herein are not limited to any particular type of interconnect technology.
[0124] Each multi-core processor 405-406 may be communicatively coupled to a processor memory 401-402 via a memory interconnect 430A-430B, and each GPU 410-413 may be communicatively coupled to a GPU memory 420-423 via a GPU memory interconnect 450A-450D, respectively. The memory interconnects 430A-430B and 450A-450D may use the same or different memory access technologies. By way of example and not limitation, the processor memory 401-402 and the 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 / Optane or Nano-Ram. For example, some of the memories may be volatile and some may be non-volatile (e.g., using a two-level memory (2LM) hierarchy). The memory subsystems described herein may be compatible with multiple memory technologies, such as double data rate versions released by the Joint Electronic Device Engineering Council (JEDEC).
[0125] As described below, each of the various processors 405-406 and GPUs 410-413 may be physically coupled to a particular memory 401-402, 420-423, but a unified memory architecture may be implemented in which the same virtual system address space (also referred to as the "effective address" space) is distributed across all of the various physical memories. For example, each of the processor memories 401-402 may have a system memory address space of 64 GB, and each of the GPU memories 420-423 may have a system memory address space of 32 GB (resulting in a total of 256 GB of addressable memory in this example).
[0126] 4B details additional options for the interconnection between the multi-core processor 407 and the graphics acceleration module 446. The graphics acceleration module 446 may include one or more GPU chips integrated on a line card coupled to the processor 407 via a high-speed link 440. Alternatively, the graphics acceleration module 446 may be integrated in the same package or chip as the processor 407.
[0127] The illustrated processor 407 includes multiple cores 460A-460D, each with a translation lookaside buffer 461A-461D and one or more caches 462A-462D. The cores may include various other components for executing instructions and processing data (e.g., instruction fetch units, branch prediction units, decoders, execution units, reorder buffers, etc.), but are not shown to avoid obscuring the principles underlying the components described herein. The caches 462A-462D may include a level 1 (L1) cache and a level 2 (L2) cache. One or more shared caches 456 may also be included in the cache hierarchy and may be shared by the set of cores 460A-460D. For example, one embodiment of the processor 407 includes 24 cores, each with 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 a system memory 441, which may include the processor memories 401-402.
[0128] Coherency of data and instructions stored within the various caches 462A-462D, 456 and system memory 441 is maintained via inter-core communication over a coherence bus 464. For example, each cache may have cache coherency logic / circuitry associated with it and communicates with them over the coherence bus 464 in response to detecting a read or write from a particular cache line. In one implementation, a cache snooping protocol is implemented over the coherence bus 464 to snoop cache accesses. Cache snooping / coherency techniques are well understood by those skilled in the art and will not be described in detail here to avoid obscuring the underlying principles described herein.
[0129] A proxy circuit 425 may be provided that communicatively couples the graphics acceleration module 446 to the coherence bus 464 to enable the graphics acceleration module 446 to participate in cache coherence protocols as a peer of the cores. In particular, an interface 435 provides connectivity to the proxy circuit 425 through a high-speed link 440 (e.g., a PCIe bus, an NV link, etc.), and an interface 437 connects the graphics acceleration module 446 to the high-speed link 440.
[0130] 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 have a separate graphics processing unit (GPU). Alternatively, the graphics processing engines 431, 432, N may have different types of graphics processing engines within a GPU, such as, for example, a graphics execution unit, a media processing engine (e.g., a video encoder / decoder), a sampler and a blit engine. 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 individual GPUs integrated on a common package, line card, or chip.
[0131] The accelerator integrated circuitry 436 may include a memory management unit (MMU) 439 for performing various memory management functions such as virtual-to-physical memory translation (also referred to as effective-to-real memory translation), and a memory access protocol 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 implementation, the cache 438 stores commands and data for efficient access by the graphics processing engines 431-432, N. Data stored in the cache 438 and the graphics memory 433-434, M may be maintained coherently with the core caches 462A-462D, 456 and the system memory 441. As mentioned above, this may be achieved via a proxy circuit 425 that participates in the cache coherency mechanism on behalf of the cache 438 and memories 433-434, M (e.g., sending updates to the cache 438 regarding modifications / accesses of cache lines on the processor caches 462A-462D, 456, and receiving updates from the cache 438).
[0132] A set of registers 445 stores context data for threads executed by the graphics processing engines 431-432,N, and a context management circuit 448 manages the thread contexts. For example, the context management circuit 448 may perform save and restore operations to save and restore the context of various threads during a context switch (e.g., a first thread is saved and a second thread is restored so that the second thread can be executed by the graphics processing engine). For example, a context switch may store current register values in a designated area in memory (e.g., identified by a context pointer). Then, when returning to the context, the context management circuit 448 may restore the register values. An interrupt management circuit 447 may receive and process interrupts received from, for example, a system device.
[0133] In one implementation, the MMU 439 translates virtual / effective addresses from the graphics processing engine 431 to real / physical addresses in the system memory 441. Optionally, the accelerator integration circuit 436 supports multiple (e.g., 4, 8, 16) graphics accelerator modules 446 and / or other accelerator devices. The graphics accelerator modules 446 may be dedicated to a single application running on the processor 407 or may be shared among multiple applications. Optionally, a virtualized graphics execution environment is provided in which the resources of the graphics processing engines 431-432, N are shared with multiple applications, virtual machines (VMs) or containers. Resources may be subdivided into "slices" and the slices are assigned to different VMs and / or applications based on processing requirements and priorities associated with the VMs and / or applications. VMs and containers may be used interchangeably herein.
[0134] A virtual machine (VM) may be software that runs an operating system and one or more applications. A VM may be defined with a specification, configuration files, virtual disk files, non-volatile random access memory (NVRAM) setting files, and log files, and is backed by the physical resources of a host computing platform. A VM may include an operating system (OS) or application environment installed on software that mimics dedicated hardware. End users have the same experience on a virtual machine as they would on dedicated hardware. Dedicated software called a hypervisor fully emulates the CPU, memory, hard disk, network, and other hardware resources of a PC client or server, allowing virtual machines to share resources. A hypervisor may emulate multiple virtual hardware platforms that are isolated from each other, allowing multiple virtual machines to run Linux, Windows Server, VMware ESXi, and other operating systems on the same underlying physical host.
[0135] A container may be a software package consisting of applications, configurations, and dependencies, so that applications can run reliably between one computing environment and another. A container may share an operating system installed on a server platform and run as an isolated process. A container may be a software package that includes everything that software needs to run, such as system tools, libraries, settings, etc. Containers are not installed like traditional software programs, allowing containers to be isolated from other software and the operating system itself. The isolated nature of containers offers several advantages. First, software within a container runs simultaneously in different environments. For example, a container containing PHP and MySQL may run identically on both a Linux computer and a Windows machine. Second, containers offer additional security since the software does not affect the host operating system. While an installed application may change system settings and resources such as the Windows registry, a container can only change settings within the container.
[0136] Thus, the accelerator integrated circuitry 436 acts as a bridge to the system for the graphics acceleration module 446, providing address translation and system memory caching services. In one embodiment, to facilitate the bridging function, the accelerator integrated circuitry 436 may also include hardware to enable shared I / O 497 (e.g., PCIe, USB, or other) and system control of voltage, clocks, performance, thermal, and security. The shared I / O 497 may utilize multiple separate physical connections or may traverse high speed link 440. The accelerator integrated circuitry 436 may also provide virtualization functionality to manage graphics processing engine virtualization, interrupts, and memory management for the host processor.
[0137] The hardware resources of the graphics processing engines 431-432, N are explicitly mapped into the real address space seen by the host processor 407, so that any host processor may directly address these resources using effective address values. One optional feature of the accelerator integrated circuitry 436 is to physically separate the graphics processing engines 431-432, N such that they appear to the system as independent units.
[0138] One or more graphics memories 433-434, M may be coupled to the graphics processing engines 431-432, N, respectively. The graphics memories 433-434, M store instructions and data being 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 3D XPoint / Optane, Samsung's Z-NAND or Nano-Ram.
[0139] To reduce data traffic on the high-speed link 440, biasing techniques may be used to ensure that the data stored in the graphics memories 433-434, M is the data that is most frequently used by the graphics processing engines 431-432, N and preferably is not (at least not frequently) used by the cores 460A-460D. Similarly, the biasing mechanism attempts to keep data needed by the cores (preferably not the graphics processing engines 431-432, N) in the caches 462A-462D, 456 of the core and system memory 441.
[0140] The variation shown in Figure 4C integrates accelerator integration circuitry 436 within processor 407. Graphics processing engines 431-432, N communicate directly with accelerator integration circuitry 436 via interfaces 437 and 435 over high speed link 440 (which again may use any form of bus or interface protocol). Accelerator integration circuitry 436 may perform the same processing as described with reference to Figure 4B, but potentially with a higher throughput when placed in close proximity to coherence bus 464 and caches 462A-462D, 456.
[0141] The embodiments described herein may support different programming models, including a dedicated process programming model (without graphics acceleration module virtualization) and a shared programming model (with virtualization), which may include a programming model controlled by the accelerator integrated circuitry 436 and a programming model controlled by the graphics acceleration module 446.
[0142] In a dedicated process model embodiment, the graphics processing engines 431-432, N may be assigned to a single application or process under a single operating system. A single application may filter other application requests to the graphics engines 431-432, N to provide virtualization within a VM / partitioning.
[0143] In a dedicated process programming model, the graphics processing engines 431-432, N may be shared by multiple VM / application partitions. The shared model requires a system hypervisor to virtualize the graphics processing engines 431-432, N to allow access by each operating system. For a single partitioning system without a hypervisor, the graphics processing engines 431-432, N are owned by the operating system. In both of these cases, the operating system may virtualize the graphics processing engines 431-432, N to provide access to each process or application.
[0144] For a shared programming model, the graphics acceleration module 446 or individual graphics processing engines 431-432,N select a process element using a process handle. The process element may be stored in system memory 441 and may be addressable using 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 a context with the graphics processing engines 431-432,N (i.e., calling 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 in the process element linked list.
[0145] 4D illustrates an exemplary accelerator integration slice 490. As used herein, a "slice" comprises a particular portion of the processing resources of the accelerator integration circuitry 436. An application effective address space 482 in the system memory 441 stores a process element 483. The process element 483 may be stored in response to a GPU call 481 from an application 480 executing on the processor 407. The process element 483 contains the state of the process of the corresponding application 480. A work descriptor (WD) 484 contained within the process element 483 may be a single job requested by the application or may contain a pointer to a queue of multiple jobs. In the latter case, the WD 484 is a pointer to a job request queue in the address space 482 of that application.
[0146] The graphics acceleration module 446 and / or the individual graphics processing engines 431-432, N may be shared by all or a subset of the processes in the system. For example, the techniques described herein may include infrastructure for setting process state and for sending WD484 to the graphics acceleration module 446 to start jobs within a virtualized environment.
[0147] In one implementation, the dedicated process programming model is implementation specific. In this model, a single process owns the graphics acceleration module 446 or an individual graphics processing engine 431. Because the graphics acceleration module 446 is owned by a single process, the hypervisor initializes the accelerator integration circuitry 436 for its owning partitioning, and the operating system initializes the accelerator integration circuitry 436 for the owning process at the time the graphics acceleration module 446 is allocated.
[0148] In operation, the WD fetch unit 491 in the accelerator integrated slice 490 fetches the next WD 484, which includes an index of work to be done by one of the graphics processing engines of the graphics acceleration module 446. Data from the WD 484 may be stored in registers 445 and may be used by the MMU 439, the interrupt management circuitry 447, and / or the context management circuitry 448, as shown. For example, the MMU 439 may include a segment / page walk circuit to access a segment / page table 486 in the OS virtual address space 485. The interrupt management circuitry 447 may process an interrupt event 492 received from the graphics acceleration module 446. When performing graphics processing, the effective addresses 493 generated by the graphics processing engines 431-432,N are translated to real addresses by the MMU 439.
[0149] An identical set of registers 445 may be duplicated in each graphics processing engine 431-432,N and / or graphics acceleration module 446 and may be initialized by the hypervisor or operating system. Each of these duplicate registers may be included in the accelerator unified slice 490. In one embodiment, each graphics processing engine 431-432,N may be presented to the hypervisor 496 as a separate graphics processor device. QoS settings may be configured for clients of a particular graphics processing engine 431-432,N and data isolation between clients of each engine may be enabled. Exemplary registers that may be initialized by the hypervisor are shown in Table 1. [Table 1]
[0150] Exemplary registers that may be initialized by the operating system are shown in Table 2. [Table 2]
[0151] Each WD 484 may be specific to a particular graphics acceleration module 446 and / or graphics processing engine 431-432. Each WD 484 may contain all the information that a graphics processing engine 431-432, N needs to do its work, or each WD 484 may be a pointer to a memory location where an application has set up a command queue for work to be completed.
[0152] 4E shows additional optional details of the sharing model, including a hypervisor real address space 498 in which a process element list 499 is stored. The hypervisor real address space 498 is accessible on behalf of an operating system 495 via a hypervisor 496 that virtualizes the graphics acceleration module engine.
[0153] A shared programming model allows all or a subset of processes from all or a subset of the partitions in a system to use the graphics acceleration module 446. There are two programming models in which the graphics acceleration module 446 is shared by multiple processes and partitions: time slice sharing and graphics directed sharing.
[0154] In this model, the system hypervisor 496 owns the graphics acceleration module 446 and makes its functionality available to all operating systems 495. For a graphics acceleration module 446 to support virtualization by the system hypervisor 496, the graphics acceleration module 446 may adhere to the following requirements: 1) the application's job requests must be autonomous (i.e., 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 must be guaranteed by the graphics acceleration module 446 to complete within a specified time including any transformation failures or the graphics acceleration module 446 must provide the ability to preempt the processing of jobs; and 3) the graphics acceleration module 446 must ensure fairness between processes when operating in a specified shared programming model.
[0155] For the shared model, the application 480 may be required to make a system call to the operating system 495 with a graphics acceleration module 446 type, a work descriptor (WD), an authority mask register (AMR) value, and a context save / restore area pointer (CSRP). The graphics acceleration module 446 type describes the accelerated function for which the system call is intended. The graphics acceleration module 446 type may be a system-specific value. The WD is specifically formatted for the graphics acceleration module 446 and may be 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 command queue, or any other data structure that describes the work to be performed by the graphics acceleration module 446. In one embodiment, the AMR value is the AMR state used for the current process. The value passed to the operating system is the same as the application setting the AMR. If the accelerator integrated circuit 436 implementation and the graphics acceleration module 446 implementation do not support a user authority mask overwrite register (UAMOR), the operating system may apply the current UAMOR value to the AMR value before passing the AMR on the hypervisor call. Optionally, the hypervisor 496 may apply the current authority mask overwrite register (AMOR) value before placing the AMR in the process element 483. The CSRP may be one of the registers 445 that contains the effective address of an area in the application address space 482 for the graphics acceleration module 446 to save and restore context state. This pointer is optional if state does not need to be saved between jobs or when a job is preempted. The context save / restore area may be pinned system memory.
[0156] Upon receiving the system call, operating system 495 may verify that application 480 is registered and authorized to use graphics acceleration module 446. Operating system 495 then calls hypervisor 496 with the information shown in Table 3. [Table 3]
[0157] Upon receiving the hypervisor call, the hypervisor 496 verifies that the operating system 495 is registered and authorized to use the graphics acceleration module 446. The hypervisor 496 then places the process element 483 in a process element linked list of the corresponding graphics acceleration module 446 type. The process element may include the information shown in Table 4. [Table 4]
[0158] The hypervisor may initialize multiple registers 445 of the accelerator integrated slice 490.
[0159] As shown in FIG. 4F, one optional implementation uses a unified memory addressable via a common virtual memory address space that is used to access the physical processor memories 401-402 and the GPU memories 420-423. In this implementation, processes running on the GPUs 410-413 use the same virtual / effective memory address space to access the processor memories 401-402 and vice versa, simplifying programmability. A first portion of the virtual / effective address space may be assigned to the processor memory 401, a second portion to the second processor memory 402, and a third portion to the GPU memory 420, etc. Thus, the entire virtual / effective memory space (also referred to as the effective address space) may be distributed among each of the processor memories 401-402 and the GPU memories 420-423, allowing any processor or GPU to access any physical memory using a virtual address mapped to that memory.
[0160] Bias / coherence management circuits 494A-494E may be provided within one or more of the MMUs 439A-439E to ensure cache coherence between the caches of a host processor (e.g., 405) and the caches of the GPUs 410-413 and to implement biasing techniques to indicate in which physical memory particular types of data should be stored. Although multiple instances of bias / coherence management circuits 494A-494E are shown in FIG. 4F, the bias / coherence circuits may be implemented within the MMUs of one or more of the host processors 405 and / or within the accelerator integration circuitry 436.
[0161] Allowing the GPU-associated memory 420-423 to be mapped as part of system memory and accessed using shared virtual memory (SVM) techniques, without suffering from the typical performance drawbacks associated with full-system cache coherence. The ability to access the GPU-associated memory 420-423 as system memory without onerous cache coherence overhead provides a favorable operating environment for GPU offload. This configuration allows host processor 405 software to set operands and access computation results without traditional I / O DMA data copy overhead. Such traditional copies require driver calls, interrupts, and memory-mapped I / O (MMIO) accesses, all of which are inefficient compared to simple memory access. At the same time, being able to access the GPU-associated memory 420-423 without cache coherence overhead may be critical to the execution time of offload computations. When streaming write memory traffic is large, for example, cache coherence overhead can significantly reduce the effective write bandwidth seen by the GPUs 410-413. The efficiency of operand setup, the efficiency of accessing results, and the efficiency of GPU computation all play a role in determining the effectiveness of GPU offloading.
[0162] The selection between the GPU bias and the host processor bias may be driven by a bias tracker data structure. For example, a bias table may be used, which may be a page-granular structure (i.e., controlled at the granularity of a memory page) containing one or two bits per GPU-attached memory page. The bias table may be implemented within stolen memory of one or more GPU-attached memories 420-423 (e.g., to cache frequently / recently used entries of the bias table), with or without a bias cache within the GPU 410-413. Alternatively, the entire bias table may be maintained within the GPU.
[0163] In one implementation, the bias table entry associated with each access to a GPU-attached memory 420-423 is accessed prior to the actual access to the GPU memory, resulting in the following processing: First, a local request from a GPU 410-413 that finds its page in the GPU bias is forwarded directly to the corresponding GPU memory 420-423. A local request from a GPU that finds its page in the host bias is forwarded to the processor 405 (e.g., over a high-speed link as described above). Optionally, a request from the processor 405 that finds the requested page in the host processor bias completes the request as if it were a normal memory read. Alternatively, a request addressed to a GPU-biased page may be forwarded to the GPU 410-413. The GPU may then transition the page to the host processor bias if the GPU is not currently using the page.
[0164] The bias state of a page may be changed either by a software-based mechanism, a hardware-assisted software-based mechanism, or, in limited cases, a purely hardware-based mechanism.
[0165] One mechanism for changing the bias state is using an API call (e.g., OpenCL) that calls a GPU device driver, which sends a message (or queues a command descriptor) to the GPU instructing it to change the bias state and, for some transitions, to perform a cache flush operation in the host. A cache flush operation is required for a transition from host processor 405 bias to GPU bias, but not for the reverse transition.
[0166] Cache coherency may be maintained by temporarily rendering GPU-biased pages non-cacheable by the host processor 405. To access these pages, the processor 405 may request access from the GPU 410, which, depending on the implementation, may or may not immediately grant the access. Thus, to reduce communication between the host processor 405 and the GPU 410, it is advantageous to ensure that the GPU-biased pages are pages that are needed by the GPU and not the host processor 405, and vice versa. "Graphics Processing Pipeline"
[0167] FIG. 5 illustrates a graphics processing pipeline 500. A graphics multiprocessor, such as the graphics multiprocessor 234 in FIG. 2D, the graphics multiprocessor 325 in FIG. 3A, or the graphics multiprocessor 350 in FIG. 3B, may implement the illustrated graphics processing pipeline 500. The graphics multiprocessor may be included within a parallel processing subsystem described herein, such as the parallel processor 200 in FIG. 2A, which may be associated with or may be used in place of one of the parallel processors 112 in FIG. 1. Various parallel processing systems may implement the graphics processing pipeline 500 via one or more instances of the parallel processing units described herein (e.g., the parallel processing unit 202 in FIG. 2A). For example, a shader unit (e.g., the graphics multiprocessor 234 in FIG. 2C) may be configured to perform one or more functions of the vertex processing unit 504, the tessellation control processing unit 508, the tessellation evaluation processing unit 512, the geometry processing unit 516, and the fragment / pixel processing unit 524. The functions of data assembler 502, primitive assemblers 506, 514, 518, tessellation unit 510, rasterizer 522, and raster processing unit 526 may also be performed by other processing engines in a processing cluster (e.g., processing cluster 214 of FIG. 2A) and corresponding partition unit (e.g., partition units 220A-220N of FIG. 2A). Graphics processing pipeline 500 may also be implemented using dedicated processing units for one or more functions. One or more portions of graphics processing pipeline 500 may also be performed by parallel processing logic in a general-purpose processor (e.g., CPU). Optionally, one or more portions of graphics processing pipeline 500 may access on-chip memory (e.g., parallel processor memory 222 as in FIG. 2A) via memory interface 528, which may be an instance of memory interface 218 of FIG. 2A.Graphics processor pipeline 500 may also be implemented with multi-core group 365A as in FIG. 3C.
[0168] Data assembler 502 is a processing unit that may collect vertex data for surfaces and primitives. Data assembler 502 then outputs the vertex data, including vertex attributes, to vertex processing unit 504. Vertex processing unit 504 is a programmable execution unit that runs vertex shader programs and lights and transforms the 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 the vertex data, and vertex processing unit 504 may be programmed to transform the vertex data from an object-based coordinate representation to a world space coordinate space or a normalized device coordinate space.
[0169] 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, lines, points, patches, etc. as supported by various graphics processing application programming interfaces (APIs).
[0170] The tessellation control processing unit 508 treats the input vertices as control points for the geometric patch. The control points are converted from an input representation from the patch (e.g., patch-based) to a representation suitable for use in surface evaluation by the tessellation evaluation processing unit 512. The tessellation control processing unit 508 may also calculate a tessellation factor for the edge of the geometric patch. The tessellation factor is applied to a single edge to quantify a view-dependent level of detail associated with the edge. The tessellation unit 510 is configured to receive the tessellation factor for the edge of the patch and tessellate the patch into a number of geometric primitives, such as line, triangle, and quadrilateral primitives, which are transmitted to the tessellation evaluation processing unit 512. The tessellation evaluation processing unit 512 operates on the parameterized coordinates of the subdivided patch to generate a surface representation and vertex attributes for each vertex associated with the geometric primitive.
[0171] A second instance of primitive assembler 514 receives vertex attributes from tessellation evaluation processing unit 512, reads stored vertex attributes as necessary, and constructs graphics primitives for processing by geometry processing unit 516. Geometry processing unit 516 is a programmable execution unit that executes a geometry shader program that transforms the graphics primitives received from primitive assembler 514 as specified by the geometry shader program. Geometry processing unit 516 may be programmed to subdivide the graphics primitives into one or more new graphics primitives and calculate parameters used to rasterize the new graphics primitives.
[0172] The geometry processing unit 516 may be able to add or remove elements from the geometry stream. The geometry processing unit 516 outputs parameters and vertices that specify new graphics primitives to a primitive assembler 518. The primitive assembler 518 receives the parameters and vertices from the geometry processing unit 516 and builds the graphics primitives for processing by the viewpoint scale, culling, and clip unit 520. The geometry processing unit 516 reads data stored in a parallel processor memory or in a system memory that it uses to process the geometry data. The viewpoint scale, culling, and clip unit 520 performs clipping, culling, and viewpoint scaling and outputs the processed graphics primitives to a rasterizer 522.
[0173] The rasterizer 522 may perform depth sculling and other depth-based optimizations. The rasterizer 522 also performs scan conversion on new graphics primitives to generate fragments and outputs these 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 processing including, but not limited to, texture mapping, shading, blending, texture correction, and perspective correction to generate shaded fragments or pixels, which are output to the raster processing unit 526. The fragment / pixel processing unit 524 may read data stored in either the parallel processor memory or the system memory for use in processing the fragment data. The fragment or pixel shader programs may be configured to shade at a sample granularity, pixel granularity, tile granularity, or other granularity, depending on the sampling rate configured for the processing unit.
[0174] Raster processing unit 526 is a processing unit that performs raster processing, including but not limited to stencil, z-testing, and blending, and outputs pixel data as processed graphics data to be stored in a graphics memory (e.g., such as parallel processor memory 222 of FIG. 2A and / or such as system memory 104 of FIG. 1), as processed graphics data to be displayed on one or more display devices 110, or for further processing by one of one of the one or more processors 102 or parallel processors 112. Raster processing unit 526 may be configured to compress z data or color data written to memory and to decompress z data or color data read from memory. "Introduction to Machine Learning"
[0175] The above architectures may be applied to perform training and inference processing with machine learning models. Machine learning has been successful in solving many types of tasks. The computations that occur in training and using machine learning algorithms (e.g., neural networks) are inherently suitable for efficient parallel implementation. Thus, parallel processors such as general-purpose graphic processing units (GPGPUs) play a major role in practical implementation of deep neural networks. Parallel graphic processors with single instruction, multiple thread (SIMT) architecture are designed to maximize the amount of parallel processing in the graphic pipeline. In the SIMT architecture, a group of parallel threads attempts to execute multiple program instructions synchronously as often as possible to improve processing efficiency. The efficiency provided by parallel machine learning algorithm implementation allows the use of high-capacity networks, allowing these networks to be trained on larger databases.
[0176] Machine learning algorithms are algorithms that can learn from a set of data. For example, machine learning algorithms may be designed to model high-level abstractions within a data set. For example, image recognition algorithms may be used to determine which of several categories a particular input belongs to. Regression algorithms may output a numerical value given an input. Pattern recognition algorithms may be used to generate converted text or perform text-to-speech and / or speech recognition.
[0177] 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 may be implemented as an acyclic graph with nodes arranged in layers. Typically, a feedforward network topology includes an input layer and an output layer separated by at least one hidden layer. The hidden layer converts the inputs received by the input layer into a representation that is useful for generating an output at the output layer. The network nodes are all connected by edges to nodes in adjacent layers, but there are no edges between nodes within each layer. Data received at the nodes in the input layer of a feedforward network is propagated (i.e., "fed forward") to the nodes in the output layer through an activation function that 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 particular model represented by the algorithm being executed, the output from a neural network algorithm may take a variety of forms.
[0178] 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 that represents the problem being modeled by the neural network, and adjusting the weights until the network model performs with minimal error for every instance 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 output of the "correct" label for that instance, an error signal is calculated that represents the difference between the output and the labeled output, and the weights associated with these relationships are adjusted to minimize the error as the error signal is propagated back through the layers of the network. The network is considered "trained" once the error for each output generated from an instance of the training data set is minimized.
[0179] The accuracy of machine learning algorithms can be greatly affected by the quality of the data set used to train the algorithm. The training process can be computationally intensive and can require a large amount of time for a conventional general-purpose processor. Therefore, parallel processing hardware is used to train many types of machine learning algorithms. The calculations performed in adjusting the coefficients in a neural network are inherently suitable for parallel implementation, which is particularly useful for optimizing the training of neural networks. In particular, many machine learning algorithms and software applications are adapted to take advantage of parallel processing hardware within general-purpose graphic processing devices.
[0180] FIG. 6 is a general diagram of a machine learning software stack 600. A machine learning application 602 is any logic that may be configured to train a neural network with a training dataset or use a trained deep neural network to implement machine intelligence. The machine learning application 602 may include training and inference functions for the neural network and / or specialized software that may be used to train the neural network before deployment. The machine learning application 602 may implement any type of machine intelligence, including but not limited to image recognition, mapping and localization, autonomous navigation, speech synthesis, medical imaging, or language translation. Exemplary machine learning applications 602 include but are not limited to voice-based virtual assistants, image or facial recognition algorithms, autonomous navigation, and software tools used to train machine learning models used by the machine learning application 602.
[0181] Hardware acceleration for machine learning applications 602 may be enabled through machine learning framework 604. Machine learning framework 604 may provide a library of machine learning primitives. Machine learning primitives are basic operations commonly performed by machine learning algorithms. Without machine learning framework 604, machine learning algorithm developers would be required to create and optimize the main computation logic associated with the machine learning algorithm, and would be required to re-optimize the computation logic as new parallel processors are developed. Instead, machine learning applications may be configured to perform the necessary computations using primitives provided by machine learning framework 604. Exemplary primitives include tensor convolution, activation functions, and pooling, which are computation operations performed when training a convolutional neural network (CNN). Machine learning framework 604 may also provide primitives for implementing basic linear algebra subprograms performed by many machine learning algorithms, such as matrix and vector operations. Examples of machine learning framework 604 include, but are not limited to, TensorFlow, TensorRT, PyTorch, MXNet, Caffee, and other high-level machine learning frameworks.
[0182] 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 underlying instructions provided to the GPGPU driver 608 to enable the machine learning framework 604 to leverage 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. Additionally, the computation framework 606 may enable hardware acceleration for the machine learning framework 604 across different types and generations of GPGPU hardware 610. Exemplary computation frameworks 606 include CUDA computation frameworks and associated machine learning libraries, such as the CUDA Deep Neural Network (cuDNN) library. The machine learning software stack 600 may also include communication libraries or frameworks to facilitate multi-GPU and multi-node computing. "GPGPU Machine Learning Acceleration"
[0183] 7 illustrates a general purpose graphics processing unit 700, which may be the parallel processor 200 of FIG. 2A or the parallel processor 112 of FIG. 1. The general purpose processing unit (GPGPU) 700 may be configured to provide support for hardware acceleration of primitives provided by machine learning frameworks to accelerate the processing of computational workloads of the type associated with training deep neural networks. Additionally, the GPGPU 700 may be directly linked to other instances of GPGPUs to form a multi-GPU cluster to speed up the training of deep neural networks in particular. Primitives may be supported to accelerate inference processing for deployed neural networks.
[0184] The GPGPU 700 includes a host interface 702 that allows for connection to a host processor. The host interface 702 may be a PCI Express interface. However, the host interface may also be a vendor-specific communication interface or fabric. The GPGPU 700 receives commands from the host processor and distributes execution threads associated with those commands to a set of processing clusters 706A-706H using a global scheduler 704. The processing clusters 706A-706H share a cache memory 708. The cache memory 708 may act as a higher level cache for the cache memories in the processing clusters 706A-706H. The illustrated processing clusters 706A-706H may correspond to the processing clusters 214A-214N as in FIG. 2A.
[0185] The GPGPU 700 includes memories 714A-714B coupled to the processing clusters 706A-706H via a set of memory controllers 712A-712B. The memory units 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. The memories 714A-714B may also include 3D stacked memory including, but not limited to, high bandwidth memory (HBM).
[0186] Each of the processing clusters 706A-H may include a set of graphics multiprocessors, such as graphics multiprocessor 234 of FIG. 2D, graphics multiprocessor 325 of FIG. 3A, graphics multiprocessor 350 of FIG. 3B, or may include multicore groups 365A-N of FIG. 3C. The graphics multiprocessors of the computing clusters include multiple types of integer and floating point logic units capable of performing computational operations in a range of precision, including those suitable for machine learning computations. For example, at least a subset of the floating point units in each processing cluster 706A-H may be configured to perform 16-bit or 32-bit floating point operations, while a different subset of the floating point units may be configured to perform 64-bit floating point operations.
[0187] Multiple instances of GPGPU 700 may be configured to operate as a compute cluster. The communication mechanisms used by the compute cluster for synchronization and data exchange vary across embodiments. For example, multiple instances of GPGPU 700 communicate through host interface 702. In one embodiment, GPGPU 700 includes an I / O hub 709 that couples to a GPU link 710 that allows GPGPU 700 to connect directly to other instances of GPGPUs. GPU link 710 may be coupled to a dedicated GPU-to-GPU bridge that allows communication and synchronization between multiple instances of GPGPU 700. Optionally, GPU link 710 is coupled to a high-speed interconnect to send and receive data to other GPGPUs or parallel processors. Multiple instances of GPGPU 700 may be located in separate data processing systems and may communicate through a network device accessible via host interface 702. GPU link 710 may be configured to allow connection to a host processor in addition to or instead of host interface 702.
[0188] While the illustrated configuration of GPGPU 700 may be configured to train a neural network, alternative configurations of GPGPU 700 may be configured for deployment in high performance or low power inference platforms. In the inference configuration, GPGPU 700 includes a smaller number of processing clusters 706A-H compared to the training configuration. Additionally, the memory technology associated with memories 714A-B may differ 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 commonly used during inference operations for deployed neural networks.
[0189] FIG. 8 illustrates a multi-GPU computing system 800. The multi-GPU computing system 800 may include a processor 802 coupled to a plurality of GPGPUs 806A-806D via a host interface switch 804. The host interface switch 804 may be a PCI Express switch device that couples the processor 802 to a PCI Express bus through which the processor 802 may communicate with the set of GPGPUs 806A-806D. Each of the plurality of GPGPUs 806A-806D may be an instance of the GPGPU 700 of FIG. 7. The GPGPUs 806A-806D may be interconnected via a set of high-speed point-to-point inter-GPU links 816. The high-speed inter-GPU links may be connected to each of the GPGPUs 806A-806D via a dedicated GPU link, such as the GPU link 710 of FIG. 7. The P2P GPU link 816 allows direct communication between each of the GPGPUs 806A-806D without requiring communication via the host interface bus to which the processor 802 is connected. Inter-GPU traffic is directed to the P2P GPU link, and the host interface bus remains available for system memory access or to communicate with other instances of the multi-GPU computing system 800, for example, via one or more network devices. In FIG. 8, the GPGPUs 806A-806D are connected to the processor 802 via the host interface switch 804, while the processor 802 may alternatively include direct support for the P2P GPU link 816 and be directly connected to the GPGPUs 806A-806D. In one embodiment, the P2P GPU link 816 allows the multi-GPU computing system 800 to operate as a single logical GPU. "Machine learning neural network implementation"
[0190] The computing architecture described herein may be configured to perform a type of parallel processing that is particularly suitable for training and deploying neural networks for machine learning. A neural network may be generalized as a network of functions with graph relationships. As is well 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.
[0191] A second exemplary type of neural network is a convolutional neural network (CNN). CNNs are feed-forward neural networks dedicated to processing data with a known grid-like topology, such as image data. Thus, CNNs are commonly used in computer vision and image recognition applications, but they may also be used for other types of pattern recognition, such as speech and language processing. Nodes in a CNN input layer are organized into a set of "filters" (feature detectors inspired by the receptive fields found in the retina), and the output of each set of filters is propagated to nodes in successive layers of the network. Computation for a CNN involves applying a convolutional mathematical operation to each filter to generate the output of that filter. Convolution is a special kind of mathematical operation performed by two original functions to generate a third function that is a modified version of one of the two functions. In convolutional network terminology, the first function for the convolution may be referred to as the input, while the second function may be referred to as the convolution kernel. The output may be referred to as a feature map. For example, the input to a convolutional layer may be a multidimensional array of data defining the various color components of the input image, and the convolution kernel may be a multidimensional array of parameters, which are adapted by a neural network training process.
[0192] Recurrent neural networks (RNNs) are a family of feed-forward neural networks that contain feedback connections between layers. RNNs allow for the modeling of sequential data by sharing parameter data between different parts of the neural network. The architecture of an RNN contains cycles. At least a portion of the output data from an RNN is used as feedback to process subsequent inputs in the sequence, so that the cycle represents the influence of a variable's current value on its own value at a future time. This feature, due to the nature of the variables from which language data can be created, makes RNNs particularly useful for language processing.
[0193] The figures shown below depict exemplary feedforward, CNN and RNN networks, and describe the general process for training and deploying each of these types of networks, respectively. It should be understood that these descriptions are illustrative and not limited to the specific embodiments described herein, and that the concepts presented are generally applicable to deep neural networks and machine learning techniques in general.
[0194] The above exemplary neural network may be used to perform deep learning. Deep learning is machine learning using deep neural networks. Deep neural networks used in deep learning are artificial neural networks that are composed of multiple hidden layers, as opposed to shallow neural networks that contain only a single hidden layer. In general, deeper neural networks are more computationally intensive to train. However, the additional hidden layers of the network allow for multi-step pattern recognition, which results in reduced output errors, compared to shallow machine learning techniques.
[0195] A deep neural network used in deep learning typically includes a front-end network for performing feature recognition coupled to a back-end network, which represents a mathematical model that may perform processing (e.g., object classification, speech recognition, etc.) based on feature representations provided to the model. Deep learning allows machine learning to be performed without requiring hand-crafted feature engineering to be performed on the model. Instead, the deep neural network may learn features based on statistical structures or correlations in the input data. The learned features may be provided to a mathematical model, which may map the detected features to an output. The mathematical model used by the network is generally dedicated to the specific task to be performed, and different models are used to perform different tasks.
[0196] Once a neural network is constructed, a learning model may be applied to the network to train it to perform a particular task. The learning model describes how to adjust the weights in the model to reduce the network's output error. Backpropagation is a common method used to train neural networks. An input vector is presented to the network for processing. The output of the network is compared to a desired value using a loss function, and an error value is calculated for each neuron in the output layer. The error values are then backpropagated until each neuron has an associated error value that roughly represents its contribution to the original output. The network may then learn from these errors using an algorithm such as a stochastic gradient descent algorithm to update the neural network weights.
[0197] 9A-9B show an exemplary convolutional neural network. FIG. 9A shows various layers in a CNN. As shown in FIG. 9A, an exemplary CNN used to model 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 multiple convolutional layers (e.g., convolutional layer 904, convolutional layer 906). Optionally, the output from the multiple convolutional layers may be processed by a set of fully connected layers 908. Neurons in the fully connected layers have full connections to all activations in the previous layer, as previously described in the feedforward network. The output from the fully connected layers 908 may be used to generate an output result from the network. The activations in the fully connected layers 908 may be calculated using matrix multiplication instead of convolution. Not all CNN implementations utilize the fully connected layers 908. For example, in some implementations, the convolutional layers 906 may generate the output of the CNN.
[0198] Convolutional layers are sparsely connected, which differs from the traditional neural network configuration found in the fully connected layer 908. Traditional neural network layers are fully connected, such that every output unit interacts with every input unit. However, as shown, convolutional layers are sparsely connected, since the output of the convolution of a field is input to the nodes of the subsequent layer (instead of the respective state values of each node in that field). The kernels associated with the convolutional layers perform the convolution operation, and the output is sent to the next layer. The dimensionality reduction performed within the convolutional layers is one aspect that allows CNNs to scale to process large images.
[0199] 9B illustrates exemplary computational stages within a convolutional layer of a CNN. An input to the convolutional layer 912 of a CNN may be processed in three stages of the convolutional layer 914. The three stages may include a convolutional stage 916, a detection stage 918, and a pooling stage 920. The convolutional layer 914 may then output output data to a subsequent convolutional layer. The final convolutional layer of the network may generate output feature map data or provide an input to a fully connected layer, for example, to generate a classification value for the input to the CNN.
[0200] In the convolution stage 916, several convolutions are performed in parallel to generate a set of linear activations. The convolution stage 916 may include an affine transformation, which may be any transformation that can be specified as a linear transformation plus a translation. Affine transformations include rotation, translation, scaling, and combinations of these transformations. The convolution stage calculates the output of a function (e.g., a neuron) connected to a particular region in the input, which may be determined as the local region associated with the neuron. The neuron calculates a dot product between the neuron's weight 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 that are processed by successive stages of the convolution layer 914.
[0201] The linear activations may be processed by a detection stage 918. In the detection stage 918, each linear activation is processed by a nonlinear activation function. The nonlinear activation function increases the nonlinear properties of the entire network without affecting the receptive fields of the convolutional layers. 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) such that activations are thresholded to zero.
[0202] The pooling stage 920 uses a pooling function that replaces the output of the convolutional layer 906 with summary statistics of nearby outputs. The pooling function may be used to introduce translation invariance into the neural network so that slight translations to the input do not change the pooled output. Invariance to local translations may be useful in scenarios where the presence of a feature in the input data is more important than the exact location of the feature. Various types of pooling functions may be used during the pooling stage 920, including max pooling, average pooling, and l2-norm pooling. Additionally, some CNN implementations do not include a pooling stage. Instead, such implementations are alternative and additional convolutional stages with increased strides compared to the previous convolutional stage.
[0203] The output from the convolutional layer 914 may then be processed by the next layer 922, which may be an additional convolutional layer or may be one of the fully connected layers 908. For example, the first convolutional layer 904 in FIG. 9A may output to the second convolutional layer 906, which may output to the first one of the fully connected layers 908.
[0204] FIG. 10 illustrates an exemplary recurrent neural network 1000. In a recurrent neural network (RNN), the previous state of the network influences the output of the current state of the network. RNNs may be constructed in a variety of ways with a variety of functions. The use of RNNs is generally recurrent, using mathematical models to predict the future based on a previous sequence of inputs. For example, an RNN may be used to perform statistical language modeling to predict the next word given a previous sequence of words. The illustrated RNN 1000 may be described as having an input layer 1002 that receives input vectors, a hidden layer 1004 that implements a recurrent function, a feedback mechanism 1005 that allows a "memory" of the previous state, and an output layer 1006 that outputs the results. The RNN 1000 operates on a time step basis. The state of the RNN at a particular time step is influenced based on the previous time step by the feedback mechanism 1005. For a particular 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 (x 1 ) may be processed by the hidden layer 1004. The second input (x 2 ) is the initial input (x 1 ) may be processed by hidden layer 1004 using state information determined during processing of
number
[0205] In addition to the basic CNN and RNN networks described, acceleration may also be possible for variations of these networks. An example RNN variation is the Long Short-Term Memory (LSTM) RNN. LSTM RNNs can learn long-term dependencies that may be necessary to process longer sequences of language. A variation of CNN is the Convolutional Deep Belief Network, which has a similar structure to CNNs and is trained in a similar manner to deep belief networks. Deep Belief Networks (DBNs) are generative neural networks that consist of multiple layers of random variables. DBNs may be trained using greedy unsupervised learning for each layer. The learned DBN weights may then be used to provide a pre-trained neural network by determining an optimal initial set of weights for the neural network. In a further embodiment, acceleration is enabled for reinforcement learning. In reinforcement learning, an artificial agent learns by interacting with its environment. The artificial agent is configured to optimize a particular objective to maximize a cumulative reward.
[0206] FIG. 11 illustrates the training and deployment of a deep neural network. Once a specific network has been constructed for a task, the neural network is trained using a training dataset 1102. Various training frameworks 1104 have been developed to enable hardware acceleration of the training process. For example, the machine learning framework 604 of FIG. 6 may be configured as the training framework 604. The training framework 604 may be connected to an untrained neural network 1106, allowing the untrained neural net to be trained using parallel processing resources as described herein to generate a trained neural net 1108.
[0207] To begin the training process, initial weights may be selected randomly or by pre-training with a deep belief network, after which training cycles may be performed in a supervised or unsupervised manner.
[0208] Supervised learning is a learning method in which training is performed as an intermediary operation, for example, when the training data set 1102 includes inputs that are combined with desired outputs for the inputs, or when 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 to a set of expected or desired outputs. Errors are then propagated to the system. The training framework 1104 may adjust the weights that control the untrained neural network 1106. The training framework 1104 may provide tools to monitor whether the poorly trained neural network 1106 is converging to a model suitable for generating correct answers based on known input data. The training process is iterative as the network weights are adjusted to refine the outputs generated by the neural network. The training process may continue until the neural network reaches the statistically desired accuracy associated with the trained neural net 1108. The trained neural network 1108 may then be deployed to implement any number of machine learning processes to generate inference results 1114 based on the input of new data 1112.
[0209] Unsupervised learning is a learning method in which a network attempts to train itself using unlabeled data. Thus, for unsupervised learning, a training dataset 1102 includes input data that has no associated output data. An untrained neural network 1106 may learn groupings within the unlabeled inputs to determine how individual inputs relate to the entire dataset. Unsupervised training may be used to generate self-organizing maps, which are a type of trained neural network 1108 that can perform operations useful for reducing the dimensionality of data. Unsupervised training may also be used to perform anomaly detection, which allows for the identification of data points within the input dataset that deviate from normal patterns of data.
[0210] Variations of supervised and unsupervised training may also be used. Semi-supervised learning is a technique in which the training data set 1102 contains a mix of labeled and unlabeled data of the same variance. Incremental learning is a variation of supervised learning in which input data is continually used to further train the model. Incremental learning allows the trained neural network 1108 to adapt to new data 1112 without forgetting the knowledge implanted in the network during initial training.
[0211] The training process, especially of deep neural networks, whether supervised or unsupervised, can be too computationally intensive for a single computation node. Instead of using a single computation node, a distributed network of computation nodes may be used to accelerate the training process.
[0212] 12A is a block diagram illustrating distributed learning. Distributed learning is a training model that uses multiple distributed computing nodes to perform supervised or unsupervised training of a neural network. Each distributed computing node may include one or more host processors and one or more general purpose processing nodes, such as the high speed parallel general purpose graphics processing unit 700 of FIG. 7. As shown, distributed learning may be performed using model parallelism 1202, data parallelism 1204, or a combination of model parallelism and data parallelism 1206.
[0213] In model parallelism 1202, different computational 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. Advantages of model parallelism may include the ability to scale to particularly large models. Splitting up the computations associated with different layers of a neural network allows for the training of very large neural networks where all the layer weights would not fit into the memory of a single computational node. In some examples, model parallelism may be particularly useful for performing unsupervised training of large neural networks.
[0214] In data parallel processing 1204, different nodes of the distributed network have a complete instance of the model, and each node receives a different portion of the data. The results from the different nodes are then combined. While different approaches to data parallel processing are possible, all data parallel training approaches require techniques to combine the results and synchronize the model parameters between each node. An exemplary approach to combining data includes parameter averaging and updating based on data parallel processing. Parameter averaging trains each node on a subset of the training data and sets the global parameters (e.g., weights, biases) to the average of the parameters from each node. Parameter averaging uses a central parameter server that maintains the parameter data. Update-based data parallel processing is similar to parameter averaging, except that instead of forwarding parameters from the nodes to the parameter server, updates to the model are forwarded. Additionally, update-based data parallel processing may be performed in a decentralized manner, where updates are compressed and forwarded between nodes.
[0215] The combined model and data parallelism 1206 may be implemented, for example, in a distributed system where each compute node contains multiple GPUs. Each node can have a complete instance of the model with separate GPUs in each node used to train different parts of the model.
[0216] Distributed training increases overhead compared to training on a single machine. However, the parallel processors and GPGPUs described herein may each implement various techniques to reduce the overhead of distributed training, including techniques that enable high-bandwidth inter-GPU data transfers and accelerated remote data synchronization.
[0217] FIG. 12B is a block diagram showing a programmable network interface 1210 and a data processing unit. The programmable network interface 1210 is a programmable network engine that can be used to accelerate network-based computational tasks in a distributed environment. The programmable network interface 1210 may be coupled to a host system via a host interface 1270. The programmable network interface 1210 may be used to accelerate network or storage operations of the host system's CPU or GPU. The host system may be, for example, a node of a distributed learning system used to perform distributed training as shown in FIG. 12A. The host system may also be a data center node in a data center.
[0218] In one embodiment, access to remote storage containing model data may be accelerated by the programmable network interface 1210. For example, the programmable network interface 1210 may be configured to present a remote storage device to the host system as a local storage device. The programmable network interface 1210 may also accelerate remote direct memory access (RDMA) operations performed between the GPU of the host system and the GPU of the remote system. In one embodiment, the programmable network interface 1210 may enable storage features such as, but not limited to, NVME-oF. The programmable network interface 1210 may also accelerate encryption, data integrity, compression, and other operations for the remote storage on behalf of the host system, allowing the remote storage to approach the latency of a storage device directly attached to the host system.
[0219] The programmable network interface 1210 may also perform resource allocation and management on behalf of the host system. Storage security operations may be offloaded to the programmable network interface 1210 and performed in conjunction with the allocation and management of remote storage resources. Network-based operations for managing access to remote storage that would otherwise be performed by the host system's processor may instead be performed by the programmable network interface 1210.
[0220] In one embodiment, network and / or data security operations may be offloaded from the host system to the programmable network interface 1210. Data center security policies for a data center node may be handled by the programmable network interface 1210 instead of the host system's processor. For example, the programmable network interface 1210 may detect and mitigate network-based attacks (e.g., DDoS) attempted on the host system and prevent the attacks from compromising the availability of the host system.
[0221] The programmable network interface 1210 may include a system-on-chip (SoC 1220) that executes an operating system via multiple processor cores 1222. The processor cores 1222 may include a general-purpose processor (e.g., CPU) core. In one embodiment, the processor cores 1222 may also include one or more GPU cores. The SoC 1220 may execute instructions stored in the memory device 1240. The storage device 1250 may store local operating system data. The storage device 1250 and the memory device 1240 may be used to cache remote data for a host system. The network ports 1260A-1260B may enable connection to a network or fabric and facilitate network access to the SoC 1220 via the host interface 1270 for the host system. The programmable network interface 1210 may also include an I / O interface 1275, such as a USB interface. The I / O interface 1275 may be used to couple external devices to the programmable network interface 1210 or as a debug interface. The programmable network interface 1210 also includes a management interface 1230 that allows software on a host device to manage and configure the programmable network interface 1210 and / or the SoC 1220. In one embodiment, the programmable network interface 1210 may also include one or more accelerators or GPUs 1245 to accept offload of parallel computing tasks from the SoC 1220, a host system, or remote systems coupled by network ports 1260A-1260B. "Example Machine Learning Applications"
[0222] Machine learning may be applied to solve various technical problems, including, but not limited to, computer vision, autonomous driving and navigation, speech recognition and language processing. Traditionally, computer vision is one of the most active research areas for machine learning applications. Computer vision applications range from reproducing human visual capabilities, such as face recognition, to creating new categories of visual capabilities. For example, a computer vision application may be configured to recognize sound waves from vibrations induced on visible objects in a video. Machine learning accelerated by parallel processors allows computer vision applications to be trained with much larger training datasets than previously feasible, and allows inference systems to be deployed using low-power parallel processors.
[0223] Machine learning accelerated by parallel processors has autonomous driving applications including lane and road sign recognition, obstacle avoidance, navigation and driving control. Accelerated machine learning techniques may be used to train driving models based on data sets that define appropriate responses to specific training inputs. The parallel processors described herein may enable rapid training of increasingly complex neural networks used in autonomous driving solutions, enabling the deployment of low-power inference processors in mobile platforms suitable for integration into autonomous vehicles.
[0224] Deep neural networks accelerated by parallel processors are enabling machine learning approaches to automatic speech recognition (ASR). ASR involves creating a function that computes the most likely language sequence given an input acoustic sequence. Accelerated machine learning using deep neural networks allows the replacement of hidden Markov models (HMMs) and Gaussian mixture models (GMMs) previously used for ASR.
[0225] Also, parallel processor-accelerated machine learning may be used to accelerate natural language processing. Automated learning procedures may leverage statistical inference algorithms to generate models that are robust to erroneous or unfamiliar input. Exemplary natural language processor applications include automated machine translation between human languages.
[0226] Parallel processing platforms used for machine learning may be divided into training and deployment platforms. In general, training platforms are highly parallel and include optimizations for accelerating multi-GPU-single node training and multi-node-multi-GPU training. Exemplary parallel processors suitable for training include the general-purpose graphics processing unit 700 of FIG. 7 and the multi-GPU computing system 800 of FIG. 8. Instead, deployed machine learning platforms generally include lower power parallel processors suitable for use in products such as cameras, autonomous robots and autonomous vehicles.
[0227] Additionally, machine learning techniques may be applied to accelerate or enhance graphics processing activities. For example, a machine learning model may be trained to recognize output generated by a GPU-accelerated application and generate an upscaled version of that output. Such techniques may be applied to accelerate the generation of high-resolution images for gaming applications. Various other graphics pipeline activities may benefit from the use of machine learning. For example, a machine learning model may be trained to perform tessellation operations on geometry data to increase the complexity of a geometric model, allowing detailed geometry to be automatically generated from relatively low-detail geometry.
[0228] FIG. 13 illustrates an exemplary inference system on a system-on-chip (SoC) 1300 suitable for performing inference using a trained model. 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 GPGPU 1306 may be a GPGPU as described herein, such as GPGPU 700, and the multi-core processor 1308 may be a multi-core processor as described herein, such as multi-core processors 405-406. Additionally, the SoC 1300 may include on-chip memory 1305, which may enable a shared on-chip data pool accessible by each of the processing components. The processing components may be optimized for low power operation to enable deployment in various machine learning platforms, including autonomous vehicles and autonomous robots. For example, an implementation of the SoC 1300 may be used as part of the main control system of an autonomous vehicle. When the SoC1300 is configured for use in an autonomous vehicle, the SoC will be designed and configured to comply with the relevant functional safety standards of the deployment jurisdiction.
[0229] In operation, the media processor 1302 and the vision processor 1304 may work together to accelerate computer vision operations. The media processor 1302 may enable low-latency decoding of multiple high-resolution (e.g., 4K, 8K) video streams. The decoded video streams may be written to a buffer in the on-chip memory 1305. The vision processor 1304 may then analyze the decoded video and perform preliminary processing operations on frames of the decoded video in preparation for processing the frames with a trained image recognition model. For example, the vision processor 1304 may accelerate the convolution operations of a CNN used to perform image recognition on high-resolution video data while the back-end model computations are performed by the GPGPU 1306.
[0230] The multi-core processor 1308 may include control logic to assist in sequencing and synchronizing data transfer and shared memory operations performed by the media processor 1302 and the vision processor 1304. The multi-core processor 1308 may also function as an application processor for executing software applications that may leverage the inference computation capabilities of the GPGPU 1306. For example, at least a portion of the navigation and driving logic may be implemented in software that runs 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 these operations to the GPGPU 1306.
[0231] The GPGPU 1306 may include a computation cluster, such as processing clusters 706A-706H in a low-power configuration in the general-purpose graphics processing unit 700. The computation cluster in the GPGPU 1306 may support instructions specifically optimized for performing inference calculations on trained neural networks. For example, the GPGPU 1306 may support instructions for performing low-precision calculations, such as 8-bit integer vector operations and 4-bit integer vector operations. "Additional System Overview"
[0232] FIG. 14 is a block diagram of a processing system 1400. Elements of FIG. 14 having the same or similar names as elements of any other figures herein are described with the same elements in the other figures and may operate or function similarly as described elsewhere herein, may comprise the same components, and may be linked to other entities, but are not limited to such. The system 1400 may be used in a single processor desktop, system, multiprocessor workstation system, or server system having multiple processors 1402 or processor cores 1407. The system 1400 may be a processing platform integrated into a system-on-chip (SoC) integrated circuit for use in mobile, handheld, or embedded devices such as Internet of Things (IoT) devices with wired or wireless connectivity to local or wide area networks.
[0233] System 1400 may be a processing system having components corresponding to those of Figure 1. For example, in various configurations, processor 1402 or processor core 1407 may correspond to processor 102 of Figure 1. Graphics processor 1408 may correspond to parallel processor 112 of Figure 1. External graphics processor 1418 may be one of add-in devices 120 of Figure 1.
[0234] The system 1400 may include, be coupled to, or be integrated into a server-based gaming platform, a gaming console, including a game console and a media console, a mobile gaming console, a handheld gaming console, or an online gaming console. The system 1400 may be part of a mobile Internet-connected device, such as a mobile phone, a smart phone, a tablet computing device, or a laptop with low internal storage capacity. The processing system 1400 may include, be coupled to, or be integrated into a wearable device, such as a smart watch wearable device; an augmented smart eyewear or smart clothing with augmented reality (AR) or virtual reality (VR) capabilities to provide visual, audio, or haptic outputs that augment a real-world visual, audio, or haptic experience, or to provide textual, audio, graphic, video, holographic image, video, or haptic feedback; other augmented reality (AR) devices; other virtual reality (VR) devices. The processing system 1400 may include, or be part of a television device or a set-top box device. System 1400 may include, be coupled to, or be integrated into an autonomous vehicle, such as a bus, a tractor trailer, a car, a motorcycle or power cycle, an airplane or glider (or any combination thereof), etc. The autonomous vehicle may use system 1400 to process the sensed environment around the vehicle.
[0235] The one or more processors 1402 may include one or more processor cores 1407 for processing instructions that, when executed, perform operations on system or user software. At least one of the one or more processor cores 1407 may be configured to process a particular instruction set 1409. The instruction set 1409 may facilitate complex instruction set computing (CISC), reduced instruction set computing (RISC), or computing via very long instruction words (VLIW). The one or more processor cores 1407 may process different instruction sets 1409, which may include instructions to facilitate emulation of other instruction sets. The processor cores 1407 may also include other processing devices, such as digital signal processors (DSPs).
[0236] The processor 1402 may include cache memory 1404. Depending on the architecture, the processor 1402 may have a single internal cache or multiple levels of internal cache. In some embodiments, the cache memory may be shared among various components of the processor 1402. In some embodiments, the processor 1402 also uses an external cache (e.g., a level 3 (L3) cache or a last level cache (LLC)) (not shown), which may be shared among the processor cores 1407 using known cache coherency techniques. Additionally, a register file 1406 may be included within the processor 1402, which 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 1402.
[0237] The one or more processors 1402 may be coupled to one or more interface buses 1410 for transmitting communication signals, such as address signals, data signals, control signals, etc., between the processors 1402 and other components in the system 1400. In one of these embodiments, the interface bus 1410 may be a processor bus, such as a version of a Direct Media Interface (DMI) bus. However, the processor bus is not limited to a DMI bus and may include one or more peripheral component interconnect buses (e.g., PCI, PCI Express), memory buses, or other types of interface buses. For example, the processor 1402 may include an integrated memory controller 1416 and a platform controller hub 1430. The memory controller 1416 facilitates communication between memory devices and other components of the system 1400, while the platform controller hub (PCH) 1430 provides connectivity to I / O devices via a local I / O bus.
[0238] The memory device 1420 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 with suitable performance to function as a process memory. The memory device 1420 may, for example, operate as a system memory for the system 1400 to store data 1422 and instructions 1421 for use by the one or more processors 1402 in executing applications or processes. The memory controller 1416 may also be coupled to an optional external graphics processor 1418, which may communicate with one or more graphics processors 1408 in the processor 1402 to perform graphics or media processing. In some embodiments, graphics processing, media processing, and / or computational processing may be assisted by an accelerator 1412, which is a co-processor that may be configured to perform a specific set of graphics processing, media processing, or computational processing. For example, the accelerator 1412 may be a matrix multiplication accelerator used to optimize machine learning or computational processing. The accelerator 1412 may be a ray tracing accelerator that may be used to perform ray tracing operations in conjunction with the graphics processor 1408. In one embodiment, an external accelerator 1419 may be used instead of or in conjunction with the accelerator 1412.
[0239] A display device 1411 may be provided that may be connected to the processor 1402. The display device 1411 may be one or more of an internal display device, such as in a mobile electronic or laptop device, or an external display device attached via a display interface (e.g., DisplayPort, etc.). The display device 1411 may be a head mounted display (HMD), e.g., a stereoscopic display device for use in virtual reality (VR) or augmented reality (AR) applications.
[0240] The platform controller hub 1430 may allow peripherals to be connected to the memory device 1420 and the processor 1402 via a high-speed I / O bus. The I / O peripherals include, but are not limited to, an audio controller 1446, a network controller 1434, a firmware interface 1428, a wireless transceiver 1426, a touch sensor 1425, and a data storage device 1424 (e.g., non-volatile memory, volatile memory, hard disk drive, flash memory, NAND, 3D NAND, 3D XPoint / Optane, etc.). The data storage device 1424 may be connected via a storage interface (e.g., SATA) or via a peripheral bus such as a peripheral component interconnect bus (e.g., PCI, PCI Express). The touch sensor 1425 may include a touch screen sensor, a pressure sensor, or a fingerprint sensor. The wireless transceiver 1426 may be a mobile network transceiver, such as a Wi-Fi transceiver, a Bluetooth transceiver, a 3G, 4G, 5G, or a Long Term Evolution (LTE) transceiver. The firmware interface 1428 enables communication with system firmware and may be, for example, a Unified Extensible Firmware Interface (UEFI). The network controller 1434 may enable network connectivity to a wired network. In some embodiments, a high performance network controller (not shown) is coupled to the interface bus 1410. The audio controller 1446 may be a multi-channel high definition audio controller. In some of these embodiments, the system 1400 includes an optional legacy I / O controller 1440 for coupling legacy (e.g., Personal System 2 (PS / 2)) devices to the system.The platform controller hub 1430 may also be connected to one or more universal serial bus (USB) controllers 1442 connecting input devices, such as a keyboard and mouse 1443 combination, a camera 1444 or other USB input devices.
[0241] It should be understood that the illustrated system 1400 is exemplary and not limiting, and other types of data processing systems with different configurations may be used. For example, instances of memory controller 1416 and platform controller hub 1430 may be integrated into a separate external graphics processor, such as external graphics processor 1418. The platform controller hub 1430 and / or memory controller 1416 may be external to one or more processors 1402. For example, system 1400 may include external memory controller 1416 and platform controller hub 1430, which may be configured as a memory controller hub and a peripheral controller hub in a system chipset that communicates with processor 1402.
[0242] For example, the circuit board ("sled") on which components such as CPUs, memory, and other components are located is designed for enhanced thermal performance. Processing components such as processors may be located on the top surface of the sled, while near memory such as DIMMs may be located on the bottom surface of the sled. As a result of the increased airflow provided by this design, the components may operate at higher frequencies and power levels than typical systems, thereby increasing performance. Additionally, the sleds are configured to be hand-linked to power and data communication cables within the rack, thereby improving the ability to be quickly removed, upgraded, reinstalled, and / or replaced. Similarly, the individual components located on the sled, such as the processors, accelerators, memory, and data storage drives, are configured to be easily upgraded due to their increased spacing from one another. In the illustrated embodiment, the components additionally include hardware attestation features to attest to their authentication.
[0243] A data center may use a single network architecture ("fabric") that supports multiple other network architectures, including Ethernet and Omnipath. Threads may be coupled to switches via optical fiber, which provides higher bandwidth and lower latency than typical twisted pair cabling (e.g., Cat 5, Cat 5e, Cat 6, etc.). With a high bandwidth and low latency interconnect and network architecture, a data center may use pooled resources, such as memory accelerators (e.g., GPUs, graphics accelerators, FPGAs, ASICs, neural network and / or artificial intelligence accelerators, etc.), and physically disaggregated data storage drives, and provide them to compute resources (e.g., processors) as needed so that the compute resources can access them if they are local.
[0244] A power source or power source may provide voltage and / or current to system 1400 or any component or system described herein. In one example, the power source includes an AC-DC (alternating current-direct current) adapter that plugs into a wall outlet. Such AC power may be a renewable energy (e.g., solar power) power source. In one example, the power source includes a DC power source, such as an external AC-DC converter. The power source or power source may also include wireless charging hardware that charges by being placed in proximity to a charging field. The power source may include an internal battery, an AC power source, a motion-based power source, a solar power source, or a fuel cell source.
[0245] 15A-15C show a computing system and a graphics processor. Elements in FIG. 15A-15C having the same or similar names as elements in any other figures herein describe the same elements in the other figures, may operate or function in a similar manner as described elsewhere herein, may comprise the same components, and may be linked to other entities, but are not limited to such.
[0246] FIG. 15A is a block diagram of a processor 1500, which may be a variation of one of the processors 1402 and may be used in place of one of them. Thus, the disclosure of any feature herein in combination with the processor 1500 also discloses the corresponding combination with the processor 1402, but is not limited to such. The processor 1500 may have one or more processor cores 1502A-1502N, an integrated memory controller 1514, and an integrated graphics processor 1508. If the integrated graphics processor 1508 is excluded, the system including the processor may include a graphics processor device in a system chipset or coupled via a system bus. The processor 1500 may include additional cores, including up to an additional core 1502N, represented by a dashed box. Each of the processor cores 1502A-1502N includes one or more internal cache units 1504A-1504N. In some embodiments, each processor core 1502A-1502N also has access to one or more shared cache units 1506. The internal cache units 1504A-1504N and the shared cache unit 1506 represent a cache memory hierarchy within the processor 1500. The cache memory hierarchy may include at least one level of instruction and data cache within each processor core, as well as one or more levels of shared mid-level caches, such as level 2 (L2), level 3 (L3), level 4 (L4), and other levels of cache, where the highest level cache before external memory is classified as LLC. In some embodiments, cache coherency logic maintains coherency between the various cache units 1506 and 1504A-1504N.
[0247] Processor 1500 may include a set of one or more bus controller units 1516 and a system agent core 1510. The one or more bus controller units 1516 manage a set of peripheral buses, such as one or more PCI or PCI Express buses. System agent core 1510 provides management functions for the various processor components. System agent core 1510 may include one or more integrated memory controllers 1514 for managing access to various external memory devices (not shown).
[0248] For example, one or more of the processor cores 1502A-1502N may include support for simultaneous multithreading. The system agent core 1510 includes components for coordinating and operating the cores 1502A-1502N during multithreaded processing. Additionally, the system agent core 1510 may include a power control unit (PCU), which includes logic and components for controlling the power state of the processor cores 1502A-1502N and the graphics processor 1508.
[0249] Additionally, processor 1500 may include a graphics processor 1508 for performing graphics processing operations. In some of these embodiments, graphics processor 1508 is coupled to a system agent core 1510 that includes a set of shared cache units 1506 and one or more integrated memory controllers 1514. System agent core 1510 may also include a display controller 1511 for driving output of the graphics processor to one or more coupled displays. Display controller 1511 may also be a separate module coupled to the graphics processor via at least one interconnect or may be integrated within graphics processor 1508.
[0250] A ring-based interconnect unit 1512 may be used to couple the internal components of the processor 1500. However, alternative interconnect units may be used, such as a point-to-point interconnect, a switched interconnect, or other techniques, including techniques known in the art. In some of these embodiments, using the ring-based interconnect 1512, the graphics processor 1508 is coupled to the ring-based interconnect 1512 via an I / O link 1513.
[0251] The exemplary I / O link 1513 represents at least one of a number of various I / O interconnects, including a package I / O interconnect that facilitates communication between various processor components and a high-performance embedded memory module 1518, such as an eDRAM module. Optionally, each of the processor cores 1502A-1502N and the graphics processor 1508 may use the embedded memory module 1518 as a shared last-level cache.
[0252] For example, the processor cores 1502A-1502N may be homogenous cores that execute the same instruction set architecture. Alternatively, the processor cores 1502A-1502N may be heterogeneous in terms of instruction set architecture (ISA), where one or more of the processor cores 1502A-1502N 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. The processor cores 1502A-1502N may be heterogeneous in terms of microarchitecture, where one or more cores having a relatively higher power consumption are coupled to one or more power cores having a lower power consumption. As another example, the processor cores 1502A-1502N are heterogeneous in terms of computational capabilities. Additionally, the processor 1500 may be implemented on one or more chips or may be implemented as a SoC integrated circuit having the illustrated components in addition to other components.
[0253] 15B is a block diagram of hardware logic of a graphics processor core 1519 according to some embodiments described herein. The graphics processor core 1519, sometimes referred to as a core slice, may be one or more graphics cores in a modular graphics processor. The graphics processor core 1519 is an example of one graphics core slice, and a graphics processor as described herein may include multiple graphics core slices based on a target power and performance envelope. Each graphics processor core 1519 may include a fixed function block 1530 coupled to multiple sub-cores 1521A-1521F, also referred to as sub-slices, which include modular blocks of general purpose fixed function logic.
[0254] Fixed function block 1530 may include a geometry / fixed function pipeline 1531 that may be shared by all sub-cores in graphics processor core 1519, e.g., in a lower performance and / or lower power graphics processor implementation. Geometry / fixed function pipeline 1531 may include a 3D fixed function pipeline (e.g., 3D pipeline 1612 as in FIG. 16A described below), a video front end unit, a thread spawner and thread dispatcher, and a unified return buffer manager that manages a unified return buffer (e.g., unified return buffer 1718 as in FIG. 17 described below).
[0255] The fixed function block 1530 may also include a graphics SoC interface 1532, a graphics microcontroller 1533, and a media pipeline 1534. The graphics SoC interface 1532 provides an interface between the graphics processor core 1519 and other processor cores in a system on chip integrated circuit. The graphics microcontroller 1533 is a programmable sub-processor that can be configured to manage various functions of the graphics processor core 1519, including thread dispatch, scheduling, and preemption. The media pipeline 1534 (e.g., the media pipeline 1616 of Figures 16A and 17) includes logic to facilitate decoding, encoding, pre-processing, and / or post-processing of multimedia data, including image video data. The media pipeline 1534 implements media processing or sampling logic in the sub-cores 1521-1521F via requests for computation.
[0256] The SoC interface 1532 may enable the graphics processor core 1519 to communicate with a general-purpose application processor core (e.g., a CPU) and / or other components in the SoC, including memory hierarchy elements such as shared last-level cache memory, system RAM, and / or embedded on-chip or on-package DRAM. The SoC interface 1532 may also enable communication with fixed function devices in the SoC, such as a camera imaging pipeline, and enable use of and / or implement global memory atomics that are shareable between the graphics processor core 1519 and CPUs in the SoC. The SoC interface 1532 may also implement power management control for the graphics processor core 1519 and may enable an interface between the clock domain of the graphics core 1519 and other clock domains in the SoC. Optionally, the SoC interface 1532 may enable receipt of command buffers from a command streamer and a global thread dispatcher configured to provide commands and instructions to each of one or more graphics cores in the graphics processor. Commands and instructions may be dispatched to the media pipeline 1534 when media operations are to be performed, or to the geometry and fixed function pipelines (e.g., geometry and fixed function pipelines 1531, geometry and fixed function pipelines 1537) when graphics processing operations are to be performed.
[0257] The graphics microcontroller 1533 may be configured to perform various scheduling and management tasks for the graphics processor core 1519. In one configuration, the graphics microcontroller 1533 may perform, for example, graphics and / or compute workload scheduling to various graphics parallel engines in the execution unit (EU) arrays 1522A-1522F, 1524A-1524F in the sub-cores 1521A-1521F. In this workload scheduling, host software executing on a CPU core of the SoC including the graphics processor core 1519 can send a workload to one of a number of graphics processor doorbells, which invokes a scheduling operation on the appropriate graphics engine. The scheduling process includes determining which workload to run next, sending the workload to a command streamer, preempting existing workloads running on the engines, monitoring the progress of the workload, and notifying the host software when the workload is completed. Optionally, the graphics microcontroller 1533 can also facilitate low power or idle states for the graphics processor core 1519, providing the graphics processor core 1519 with the ability to save and restore registers within the graphics processor core 1519 across low power state transitions, independent of the operating system and / or graphics driver software on the system.
[0258] The graphics processor core 1519 may have more or fewer sub-cores than the illustrated sub-cores 1521A-1521F, up to a maximum of N modular sub-cores. For each set of N sub-cores, the graphics processor core 1519 may also include shared function logic 1535, shared and / or cache memory 1536, geometry / fixed function pipeline 1537, as well as additional fixed function logic 1538 to accelerate various graphics computation operations. The shared function logic 1535 may also include logic units associated with the shared function logic 1720 of FIG. 17 (e.g., samplers, math, and / or inter-thread communication logic) that are shareable by each of the N sub-cores in the graphics processor core 1519. The shared and / or cache memory 1536 may be a last-level cache for the set of N sub-cores 1521A-1521F in the graphics processor core 1519, and may also function as a shared memory accessible by multiple sub-cores. Instead of the geometry / fixed function pipeline 1531, a geometry / fixed function pipeline 1537 may be included within the fixed function block 1530, and the geometry / fixed function pipeline 1537 may include the same or similar logic units.
[0259] Graphics processor core 1519 may include additional fixed function logic 1538, which may include various fixed function acceleration logic for use by graphics processor core 1519. Optionally, additional fixed function logic 1538 includes an additional geometry pipeline for use in position-only shading. In position-only shading, there are two geometry pipelines: a full geometry pipeline in geometry / fixed function pipeline 1538, 1531, and a culling pipeline, which is an additional geometry pipeline that may be included in additional fixed function logic 1538. For example, the culling pipeline may be a simplified version of the full geometry pipeline. The full pipeline and the culling pipeline may run different instances of the same application, each instance having a separate context. Position-only shading can hide long culling runs of discarded triangles, allowing shading to be performed earlier in some cases. For example, the culling pipeline logic in the additional fixed function logic 1538 may execute position shaders in parallel with the main application, and the culling pipeline generally produces non-trivial results faster than the full pipeline because it fetches and shades only position attributes of vertices without rasterizing and rendering pixels in the frame buffer. The culling pipeline may use the non-trivial results to calculate visibility information for all triangles, regardless of whether these triangles were culled or not. The full pipeline (which may also be referred to as a reconstruction pipeline in this example) may use the visibility information to skip culled triangles and shade only visible triangles that are ultimately passed to the rasterization phase.
[0260] Optionally, the additional fixed function logic 1538 may also include machine learning acceleration logic, such as fixed function matrix multiplication, for implementations involving optimization of machine learning training or inference.
[0261] Within each graphics sub-core 1521A-1521F is a set of execution resources that may be used to perform graphics, media, and computational operations in response to requests by a graphics pipeline, a media pipeline, or a shader program. The graphics sub-cores 1521A-1521F include a number of EU arrays 1522A-1522F, 1524A-1524F, thread dispatch and inter-thread communication (TD / IC) logic 1523A-1523F, 3D (e.g., texture) samplers 1525A-1525F, media samplers 15226A-1526F, shader processors 1527A-1527F, and shared local memories (SLMs) 1528A-1528F. Each of the EU arrays 1522A-1522F, 1524A-1524F includes multiple execution units, which are general-purpose graphics processing units capable of performing floating-point and integer / fixed-point logic operations in service of graphics, media, or computational processing, including graphics, media, or computational shader programs. The TD / IC logic 1523A-1523F performs local thread dispatch and thread control operations for the execution units in the sub-cores and facilitates communication between threads executing on the execution units of the sub-cores. The 3D samplers 1525A-1525F may read textures or other 3D graphics related data in memory. The 3D samplers may read the texture data differently based on the configured sample state and the texture format associated with a particular texture. The media samplers 1526A-1526F may perform a similar read operation based on the type and format associated with the media data. For example, each graphics subcore 1521A-1521F may alternately include integrated 3D and media samplers. Threads executing on execution units within each subcore 1521A-1521F may utilize shared local memory 1528A-1528F within each subcore, allowing threads executing within a thread group to execute using a common pool of on-chip memory.
[0262] 15C is a block diagram of a general purpose graphics processing unit (GPGPU) 1570 that can be configured as a graphics processor, such as, for example, graphics processor 1508, and / or a computational accelerator, according to embodiments described herein. GPGPU 1570 can be interconnected with a host processor (e.g., one or more CPUs 1546) and memories 1571, 1572 via one or more system and / or memory buses. Memory 1571 can be system memory that can be shared with one or more CPUs 1546, while memory 1572 is device memory dedicated to GPGPU 1570. For example, components within GPGPU 1570 and device memory 1572 can be mapped to memory addresses accessible to one or more CPUs 1546. Access to memories 1571 and 1572 can be facilitated via memory controller 1568. Memory controller 1568 may include an internal direct memory access (DMA) controller 1569 or may include logic for performing operations that would be performed in a DMA controller.
[0263] The GPGPU 1570 includes a number of cache memories, including an L2 cache 1553, an L1 cache 1554, an instruction cache 1555, and a shared memory 1556, at least some of which may be partitioned as cache memories. The GPGPU 1570 also includes a number of compute units 1560A-1560N. Each of the compute units 1560A-1560N includes a set of vector registers 1561, scalar registers 1562, a vector logic unit 1563, and a scalar logic unit 1564. The compute units 1560A-1560N may also include a local shared memory 1565 and a program counter 1566. The compute units 1560A-1560N may be coupled to a constant cache 1567, which may be used to store constant data, which is data that does not change during execution of a kernel or shader program executing on the GPGPU 1570. The constant cache 1567 may be a scalar data cache, and cache data may be fetched directly into the scalar registers 1562.
[0264] During processing, one or more CPUs 1546 may write commands to registers or memory in the GPGPU 1570 that are mapped to an accessible address space. The command processor 1557 may read commands from the registers or memory and may determine how these commands are processed in the GPGPU 1570. The thread dispatcher 1558 may then be used to dispatch threads to the computation units 1560A-1560N for execution of these commands. Each computation unit 1560A-1560N may execute threads independently of the other computation units. Additionally, each computation unit 1560A-1560N may be independently configured for conditional computation and may conditionally output the results of the computation to memory. The command processor 1557 may interrupt one or more CPUs 1546 when a submitted command is completed.
[0265] Figures 16A-16C show block diagrams of additional graphics processor and computational accelerator architectures provided by embodiments described herein, for example, by Figures 15A-15C. Elements in Figures 16A-16C having the same or similar names as elements in any other figure describe the same element in the other figure, may operate or function in a similar manner as described elsewhere herein, may comprise the same components, and may be linked to other entities, but are not limited to such.
[0266] FIG. 16A is a block diagram of a graphics processor 1600, which may be a separate graphics processing unit or a graphics processor integrated with multiple processing cores, or other semiconductor device, but is not limited to a memory device or a network interface. The graphics processor 1600 may be a variation of the graphics processor 1508 and may be used in place of the graphics processor 1508, and thus, the disclosure of any feature in combination with the graphics processor 1508 also discloses the corresponding combination with the graphics processor 1600, but is not limited to such. The graphics processor may communicate with registers on the graphics processor via a memory-mapped I / O interface and with commands located in the processor memory. The graphics processor 1600 may include a memory interface 1614 for accessing memory. The memory interface 1614 may be an interface with a local memory, one or more internal caches, one or more shared external caches, and / or a system memory.
[0267] Optionally, the graphics processor 1600 also includes a display controller 1602 for driving display output data to a display device 1618. The display controller 1602 includes hardware for one or more overlay planes for display and multiple layers of video or user interface elements configuration. The display device 1618 may be an internal or external display device. In one embodiment, the display device 1618 is a head-mounted display device, such as a virtual reality (VR) display device or an augmented reality (AR) display device. Graphics processor 1600 may include a video codec engine 1606 that encodes, decodes, or transcodes 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, H.265 / HEVC, Alliance for Open Media (AOMedia) VP8, VP9, and the like, 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.
[0268] Graphics processor 1600 may include a block image transfer (BLIT) engine 1603 for performing two-dimensional (2D) rasterizer operations including, for example, bit-boundary block transfers. Alternatively, however, 2D graphics operations may be performed using one or more components of a graphics processing engine (GPE) 1610. In some embodiments, GPE 1610 is a computational engine for performing graphics processing, including three-dimensional (3D) graphics processing and media processing.
[0269] The GPE 1610 may include a 3D pipeline 1612 for performing 3D processing, such as rendering three-dimensional images and scenes using processing functions that operate on 3D primitive shapes (e.g., rectangles, triangles, etc.). The 3D pipeline 1612 includes programmable and fixed function elements that perform various tasks within and / or spawn execution threads for the 3D / media subsystem 1615. While the 3D pipeline 1612 may be used to perform media processing, embodiments of the GPE 1610 also include a media pipeline 1616 that is used specifically to perform media processing, such as video post-processing and image up-scalement.
[0270] The media pipeline 1616 may include fixed function or programmable logic units for performing one or more specialized media processing, such as video decode acceleration, video deinterlacing, and video encode acceleration, in place of or on behalf of the video codec engine 1606. Additionally, the media pipeline 1616 may also include a thread generation unit for generating threads for execution on the 3D / media subsystem 1615. The generated threads perform computations for the media processing on one or more graphics execution units included within the 3D / media subsystem 1615.
[0271] The 3D / Media subsystem 1615 may include logic for executing threads created by the 3D pipeline 1612 and the media pipeline 1616. The pipelines may send thread execution requests to the 3D / Media subsystem 1615, which includes thread dispatch logic for coordinating and dispatching the various requests to available thread execution resources. The execution resources include an array of graphics execution units for processing the 3D and media threads. The 3D / Media subsystem 1615 may include one or more internal caches for thread instructions and data. Additionally, the 3D / Media subsystem 1615 may also include shared memory, including registers and addressable memory for sharing data between threads and storing output data.
[0272] FIG. 16B illustrates a graphics processor 1620 that is a variation of the graphics processor 1600 and may be used in place of the graphics processor 1600 or vice versa. Thus, any disclosure herein of any feature in combination with the graphics processor 1600 also discloses the corresponding combination with the graphics processor 1620, but is not limited to such. The graphics processor 1620 has a tiled architecture according to embodiments described herein. The graphics processor 1620 may include a graphics processing engine cluster 1622 having multiple instances of the graphics processing engine 1610 of FIG. 16A in the graphics engine tiles 1610A-1610D. Each of the graphics engine tiles 1610A-1610D may be interconnected via a set of tile interconnects 1623A-1623F. Each of the graphics engine tiles 1610A-1610D may also be connected to a memory module or memory device 1626A-1626D via memory interconnects 1625A-1625D. The memory devices 1626A-1626D may use any graphics memory technology. For example, the memory devices 1626A-1626D may be graphics double data rate (GDDR) memory. The memory devices 1626A-1626D may be high bandwidth memory (HBM) modules that may reside on a die with the respective graphics engine tiles 1610A-1610D. The memory devices 1626A-1626D may be stacked memory devices that may be stacked on the respective graphics engine tiles 1610A-1610D. Each graphics engine tile 1610A-1610D and associated memory 1626A-1626D may reside on a separate chiplet, which is bonded to a base die or base substrate, which will be described in further detail in FIGS. 24B-24D.
[0273] The graphics processor 1620 may be configured with a non-uniform memory access (NUMA) system, with memory devices 1626A-1626D coupled to associated graphics engine tiles 1610A-1610D. A particular memory device may be accessed by a graphics engine tile other than the tile to which the particular memory device is directly connected. However, access latency to memory devices 1626A-1626D may be lowest when accessing the local tile. In one embodiment, when two or more caches store to the same memory location, a cache coherent NUMA (ccNUMA) system may be enabled using tile interconnects 1623A-1623F that allow communication between cache controllers in the graphics engine tiles 1610A-1610D to maintain a consistent memory image.
[0274] The graphics processing engine cluster 1622 may be connected to an on-chip or on-package fabric interconnect 1624. In one embodiment, the fabric interconnect 1624 includes a network processor, network on chip (NoC), or another switching processor to enable the fabric interconnect 1624 to operate as a packet-switched fabric interconnect that switches data packets between multiple components of the graphics processor 1620. The fabric interconnect 1624 may enable communication between the graphics engine tiles 1610A-1610D and components such as the video codec engine 1606 and one or more copy engines 1604. The copy engine 1604 may be used to move data from memory external to the memory devices 1626A-1626D and the graphics processor 1620 (e.g., system memory) to memory external to the memory devices 1626A-1626D and the graphics processor 1620, and between memory external to the memory devices 1626A-1626D and the graphics processor 1620. A fabric interconnect 1624 may also be used to interconnect the graphics engine tiles 1610A-1610D. Optionally, the graphics processor 1620 may include a display controller 1602 to enable connection to an external display device 1618. The graphics processor may also be configured as a graphics accelerator or a computation accelerator. In an accelerator configuration, the display controller 1602 and the display device 1618 may be omitted.
[0275] The graphics processor 1620 may be connected to a host system via a host interface 1628. The host interface 1628 may enable communication between the graphics processor 1620, system memory, and / or other system components. The host interface 1628 may be, for example, a PCI Express bus or another type of host system interface. For example, the host interface 1628 may be an NV Link or an NVSwitch interface. The host interface 1628 and the fabric interconnect 1624 may cooperate to enable multiple instances of the graphics processor 1620 to operate as a single logical device. The cooperation between the host interface 1628 and the fabric interconnect 1624 may also enable the individual graphics engine tiles 1610A-1610D to be presented to the host system as separate logical graphics devices.
[0276] FIG. 16C illustrates a computation accelerator 1630 according to an embodiment described herein. The computation accelerator 1630 may include an architecture similar to the graphics processor 1620 of FIG. 16B and is optimized for computation acceleration. The computation engine cluster 1632 may include a set of computation engine tiles 1640A-1640D that include execution logic optimized for parallel or vector-based general-purpose computation processing. The computation engine tiles 1640A-1640D may not include fixed-function graphics processing logic, but in some embodiments, one or more of the computation engine tiles 1640A-1640D may include logic for performing media acceleration. The computation engine tiles 1640A-1640D may be connected to memories 1626A-1626D via memory interconnects 1625A-1625D. The memories 1626A-1626D and memory interconnects 1625A-1625D may be of similar technology as the graphics processor 1620 or may be different. The graphics computation engine tiles 1640A-1640D may also be interconnected via a set of tile interconnects 1623A-1623F and may be connected to and / or by the fabric interconnect 1624. In one embodiment, the computation accelerator 1630 includes a large L3 cache 1636 that may be configured as a device-wide cache. The computation accelerator 1630 may also be connected to the host processor and memory via a host interface 1628 in a manner similar to the graphics processor 1620 of FIG. 16B.
[0277] The computational accelerator 1630 may also include an integrated network interface 1642. In one embodiment, the network interface 1642 includes network processor and controller logic that allows the computational engine cluster 1632 to communicate over the physical layer interconnect 1644 without requiring the data to traverse the host system's memory. In one embodiment, one of the computational engine tiles 1640A-1640D may be replaced by network processor logic, and data to be sent or received over the physical layer interconnect 1644 may be sent directly to or from the memory 1626A-1626D. Multiple instances of the computational accelerator 1630 may be joined into a single logical device via the physical layer interconnect 1644. Alternatively, the various computational engine tiles 1640A-1640D may be depicted as separate network-accessible computational accelerator devices. Graphics processing engine
[0278] FIG. 17 is a block diagram of a graphics processing engine 1710 of a graphics processor, according to some embodiments. The graphics processing engine (GPE) 1710 may be a version of the GPE 1610 shown in FIG. 16A and may represent the graphics engine tiles 1610A-1610D of FIG. 16B. Elements of FIG. 17 having the same or similar names as elements of any other figure describe the same elements of the other figures, may operate or function in a similar manner as described elsewhere herein, may comprise the same components, and may be linked to other entities, but are not limited to such. For example, the 3D pipeline 1612 and media pipeline 1616 of FIG. 16A are also illustrated in FIG. 17. In some embodiments of the GPE 1710, the media pipeline 1616 is optional and may not be explicitly included within the GPE 1710. For example, in at least one embodiment, a separate media processor and / or image processor is coupled to the GPE 1710.
[0279] The GPE 1710 may be coupled to or may include a command streamer 1703 that provides a command stream to the 3D pipeline 1612 and / or the media pipeline 1616. Alternatively or additionally, the command streamer 1703 may be directly coupled to a unified return buffer 1718. The unified return buffer 1718 may be communicatively coupled to the graphics core array 1714. Optionally, the command streamer 1703 is coupled to a memory, which may be one or more of a system memory or an internal cache memory and a shared cache memory. The command streamer 1703 may receive commands from the memory and send the commands to the 3D pipeline 1612 and / or the media pipeline 1616. The commands are instructions fetched from a ring buffer, which stores commands for the 3D pipeline 1612 and the media pipeline 1616. Additionally, the ring buffer may include a batch command buffer that stores a batch of multiple commands. Commands for the 3D pipeline 1612 may also include references to data stored in memory, including, but not limited to, vertex and geometry data for the 3D pipeline 1612 and / or image data and memory objects for the media pipeline 1616. The 3D pipeline 1612 and the media pipeline 1616 process commands and data by executing operations through logic within the respective pipelines or by dispatching one or more execution threads to the graphics core array 1714. The graphics core array 1714 includes one or more blocks of graphics cores (e.g., graphics core 1715A, graphics core 1715B), each of which may include one or more graphics cores. Each graphics core includes a set of graphics execution resources including general-purpose and graphics-specific execution logic for performing graphics and computational operations, as well as fixed-function texture processing and / or machine learning and artificial intelligence acceleration logic.
[0280] In various embodiments, the 3D pipeline 1612 may include fixed function logic and programmable logic for processing instructions and dispatching execution threads to the graphics core array 1714 to process one or more shader programs, such as vertex shaders, geometry shaders, pixel shaders, fragment shaders, compute shaders, or other shader programs. The graphics core array 1714 provides a unified block of execution resources for use in processing these shader programs. General purpose execution logic (e.g., execution units) within the graphics cores 1715A-1715B of the graphics core array 1714 may include support for various 3D API shader languages and execute multiple concurrent threads associated with multiple shaders.
[0281] Graphics core array 1714 may include execution logic for performing media functions such as video and / or image processing. In addition to graphics processing operations, the execution units may also include general purpose logic that is programmable to perform parallel general purpose computing operations. The general purpose logic may perform processing operations in parallel or in cooperation with general purpose logic in processor core 1407 of FIG. 14 or in cores 1502A-1502N of FIG. 15A.
[0282] Output data generated by threads executing on the graphics core array 1714 may output data to memory in unified return buffers (URBs) 1718. The URBs 1718 may store data for multiple threads. The URBs 1718 may be used to transmit data between different threads executing on the graphics core array 1714. Additionally, the URBs 1718 may be used for synchronization between threads on the graphics core array 1714 and fixed function logic in the shared function logic 1720.
[0283] Optionally, graphics core array 1714 may be scalable such that the array includes a variable number of graphics cores, each having a variable number of execution units based on the target power and performance levels of GPE 1710. Execution resources may be dynamically scalable such that they can be enabled or disabled as needed.
[0284] The graphics core array 1714 is coupled to shared function logic 1720, which includes multiple resources shared between the graphics core and the graphics core array. The shared functions in the shared function logic 1720 are hardware logic units that provide special supplemental functions to the graphics core array 1714. In various embodiments, the shared function logic 1720 includes, but is not limited to, sampler 1721, math 1722, and inter-thread communication (ITC) 1723 logic. Additionally, one or more caches 1725 in the shared function logic 1720 may be implemented.
[0285] Shared functionality is implemented at least when there is insufficient demand for a particular dedicated functionality contained within the graphics core array 1714. Instead, a single instance for that dedicated functionality is implemented as a standalone entity within the shared functionality logic 1720 and shared among the execution resources within the graphics core array 1714. The exact set of functionality shared among and contained within the graphics core array 1714 varies depending on the embodiment. Certain shared functionality within the shared functionality logic 1720 that is used extensively by the graphics core array 1714 may be included within the shared functionality logic 1716 within the graphics core array 1714. Optionally, the shared functionality logic 1716 within the graphics core array 1714 may include some or all of the logic within the shared functionality logic 1720. All logic elements within the shared functionality logic 1720 may be duplicated within the shared functionality logic 1716 of the graphics core array 1714. Alternatively, the shared function logic 1716 in the graphics core array 1714 is prioritized and the shared function logic 1720 is excluded. "Execution Unit"
[0286] 18A-18B illustrate thread execution logic 1800 including an array of processing elements used in a graphics processor core according to embodiments described herein. Elements of FIG. 18A-18B having the same or similar names as elements of any other figures describe the same elements in the other figures and may operate or function similarly as described elsewhere herein, may comprise the same components, and may be linked to other entities, but are not limited to such. FIG. 18A-18B illustrates an overview of thread execution logic 1800, which may represent hardware logic illustrated with each of sub-cores 1521A-1521F of FIG. 15B. FIG. 18A illustrates an execution unit in a general-purpose graphics processor, while FIG. 18B illustrates an execution unit that may be used in a computation accelerator.
[0287] 18A , the thread execution logic 1800 may include a shader processor 1802, a thread dispatcher 1804, an instruction cache 1806, a scalable execution unit array including multiple graphics execution units 1808A-1808N, a sampler 1810, a shared local memory 1811, a data cache 1812, and a data port 1814. Optionally, the scalable execution unit array may be dynamically scaled by enabling or disabling one or more execution units (e.g., any of the graphics execution units 1808A, 1808B, 1808C, 1808D, 1808N-1, and up to 1808N) based on the computational requirements of a workload. The included components may be interconnected via interconnect fabric links linked to each component. The thread execution logic 1800 may include one or more connections to memory, such as system memory or cache memory, through one or more of an instruction cache 1806, a data port 1814, a sampler 1810, and graphics execution units 1808A-1808N. Each execution unit (e.g., 1808A) may be a standalone programmable general-purpose computational unit capable of executing multiple simultaneous hardware threads while processing multiple data elements of each thread in parallel. In various embodiments, the array of execution units 1808A-1808N is scalable to include any number of individual execution units.
[0288] In some embodiments, the graphic execution units 1808A-1808N may be primarily used to execute shader programs. The shader processor 1802 may process various shader programs and may dispatch execution threads associated with the shader programs via the thread dispatcher 1804. The thread dispatcher may include logic for coordinating thread initiation requests from the graphics and media pipelines and instantiating the requested threads on one or more execution units within the graphic execution units 1808A-1808N. For example, the geometry pipeline may dispatch to thread execution logic to process vertex, tessellation, or geometry shaders. Optionally, the thread dispatcher 1804 may also handle run-time thread creation requests from executing shader programs.
[0289] In some embodiments, the graphics execution units 1808A-1808N may support an instruction set that includes native support for many standard 3D graphics shader instructions so that shader programs from graphics libraries (e.g., Direct3D and OpenGL) are executed with minimal translation. The execution units support vertex and geometry processing (e.g., vertex programs, geometry programs, vertex shaders), pixel processing (e.g., pixel shaders, fragment shaders), and general-purpose processing (e.g., compute and media shaders). Each of the graphics execution units 1808A-1808N is capable of multi-issue single instruction multiple data (SIMD) execution, and multi-threaded operation allows for an efficient execution environment despite higher latency memory accesses. Each hardware thread within each execution unit has a dedicated high-bandwidth register file and associated independent thread state. Execution is multi-issue per clock into a pipeline capable of integer, single and double precision floating point operations, SIMD branch functions, logical operations, transcendental operations, and a variety of other operations. While waiting for data from memory or one of the shared functions, dependency logic within the execution units 1808A-1808N causes the waiting thread to sleep until the requested data is returned. While the waiting thread sleeps, hardware resources may be dedicated to processing other threads. For example, during a delay associated with vertex shader processing, the execution units may execute processing of a pixel shader, fragment shader, or another type of shader program, including a different vertex shader, such as the vertex shader 2107 illustrated in FIG. 21. Various embodiments may apply to the use of execution through the use of Single Instruction Multiple Threads (SIMT) as an alternative to or in addition to the use of SIMD. Reference to a SIMD core or operation may also apply to SIMT or to SIMD in combination with SIMT.
[0290] Each execution unit in the graphics execution units 1808A-1808N operates on an array of data elements. The number of data elements is the "execution size" or number of channels for an instruction. An execution channel is a logical unit of execution for data element access, masking, and flow control within an instruction. The number of channels may be independent of the number of physical arithmetic logic units (ALUs), floating point units (FPUs), or other logic units (e.g., tensor cores, ray tracing cores, etc.) for a particular graphics processor. Additionally, the graphics execution units 1808A-1808N may support integer and floating point data types.
[0291] The execution unit instruction set includes SIMD instructions. Various data elements can be stored as packed data types in registers, and the execution unit processes the various elements based on the data size of the elements. For example, when manipulating a 256-bit wide vector, the 256 bits of the vector are stored in a register, and the execution unit manipulates the vector as four separate 184-bit packed data elements (quadword (QW) sized data elements), eight separate 32-bit packed data elements (doubleword (DW) sized data elements), sixteen separate 16-bit packed data elements (word (W) sized data elements), or thirty-two separate 8-bit data elements (byte (B) sized data elements). However, different vector widths and register sizes are also possible.
[0292] Optionally, one or more execution units may be combined with fused execution units 1809A-1809N having thread control logic (1807A-1807N) common to the fused graphics execution units (EUs). Multiple EUs may be fused into an EU group. Each EU in the fused EU group may be configured to execute a separate SIMD hardware thread. The number of EUs in the fused EU group may vary depending on the embodiment. Additionally, various SIMD widths may be executed per EU, including but not limited to SIMD8, SIMD16, and SIMD32. Each fused graphics execution unit 1809A-1809N includes at least two execution units. For example, the fused execution unit 1809A includes a first EU 1808A, a second EU 1808B, and thread control logic 1807A common to the first EU 1808A and the second EU 1808B. Thread control logic 1807A controls the threads executing on the fused graphics execution unit 1809A and enables each EU in the fused execution units 1809A-1809N to execute using a common instruction pointer register.
[0293] One or more internal instruction caches (e.g., 1806) are included in the thread execution logic 1800 for caching thread instructions for the execution units. One or more data caches (e.g., 1812) may be included in the thread execution logic 1800 for caching thread data during thread execution. Threads executing in the execution logic 1800 may also store explicitly managed data in the shared local memory 1811. A sampler 1810 may be included to provide texture sampling for 3D processing and media sampling for media processing. The sampler 1810 may include dedicated texture or media sampling functionality for processing texture or media data during sampling processing before providing the sampled data to the execution units.
[0294] During execution, the graphics and media pipelines send thread start requests to the thread execution logic 1800 via thread generation and dispatch logic. Once a group of geometric objects has been processed and rasterized into pixel data, pixel processor logic (e.g., pixel shader logic, fragment shader logic, etc.) in the shader processor 1802 is invoked to further compute output information so that the results are written to an output surface (e.g., color buffer, depth buffer, stencil buffer, etc.). The pixel shader or fragment shader may compute values of various vertex attributes to be interpolated across the rasterized objects. The pixel processor logic in the shader processor 1802 may then execute pixel or fragment shader programs provided by an application programming interface (API). To execute the shader programs, the shader processor 1802 dispatches threads to the execution units (e.g., 1808A) via the thread dispatcher 1804. The shader processor 1802 may use texture sampling logic in the sampler 1810 to access texture data in texture maps stored in memory. Arithmetic operations on the texture data and the input geometry data compute pixel color data for each geometric fragment or discard one or more pixels from further processing.
[0295] The data port 1814 may also provide the thread execution logic 1800 with a memory access mechanism to output processed data to memory for further processing on the output pipeline of the graphics processor. The data port 1814 may include or be coupled to one or more cache memories (e.g., data cache 1812) for caching data for memory access via the data port 1814.
[0296] Optionally, the execution logic 1800 may also include a ray tracer 1805 capable of providing ray tracing acceleration functionality. The ray tracer 1805 may support a ray tracing instruction set that includes instructions / functions for ray generation. The ray tracing instruction set may be similar to or different from the ray tracing instruction set supported by the ray tracing core 372 of FIG. 3C.
[0297] FIG. 18B illustrates example internal details of the execution unit 1808. The graphics execution unit 1808 may include an instruction fetch unit 1837, a general purpose register file array (GRF) 1824, an architectural register file array (ARF) 1826, a thread arbiter 1822, a send unit 1830, a branch unit 1832, a set of SIMD floating point units (FPUs) 1834, and an optional dedicated integer SIMD ALU 1835. The GRF 1824 and ARF 1826 include a general purpose register file and a set of architectural register files associated with each concurrent hardware thread that may be active in the graphics execution unit 1808. For each thread, architectural state may be maintained in the ARF 1826, while data used during thread execution is stored in the GRF 1824. The execution state of each thread, including the instruction pointer of each thread, may be kept in thread-specific registers in the ARF 1826.
[0298] The graphics execution unit 1808 may have a combined simultaneous multithreading (SMT) and fine-grained interleaved multithreading (IMT) architecture. The architecture may have a modular structure that may be tuned at design time based on the target number of simultaneous threads and the number of registers per execution unit, where the resources of the execution unit are partitioned into logic used to execute multiple simultaneous threads. The number of logical threads that can be executed by the graphics execution unit 1808 is not limited to the number of hardware threads, and multiple logical threads may be assigned to each hardware thread.
[0299] Optionally, the graphics execution unit 1808 can jointly issue multiple instructions, each of which can be a different instruction. The thread arbiter 1822 of the graphics execution unit thread 1808 can dispatch the instruction to one of the send unit 1830, the branch unit 1832, or the SIMD FPU 1834 for execution. Each execution thread can access 128 general purpose registers in the GRF 1824, where each register can store 32 bytes accessible as a SIMD 8-element vector of 32-bit data elements. Each execution unit thread can access 4K bytes in the GRF 1824, although embodiments are not so limited and other embodiments may provide more or less register resources. The graphics execution unit 1808 can be partitioned into seven hardware threads that can independently perform computational operations, although the number of threads per execution unit may vary depending on the embodiment, for example, up to 16 hardware threads may be supported. In an exemplary embodiment where 7 threads may access 4K bytes, GRF 1824 may store a total of 28K bytes. In another exemplary embodiment where 16 threads may access 4K bytes, GRF 1824 may store a total of 64K bytes. However, the number of threads per execution unit is not limited to these examples and may be more or less than the specified number. Flexible addressing modes allow multiple registers to be addressed together, effectively building wider registers or representing strided rectangular block data structures.
[0300] Additionally or alternatively, memory operations, sampler operations and other longer latency system communications may be dispatched via “send” instructions executed by a message passing send unit 1830. Branch instructions may be dispatched to a dedicated branch unit 1832 to facilitate SIMD branching and eventual convergence.
[0301] The graphics execution unit 1808 may include one or more SIMD floating point units (FPUs) 1834 that perform floating point operations. The FPUs 1834 may also support integer calculations. In some examples, the FPUs 1834 may SIMD execute up to M 32-bit floating point (or integer) operations, or SIMD execute up to 2M 16-bit integer or 16-bit floating point operations. Optionally, at least one of the FPUs provides extended math capabilities supporting high throughput, intelligent math functions, and double precision 184-bit floating point. A set of 8-bit integer SIMD ALUs 1835 may also be present and may be specifically optimized to execute operations associated with machine learning calculations.
[0302] Optionally, an array of multiple instances of the graphics execution unit 1808 may be instantiated into graphics sub-core groups (e.g., sub-slices). For scalability, product designers may select the exact number of execution units per sub-core group. The execution units 1808 may execute instructions across multiple execution channels. Also, each thread executing on the graphics execution unit 1808 may execute on a different channel.
[0303] FIG. 19 illustrates a further exemplary proposed execution unit 1900. Elements of FIG. 19 having the same or similar names as elements of any other figures herein describe the same elements in the other figures, may operate or function similarly as described elsewhere herein, may comprise the same components, may be linked to other entities, but is not limited to such. The execution unit 1900 may be, for example, but is not limited to, a computationally optimized execution unit for use in the compute engine tiles 1640A-1640D as in FIG. 16C. The execution unit 1900 may also be used in the graphics engine tiles 1610A-1610D as in FIG. 16B. The execution unit 1900 may include a thread control unit 1901, a thread state unit 1902, an instruction fetch / prefetch unit 1903, and an instruction decode unit 1904. Additionally, the execution unit 1900 may include a register file 1906 that stores registers that may be assigned to hardware threads within the execution unit. Additionally, the execution unit 1900 may include a sending unit 1907 and a branching unit 1908. The sending unit 1907 and the branching unit 1908 may operate similarly to the sending unit 1830 and the branching unit 1832 of the graphics execution unit 1808 of FIG. 18B.
[0304] The execution unit 1900 may also include a computation unit 1910 that includes multiple different types of functional units. The computation unit 1910 may also include an ALU 1911, a systolic array 1912, and a math unit 1913. The ALU 1911 includes an array of arithmetic logic units. The ALU 1911 may be configured to perform 64-bit, 32-bit, and 16-bit integer and floating-point operations across multiple processing lanes and data channels, and for multiple hardware and / or software threads. The ALU 1911 may perform integer and floating-point operations simultaneously (e.g., within the same clock cycle).
[0305] The systolic array 1912 includes a W-wide and D-deep network of multiple data processing units that may be used to systolicly perform vector operations or other data parallel operations. The systolic array 1912 may be configured to perform various matrix operations, including dot products, cross products, and general matrix-matrix multiplication (GEMM) operations. The systolic array 1912 may support 16-bit floating-point operations and 8-bit, 4-bit, 2-bit, and binary integer operations. The systolic array 1912 may be configured to accelerate machine learning operations. The systolic array 1912 may be configured with support for the bfloat16 (brain floating point) 16-bit floating-point format or the tensor float 32-bit floating-point format (TF32), which has a different number of mantissa and exponent bits relative to the Institute of Electrical and Electronics Engineers (IEEE) 754 format. The FP64 format may also be supported.
[0306] In one embodiment, the systolic array 1912 includes hardware for accelerating sparse matrix operations. Multiplication operations on sparse regions of input data may be bypassed without sacrificing throughput. Block sparsity in the input matrix can be detected and operations with known output values can be bypassed. In one embodiment, the systolic array 1912 includes hardware for enabling operations on sparse data having a compressed representation. A compressed representation of a sparse matrix stores metadata that defines non-zero values and the location of the non-zero values in the matrix. Exemplary compressed representations include compressed tensor representations, such as, but not limited to, compressed sparse row (CSR), compressed sparse column (CSC), and compressed sparse fiber (CSF) representations. Support for compressed representations allows operations on inputs in compressed tensor format without requiring the compressed representation to be decompressed or decoded. In such an embodiment, operations may be performed only on non-zero input values and the resulting non-zero output values may be mapped to an output matrix. In some embodiments, hardware support is also provided for machine-native lossless data compression formats used within the hardware or when transmitting data across the system bus. Such data may be held in a compressed format for sparse input data, and the systolic array 1912 may use compression metadata of the compressed data so that operations may be performed only on non-zero values, or blocks with zero data inputs may be bypassed in multiplication operations.
[0307] Math unit 1913 may be configured to perform a specific subset of mathematical operations more efficiently and with less power than ALU unit 1911. Math unit 1913 may include math logic found in shared functional logic of a graphics processing engine provided by other described embodiments, such as math logic 1722 of shared functional logic 1720 of Figure 17. Math unit 1913 may be configured to perform 32-bit and 64-bit floating point operations.
[0308] The thread control unit 1901 includes logic for controlling the execution of threads in the execution units. The thread control unit 1901 may include thread arbitration logic for starting, stopping, and preempting the execution of threads in the execution units 1900. The thread state unit 1902 may be used to store the state of threads assigned to execute on the execution units 1900. Storing the state of threads in the execution units 1900 allows for rapid preemption of these threads when they become blocked or idle. The instruction fetch / prefetch unit 1903 may fetch instructions from an instruction cache of a higher level execution logic (e.g., instruction cache 1806 as in FIG. 18A). The instruction fetch / prefetch unit 1903 may also issue prefetch requests for instructions to be loaded into the instruction cache based on analysis of currently executing threads. The instruction decode unit 1904 may be used to decode instructions to be executed by the computation units. The instruction decode unit 1904 may be used as a secondary decoder to decode compound instructions into constituent micro-operations.
[0309] Additionally, the execution unit 1900 includes a register file 1906 that may be used by the hardware threads executing on the execution unit 1900. The registers in the register file 1906 may be divided across logic used to execute multiple simultaneous threads within the computational units 1910 of the execution unit 1900. The number of logical threads executable by the graphics execution unit 1900 is not limited to the number of hardware threads, and multiple logical threads may be assigned to each hardware thread. The size of the register file 1906 may vary by embodiment based on the number of hardware threads supported. Register renaming may be used to dynamically assign registers to hardware threads.
[0310] FIG. 20 is a block diagram illustrating a graphics processor instruction format 2000. A graphics processor execution unit supports an instruction set having instructions in multiple formats. The solid lined boxes indicate components that are typically included in an execution unit instruction, while the dashed lines include components that are optional or that are only included in a subset of the instructions. In some embodiments, the graphics processor instruction format 2000 described and illustrated is a macroinstruction, in that it is an instruction that is provided to an execution unit, as opposed to a micro-operation that results from an instruction decode at the time the instruction is processed. Thus, a single instruction may cause the hardware to perform multiple micro-operations.
[0311] As described herein, the graphics processor execution units may natively support instructions in a 128-bit instruction format 2010. Based on the selected instruction, instruction options, and number of operands, a 64-bit compressed instruction format 2030 is available for some instructions. While the native 128-bit instruction format 2010 provides access to all instruction options, some options and operations are restricted to the 64-bit format 2030. The native instructions available in the 64-bit format 2030 vary depending on the embodiment. The instructions are compressed, in part, using a set of index values in the index field 2013. The execution unit hardware references a set of compression tables based on the index value, and uses the output of the compression tables to reconstruct the native instruction in the 128-bit instruction format 2010. Instructions of other sizes and formats may also be used.
[0312] For each format, the instruction opcode 2012 defines the operation that the execution unit is to perform. The execution unit executes each instruction in parallel on multiple data elements of each operand. For example, in response to an additional instruction, the execution unit simultaneously executes an additional operation across each color channel representing a texture or picture element. By default, the execution unit executes each instruction across all data channels of an operand. The instruction control field 2014 may allow control over certain execution options such as channel selection (e.g., predication) and data channel order (e.g., swizzle). For instructions in the 128-bit instruction format 2010, the execution size field 2016 limits the number of data channels that are executed in parallel. The execution size field 2016 may not be available for use with the 64-bit compact instruction format 2030.
[0313] Some execution unit instructions have up to three operands, including two source operands src0 2020, src1 2022, and one destination 2018. An execution unit may support dual destination instructions, in which case one of the destinations is implied. Data manipulation instructions may have a third source operand (e.g., SRC2 2024), in which case the instruction opcode 2012 determines the number of source operands. The last source operand of an instruction may be an immediate value passed (e.g., hard-coded) with the instruction.
[0314] The 128-bit instruction format 2010 may include, for example, an access / address mode field 2026 that specifies whether direct register addressing mode or indirect register addressing mode is used. If direct register addressing mode is used, the register addresses of one or more operands are provided directly by bits in the instruction.
[0315] The 128-bit instruction format 2010 may also include an access / address mode field 2026, which specifies the address mode and / or access mode of the instruction. The access mode may be used to define the data access alignment of the instruction. Access modes may be supported including a 16-byte aligned access mode and a 1-byte aligned access mode, where the byte alignment of the access mode determines the access alignment of the instruction operands. For example, in a first mode, the instruction may use byte-aligned addressing for source and destination operands, and in a second mode, the instruction may use 16-byte aligned addressing for all source and destination operands.
[0316] The address mode portion of the access / address mode field 2026 may determine whether the instruction uses direct or indirect addressing. If the direct register addressing mode is used, bits in the instruction directly provide the register address of one or more operands. If the indirect register addressing mode is used, the register address of one or more operands may be calculated based on an address register value and an address immediate field in the instruction.
[0317] Instructions may be grouped based on opcode 2012 bit fields to simplify opcode decode 2040. For 8-bit opcodes, bits 4, 5, and 6 allow the execution unit to determine the type of opcode. The exact opcode grouping shown is only an example. The move and logic opcode group 2042 may include data movement and logic instructions (e.g., move (mov), compare (cmp)). The move and logic group 2042 may share five least significant bits (LSBs), where move (mov) instructions are of the form 0000xxxxb and logic instructions are of the form 0001xxxxb. The flow control instruction group 2044 (e.g., call, jump (jmp)) includes instructions of the form 0010xxxxb (e.g., 0x20). The miscellaneous instruction group 2046 includes a mix of instructions, including synchronization instructions (e.g., wait, send) in the format of 0011xxxxb (e.g., 0x30). The parallel math instruction group 2048 includes component-wise arithmetic instructions (e.g., add, multiply (mul)) in the format of 0100xxxxb (e.g., 0x40). The parallel math instruction group 2048 performs arithmetic operations in parallel across multiple data channels. The vector math group 2050 includes arithmetic instructions (e.g., dp4) in the format of 0101xxxxb (e.g., 0x50). The vector math group performs arithmetic such as a dot product calculation on vector operands. In one embodiment, the indicated opcode decode 2040 may be used to determine which portion of the execution unit is used to execute the decoded instruction. For example, some instructions may be designated as systolic instructions to be executed by a systolic array. Other instructions, such as ray tracing instructions (not shown), may be routed to a ray tracing core or ray tracing logic within a slice or partitioning of the execution logic. "Graphics Pipeline"
[0318] Figure 21 is a block diagram of a graphics processor 2100 according to another embodiment. Elements of Figure 21 having the same or similar names as elements of any other figures herein describe the same elements in the other figures, may operate or function in a similar manner as described elsewhere herein, may comprise the same components, and may be linked to other entities, but are not limited to such.
[0319] The graphics processor 2100 may include different types of graphics processing pipelines, such as a geometry pipeline 2120, a media pipeline 2130, a display engine 2140, thread execution logic 2150, and a rendering output pipeline 2170. The graphics processor 2100 may be a graphics processor in a multi-core processing system that includes one or more general-purpose processing cores. The graphics processor may be controlled by register writes to one or more control registers (not shown) or via commands issued to the graphics processor 2100 via a ring interconnect 2102. The ring interconnect 2102 may couple the graphics processor 2100 to other processing components, such as other graphics processors or general-purpose processors. Commands from the ring interconnect 2102 are interpreted by a command streamer 2103, which provides instructions to individual components of the geometry pipeline 2120 or the media pipeline 2130.
[0320] The command streamer 2103 may direct the operation of a vertex fetcher 2105, which reads vertex data from memory, and executes the vertex processing commands provided by the command streamer 2103. The vertex fetcher 2105 may provide the vertex data to a vertex shader 2107, which performs coordinate space transformations and lighting operations on each vertex. The vertex fetcher 2105 and vertex shader 2107 may execute the vertex processing instructions by dispatching execution threads to the execution units 2152A-2152B via a thread dispatcher 2131.
[0321] The execution units 2152A-B may be an array of vector processors with an instruction set for performing graphics and media processing. The execution units 2152A-B may have an associated L1 cache 2151 that is unique per array or shared between arrays. The cache may be configured as a data cache, an instruction cache, or a single cache partitioned to contain data and instructions in different partitions.
[0322] The geometry pipeline 2120 may include a tessellation component that performs hardware accelerated tessellation of 3D objects. The programmable hull shader 2111 may configure the tessellation process. The programmable domain shader 2117 may provide back-end evaluation of the tessellation output. The tessellator 2113 may operate at the direction of the hull shader 2111 and may include application-specific logic to generate a set of detailed geometric objects based on a coarse geometric model provided to the geometry pipeline 2120 as input. Also, if tessellation is not used, the tessellation components (e.g., the hull shader 2111, the tessellator 2113, and the domain shader 2117) may be bypassed. The tessellation components may operate based on data received from the vertex shader 2107.
[0323] A complete geometric object may be processed by the geometry shader 2119 via one or more threads dispatched to the execution units 2152A-2152B, or may proceed directly to the clipper 2129. The geometry shader may operate on entire geometric objects, rather than vertices or patches of vertices as in earlier stages of the graphics pipeline. If tessellation is disabled, the geometry shader 2119 receives input from the vertex shader 2107. The geometry shader 2119 may be programmable by a geometry shader program to perform geometry tessellation if the tessellation units are disabled.
[0324] Prior to rasterization, a clipper 2129 processes the vertex data. The clipper 2129 may be a fixed-function clipper or a programmable clipper with clipping and geometry shader functions. A rasterizer and depth test component 2173 in the rendering output pipeline 2170 may dispatch pixel shaders to convert geometric objects into per-pixel representations. The pixel shader logic may be included in the thread execution logic 2150. Optionally, an application may bypass the rasterizer and depth test component 2173 and access un-rasterized vertex data via the stream-out unit 2123.
[0325] The graphics processor 2100 has an interconnect bus, an interconnect fabric, or some other interconnect mechanism that allows data and message passing between the major components of the processor. In some embodiments, the execution units 2152A-2152B and associated logic units (e.g., L1 cache 2151, sampler 2154, texture cache 2158, etc.) interconnect via data port 2156 to perform memory accesses and communicate with the rendering output pipeline components of the processor. The sampler 2154, caches 2151, 2158, and the execution units 2152A-2152B may each have a separate memory access path. Optionally, the texture cache 2158 may also be configured as a sampler cache.
[0326] The rendering output pipeline 2170 may include a rasterizer and depth test component 2173 that converts vertex-based objects into an associated pixel-based representation. The rasterizer logic may include a windower / masker unit that performs fixed function triangle and line rasterization. In some embodiments, an associated rendering cache 2178 and depth cache 2179 are also available. A pixel processing component 2177 performs pixel-based operations on the data, although in some examples pixel operations associated with 2D operations (e.g., bit block image transfer with blending) are performed by the 2D engine 2141 or are replaced at display time by the display controller 2143 using an overlay display plane. A shared L3 cache 2175 may be available to all graphics components, allowing sharing of data without using main system memory.
[0327] The graphics processor's media pipeline 2130 may include a media engine 2137 and a video front end 2134. The video front end 2134 may receive pipeline commands from the command streamer 2103. The media pipeline 2130 may include a separate command streamer. The video front end 2134 may process the media commands before sending the commands to the media engine 2137. The media engine 2137 may include a thread generation function to generate threads for dispatching to the thread execution logic 2150 via the thread dispatcher 2131.
[0328] The graphics processor 2100 may include a display engine 2140, which may be external to the processor 2100 and may be coupled to the graphics processor via a ring interconnect 2102 or some other interconnect bus or fabric. The display engine 2140 may include a 2D engine 2141 and a display controller 2143. The display engine 2140 may include special purpose logic that can operate independently of the 3D pipeline. The display controller 2143 may be coupled to a display device (not shown), which may be a system integrated display device such as found in a laptop computer or an external display device attached via a display device connector.
[0329] The geometry pipeline 2120 and the media pipeline 2130 may be configurable to perform operations based on multiple graphic and media programming interfaces and are not specific to any application programming interface (API). Driver software for the graphics processor may translate API calls specific to a particular graphic or media library into commands that can be processed by the graphics processor. Support may be provided for the Open Graphics Library (OpenGL), Open Computing Language (OpenCL), and / or Vulkan graphics and compute APIs, all from the Khronos Group. Support may also be provided for Microsoft Corporation's Direct3D library. Combinations of these libraries may also be supported. Support may also be provided for the open source computer vision library (OpenCV). Future APIs compatible with the 3D pipeline will also be supported if a mapping can be made from the future API's pipeline to the graphics processor's pipeline. "Graphics Pipeline Programming"
[0330] FIG. 22A is a block diagram illustrating a graphics processor command format 2200 used to program a graphics processing pipeline, such as the pipelines described with respect to FIGs. 16A, 17, and 21. FIG. 22B is a block diagram illustrating a graphics processor command sequence 2210, according to one embodiment. The solid lined boxes in FIG. 22A indicate components that are generally included in a graphics command, while the dashed lines include components that are optional or that are included in only a subset of the graphics commands. The example graphics processor command format 2200 of FIG. 22A includes data fields identifying a client 2202, a command operation code (opcode) 2204, and data for the command 2206. A sub-opcode 2205 and a command size 2208 are also included in some commands.
[0331] The client 2202 may specify a client unit of the graphics device that processes the command data. The graphics processor command parser may inspect the client field of each command to condition further processing of the command and route the command data to the appropriate client unit. The graphics processor client units may include a memory interface unit, a rendering unit, a 2D unit, a 3D unit, and a media unit. Each client unit may have a corresponding processing pipeline for processing the command. When a command is received by a client unit, the client unit reads the opcode 2204 and, if present, the sub-opcode 2205 to determine the operation to perform. The client unit executes the command using the information in the data field 2206. For some commands, an explicit command size 2208 is expected to specify the size of the command. The command parser may automatically determine the size of at least some of the commands based on the command opcode. The commands may be aligned using doubleword multiples. Other command formats may also be used.
[0332] The flow diagram in FIG. 22B illustrates an exemplary graphics processor command sequence 2210. Software or firmware of a data processing system featuring an exemplary graphics processor may use a version of the illustrated command sequence to set up, execute, and terminate a set of graphics operations. The sample command sequence is shown and described for illustrative purposes only, and is not limited to these particular commands or this command sequence. Furthermore, the commands may be issued as a batch of commands in a command sequence, such that the graphics processor processes the sequence of commands in an at least partially coherent state.
[0333] The graphics processor command sequence 2210 may begin with a pipeline flush command 2212 that causes any active graphics pipelines to complete any commands currently pending for the pipeline. Optionally, the 3D pipeline 2222 and the media pipeline 2224 may not operate simultaneously. The pipeline flush is executed to cause the active graphics pipelines to complete any pending commands. In response to the pipeline flush, the command parser for the graphics processor pauses command processing until the active drawing engines complete pending operations and the associated read caches are invalidated. Optionally, any data in the rendering cache that is marked as "dirty" may be flushed to memory. The pipeline flush command 2212 may be used during pipeline synchronization or before placing the graphics processor in a low power state.
[0334] The pipeline select command 2213 may be used when a command sequence requires the graphics processor to explicitly switch between pipelines. The pipeline select command 2213 may only be needed once within an execution context before issuing a pipeline command unless the context issues commands to both pipelines. A pipeline flush command 2212 may be needed immediately before a pipeline switch via the pipeline select command 2213.
[0335] Pipeline control commands 2214 may configure the graphics pipeline for processing and may be used to program the 3D pipeline 2222 and the media pipeline 2224. Pipeline control commands 2214 may configure the pipeline state of an active pipeline. Pipeline control commands 2214 may be used during pipeline synchronization or to clear data from one or more cache memories in an active pipeline before processing a batch of commands.
[0336] Return buffer state commands 2216 may be used to configure a set of return buffers for each pipeline to write data to. Some pipeline operations require the allocation, selection, or configuration of one or more return buffers to which the operation writes intermediate data during processing. The graphics processor may also use one or more return buffers to store output data and perform cross-thread communication. Return buffer state 2216 may include selecting the size and number of return buffers to use for a set of pipeline operations.
[0337] The remaining commands in the command sequence differ based on the active pipeline for the operation. Based on the pipeline decision 2220, the command sequence aligns to either the 3D pipeline 2222 starting at the 3D pipeline state 2230 or the media pipeline 2224 starting at the media pipeline state 2240.
[0338] The commands that configure the 3D pipeline state 2230 include 3D state setting commands for vertex buffer states, vertex element states, certain color states, depth buffer states, and other state variables that should be configured before 3D primitive commands are processed. The values of these commands are determined at least in part based on the particular 3D API being used. The 3D pipeline state 2230 commands may also be able to selectively disable or bypass certain pipeline elements if those elements are not used.
[0339] The 3D primitive 2232 commands may be used to submit 3D primitives to be processed by the 3D pipeline. Commands and associated parameters passed to the graphics processor via the 3D primitive 2232 commands are forwarded to a vertex fetch function in the graphics pipeline. The vertex fetch function uses the 3D primitive 2232 command data to generate a vertex data structure. The vertex data structure is stored in one or more return buffers. The 3D primitive 2232 commands may be used to perform vertex processing on the 3D primitives via vertex shaders. To process the vertex shaders, the 3D pipeline 2222 dispatches shader execution threads to the graphics processor execution units.
[0340] The 3D pipeline 2222 may be triggered via execute 2234 commands or events. Registers may be written to trigger command execution. Execution may be triggered via "go", "kick" commands in a command sequence. Command execution may be triggered using a pipeline synchronization command to flush the command sequence in the graphics pipeline. The 3D pipeline performs geometry processing for 3D primitives. Once the operations are complete, the resulting geometric objects are rasterized and the pixel engine colors the resulting pixels. Additional commands to control pixel shading and pixel backend operations may be included for these operations.
[0341] The graphics processor command sequence 2210 may follow a path in the media pipeline 2224 when performing media operations. In general, the specific use and manner of programming for the media pipeline 2224 depends on the media or computational processing being performed. Certain media decode operations may be offloaded to the media pipeline during media decoding. The media pipeline may also be bypassed, and media decoding may be performed in whole or in part using resources provided by one or more general purpose processing cores. The media pipeline may also include elements for general purpose graphics processor unit (GPGPU) operations, where the graphics processor is used to perform SIMD vector operations using computational shader programs that are not explicitly related to rendering graphics primitives.
[0342] The media pipeline 2224 may be configured similarly to the 3D pipeline 2222. A set of commands to configure the media pipeline state 2240 are dispatched or placed in the command queue before the media object commands 2242. Commands for the media pipeline state 2240 may include data to configure the media pipeline elements used to process the media objects. This includes data that configures the video decode and video encode logic in the media pipeline, e.g., encode or decode formats. Commands for the media pipeline state 2240 may also support the use of one or more pointers to "indirect" state elements that contain a batch of state settings.
[0343] A media object command 2242 may provide a pointer to a media object for processing by the media pipeline. A media object includes a memory buffer containing the video data to be processed. Optionally, all media pipeline state must be valid before issuing a media object command 2242. Once the pipeline state is configured and media object commands 2242 are queued, the media pipeline 2224 is triggered by an execute command 2244 or an equivalent execution event (e.g., a register write). Output from the media pipeline 2224 may then be post-processed by operations provided by the 3D pipeline 2222 or the media pipeline 2224. GPGPU processing may be configured and executed in a similar manner to media processing. "Graphics Software Architecture"
[0344] FIG. 23 illustrates an exemplary graphics software architecture for a data processing system 2300. Such software architecture may include a 3D graphics application 2310, an operating system 2320, and at least one processor 2330. The processor 2330 may include a graphics processor 2332, and one or more general-purpose processor cores 2334. The processor 2330 may be a variation of the processor 1402 or any other processor described herein. The processor 2330 may be substituted for the processor 1402 or any other processor described herein. Thus, the disclosure of any feature in combination with the processor 1402 or any other processor described herein also discloses the corresponding combination with the graphics processor 2330, but is not limited to such. Furthermore, elements of FIG. 23 having the same or similar names as elements of any other figures herein describe the same elements of the other figures, may operate or function similarly as described elsewhere herein, may comprise the same components, and may be linked to other entities, but is not limited to such. The graphics application 2310 and the operating system 2320 each execute within the system memory 2350 of the data processing system.
[0345] The 3D graphics application 2310 may include one or more shader programs, including shader instructions 2312. The shader language instructions may be in, for example, Direct3D High Level Shader Language (HLSL) or OpenGL Shader Language (GLSL), etc. The application may also include executable instructions 2314 in a machine language suitable for execution by a general purpose processor core 2334. The application may also include graphics objects 2316 defined by vertex data.
[0346] In some embodiments, the operating system 2320 may be Microsoft Windows operating systems from Microsoft Corporation, a proprietary UNIX-style operating system, or an open source UNIX-style operating system using a variation of the Linux kernel. The operating system 2320 may support a graphics API 2322, such as the Direct3D API, the OpenGL API, or the Vulkan API. If the Direct3D API is used, the operating system 2320 compiles any shader instructions 2312 in HLSL into a lower level shader language using a front-end shader compiler 2324. The compilation may be a just-in-time (JIT) compilation, or the application may perform shader pre-compilation. High-level shaders may be compiled into lower level shaders during compilation of the 3D graphics application 2310. The shader instructions 2312 may be provided in an intermediate form, such as a version of the Standard Portable Intermediate Representation (SPIR) used by the Vulkan API.
[0347] The user mode graphics driver 2326 may include a back-end shader compiler 2327 for converting the shader instructions 2312 into a hardware-specific representation. If the OpenGL API is used, the shader instructions 2312 in the GLSL high-level language are passed to the user mode graphics driver 2326 for compilation. The user mode graphics driver 2326 may communicate with a kernel mode graphics driver 2329 using operating system kernel mode functions 2328. The kernel mode graphics driver 2329 may communicate with the graphics processor 2332 to dispatch commands and instructions. "IP Core Implementation"
[0348] One or more aspects may be implemented by representative code stored on a machine-readable medium that represents and / or defines logic in an integrated circuit, such as a processor. For example, the machine-readable medium may include instructions that represent various logic in a processor. When read by a machine, the instructions may cause the machine to assemble logic that performs the techniques described herein. Such representations, known 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 that describes the structure of the integrated circuit. The hardware model may be provided to various customers or manufacturing facilities that load the hardware model onto manufacturing machines that produce the integrated circuit. The integrated circuit may be manufactured such that the circuit performs the operations described in connection with any of the embodiments described herein.
[0349] FIG. 24A is a block diagram illustrating an IP core development system 2400 that may be used to manufacture an integrated circuit that performs operations, according to one embodiment. The IP core development system 2400 may be used to generate modular, reusable designs that may be incorporated into a larger design, or may be used to build an entire integrated circuit (e.g., an SoC integrated circuit). The design facility 2430 may generate a software simulation 2410 of the IP core design in a high-level programming language (e.g., C / C++). The software simulation 2410 may be used to design, test, and verify the behavior of the IP core using a simulation model 2412. The simulation model 2412 may include functional, behavioral, and / or timing simulation. A register transfer level (RTL) design 2415 may then be created or synthesized from the simulation model 2412. The RTL design 2415 extracts the behavior of the integrated circuit that models the flow of digital signals between hardware registers and includes associated logic that is executed using the modeled digital signals. In addition to the RTL design 2415, lower level designs at the logic level or transistor level may be created, designed, or synthesized. Therefore, the specific details of the initial design and simulation may vary.
[0350] The RTL design 2415 or equivalent may be further synthesized by a design function into a hardware model 2420, which may be a hardware description language (HDL) or some other representation of the 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 2440 (e.g., a hard disk, a flash memory, or any non-volatile storage medium) for delivery to a third-party manufacturing facility 2465. Alternatively, the IP core design may be transmitted (e.g., via the Internet) through a wired connection 2450 or a wireless connection 2460. The manufacturing facility 2465 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.
[0351] 24B illustrates a vertical cross-sectional view of an integrated circuit package assembly 2470. The integrated circuit package assembly 2470 illustrates an implementation of one or more processors or accelerator devices described herein. The package assembly 2470 includes multiple units of hardware logic 2472, 2474 coupled to a substrate 2480. The logic 2472, 2474 may be implemented at least partially in configurable logic or fixed function logic hardware and may include one or more portions of any of the processor cores, graphic processors or other accelerator devices described herein. Each unit of logic 2472, 2474 may be implemented in a semiconductor die and coupled to the substrate 2480 via an interconnect structure 2473. The interconnect structure 2473 may be configured to route electrical signals between the logic 2472, 2474 and the substrate 2480 and may include interconnects such as, but not limited to, bumps or pillars. The interconnect structure 2473 may be configured to route electrical signals, such as, for example, input / output (I / O) signals associated with the operation of the logic 2472, 2474, and / or power or ground signals. Optionally, the substrate 2480 may be an epoxy-based laminate substrate. The substrate 2480 may also include other suitable types of substrates. The package assembly 2470 may be connected to other electrical devices via the package interconnect 2483. The package interconnect 2483 may be coupled to a surface of the substrate 2480 to route electrical signals to other electrical devices, such as a motherboard, other chipsets, or multi-chip modules.
[0352] The units of logic 2472, 2474 may be electrically coupled to a bridge 2482 configured to route electrical signals between the logic 2472, 2474. The bridge 2482 may be a high density interconnect structure that provides routing of electrical signals. The bridge 2482 may include a bridge substrate comprised of glass or a suitable semiconductor material. Electrical routing features may be formed on the bridge substrate that provides chip-to-chip connections between the logic 2472, 2474.
[0353] Although two units of logic 2472, 2474 and a bridge 2482 are shown, the embodiments described herein may include more or fewer logic units on one or more dies. If logic is included on a single die, bridge 2482 may be omitted, and thus one or more dies may be connected by zero or more bridges. Alternatively, multiple dies or units of logic may be connected by one or more bridges. Additionally, multiple logic units, dies and bridges may be connected together in other possible configurations, including three-dimensional configurations.
[0354] FIG. 24C illustrates a package assembly 2490 including multiple units of a hardware logic chipset connected to a substrate 2480 (e.g., a base die). The graphics processing units, parallel processors, and / or computational accelerators described herein may be composed of various silicon chiplets that are manufactured separately. In this context, a chiplet is an at least partially packaged integrated circuit that includes separate units of logic that may be assembled with other chiplets into a larger package. Various sets of chiplets with different IP core logic may be assembled into a single device. Additionally, chiplets may be integrated into a base die or base chiplet using active interposer technology. The concepts described herein allow interconnection and communication between different forms of IP within a GPU. IP cores may be manufactured using different process technologies and may be configured during manufacturing. This avoids the complexity of converging multiple IPs on a large SoC with several flavors of IP, among others, into the same manufacturing process. The ability to use multiple process technologies provides a faster time to market and a cost-effective way to create multiple product SKUs. Additionally, non-aggregated IP can be further modified to be independently power-gated, so that components not used in a particular workload are powered off, reducing overall power consumption.
[0355] In various embodiments, package assembly 2490 may include fewer or more components or chiplets than fabric 2485 or one or more bridges 2487. The chiplets in package assembly 2490 may have a 2.5D configuration using chip-on-wafer-on-substrate with multiple dies stacked side-by-side on a silicon interposer that includes three silicon vias (TSVs) for coupling the chiplets to substrate 2480, which has electrical connections to package interconnects 2483.
[0356] In one embodiment, the silicon interposer is an active interposer 2489 with embedded logic in addition to the TSVs. In such an embodiment, the chiplets in the package assembly 2490 are placed on top of the active interposer 2489 using 3D face-to-face die stacking. The active interposer 2489 may include hardware logic for I / O 2491, cache memory 2492, and other hardware logic 2493 in addition to the interconnect fabric 2485 and silicon bridge 2487. The fabric 2485 enables communication between the various logic chiplets 2472, 2474 and the logic 2491, 2493 in the active interposer 2489. The fabric 2485 may be another form of NoC interconnect or packet switch fabric that switches data packets between components of the package assembly. For complex assemblies, the fabric 2485 may be dedicated chiplets that enable communication between the various hardware logic of the package assembly 2490.
[0357] Bridge structures 2487 in active interposer 2489 may be used to facilitate point-to-point interconnections between, for example, logic or I / O chiplets 2474 and memory chiplets 2475. In some implementations, bridge structures 2487 may also be embedded in substrate 2480.
[0358] The hardware logic chipset may include dedicated hardware logic chiplets 2472, logic or I / O chiplets 2474, and / or memory chiplets 2475. The hardware logic chipset 2472 and logic or I / O chiplets 2474 may be at least partially implemented in configurable logic or fixed function logic hardware and may include one or more portions of any of the processor cores, graphics processors, parallel processors or other accelerator devices described herein. The memory chiplets 2475 may be DRAM (e.g., GDDR, HBM) memory or cache (SRAM) memory. Cache memory 2492 in the active interposer 2489 (or substrate 2480) may operate as a global cache for the package assembly 2490, as part of a distributed global cache, or as a dedicated cache for the fabric 2485.
[0359] Each chiplet may be fabricated as a separate semiconductor die and may be coupled to a base die embedded in or coupled to the substrate 2480. Coupling to the substrate 2480 may be via interconnect structures 2473. The interconnect structures 2473 may be configured to route electrical signals between the various chiplets and logic in the substrate 2480. The interconnect structures 2473 may include interconnects such as, but are not limited to, bumps or pillars. In some embodiments, the interconnect structures 2473 may be configured to route electrical signals such as, for example, input / output (I / O) signals associated with the operation of the logic, I / O, and memory chiplets, and / or power or ground signals. In one embodiment, additional interconnect structures couple the active interposer 2489 to the substrate 2480.
[0360] The substrate 2480 may be an epoxy-based laminate substrate, but is not so limited, and the substrate 2480 may also include other suitable types of substrates. The package assembly 2490 may be connected to other electrical devices via package interconnects 2483. The package interconnects 2483 may be coupled to a surface of the substrate 2480 to route electrical signals to other electrical devices, such as a motherboard, other chipsets, or multi-chip modules.
[0361] The logic or I / O chiplets 2474 and the memory chiplets 2475 may be electrically coupled via a bridge 2487 configured to route electrical signals between the logic or I / O chiplets 2474 and the memory chiplets 2475. The bridge 2487 may be a high density interconnect structure that provides routing of electrical signals. The bridge 2487 may include a bridge substrate made of glass or a suitable semiconductor material. Electrical routing features may be formed on the bridge substrate that provides inter-chip connections between the logic or I / O chiplets 2474 and the memory chiplets 2475. The bridge 2487 may also be referred to as a silicon bridge or an interconnect bridge. For example, the bridge 2487 is an embedded multi-die interconnect bridge (EMIB). Alternatively, the bridge 2487 may simply be a direct connection from one chiplet to another.
[0362] FIG. 24D illustrates a package assembly 2494 including a replaceable chiplet 2495 according to one embodiment. The replaceable chiplet 2495 may be assembled into a standard slot on one or more base chiplets 2496, 2498. The base chiplets 2496, 2498 may be coupled via a bridge interconnect 2497, which may be similar to other bridge interconnects described herein, e.g., an EMIB. Memory chiplets may also be connected to logic or I / O chiplets via bridge interconnects. I / O and logic chiplets may communicate via an interconnect fabric. The base chiplets may each support one or more slots in a standard format for one of logic or I / O memory caches.
[0363] The SRAM and power delivery circuitry may be fabricated within one or more of the base chiplets 2496, 2498, which may be fabricated using a different process technology than the replaceable chiplets 2495 stacked on top of the base chiplets. For example, the base chiplets 2496, 2498 may be fabricated using a larger process technology while the replaceable chiplets may be fabricated using a smaller process technology. One or more of the replaceable chiplets 2495 may be memory (e.g., DRAM) chiplets. Different memory densities may be selected for the package assembly 2494 based on the target power and / or performance of the product using the package assembly 2494. Additionally, logic chiplets with different numbers of functional unit types may be selected at assembly time based on the target product power and / or performance. Additionally, chiplets containing different types of IP logic cores may be inserted into the replaceable chiplet slots, enabling hybrid processor designs where IP blocks of different technologies can be mixed and matched. "Exemplary System on a Chip Integrated Circuit"
[0364] 25-26B show example integrated circuits and associated graphics processors that may be fabricated using one or more IP cores. In addition to what is shown, other logic and circuits may be included, including additional graphics processors / cores, peripheral interface controllers, or general-purpose processor cores. Elements in FIG. 25-26B that have the same or similar names as elements in any other figure herein describe the same elements in any other figure, may operate or function in a similar manner as described elsewhere herein, may comprise the same components, and may be linked to other entities, but are not limited to such.
[0365] FIG. 25 is a block diagram illustrating an exemplary system on chip integrated circuit 2500 that may be manufactured using one or more IP cores. The exemplary integrated circuit 2500 includes one or more application processors 2505 (e.g., CPU), at least one graphics processor 2510, which may be a variation of the graphics processors 1408, 1508, 2510 or any graphics processor described herein, and may be used in place of any graphics processor described herein. Thus, any disclosure herein of any feature in combination with a graphics processor also discloses the corresponding combination with the graphics processor 2510, but is not limited to such. The integrated circuit 2500 may further include an image processor 2515 and / or a video processor 2520, any of which may be modular IP cores from the same or multiple different design facilities. The integrated circuit 2500 includes a USB controller 2525, a UART controller 2530, an SPI / SDIO controller 2535, and an I / O controller 2540. 2 S / I 2The integrated circuit may include peripheral or bus logic including a C controller 2540. Additionally, the integrated circuit may include a display device 2545 coupled to one or more of a High Definition Multimedia Interface (HDMI) controller 2550 and a Mobile Industry Processor Interface (MIPI) display interface 2555. Storage may be provided by a flash memory subsystem 2560 including a flash memory and a flash memory controller. Memory interface may be provided via a memory controller 2565 for access to an SDRAM or SRAM memory device. Some integrated circuits may additionally include an embedded security engine 2570.
[0366] 26A-26B are block diagrams illustrating an exemplary graphics processor for use in an SoC, according to embodiments described herein. The graphics processor may be a variation of graphics processor 1408, 1508, 2510, or any other graphics processor described herein. The graphics processor may be substituted for graphics processor 1408, 1508, 2510, or any other graphics processor described herein. Thus, the disclosure of any feature in combination with graphics processor 1408, 1508, 2510, or any other graphics processor described herein also discloses the corresponding combination with the graphics processor of FIGS. 26A-26B, but is not so limited. FIG. 26A illustrates an exemplary graphics processor 2610 of a system on a chip integrated circuit that may be fabricated using one or more IP cores, according to one embodiment. FIG. 26B illustrates an additional exemplary graphics processor 2640 of a system on a chip integrated circuit that may be fabricated using one or more IP cores, according to one embodiment. The graphics processor 2610 of FIG. 26A is an example of a low power graphics processor core. Graphics processor 2640 of Figure 26B is an example of a higher performance graphics processor core. For example, graphics processor 2610 and graphics processor 2640 may each be a variation of graphics processor 2510 of Figure 25, as mentioned at the beginning of this paragraph.
[0367] As shown in FIG. 26A, the graphics processor 2610 includes a vertex processor 2605 and one or more fragment processors 2615A-2615N (e.g., 2615A, 2615B, 2615C, 2615D, 2615N-1, and 2615N-2). The graphics processor 2610 can execute different shader programs through separate logic, with the vertex processor 2605 optimized to perform operations for vertex shader programs, while the one or more fragment processors 2615A-2615N may perform fragment (e.g., pixel) shading operations for fragment or pixel shader programs. The vertex processor 2605 executes the vertex processing stage of the 3D graphics pipeline and generates primitive and vertex data. The fragment processors 2615A-2615N use the primitive and vertex data generated by the vertex processor 2605 to generate a frame buffer that is displayed on a display device. The fragment processors 2615A-2615N may be optimized to execute fragment shader programs such as those provided in the OpenGL API, and may be used to perform operations similar to pixel shader programs such as those provided in the Direct 3D API.
[0368] Additionally, the graphics processor 2610 further includes one or more memory management units (MMUs) 2620A-2620B, caches 2625A-2625B, and circuit interconnects 2630A-2630B. The one or more MMUs 2620A-2620B provide virtual-to-physical address mapping for the graphics processor 2610, including the vertex processor 2605 and / or fragment processors 2615A-2615N, and may 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 2625A-2625B. The one or more MMUs 2620A-2620B may be synchronized with other MMUs in the system, including one or more MMUs associated with the one or more application processors 2505, image processor 2515, and / or video processor 2520 of FIG. 25, such that each processor 2505-2520 may participate in a shared or unified virtual memory system. Components of the graphics processor 2610 may correspond to components of other graphics processors described herein. One or more MMUs 2620A-2620B may correspond to MMU 245 of FIG. 2C. Vertex processor 2605 and fragment processors 2615A-2615N may correspond to graphics multiprocessor 234. One or more circuit interconnects 2630A-2630B enable the graphics processor 2610 to interface with other IP cores in the SoC via an internal bus of the SoC or via a direct connection, according to an embodiment. One or more circuit interconnects 2630A-2630B may correspond to data crossbar 240 of FIG. 2C. Further correspondences may be found between similar components of the graphics processor 2610 and the various graphics processor architectures described herein.
[0369] As shown in FIG. 26B, the graphics processor 2640 includes one or more MMUs 2620A-2620B, caches 2625A-2625B, and circuit interconnects 2630A-2630B of the graphics processor 2610 of FIG. 26A. The graphics processor 2640 includes one or more shader cores 2655A-2655N (e.g., 2655A, 2655B, 2655C, 2655D, 2655E, 2655F through 2655N-1 and 2655N), which provide a unified shader core architecture in which a single core or type or cores can execute any type of programmable shader code, including shader program code implementing vertex shaders, fragment shaders, and / or compute shaders. The exact number of shader cores presented may vary between embodiments and implementations. Additionally, the graphics processor 2640 includes an inter-core task manager 2645, which acts as a thread dispatcher to dispatch execution threads to one or more shader cores 2655A-2655N, and a tiling unit 2658 to accelerate tiling operations for tile-based rendering, where rendering operations for a scene are subdivided into image space, for example, to exploit local spatial coherence within a scene or to optimize internal cache utilization. The shader cores 2655A-2655N may correspond, for example, to the graphics multiprocessor 234 as in FIG. 2D, or to each of the graphics multiprocessors 325, 350 of FIGs. 3A and 3B, or to the multi-core group 365A of FIG. 3C. "Systolic Arithmetic for Sparse Data"
[0370] A sparse matrix is a matrix that contains very few nonzero elements relative to the total number of elements in the matrix. The sparsity of a matrix may be indicated by the number of nonzero-valued elements divided by the total number of elements. The amount of storage used by a sparse matrix may be reduced by compressing the data and / or encoding the data into a sparse encoding format. Processing operations performed with sparse matrices may be accelerated by bypassing multiplication operations on zero-valued matrix elements. Optimizations for matrix data that is predominantly single-valued or easily compressible may also be performed.
[0371] The embodiments described herein include software, firmware, and hardware logic that provide techniques for performing arithmetic operations on sparse data via systolic processing units or other matrix and / or tensor accelerator units. One embodiment provides techniques for optimizing training and inference on systolic arrays when using sparse data. One embodiment provides techniques for using decompression information when performing sparse computations. One embodiment provides numerical transformations that transform sparse data and allow training to be performed based on the transformed data. One embodiment provides techniques for performing systolic arithmetic directly on compressed data. "GPGPU with tensor acceleration logic"
[0372] 27 is a block diagram of a data processing system 2700 according to one embodiment. The data processing system 2700 is a heterogeneous processing system having a processor 2702, a unified memory 2710, and a GPGPU 2720 including machine learning acceleration logic. The processor 2702 and the GPGPU 2720 may be any of the processors and GPGPUs / parallel processors described herein. The processor 2702 may execute instructions for a compiler 2715 stored in the system memory 2712. The compiler 2715 executes on the processor 2702 to compile the source code 2714A into compiled code 2714B. The compiled code 2714B may include instructions that may be executed by the processor 2702 and / or instructions that may be executed by the GPGPU 2720. During compilation, the compiler 2715 may perform an operation to insert metadata, including hints regarding the level of data parallelism present in the compiled code 2714B and / or hints regarding data locality associated with threads to be dispatched based on the compiled code 2714B. The compiler 2715 may include the information necessary to perform such operations, or the operations may be performed with the assistance of the runtime library 2716. The runtime library 2716 may also assist the compiler 2715 in compiling the source code 2714A, and the runtime library 2716 may include instructions that are linked into the compiled code 2714B at runtime to facilitate execution of the compiled instructions on the GPGPU 2720.
[0373] The unified memory 2710 represents a unified address space that may be accessed by the processor 2702 and the GPGPU 2720. The unified memory may include system memory 2712 and GPGPU memory 2718. The GPGPU memory 2718 is memory within the address space of the GPGPU 2720 and may include some or all of the system memory 2712. In one embodiment, the GPGPU memory 2718 may also include at least a portion of any memory dedicated for exclusive use by the GPGPU 2720. In one embodiment, the compiled code 2714B stored in the system memory 2712 may be mapped into the GPGPU memory 2718 for access by the GPGPU 2720.
[0374] The GPGPU 2720 includes multiple computation blocks 2724A-2724N, which may include one or more of the various processing resources described herein. The processing resources may be or include a variety of different computation resources, such as, for example, an execution unit, a compute unit, a streaming multiprocessor, a graphics multiprocessor, or a multicore group. In one embodiment, the GPGPU 2720 additionally includes a tensor accelerator 2723, which may include one or more special-function computation units designed to accelerate a subset of matrix operations (e.g., dot products, etc.). The tensor accelerator 2723 may also be referred to as a tensor accelerator or a tensor core. In one embodiment, logic components within the tensor accelerator 2723 may be distributed among the processing resources of the multiple computation blocks 2724A-2724N.
[0375] The GPGPU 2720 may also include a set of resources that may be shared by the compute blocks 2724A-2724N and the tensor accelerator 2723, including, but not limited to, a set of registers 2725, a power and performance module 2726, and a cache 2727. In one embodiment, the registers 2725 include directly and indirectly accessible registers, where the indirectly accessible registers are optimized for use by the tensor accelerator 2723. The power and performance module 2726 may be configured to adjust the power supply and clock frequency for the compute blocks 2724A-2724N to power gate idle components within the compute blocks 2724A-2724N. In various embodiments, the cache 2727 may include an instruction cache and / or a lower level data cache.
[0376] The GPGPU 2720 may additionally include an L3 data cache 2730 that may be used to cache data accessed by the tensor accelerator 2723 and / or the computational elements in the computational blocks 2724A-2724N from the unified memory 2710. In one embodiment, the L3 data cache 2730 includes a shared local memory 2732 that may be shared by the computational elements in the computational blocks 2724A-2724N and the tensor accelerator 2723.
[0377] In one embodiment, the GPGPU 2720 includes instruction processing logic such as a fetch and decode unit 2721 and a scheduler controller 2722. The fetch and decode unit 2721 includes a fetch unit and a decode unit for fetching and decoding instructions to be executed by one or more of the computation blocks 2724A-2724N or the tensor accelerator 2723. Instructions may be scheduled to appropriate functional units or tensor accelerators in the computation blocks 2724A-2724N via the scheduler controller 2722. In one embodiment, the scheduler controller 2722 is an ASIC configurable to perform advanced scheduling operations. In one embodiment, the scheduler controller 2722 is a microcontroller or low energy-per-instruction processing core capable of executing scheduler instructions loaded from a firmware module.
[0378] In one embodiment, some functions to be performed by the computation blocks 2724A-2724N may be scheduled directly to the tensor accelerator 2723 or offloaded to the tensor accelerator 2723. In various embodiments, the tensor accelerator 2723 includes processing element logic configured to efficiently perform matrix computation operations such as multiplication and addition operations and dot product operations used by 3D graphics or computation shader programs. In one embodiment, the tensor accelerator 2723 may be configured to accelerate operations used by machine learning frameworks. In one embodiment, the tensor accelerator 2723 is an application specific integrated circuit explicitly configured to perform a specific set of parallel matrix multiplication and / or addition operations. In one embodiment, the tensor accelerator 2723 is a field programmable gate array (FPGA) that provides fixed function logic that can be updated between workloads. The set of matrix operations that can be performed by the tensor accelerator 2723 may be limited compared to the operations that can be performed by the computation blocks 2724A-2724N. However, the tensor accelerator 2723 may perform these operations with a much higher throughput compared to the computation blocks 2724A-2724N.
[0379] 28 illustrates a matrix operation 2805 performed by an instruction pipeline 2800 according to one embodiment. The instruction pipeline 2800 may be configured to perform a matrix operation 2805, such as, but not limited to, a dot product operation. The dot product of two vectors is a scalar value equal to the sum of the products of corresponding components of the vectors. The dot product may be calculated as shown in equation (1) below.
number
[0380] Dot products may be used in convolution operations for convolutional neural networks (CNNs). FIG. 28 illustrates two-dimensional (2D) convolution using a matrix operation 2805 that includes a dot product operation. While a 2D convolution is shown, an N-dimensional convolution may be performed on an N-dimensional volume using an N-dimensional filter. A receptive field tile 2802 highlights a portion of an input volume in an input volume buffer 2804. The input volume buffer may be stored in a memory 2830. A dot matrix operation 2805 may be performed between data in the receptive field tile 2802 and a convolution filter to generate data points in an output buffer 2806, which may be stored in the memory 2830. The memory 2830 may be any memory described herein, including the system memory 2712, the GPGPU memory 2718, or one or more cache memories 2727, 2730 as in FIG. 27.
[0381] The combination of data points in the output buffer 2806 represents an activation map that is generated by the convolution operation. Each point in the activation map is generated by slicing a receptive field tile across the input volume buffer 2804. The activation map data may be input to an activation function to determine an output activation value. In one embodiment, the convolution of the input volume buffer 2804 may be defined within the framework as a high-level matrix operation 2905. The high-level matrix operation may be performed via primitive operations such as Basic Linear Algebra Subprograms (BLAS) operations. The primitive operations may be accelerated via hardware instructions executed by the instruction pipeline 2800.
[0382] The instruction pipeline 2800 used to accelerate hardware instructions may include an instruction fetch and decode unit 2721 capable of fetching and decoding hardware instructions, and may include a scheduler controller 2722 capable of scheduling the decoded instructions to one or more processing resources in the computation blocks 2724A-2724N and / or the tensor accelerator 2723. In one embodiment, the hardware instructions may be scheduled to the computation blocks 2724A-2724N and offloaded to the tensor accelerator 2723. One or more hardware instructions and associated data for performing the matrix operations 2805 may be stored in the memory 2830. Output of the hardware instructions may also be stored in the memory 2830.
[0383] In one embodiment, the tensor accelerator 2723 may execute one or more hardware instructions to perform matrix operations 2805 using an integrated systolic tensor array 2808 (DP logic). The systolic tensor array 2808 may include a combination of programmable and fixed-function hardware configurable to perform dot-product operations. While the functional units within the computation blocks 2724A-2724N may be configured to perform dot-product operations, the systolic tensor array 2808 may be configured to perform a limited subset of dot-product operations with a much greater throughput compared to the computation blocks 2724A-2724N.
[0384] Figures 29A-29B show details of a hardware-based systolic tensor array 2808, according to some embodiments. Figure 29A shows a grid of functional units that can be configured to perform a dot-product operation within a single clock cycle. Figure 29B shows a single exemplary functional unit.
[0385] As shown in FIG. 29A, in one embodiment, the systolic tensor array 2808 can be configured to perform a set of parallel dot-product operations using various functional units. The dot products may be performed in a "systolic" manner, where SIMD data is pumped across multiple layers of functional units. The systolic tensor array 2808 is a collection of functional units arranged in a grid. The grid of functional units operates in lockstep and is optimized to perform multiply-add operations. A matrix to be operated on by the systolic tensor array 2808 is split into sub-matrices, and the sub-matrices are pumped across the grid of functional units.
[0386] In one embodiment, the systolic tensor array 2808 may process a configurable number of SIMD channels of data with a configurable systolic depth. For a particular instruction, a SIMD width and a systolic depth may be selected to process a set of source data. The systolic depth defines the number of systolic layers of hardware logic used to process an instruction. A systolic layer is a group of multiplication and addition logic units with variable SIMD width that receives an initial accumulator value as input and generates a dot product value for output to a successive systolic layer or an output register.
[0387] In some embodiments, three sources may be processed, and each source may be a vector register or an immediate value. In one embodiment, source 2900 (SRC0) may be an initial value for one or more accumulators, which may be a single value or a vector of accumulator values. The initial accumulator values are to be added to a first set of dot products calculated by each functional unit in the first systolic layer. The dot products calculated by the functional units may be provided to the next systolic layer for a particular SIMD channel. The dot products may be calculated based on source 2901 (SRC1) and source 2902 (SRC2), which are vector registers that may contain one or more channels of packed data, each channel containing a vector of four components. In one embodiment, each channel is 32 bits wide and provides four 8-bit vector components. Several embodiments are configurable that calculate dot products from input vectors having 8-bit components, 4-bit components, and / or 2-bit components. In one embodiment, mixed precision operations may be performed using any combination of supported component sizes (e.g., 8 bits by 2 bits, 8 bits by 4 bits, 4 bits by 4 bits, etc.). In one embodiment, systolic tensor array 2808 is configured for integer arithmetic, but in some embodiments, automatic fixed-point arithmetic is configurable. While the instruction described herein is a four-component dot product, in some embodiments systolic tensor array 2808 may be configured to support floating-point dot product calculations for different numbers of components per vector.
[0388] In one embodiment, multiple channels of a four-component vector may be packed into a single vector register of various widths (e.g., 64 bits, 128 bits, 256 bits, 512 bits, etc.). A simultaneous dot product may be computed via systolic tensor array 2808 for multiple channels of vector components provided via source 2901 and source 2902. The number of channels of vector components to be processed may be configured based on the execution size and systolic depth selected for the dot product computation. In one embodiment, source vectors wider than the specified execution size and / or systolic depth may also be computed using multiple cycles of systolic tensor array 2808.
[0389] The number of calculations that can be performed within a particular clock cycle may vary based on the number of SIMD lanes and systolic layers. The systolic tensor array 2808 may perform a throughput of 16 dot products per SIMD lane, as shown, with a systolic depth of four. When configured for eight SIMD lanes, the logic may perform 128 8-bit integer (INT8) dot products within a particular cycle. When configured for eight SIMD lanes and a systolic depth of eight, each lane may perform 32 8-bit integer (INT8) dot products, for a total of 256 dot products. These particular numbers of operations are illustrative of one embodiment, and other embodiments have different throughputs. Additionally, for different data types, the number of operations will scale based on the different data types.
[0390] In each functional unit, a dot product is calculated by multiplication and addition logic, and the dot product is added to the value of an accumulator. The resulting data may be output to a destination register or may be provided to an accumulator of the next systolic layer. Figure 29B shows the details of functional unit 2912.
[0391] As shown in FIG. 29B, functional unit 2912 may include a set of input data buffers 2904, 2906 and an accumulator 2922, each of which may accept input data. In one embodiment, data buffer 2906 may accept source 2902 (SRC2), which may be a packed vector of input data. Input data buffer 2904 may accept source 2901 (SRC1), which may be a packed vector of input data. Accumulator 2922 may accept source 2900 (SRC0), which provides an initial value of the accumulator to functional unit 2912. The initial value of the accumulator is added to a dot product calculated from elements of source 2901 and source 2902. The dot product is calculated by element-wise multiplication of the source vectors using a set of multipliers 2923A-2923D and adder 2924. A set of products are calculated using multipliers 2923A-2923D. A sum of the set of products is calculated by adder 2924. The sum may be accumulated (e.g., added) with an optional initial value provided via source 2900. In one embodiment, this accumulated value may be provided as an input value 2926 to a next accumulator, which may be in a next systolic layer. In one embodiment, source 2901 may include multiple channels of input data. An additional channel of source 2901 may be routed as an SRC1 input to additional SIMD lanes 2928. In one embodiment, source 2902 may include multiple channels of input data. An additional channel of source 2902 may be used as an SRC2 input data to logic units in additional systolic depths. In one embodiment, source 2900 may optionally include multiple channels, with the additional channel provided as an input to an accumulator in an additional functional unit. In one embodiment, source 2900 may be a single value that is added to each accumulator in each functional unit of the first systolic layer.
[0392] FIG. 30 illustrates a processing resource 3000 including a systolic tensor array with sparse optimization, according to one embodiment. The processing resource 3000 includes components similar to the execution unit 1900, along with a tensor accelerator 3012 with sparse optimization. Variations of the processing resource 3000 may be used in parallel computing accelerators, graphic processing engines, and / or neural network accelerators. The tensor accelerator 3012 may include a systolic tensor array 2808 as in FIG. 28 or a systolic array 1912 as in FIG. 19, and may have similar functionality. Other matrix acceleration architectures may also be used. Sparse optimization of the tensor accelerator 3012 is described below. "Optimized Training and Inference for Systolic Arrays When Using Sparse Data"
[0393] One embodiment provides techniques for optimizing training and inference on systolic arrays when using sparse data. If a submatrix to be processed by the systolic tensor array 2808 is entirely zero, the dimension values of the submatrix may be set to zero, and the systolic tensor array 2808 may bypass one or more computation phases associated with that submatrix, depending on the operation to be performed. During pre-processing of the matrix data, submatrices of zeros may be identified, and a submatrix map may be generated for that matrix indicating which submatrices contain only zero values. In one embodiment, submatrices containing only one non-zero value may also be bypassed.
[0394] 31A-31B illustrate a system for bypassing zero-valued sub-matrices, according to an embodiment. As shown in FIG. 31A, matrix 3102 and matrix 3104 are matrices in which one or more sub-matrices contain only zero values. Processing logic may generate sub-matrix map 3112 for matrix 3102 and sub-matrix map 3114 for matrix 3104 to indicate whether a sub-matrix contains only zero values. The sub-maps may be generated using various techniques, including performing a bit-wise comparison with zero for each sub-matrix. The sub-matrix maps may be generated by framework or driver logic running on general-purpose processing logic (e.g., a CPU) or may be generated by dedicated hardware logic within the processing resource.
[0395] In one embodiment, single non-zero value sub-matrices 3105 containing a single non-zero value may also be bypassed and the results of the matrix operations may be calculated using an ALU instead of a systolic tensor array.
[0396] 31B, memory 3120 may store matrix 3102 and matrix 3104. Systolic tensor array 2808 may include a matrix A load unit 3126, a matrix B load unit 3122, a matrix A supply unit 3128, and a matrix B supply unit 3124. Matrix 3102 may be loaded and supplied as matrix B, while matrix 3104 may be loaded and supplied as matrix A. Sub-matrices of matrix A and matrix B may be loaded and supplied through functional units 3130 that operate as processing elements of systolic tensor array 2808.
[0397] In one embodiment, the load B filter 3127 and the load A filter 2127 may include buffers for storing the submatrix map 3112 for matrix 3102 and the submatrix map 3114 for matrix 3104. The load B filter 3121 may bypass the loading of zero-valued submatrices by the matrix B load unit 3122. The load filter 3127 may bypass the loading of zero-valued submatrices by the matrix A load unit 3126. Submatrices that are not bypassed may be processed by the functional units 3130. Depending on the operation to be performed by the systolic tensor array 2808, if one of the submatrices is zero, the entire operation may be bypassed. If the submatrix includes a single non-zero-valued submatrix, the submatrix associated with the operation to be performed may bypass the systolic tensor array 2808 and the operation may be performed by the ALU.
[0398] FIG. 32 illustrates a computational resource 3010 including logic for bypassing the systolic tensor array 2808 for operations on sub-matrices containing a single non-zero value. The elements of matrix 3102 and matrix 3104 stored in memory 3120 may be loaded into a register file 3006 of the computational resource 3010. The tensor accelerator 3012 may include logic for sending a sub-matrix bypass message 3202 to the ALU 3011 indicating the bypassed operations to be performed and registers storing the bypassed sub-matrix data 3204. The ALU 3011 may then execute the bypassed operations using vector processing logic. Processing of the bypassed operations may be executed in parallel with non-bypassed operations executed by the tensor accelerator 3012. "Using Decompressed Information When Performing Sparse Computation Operations"
[0399] FIG. 33 illustrates a computing architecture 3300 configured to enable compressed transmission of neural network data to processing resources on a parallel computing processor or general-purpose graphics processing unit, according to one embodiment. In one embodiment, the computing architecture 3300 includes a computing block 3302 and a hardware scratch buffer 3304 coupled to a memory 3308 via a DMA controller 3306. The memory 3308 may be a main memory or a system memory of a data processing system. The computing block 3302 includes a set of processing resources as described herein and may be similar to any of the computing blocks 2724A-2724N as in FIG. 27. The scratch buffer 3304 may be a high-speed on-chip memory, such as an on-chip static random access memory (SRAM). In one embodiment, the scratch buffer 3304 is optimized to store function block units or kernel block units for neural network operations performed by the computing block 3302.
[0400] In one embodiment, the decoder 3312 may be a hardware decoder logic integrated into the computation block 3302 that enables compressed transmission of neural network data across the computation architecture. For example, when processing a CNN, the computation block 3302 may generate output feature map (OFM) data in an uncompressed format in the scratch buffer 3304. The encoder 3316 is integrated into the DMA controller 3306 to enable writing of the output feature map data to the memory 3308 in a compressed format. As the OFMs of one layer become the input feature maps (IFMs) of the next layer, these IFMs are read from the memory 3308 as compressed data 3314 and stored in the scratch buffer 3304. The decoder 3312 may enable the computation block 3302 to read in the compressed data 3314 without the need to decode the data. Alternatively, a codec unit having both encoding and decoding logic may be integrated into the DMA controller 3306, enabling compressed data to be transmitted and read by the DMA controller 3306. The feature map data may then be decompressed by the DMA controller 3306 and written in uncompressed format to the scratch buffer 3304 and read by the computation block 3302.
[0401] In the embodiments described herein, the specific encoding formats for the kernel and feature data may vary based on the statistics of the data to be encoded. Analysis of neural network feature map data indicates that many feature maps may be highly sparse. Analysis of neural network kernel data indicates that while the kernel data is not as sparse as the feature map data, many values in the kernel data are repeated. The dynamic range of the kernel data is relatively low, which indicates that the raw data allocates more bits than are required to store the coefficients. Using various encoding techniques, the feature map and kernel data may be losslessly compressed by as much as 80% when using a selected one of the various encoding techniques.
[0402] Neural network related data may be encoded (e.g., compressed) using a variety of encoding techniques, including, but not limited to, unique absolute value (UAV) table encoding, significance map (SM) encoding, table encoding (TE), unique value coordinate (UVC) encoding, and average encoding (ME). Metadata for the encoded data indicates the type of encoding format used for the data. In one embodiment, a specific encoding format may be selected for a particular type of data, such as kernel data or feature data. In one embodiment, statistical analysis is performed on the data prior to encoding, allowing an appropriate encoder to be selected for each data block.
[0403] In one embodiment, data generated during SM encoding may be used to facilitate sub-matrix bypass in systolic tensor arrays. In SM encoding mode, only the non-zero values in a block are encoded. The number of non-zero values in a sample block is indicated in a header, followed by a significance map indicating a map of the non-zero values in the block. The non-zero values of the sample are then encoded in the order of their appearance in the stream.
[0404] 34A-34B illustrate significance map encoding for sparse neural network data, according to an embodiment. Figure 34A illustrates an encoding layout 3420 for SM encoding. Figure 34B illustrates decoding of a bitstream encoded with an exemplary bitstream significance map.
[0405] As shown in Figure 34A, the encoding layout 3420 allows sample blocks of sparse neural network data to be encoded in a reduced bit format that reduces the amount of data that needs to be transmitted or stored when processing a neural network associated with the data. In the illustrated encoding layout 3420, the number of non-zero values in a sample block is indicated in a header 3422, followed by a significance map 3424 that indicates a map of the non-zero values in the block. The sample non-zero values 3426 are encoded in the order of their appearance in the stream.
[0406] As shown in FIG. 34B, the encoded bitstream data may be decoded based on the significance map data. In one embodiment, SM encoding mode data is indicated starting in the third byte after the two-byte header, and the presence of SM encoding is indicated by the first bit of a bitstream header (not shown) at the beginning of the encoded data stream. The number of non-zero values in the sample block is indicated in the header 3422. In one embodiment, the encoding format may vary on a per sample block basis, so the header 3422 may also include metadata indicating that SM encoding is enabled for the incoming sample block. The significance map 3424 indicates a map of non-zero values in the sample block, with one bit entry associated with each value. The sample non-zero values 3426 are then encoded in the order of their appearance in the stream. To decode the significance map data into an example decoded bitstream 3430, the decoder logic may initialize at least a portion of the output data buffer 3410 to zero. The decoder logic may then refer to the significance map 3424 to determine which values in the bitstream are non-zero. The non-zero values may be sequentially unpacked and written to locations in the output data buffer 3410 indicated by the significance map. For example, a value of zero (0b0) in the significance map 3424 indicates that the corresponding decoded value is zero. A value of one (0b1) in the significance map 3424 indicates that the corresponding decoded value corresponds to the next consecutive entry in the non-zero values 3426 in the encoded bitstream.
[0407] FIG. 35 illustrates the use of significance map data to facilitate bypass or clock / power gating of elements of a systolic tensor array. In one embodiment, a decoder 3312 in the computation block 3302 may provide a significance map 3506 of decompressed data 3508 encoded using a significance map encoding. In one embodiment, the decoder may generate a significance map 3506 for data encoded using a different (non-significance map) encoding. The significance map 3506 and decompressed data 3508 may be provided by the decoder 3312 to processing resources 3000 in the computation block 3404. Bypass / gate logic 3510 in the systolic tensor array 2808 may determine to bypass sub-matrices in the decompressed data 3508 and / or clock gate particular processing elements in the systolic tensor array based on the degree of sparsity indicated by the significance map 3506 and / or the specific zero and non-zero elements specified by the significance map 3506. "Transforming Sparse Data Using Numerical Transformations"
[0408] In one embodiment, training is extended to include transforming weights in the same region to compact non-zero coefficients to reduce memory bandwidth consumption. The training system may test several different transforms, such as the discrete cosine transform (DCT), the discrete sine transform (DST), the bit-reversal transform, the bit-rotation transform, or other types of transforms (e.g., the discrete Fourier transform (DFT), etc.). The training system may select the transform that results in the closest clustering of non-zero coefficients and / or the greatest compression ratio when compressing the training data. In one embodiment, the training system may select a transform that transforms irregular sparsity to structured or block sparsity. The selected transform mode is signaled into the trained model. The transformed training model is provided to inference development. The appropriate inverse transform is applied by the inference system.
[0409] FIG. 36 illustrates a system 3600 for transforming neural network data into compact non-zero coefficients...
Claims
1. 1. A computing device comprising one or more processors including a graphics processor, the graphics processor comprising: a processing resource including a tensor accelerator that performs numerical operations to train a neural network model and generate a first matrix of weights associated with the neural network model; a weight converter for applying a numerical transformation to the first matrix of weights to generate a set of transformed weights and a transformation type, the transformation type identifying the numerical transformation applied to the first matrix of weights, the first matrix of weights being a sparse matrix, and the transformed weights being compressed at a higher compression rate than the first matrix of weights.
2. The computing device of claim 1 , wherein the weight converter is a fixed function hardware unit of the graphics processor.
3. The computing device of claim 1 , wherein the weight converter is implemented via programmable hardware of the graphics processor.
4. The weight converter includes a conversion selector and a conversion tester, the conversion tester comprising: applying a first numerical transform to at least a portion of the first matrix of weights to generate first test transformed data; applying a second numerical transform to at least a portion of the first matrix of weights to generate second test transformed data; determining a compression ratio metric based on an analysis of the first test conversion data and the second test conversion data; A computing device according to claim 1 , further comprising: a processor configured to: transmit a recommended transformation to the transformation selector;
5. The computing device of claim 4 , wherein the transform selector is further configured to select a numerical transform to apply to the first matrix of weights based on the recommended transform.
6. The computing device of claim 5 , wherein the numerical transform is selected from a set of numerical transforms including a discrete cosine transform, a discrete sine transform, a bit-reversal transform, and a bit-rotation transform.
7. The graphics processor further comprises:
7. A computing device according to claim 1, further comprising an inverse weights transformer for applying an inverse numerical transform to the set of transformed weights to generate a second matrix of weights, the inverse numerical transform to be performed being identified by the transform type associated with the set of transformed weights.
8. The computing device of claim 1 , wherein the tensor accelerator comprises a systolic array of processing elements.
9. On a graphics processor that includes a tensor accelerator, loading matrix data and metadata associated with the matrix data into the tensor accelerator, the metadata indicating a numerical transformation that has been applied to the matrix data; performing, by the tensor accelerator, an inverse numerical transform on the matrix data, the inverse numerical transform being indicated by the metadata associated with the matrix data; performing one or more computational operations within the tensor accelerator after performing the inverse numerical transform; and writing an output of the one or more computational operations to a memory of the graphics processor.
10. 10. The method of claim 9, additionally comprising decompressing or decoding the matrix data within the tensor accelerator prior to performing the inverse numerical transform on the matrix data.
11. 11. The method of claim 10, additionally comprising compressing or encoding the output within the tensor accelerator after performing the numerical transform on the matrix data.
12. 12. The method of claim 9, wherein the step of writing the output of the one or more computational operations to the memory of the graphics processor comprises writing the output to a cache memory of the graphics processor.
13. 12. The method of claim 9, wherein the step of writing the output of the one or more computational processes to the memory of the graphics processor comprises writing the output to a main memory of the graphics processor.
14. 14. The method of claim 12 or 13, further comprising applying a numerical transformation to the output of the one or more computational processes prior to writing the output to the memory of the graphics processor.
15. The method of claim 14 , wherein applying the numerical transformation to the output of the one or more computational processes comprises applying a specified numerical transformation to the output.
16. 15. The method of claim 14, wherein applying the numerical transform to the output of the one or more computational processes comprises generating, by the tensor accelerator, transform test metrics for a plurality of numerical transforms; selecting a numerical transform based on the transform test metrics; and applying the selected numerical transform to the output.
17. 17. The method of claim 16, wherein the selected numerical transform is selected from a set of numerical transforms including a discrete cosine transform, a discrete sine transform, a bit reversal transform, and a bit rotation transform.
18. A graphics processing system comprising means for carrying out the method according to any one of claims 9 to 17.
19. A program for causing one or more machines to carry out the method according to any one of claims 9 to 17.
20. A graphics processor, a processing resource including a tensor accelerator that performs numerical operations to train a neural network model and generate a first matrix of weights associated with the neural network model; a weight transformer for applying a numerical transformation to the first matrix of weights to generate a set of transformed weights and a transformation type, the transformation type identifying the numerical transformation applied to the first matrix of weights, the first matrix of weights being a sparse matrix, and the transformed weights being compressed at a higher compression rate than the first matrix of weights; an inverse weights transformer for applying an inverse numerical transform to the transformed weights to generate a second matrix of weights, the inverse numerical transform to be performed being identified by the transform type associated with the set of transformed weights; and
21. The weight converter includes a conversion selector and a conversion tester, the conversion tester comprising: applying a first numerical transform to at least a portion of the first matrix of weights to generate first test transformed data; applying a second numerical transform to at least a portion of the first matrix of weights to generate second test transformed data; determining a compression ratio metric based on an analysis of the first test conversion data and the second test conversion data; 21. The graphics processor of claim 20, further comprising: a processor for transmitting a recommended transform to the transform selector.
22. 22. The graphics processor of claim 21, wherein the transform selector is further configured to select a numerical transform to apply to the first matrix of weights based on the recommended transform.
23. 23. The graphics processor of claim 22, wherein the numeric transform is selected from a set of numeric transforms including a discrete cosine transform, a discrete sine transform, a bit-reversal transform, and a bit-rotation transform.
24. 24. A graphics processor as claimed in any one of claims 20 to 23, wherein the tensor accelerator comprises a systolic array of processing elements.
25. 20. One or more non-transitory machine-readable media having stored thereon the program of claim 19.
Citation Information
Patent Citations
Temporally stable data reconstruction with an external recurrent neural network
US20190035113A1
Accelerator hardware for compression and decompression
US20190190538A1
Method and device for operating a neural network in a memory-efficient manner
US20190279095A1
Encoding device, decoding device, encoding method, and decoding method
WO2018186433A1
