Optimized computing hardware for machine learning operations
By implementing zero-squeezing, low-precision integer multiplication and unequal bit length parallel processing technology on computing hardware, the problem of performance loss caused by sparsity in machine learning is solved and the computing efficiency of deep neural networks is improved.
Patent Information
- Application Number
- CN202010802305.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-01-12
- Filing Date
- 2018-05-07
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2038-05-07
AI Technical Summary
Existing technologies suffer from performance loss due to sparsity in machine learning operations, especially in deep neural networks where many computing operations involve multiplication by zero, resulting in resource waste and performance degradation.
Zero-squeeze technology, low-precision integer multiplication, and unequal bit length parallel processing are used to optimize computing hardware to improve computing efficiency by skipping multiplication operations, avoiding accumulator overflows, and performing operations proportional to the data type size.
Significantly improves the efficiency of machine learning operations, reduces resource waste, and improves computing performance, especially in the sparse operating environment of deep neural networks.
Smart Images

Figure CN111932435B_ABST
Abstract
Description
[0001] This invention patent application is a divisional application of the invention patent application with application number 201810427080.7 filed on May 7, 2018 and entitled “Optimized computing hardware for machine learning operations”.
[0002] Cross-references
[0003] This application claims the benefit of Indian Provisional Patent Application No. 201741015868 filed on May 5, 2017, which is hereby incorporated herein by reference. Technical Field
[0004] Embodiments relate generally to data processing, and more particularly to machine learning processing via general purpose graphics processing units. Background Art
[0005] Current parallel graphics data processing includes systems and methods developed for performing 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 compute units to process graphics data; however, recently, portions of graphics processors have become programmable, enabling such processors to support a wider variety of operations for processing vertex and fragment data.
[0006] In order to further improve performance, graphics processors generally implement processing techniques such as pipelining, which attempt to process as much graphics data as possible in parallel throughout different parts of the graphics pipeline. Parallel graphics processors with a single instruction multiple thread (SIMT) architecture are designed to maximize the amount of parallel processing in the graphics pipeline. In the SIMT architecture, multiple groups of parallel threads attempt to execute program instructions together synchronously as often as possible to improve processing efficiency. A general overview of software and hardware for SIMT architecture can be found in Shane Cook's CUDA Programming, Chapter 3, pages 37 to 51 (2013) and / or Nicholas Wilt's CUDA Handbook, A Comprehensive Guide to GPU Programming, chapters 2.6.2 to 3.1.2 (June 2013). BRIEF DESCRIPTION OF THE DRAWINGS
[0007] In order that the features of the present invention can be understood in detail, a more particular description of the present invention may be had by reference to embodiments, some of which are shown in the accompanying drawings. However, it should be noted that the accompanying drawings only show typical embodiments and are therefore not to be considered as limiting the scope of all embodiments.
[0008] Figure 1 is a block diagram illustrating a computer system configured to implement one or more aspects of the embodiments described herein;
[0009] FIG. 2A to FIG. 2D shows a parallel processor component according to an embodiment;
[0010] FIG. 3A to FIG. 3B is a block diagram of a graphics multiprocessor according to an embodiment;
[0011] 4A to 4F An exemplary architecture is shown in which multiple GPUs are communicatively coupled to multiple multi-core processors;
[0012] Figure 5 shows a graphics processing pipeline according to an embodiment;
[0013] Fig. 6A is a block diagram of a data processing system according to an embodiment;
[0014] Figure 6B Logic is shown that provides a technique for zero squashing instructions when operands are loaded;
[0015] Figure 6C Logic for pass reduction via zero squeezing is shown;
[0016] Fig.6D FIG. 4 shows round compression of a composite instruction or a multi-round instruction according to an embodiment; in one embodiment,
[0017] Fig. 6E shows the hardware logic for implementing the zero squeeze technique described herein;
[0018] Fig. 6F shows hardware for zero squeezing within a computing unit according to an embodiment;
[0019] Fig. 7A Logic is shown that provides a technique for low-precision integer multiplication according to an embodiment;
[0020] Figure 7B Logic units for low precision integer multiplication to avoid accumulator register overflow according to an embodiment are shown;
[0021] Figure 7CLogic for implementing unequal bit length parallel processing according to an embodiment is shown;
[0022] Fig.7D An exemplary instruction architecture for performing unequal bit length parallel processing according to an embodiment is shown;
[0023] Fig. 7E Variable precision execution logic that can be used to implement parallel processing of unequal bit lengths according to an embodiment is shown;
[0024] Figure 8 shows a machine learning software stack according to an embodiment;
[0025] Fig. 9 A highly parallel general purpose graphics processing unit is shown according to an embodiment;
[0026] Fig.10 A multi-GPU computing system according to an embodiment is shown;
[0027] FIG. 11A to FIG. 11B The layers of an exemplary deep neural network are shown;
[0028] Fig.12 An exemplary recurrent neural network is shown;
[0029] Fig.13 shows the training and deployment of a deep neural network;
[0030] Fig.14 is a block diagram illustrating distributed learning;
[0031] Fig.15 An exemplary inference system-on-chip (SOC) suitable for performing inference using a trained model is shown;
[0032] Fig.16 is a block diagram of a processing system according to an embodiment;
[0033] Fig.17 is a block diagram of a processor according to an embodiment;
[0034] Fig.18 is a block diagram of a graphics processor according to an embodiment;
[0035] Fig.19 is a block diagram of a graphics processing engine of a graphics processor according to some embodiments;
[0036] Fig. 20 is a block diagram of a graphics processor provided by an additional embodiment;
[0037] Fig.21 Thread execution logic is shown, which includes an array of processing elements employed in some embodiments;
[0038] Fig. 22 is a block diagram illustrating a graphics processor instruction format according to some embodiments;
[0039] Fig.23 is a block diagram of a graphics processor according to another embodiment;
[0040] FIG. 24A to FIG. 24B shows a graphics processor command format and command sequence according to some embodiments;
[0041] Fig.25 An exemplary graphical software architecture for a data processing system according to some embodiments is shown;
[0042] Fig.26 is a block diagram showing an IP core development system according to an embodiment;
[0043] Fig. 27 is a block diagram illustrating an exemplary system-on-chip integrated circuit according to an embodiment;
[0044] Fig.28 is a block diagram illustrating an additional exemplary graphics processor; and
[0045] Fig.29 is a block diagram illustrating an additional exemplary graphics processor of a system on a chip integrated circuit according to an embodiment. DETAILED DESCRIPTION
[0046] In some embodiments, a graphics processing unit (GPU) is communicatively coupled to a host / processor core to accelerate graphics operations, machine learning operations, pattern analysis operations, and various general-purpose GPU (GPGPU) functions. The GPU can be communicatively coupled to the host processor / core via a bus or another interconnect (e.g., a high-speed interconnect such as PCIe or NVLink). In other embodiments, the GPU can be integrated with the core on the same package or chip and communicatively coupled to the core via an internal processor bus / interconnect (i.e., inside the package or chip). Regardless of the manner in which the GPU is connected, the processor core can assign work to the GPU in the form of a sequence of commands / instructions contained in a work descriptor. The GPU then uses dedicated circuits / logic to efficiently process these commands / instructions.
[0047] In the following description, many specific details are set forth to provide a more comprehensive understanding. However, it will be apparent to those skilled in the art that the embodiments described herein may be practiced without one or more of these specific details. In other instances, well-known features are not described to avoid obscuring the details of the present embodiment.
[0048] System Overview
[0049] Figure 1 1 is a block diagram illustrating a computer 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, the one or more processors and the system memory communicating via an interconnect path, which may include a memory hub 105. The memory hub 105 may be a separate component within a chipset component or may be integrated within 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, which may enable the computing system 100 to receive input from one or more input devices 108. In addition, the I / O hub 107 may enable a display controller (which may be included in 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 a local display device, an internal display device, or an embedded display device.
[0050] In one embodiment, the processing subsystem 101 includes one or more parallel processors 112, which are coupled to the memory hub 105 via a bus or other communication link 113. The communication link 113 can be one of any number of standard-based communication link technologies or protocols (such as but not limited to PCI Express), or it can be a vendor-specific communication interface or communication structure. In one embodiment, the one or more parallel processors 112 form a computing-centric parallel or vector processing system that includes a large number of processing cores and / or processing clusters such as integrated many-core (MIC) processors. In one embodiment, 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 a display interface (not shown) to enable direct connection to one or more display devices 110B.
[0051] 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. The I / O switch 116 may be used to provide an interface mechanism to enable connection between the I / O hub 107 and other components that may be integrated into the platform, such as a network adapter 118 and / or a wireless network adapter 119, as well as various other devices that may be added via one or more plug-in devices 120. The network adapter 118 may be an Ethernet adapter or another wired network adapter. The wireless network adapter 119 may include one or more of Wi-Fi, Bluetooth, near field communication (NFC), or other network devices including one or more radio devices.
[0052] Computing system 100 may include other components not explicitly shown, including USB or other port connections, optical storage drives, video capture devices, etc., which may also be connected to I / O hub 107. Figure 1 The communication paths interconnecting the various components may be implemented using any suitable protocol such as a PCI (Peripheral Component Interconnect) based protocol (e.g., PCI-Express), or any other bus or point-to-point communication interface(s) and / or protocol such as the NV-Link high-speed interconnect or an interconnect protocol known in the art.
[0053] In one embodiment, one or more parallel processors 112 incorporate circuits optimized for graphics and video processing, including, for example, video output circuits, and the circuits constitute a graphics processing unit (GPU). In another embodiment, one or more parallel processors 112 incorporate circuits optimized for general-purpose processing while retaining the basic computing architecture described in more detail herein. In yet another embodiment, the components of the computing system 100 can be integrated with one or more other system elements on a single integrated circuit. For example, one or more parallel processors 112, a memory hub 105, (multiple) processors 102, and an I / O hub 107 can be integrated into a system on a chip (SoC) integrated circuit. Alternatively, the components of the computing system 100 can be integrated into a single package to form a system in package (SIP) configuration. In other embodiments, at least a portion of the components of the computing system 100 can be integrated into a multi-chip module (MCM), which can be interconnected with other multi-chip modules to form a modular computing system.
[0054] It should be understood that the computing system 100 shown herein is illustrative and variations and modifications are possible. The connection topology, including the number and arrangement of bridges, the number of (multiple) processors 102, and the number of (multiple) parallel processors 112, can be modified as needed. For example, in some embodiments, the system memory 104 is directly connected to the (multiple) processors 102 rather than through a bridge, and other devices communicate with the system memory 104 via the memory hub 105 and the (multiple) processors 102. In other alternative topologies, the (multiple) parallel processors 112 are connected to the I / O hub 107 or directly to one of the one or more processors 102, rather than to the memory hub 105. In other embodiments, the I / O hub 107 and the memory hub 105 can be integrated into a single chip. Some embodiments may include two or more groups of (multiple) processors 102 attached via multiple sockets, which can be coupled to two or more instances of (multiple) parallel processors 112.
[0055] Some specific components shown herein are optional and may not be included in all implementations of computing system 100. For example, any number of plug-in cards or peripherals may be supported, or some components may be omitted. In addition, some architectures may use different terminology to describe components related to the computing system 100. Figure 1 For example, in some architectures, memory hub 105 may be referred to as a north bridge, while I / O hub 107 may be referred to as a south bridge.
[0056] Figure 2A A parallel processor 200 according to an embodiment is shown. 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). According to an embodiment, the parallel processor 200 shown is Figure 1 A variation of one or more parallel processors 112 is shown.
[0057] In one embodiment, parallel processor 200 includes parallel processing unit 202. The parallel processing unit includes an I / O unit 204, which enables communication with other devices including other instances of parallel processing unit 202. I / O unit 204 can be directly connected to other devices. In one embodiment, I / O unit 204 is connected to other devices via the use of a hub or switch interface such as memory hub 105. The connection between memory hub 105 and I / O unit 204 forms communication link 113. Within parallel processing unit 202, I / O unit 204 is connected to host interface 206 and memory cross switch 216, wherein host interface 206 receives commands related to performing processing operations and memory cross switch 216 receives commands related to performing memory operations.
[0058] When the host interface 206 receives the command buffer via the I / O unit 204, the host interface 206 can direct the work operations for executing those commands to the front end 208. In one embodiment, the front end 208 is coupled with a scheduler 210, which is configured to distribute commands or other work items to the processing cluster array 212. In one embodiment, the scheduler 210 ensures that the processing cluster array 212 is properly configured and in a valid state before distributing tasks to the processing clusters in the processing cluster array 212. In one embodiment, the scheduler 210 is implemented via firmware logic executed on a microcontroller. The scheduler 210 implemented via the microcontroller can be configured to perform complex scheduling and work distribution operations at coarse and fine granularity, thereby enabling fast preemption and context switching of threads executed on the processing array 212. In one embodiment, the host software can confirm the workload for scheduling on the processing array 212 via one of a plurality of graphics processing doorbell mechanisms. These workloads can then be automatically distributed across the processing array 212 by the scheduler 210 logic within the scheduler microcontroller.
[0059] 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 to 214N of the processing cluster array 212 may execute a large number of concurrent threads. The scheduler 210 may use various scheduling and / or work distribution algorithms to allocate work to the clusters 214A to 214N of the processing cluster array 212, which may vary depending on the workload caused by each type of program or calculation. Scheduling may be handled dynamically by the scheduler 210, or may be partially assisted by compiler logic in the process of compiling program logic configured to be executed by the processing cluster array 212. In one embodiment, different clusters 214A to 214N of the processing cluster array 212 may be allocated to process different types of programs or to perform different types of calculations.
[0060] Processing cluster array 212 may be configured to perform various types of parallel processing operations. In one embodiment, processing cluster array 212 is configured to perform general-purpose parallel computing operations. For example, processing cluster array 212 may include logic for performing processing tasks including filtering of video and / or audio data, performing modeling operations including physical operations, and performing data transformations.
[0061] In one embodiment, processing cluster array 212 is configured to perform parallel graphics processing operations. In embodiments where parallel processor 200 is configured to perform graphics processing operations, processing cluster array 212 may include additional logic for supporting the execution of such graphics processing operations, including but not limited to texture sampling logic for performing texture operations and tessellation logic and other vertex processing logic. In addition, processing cluster array 212 may be configured to execute shader programs associated with graphics processing, such as but not limited to vertex shaders, tessellation shaders, geometry shaders, and pixel shaders. Parallel processing unit 202 may transfer data from system memory via I / O unit 204 for processing. During processing, the transferred data may be stored in on-chip memory (e.g., parallel processor memory 222) during processing and then written back to system memory.
[0062] In one embodiment, when parallel processing unit 202 is used to perform graphics processing, scheduler 210 can be configured to divide the processing workload into tasks of approximately equal size to better enable the distribution of graphics processing operations to multiple clusters 214A to 214N of processing cluster array 212. In some embodiments, portions of processing cluster array 212 can be configured to perform different types of processing. For example, a first portion can be configured to perform vertex shading and topology generation, a second portion can be configured to perform tessellation and geometry shading, and a third portion can be configured to perform pixel shading or other screen space operations to generate a rendered image for display. Intermediate data generated by one or more of clusters 214A to 214N can be stored in a buffer to allow the intermediate data to be transferred between clusters 214A to 214N for further processing.
[0063] During operation, the processing cluster array 212 may receive processing tasks to be executed via the scheduler 210, which receives commands defining the processing tasks from the front end 208. For graphics processing operations, a processing task may include data to be processed, such as surface (patch) data, primitive data, vertex data, and / or pixel data, as well as state parameters and commands (e.g., which program to execute) that define how the data is to be processed. The scheduler 210 may be configured to obtain an index corresponding to a task or may receive an index from the front end 208. The front end 208 may be configured to ensure that the processing cluster array 212 is configured to a valid state before a workload specified by an incoming command buffer (e.g., a batch buffer, a push buffer, etc.) is initiated.
[0064] Each of the one or more instances of the parallel processing unit 202 may be coupled to a parallel processor memory 222. The parallel processor memory 222 may be accessed via a memory crossbar switch 216, which may receive memory requests from the processing cluster array 212 and the I / O unit 204. The memory crossbar switch 216 may access the parallel processor memory 222 via a memory interface 218. The memory interface 218 may include a plurality of partition units (e.g., partition unit 220A, partition unit 220B, up to partition unit 220N), which may each be coupled to a portion (e.g., memory unit) of the parallel processor memory 222. In one implementation, the number of partition units 220A to 220N is configured to be equal to the number of memory units, such that the first partition unit 220A has a corresponding first memory unit 224A, the second partition unit 220B has a corresponding memory unit 224B, and the Nth partition unit 220N has a corresponding Nth memory unit 224N. In other embodiments, the number of partition units 220A to 220N may not be equal to the number of memory devices.
[0065] In various embodiments, the memory units 224A to 224N may include various types of memory devices, including dynamic random access memory (DRAM) or graphics random access memory, such as synchronous graphics random access memory (SGRAM), including graphics double data rate (GDDR) memory. In one embodiment, the memory units 224A to 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 to 224N may vary and may be selected from one of a variety of conventional designs. Rendering targets such as frame buffers or texture maps may be stored on the memory units 224A to 224N, allowing the partition units 220A to 220N to write to portions of each rendering target in parallel to efficiently use the available bandwidth of the parallel processor memory 222. In some embodiments, in order to support a unified memory design that utilizes system memory together with local cache memory, the local instance of the parallel processor memory 222 may be excluded.
[0066] In one embodiment, any of the clusters 214A to 214N of the processing cluster array 212 can process data to be written to any of the memory units 224A to 224N within the parallel processor memory 222. The memory crossbar 216 can be configured to pass the output of each cluster 214A to 214N to any partition unit 220A to 220N or another cluster 214A to 214N, which can perform additional processing operations on the output. Each cluster 214A to 214N can communicate with the memory interface 218 through the memory crossbar 216 to perform read or write operations on various external memory devices. In one embodiment, the memory crossbar 216 can be connected to the memory interface 218 to communicate with the I / O unit 204, and can be connected to the local instance of the parallel processor memory 222, so that the processing units within different processing clusters 214A to 214N can communicate with the system memory or other memory that is not local to the parallel processing unit 202. In one embodiment, the memory crossbar switch 216 may use virtual channels to separate traffic flows between the clusters 214A to 214N and the partition units 220A to 220N.
[0067] Although a single instance of parallel processing unit 202 is shown as being within parallel processor 200, any number of instances of parallel processing unit 202 may also be included. For example, multiple instances of parallel processing unit 202 may be provided on a single plug-in card, or multiple plug-in cards may be interconnected. Even if different instances have different numbers of processing cores, different local parallel processor storage amounts, and / or other configuration differences, different instances of parallel processing unit 202 may also be configured to interoperate. For example, and in one embodiment, some instances of parallel processing unit 202 may include higher precision floating point units relative to other instances. Systems incorporating one or more instances of parallel processing unit 202 or parallel processor 200 may be implemented in various configurations and form factors, including but not limited to desktop computers, laptop computers or handheld personal computers, servers, workstations, game consoles, and / or embedded systems.
[0068] Figure 2B is a block diagram of a partition unit 220 according to an embodiment. In one embodiment, the partition unit 220 is Figure 2A 20A to 220N. As shown, partition unit 220 includes L2 cache 221, frame buffer interface 225, and ROP 226 (raster operation unit). L2 cache 221 is a read / write cache that is configured to perform load and store operations received from memory crossbar switch 216 and ROP 226. Read misses and urgent write-back requests are output by L2 cache 221 to frame buffer interface 225 for processing. Updates may also be sent to the frame buffer via frame buffer interface 225 for processing. In one embodiment, frame buffer interface 225 interacts with one of the memory units in a parallel processor memory, such as memory units 224A to 224N of FIG. 2 (e.g., within parallel processor memory 222).
[0069] In graphics applications, ROP 226 is a processing unit that performs raster operations (e.g., stenciling, z-testing, color blending, etc.). ROP 226 then outputs processed graphics data, which is stored in graphics memory. In some embodiments, ROP 226 includes compression logic that compresses depth or color data written to memory and decompresses depth or color data read from memory. The compression logic can be lossless compression logic that uses one or more of a variety of compression algorithms. The type of compression performed by ROP 226 can vary based on the statistical characteristics of the data to be compressed. For example, in one embodiment, delta color compression is performed on depth and color data on a tile-by-tile basis.
[0070] In some embodiments, ROP 226 is included within each processing cluster (e.g., clusters 214A to 214N of FIG. 2 ) rather than within partition unit 220. In such embodiments, read and write requests for pixel data are transmitted through memory crossbar 216 rather than pixel fragment data. The processed graphics data may be displayed on a display device such as a Figure 1 to one of the one or more display devices 110, routed by the processor(s) 102 for further processing, or by Figure 2A One of the processing entities within parallel processor 200 is routed for further processing.
[0071] Figure 2C It is a block diagram of a processing cluster 214 in a parallel processing unit according to an embodiment. In one embodiment, the processing cluster is an instance of one of the processing clusters 214A to 214N of Figure 2. The processing cluster 214 can be configured to execute multiple threads in parallel, wherein the term "thread" refers to an instance of a specific program executed on a specific input data set. In some embodiments, a single instruction multiple data (SIMD) instruction issuance technology is used to support the parallel execution of a large number of threads without providing multiple independent instruction units. In other embodiments, a single instruction multiple thread (SIMT) technology is used to use a public instruction unit configured to issue instructions to a group of processing engines in each of the processing clusters to support the parallel execution of a large number of roughly synchronized threads. Different from the SIMD execution mechanism that all processing engines usually execute the same instruction, SIMT execution allows different threads to more easily follow the divergent execution path through a given thread program. It will be appreciated by those skilled in the art that the SIMD processing mechanism represents a functional subset of the SIMT processing mechanism.
[0072] The operation of the processing cluster 214 can be controlled via a pipeline manager 232 that distributes processing tasks to the SIMT parallel processors. The pipeline manager 232 receives instructions from the scheduler 210 of Figure 2 and manages the execution of those instructions via the graphics multiprocessor 234 and / or the texture unit 236. The graphics multiprocessor 234 shown is an exemplary instance of a SIMT parallel processor. However, various types of SIMT parallel processors of different architectures can be included in the processing cluster 214. One or more instances of the graphics multiprocessor 234 can be included in the processing cluster 214. The graphics multiprocessor 234 can process data, and the data crossbar switch 240 can be used to distribute the processed data to one of multiple possible destinations including other shading units. The pipeline manager 232 can promote the distribution of processed data by specifying a destination for the data to be distributed via the data crossbar switch 240.
[0073] Each graphics multiprocessor 234 within a processing cluster 214 may include the same set of function execution logic (e.g., arithmetic logic units, load store units, etc.). The function execution logic may be configured in a pipelined manner, where 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. In one embodiment, the same functional unit hardware may be utilized to perform different operations, and any combination of functional units may exist.
[0074] The instructions transmitted to the processing cluster 214 constitute threads. A group of threads executed on a group 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 can be assigned to a different processing engine in the graphics multiprocessor 234. A thread group can 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 the cycle of processing the thread group. A thread group can 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 can be performed on consecutive clock cycles. In one embodiment, multiple thread groups can be executed simultaneously on the graphics multiprocessor 234.
[0075] In one embodiment, the graphics multiprocessor 234 includes an internal cache memory for performing load and store operations. In one embodiment, the graphics multiprocessor 234 can abandon the internal cache and use cache memory (e.g., L1 cache 308) within the processing cluster 214. Each graphics multiprocessor 234 can also access the L2 cache within the partition unit (e.g., partition unit 220A to 220N of Figure 2) shared between all processing clusters 214, and can be used to pass data between threads. The graphics multiprocessor 234 can also access off-chip global memory, which can include one or more of the local parallel processor memory and / or system memory. Any memory outside the parallel processing unit 202 can be used as global memory. In which the processing cluster 214 includes multiple instances of the graphics multiprocessor 234, the embodiment can share common instructions and data that can be stored in the L1 cache 308.
[0076] Each processing cluster 214 may include an MMU 245 (memory management unit) configured to map virtual addresses to physical addresses. In other embodiments, one or more instances of the MMU 245 may reside within the memory interface 218 of FIG. 2 . The MMU 245 includes a set of page table entries (PTEs) for mapping virtual addresses to physical addresses of tiles and optionally cache line indexes. The MMU 245 may include an address translation lookaside buffer (TLB) or cache that may reside within the graphics multiprocessor 234 or L1 cache or processing cluster 214. Physical addresses are processed to distribute surface data access locality to achieve efficient request interleaving between partition units. The cache line index may be used to determine whether a request for a cache line is a hit or a miss.
[0077] In graphics and computing applications, the processing clusters 214 can be configured such that each graphics multiprocessor 234 is coupled to a texture unit 236 to perform texture mapping operations, such as determining texture sample locations, reading texture data, and filtering texture data. Texture data is read from an internal texture L1 cache (not shown) or in some embodiments from an L1 cache within the graphics multiprocessor 234, and is retrieved from an L2 cache, local parallel processor memory, or system memory as needed. Each graphics multiprocessor 234 outputs processed tasks to a data crossbar 240 to provide the processed tasks to another processing cluster 214 for further processing or to store the processed tasks in an L2 cache, local parallel processor memory, or system memory via a memory crossbar 216. A preROP 242 (pre-raster operation unit) is configured to receive data from the graphics multiprocessor 234, direct the data to ROP units, which can be located with partition units (e.g., partition units 220A to 220N of FIG. 2 ) as described herein. The preROP 242 unit optimizes color blending, organizes pixel color data, and performs address translation.
[0078] It should be understood that the core architecture described herein is illustrative and variations and modifications are possible. Any number of processing units, such as graphics multiprocessor 234, texture unit 236, preROP 242, etc., may be included in processing cluster 214. In addition, although only one processing cluster 214 is shown, the parallel processing unit described herein may include any number of instances of processing cluster 214. In one embodiment, each processing cluster 214 may be configured to operate independently of other processing clusters 214 using separate and distinct processing units, L1 caches, etc.
[0079] Figure 2DA graphics multiprocessor 234 is shown according to one embodiment. In such an embodiment, the graphics multiprocessor 234 is coupled to the pipeline manager 232 of the processing cluster 214. The graphics multiprocessor 234 has an execution pipeline that includes, but is 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.
[0080] In one embodiment, the instruction cache 252 receives a stream of instructions to be executed from the pipeline manager 232. These instructions are cached in the instruction cache 252 and dispatched for execution by the instruction unit 254. The instruction unit 254 can dispatch instructions as thread groups (e.g., warps), each thread of the thread group is assigned to a different execution unit within the GPGPU core 262. Instructions can access any of the local, shared, or global address spaces by specifying an address within the unified address space. The address mapping unit 256 can be used to convert addresses in the unified address space into different memory addresses that can be accessed by the load / store unit 266.
[0081] The register file 258 provides a set of registers for the functional units of the graphics multiprocessor 234. The register file 258 provides temporary storage for operands for the data paths of the functional units (e.g., GPGPU core 262, load / store unit 266) connected to the graphics multiprocessor 234. In one embodiment, the register file 258 is divided between each of the functional units so that each functional unit is allocated a dedicated portion of the register file 258. In one embodiment, the register file 258 is divided between the different warps being executed by the graphics multiprocessor 234.
[0082] The GPGPU cores 262 may each include a floating point unit (FPU) and / or an integer arithmetic logic unit (ALU) for executing instructions of the graphics multiprocessor 234. Depending on the embodiment, the architecture of the GPGPU cores 262 may be similar or different. For example, in one embodiment, the first portion of the GPGPU core 262 includes a single-precision FPU and an integer ALU, while the second portion of the GPGPU core includes a double-precision FPU. In one embodiment, the FPU may implement the IEEE 754-2008 floating-point arithmetic standard or enable variable-precision floating-point arithmetic. In addition, the graphics multiprocessor 234 may also include one or more fixed-function or special-function units for performing specific functions such as copying rectangles or pixel blending operations. In one embodiment, one or more of the GPGPU cores may also include fixed or special-function logic.
[0083] In one embodiment, the GPGPU core 262 includes SIMD logic capable of executing a single instruction for multiple sets of data. In one embodiment, the GPGPU core 262 can physically execute SIMD4, SIMD8 and SIMD16 instructions, and logically execute SIMD1, SIMD2 and SIMD32 instructions. The SIMD instructions of the GPGPU core can be generated by the shader compiler at compile time, or automatically generated when executing a program written and compiled for a single program multiple data (SPMD) or SIMT architecture. Multiple threads of a program configured for a SIMT execution model can be executed via a single SIMD instruction. For example and in one embodiment, eight SIMT threads can be executed in parallel via a single SIMD8 logic unit, and these eight SIMT threads perform the same or similar operations.
[0084] The memory and cache interconnect 268 is an interconnect network that connects each of the functional units of the graphics multiprocessor 234 to the register file 258 and the shared memory 270. In one embodiment, the memory and cache interconnect 268 is a crossbar interconnect that allows the load / store unit 266 to implement load and store operations between the shared memory 270 and the register file 258. The register file 258 can operate at the same frequency as the GPGPU core 262, so the data transfer between the GPGPU core 262 and the register file 258 has a very low latency. The shared memory 270 can be used to implement communication between threads executed on the functional units within the graphics multiprocessor 234. For example, the cache memory 272 can be used as a data cache to cache texture data communicated between the functional units and the texture unit 236. The shared memory 270 can also be used as a cached managed program. In addition to the automatically cached data stored in the cache memory 272, threads executing on the GPGPU core 262 can also programmatically store data in the shared memory.
[0085] FIG. 3A to FIG. 3B Additional graphics multiprocessors are shown according to embodiments. The graphics multiprocessors 325, 350 shown are Figure 2C The illustrated graphics multiprocessors 325, 350 may be configured as streaming multiprocessors (SMs) capable of executing a large number of execution threads simultaneously.
[0086] Figure 3A A graphics multiprocessor 325 is shown according to an additional embodiment. The graphics multiprocessor 325 includes a Figure 2D The graphics multiprocessor 325 may include multiple additional instances of execution resource units of the graphics multiprocessor 234. For example, the graphics multiprocessor 325 may include multiple instances of instruction units 332A to 332B, register files 334A to 334B, and (multiple) texture units 344A to 344B. The graphics multiprocessor 325 also includes multiple groups of graphics or compute execution units (e.g., GPGPU cores 336A to 336B, GPGPU cores 337A to 337B, GPGPU cores 338A to 338B) and multiple groups of load / store units 340A to 340B. In one embodiment, the execution resource units have a common instruction cache 330, texture and / or data cache memory 342, and shared memory 346.
[0087] Various components may communicate via an interconnect fabric 327. In one embodiment, the interconnect fabric 327 includes one or more crossbar switches to enable communication between the various components of the graphics multiprocessor 325. In one embodiment, the interconnect fabric 327 is a separate, high-speed network fabric layer on which each component of the graphics multiprocessor 325 is stacked. Components of the graphics multiprocessor 325 communicate with remote components via the interconnect fabric 327. For example, the GPGPU cores 336A-336B, 337A-337B, and 3378A-338B may each communicate with the shared memory 346 via the interconnect fabric 327. The interconnect fabric 327 may arbitrate communications within the graphics multiprocessor 325 to ensure fair bandwidth allocation between components.
[0088] Figure 3B A graphics multiprocessor 350 is shown according to an additional embodiment. Figure 2D and Figure 3A As shown, the graphics processor includes multiple groups of execution resources 356A to 356D, each of which includes multiple instruction units, register files, GPGPU cores, and load storage units. The execution resources 356A to 356D can work with (multiple) texture units 360A to 360D to perform texture operations while sharing an instruction cache 354 and a shared memory 362. In one embodiment, the execution resources 356A to 356D can share multiple instances of the instruction cache 354 and the shared memory 362 as well as texture and / or data cache memories 358A to 358B. The various components can be connected via Figure 3A The interconnect structure 327 communicates with a similar interconnect structure 352 .
[0089] Those skilled in the art will understand that Figure 1 , FIG. 2A to FIG. 2D and FIG. 3A to FIG. 3B The architecture described in is illustrative and does not limit the scope of the embodiments of the present invention. Therefore, the techniques described herein can be implemented on any appropriately configured processing unit, including but not limited to: one or more mobile application processors; one or more desktop computer or server central processing units (CPUs), including multi-core CPUs; one or more parallel processing units such as parallel processing unit 202 of FIG. 2; and one or more graphics processors or special processing units, without departing from the scope of the embodiments described herein.
[0090] In some embodiments, a parallel processor or GPGPU as described herein is communicatively coupled to a host / processor core to accelerate graphics operations, machine learning operations, pattern analysis operations, and various general-purpose GPU (GPGPU) functions. The GPU can be communicatively coupled to the host processor / core via a bus or other interconnect (e.g., a high-speed interconnect such as PCIe or NVLink). In other embodiments, the GPU can 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., inside a package or chip). Regardless of the manner in which the GPU is connected, the processor core can assign work to the GPU in the form of a sequence of commands / instructions contained in a work descriptor. The GPU then uses dedicated circuits / logic to efficiently process these commands / instructions.
[0091] Technologies for GPU to host processor interconnect
[0092] Figure 4A An exemplary architecture is shown in which multiple GPUs 410 to 413 are communicatively coupled to multiple multi-core processors 405 to 406 via high-speed links 440 to 443 (e.g., buses, point-to-point interconnects, etc.). In one embodiment, high-speed links 440 to 443 support 4GB / s, 30GB / s, 80GB / s, or higher communication throughput, depending on the implementation. Various interconnect protocols can be used, including but not limited to PCIe 4.0 or 5.0 and NVLink 2.0. However, the underlying principles of the invention are not limited to any particular communication protocol or throughput.
[0093] Furthermore, in one embodiment, two or more of the GPUs 410 to 413 are interconnected via high-speed links 444 to 445, which may be implemented using the same or different protocols / links as used for high-speed links 440 to 443. Similarly, two or more of the multi-core processors 405 to 406 may be connected via high-speed link 433, which may be a symmetric multiprocessor (SMP) bus running at 20 GB / s, 30 GB / s, 120 GB / s, or higher. Alternatively, Figure 4A All communications between the various system components shown in can be accomplished using the same protocol / links (eg, through a common interconnect structure). However, as mentioned, the underlying principles of the invention are not limited to any particular type of interconnect technology.
[0094] In one embodiment, each multi-core processor 405-406 is communicatively coupled to processor memory 401-402 via memory interconnects 430-431, respectively, and each GPU 410-413 is communicatively coupled to GPU memory 420-423 via GPU memory interconnects 450-453, respectively. The memory interconnects 430-431 and 450-453 may utilize 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 or Nano-Ram. In one embodiment, a portion of the memory may be volatile memory and another portion may be non-volatile memory (e.g., using a two-level memory (2LM) hierarchy).
[0095] As described below, although the various processors 405-406 and GPUs 410-413 may each be physically coupled to a specific memory 401-402, 420-423, respectively, a unified memory architecture may be implemented in which the same virtual system address space (also referred to as an "effective address" space) is distributed among all the various physical memories. For example, the processor memories 401-402 may each include 64GB of system memory address space, and the GPU memories 420-423 may each include 32GB of system memory address space (resulting in a total of 256GB of addressable storage space in the described example).
[0096] Figure 4B Additional details of the interconnection between the multi-core processor 407 and the graphics acceleration module 446 according to one embodiment are shown. The graphics acceleration module 446 may include one or more GPU chips integrated on a line card coupled to the processor 407 via the high-speed link 440. Alternatively, the graphics acceleration module 446 may be integrated on the same package or chip as the processor 407.
[0097] The processor 407 shown includes a plurality of cores 460A to 460D, each of which has a translation lookaside buffer 461A to 461D and one or more caches 462A to 462D. These cores may include various other components (e.g., instruction fetch units, branch prediction units, decoders, execution units, reorder buffers, etc.) for executing instructions and processing data not shown to avoid obscuring the basic principles of the present invention. Caches 462A to 462D may include level 1 (L1) and level 2 (L2) caches. In addition, one or more shared caches 426 may be included in the cache hierarchy and shared by each group of cores 460A to 460D. For example, one embodiment of the processor 407 includes 24 cores, each of which has its own L1 cache, 12 shared L2 caches, and 12 shared L3 caches. In this embodiment, one of the L2 cache and the L3 cache is shared by two adjacent cores. The processor 407 and the graphics accelerator integrated module 446 are connected to the system memory 441 , which may include the processor memories 401 to 402 .
[0098] The data and instructions stored in the various caches 462A to 462D, 456, and the system memory 441 are maintained consistent via inter-core communication via the consistency bus 464. For example, each cache may have cache consistency logic / circuitry associated therewith to communicate via the consistency bus 464 in response to a detected read or write to a particular cache line. In one implementation, a cache snooping protocol is implemented via the consistency bus 464 to snoop cache accesses. Cache snooping / consistency techniques are well understood by those skilled in the art and will not be described in detail herein to avoid obscuring the basic principles of the present invention.
[0099] In one embodiment, the proxy circuit 425 communicatively couples the graphics acceleration module 446 to the coherence bus 464, thereby allowing the graphics acceleration module 446 to participate in the cache coherence protocol as a peer of the core. Specifically, the interface 435 provides connectivity to the proxy circuit 425 via a high-speed link 440 (e.g., a PCIe bus, NVLink, etc.), and the interface 437 connects the graphics acceleration module 446 to the link 440.
[0100] 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, 43N of the graphics acceleration module 446. The graphics processing engines 431, 432, 43N may each include a separate graphics processing unit (GPU). Alternatively, the graphics processing engines 431, 432, 43N may include different types of graphics processing engines such as graphics execution units, media processing engines (e.g., video encoders / decoders), samplers, and block image transfer engines within the GPU. In other words, the graphics acceleration module may be a GPU having multiple graphics processing engines 431, 432, 43N, or the graphics processing engines 431 to 432, 43N may be separate GPUs integrated on a common package, line card, or chip.
[0101] In one embodiment, the accelerator integrated circuit 436 includes a memory management unit (MMU) 439 for performing various memory management functions such as virtual to physical memory translation (also known as effective to real memory translation) and memory access protocols for accessing the system memory 441. The MMU 439 may also include a translation lookaside buffer (TLB) (not shown) for caching virtual / effective to physical / real address translations. In one embodiment, the accelerator integrated circuit 436 includes a fetch unit 491 for fetching commands, instructions, work descriptors, etc. that define the operations to be performed. In one implementation, the cache 438 stores commands and data for efficient access by the graphics processing engines 431-432, N. In one embodiment, the data stored in the cache 438 and the graphics memory 433-434, N is kept consistent with the core caches 462A-462D, 456 and the system memory 411. As mentioned, this may be accomplished via proxy circuitry 425, which participates in cache coherence mechanisms on behalf of cache 438 and memories 433-434, N (e.g., sending updates to cache 438 related to modifications / accesses of cache lines on processor caches 462A-462D, 456 and receiving updates from cache 438).
[0102] A set of registers 449 stores context data for threads executed by the graphics processing engines 431 to 432, 43N, and a context management circuit 448 manages thread contexts. For example, the context management circuit 448 may perform save and restore operations to save and restore contexts of various threads during context switches (e.g., where a first thread is saved and a second thread is stored so that the second thread can be executed by the graphics processing engine). For example, upon context switching, the context management circuit 448 may store current register values to a specified area in memory (e.g., identified by a context pointer). The context management circuit may restore register values upon returning to context. In one embodiment, the interrupt management circuit 447 receives and processes interrupts received from system devices.
[0103] In one implementation, the virtual / effective address from the graphics processing engine 431 is converted to an actual / physical address in the system memory 411 by the MMU 439. One embodiment of the accelerator integrated circuit 436 supports multiple (e.g., 4, 8, 16) graphics accelerator modules 446 and / or other accelerator devices. The graphics accelerator module 446 can be dedicated to a single application executed on the processor 407, or can be shared between multiple applications. In one embodiment, a virtual graphics execution environment is presented in which the resources of the graphics processing engines 431 to 432, 43N are shared with multiple applications or virtual machines (VMs). Resources can be subdivided into "slices" that are allocated to different VMs and / or applications based on the processing requirements and priorities associated with the VMs and / or applications.
[0104] Thus, the accelerator integrated circuit acts as a bridge to the system of graphics acceleration modules 446 and provides address translation and system memory cache services. In addition, the accelerator integrated circuit 436 can provide virtualization facilities for the host processor to manage virtualization of the graphics processing engine, interrupts, and memory management.
[0105] Because the hardware resources of the graphics processing engines 431-432, 43N are explicitly mapped to the actual address space seen by the host processor 407, any host processor can directly address these resources using effective address values. In one embodiment, one function of the accelerator integrated circuit 436 is the physical separation of the graphics processing engines 431-432, 43N so that they appear on the system as independent units.
[0106] As mentioned, in the illustrated embodiment, one or more graphics memories 433-434, 43M are coupled to each of the graphics processing engines 431-432, 43N, respectively. The graphics memories 433-434, 43M store instructions and data being processed by each of the graphics processing engines 431-432, 43N. The graphics memories 433-434, 43M may be volatile memories such as DRAM (including stacked DRAM), GDDR memories (e.g., GDDR5, GDDR6), or HBM, and / or may be non-volatile memories such as 3D XPoint or Nano-Ram.
[0107] In one embodiment, in order to reduce data traffic on link 440, biasing techniques are used to ensure that the data stored in graphics memory 433 to 434, 43M is the data most frequently used by graphics processing engines 431 to 432, 43N, and preferably not used (at least not frequently) by cores 460A to 460D. Similarly, the biasing mechanism attempts to keep data needed by the core (and preferably not the graphics processing engines 431 to 432, 43N) within caches 462A to 462D, 456 of the core and system memory 411.
[0108] Figure 4C Another embodiment is shown in which an accelerator integrated circuit 436 is integrated into the processor 407. In this embodiment, the graphics processing engines 431 to 432, 43N communicate directly with the accelerator integrated circuit 436 via the interface 437 and the interface 435 through the high-speed link 440 (which may also utilize any form of bus or interface protocol). The accelerator integrated circuit 436 can perform operations related to Figure 4B The same operations are described, but given their close proximity to the coherency bus 462 and caches 462A to 462D, 426, it is possible to operate at a higher throughput.
[0109] One embodiment supports different programming models, including a dedicated process programming model (without graphics acceleration module virtualization) and a shared programming model (with virtualization). The shared programming model may include a programming model controlled by accelerator integrated circuit 436 and a programming model controlled by graphics acceleration module 446.
[0110] In one embodiment of a dedicated process model, graphics processing engines 431 to 432, 43N are dedicated to a single application or process under a single operating system. A single application can funnel other application requests to graphics engines 431 to 432, 43N, thereby providing virtualization within a VM / partition.
[0111] In a dedicated process programming model, the graphics processing engines 431 to 432, 43N can be shared by multiple VM / application partitions. The shared model requires a hypervisor that virtualizes the graphics processing engines 431 to 432, 43N to allow access by each operating system. For a single partition system without a hypervisor, the graphics processing engines 431 to 432, 43N are owned by the operating system. In both cases, the operating system can virtualize the graphics processing engines 431 to 432, 43N to provide access to each process or application.
[0112] For the shared programming model, the graphics acceleration module 446 or the individual graphics processing engines 431 to 432, 43N use a process handle to select a process element. In one embodiment, the process elements are stored in the system memory 411 and can be addressed using the effective address to real address translation techniques described herein. The process handle can be an implementation-specific value provided to the host process when registering its context with the graphics processing engine 431 to 432, 43N (i.e., calling the system software to add a process element to the process element linked list). The lower 16 bits of the process handle can be the offset of the process element within the process element linked list.
[0113] Figure 4D An exemplary accelerator integrated slice 490 is shown. As used herein, a "slice" includes a specified portion of the processing resources of the accelerator integrated circuit 436. The application effective address space 482 within the system memory 411 stores process elements 483. In one embodiment, the process element 483 is stored in response to a GPU call 481 from an application 480 executed on the processor 407. The process element 483 contains the processing state of the corresponding application 480. The work descriptor (WD) 484 contained in the process element 483 can be a single job requested by the application, or can contain a pointer to a job queue. In the latter case, the WD 484 is a pointer to a job request queue in the application address space 482.
[0114] Graphics acceleration module 446 and / or individual graphics processing engines 431-432, 43N may be shared by all or some processes in the system. Embodiments of the present invention include an infrastructure for establishing a processing state and sending a WD 484 to the graphics acceleration module 446 to start a job in a virtual environment.
[0115] In one implementation, the dedicated process programming model is specific to a specific implementation. In this model, a single process owns the graphics acceleration module 446 or a separate graphics processing engine 431. Since the graphics acceleration module 446 is owned by a single process, the hypervisor initializes the accelerator integrated circuit 436 to obtain the owned partition, and the operating system initializes the accelerator integrated circuit 436 to obtain the owned process when the graphics acceleration module 446 is allocated.
[0116] In operation, the WD acquisition unit 491 in the accelerator integrated slice 490 acquires the next WD 484, which includes an indication of the work to be performed by one of the graphics processing engines of the graphics acceleration module 446. As shown, the data from the WD 484 can be stored in the register 449 and used by the MMU 439, the interrupt management circuit 447 and / or the context management circuit 446. For example, one embodiment of the MMU 439 includes a segment / page walk circuit for accessing the segment / page table 486 within the OS virtual address space 485. The interrupt management circuit 447 can process the interrupt event 492 received from the graphics acceleration module 446. When performing graphics operations, the effective address 493 generated by the graphics processing engine 431 to 432, 43N is converted to an actual address by the MMU 439.
[0117] In one embodiment, the same set of registers 449 is replicated for each graphics processing engine 431 to 432, 43N and / or graphics acceleration module 446, and this set of registers can be initialized by a hypervisor or an operating system. Each of these replicated registers can be included in an accelerator integrated slice 490. Table 1 shows exemplary registers that can be initialized by a hypervisor.
[0118] Table 1 - Hypervisor Initialization Registers
[0119] 1 Slice Control Register 2 Real Address (RA) Dispatch Process Area Pointer 3 Authorization mask override register 4 Interrupt vector table entry offset 5 Interrupt vector table entry limit 6 Status Register 7 Logical Partition ID 8 Real Address (RA) Manager Accelerator Utilizes Record Pointers 9 Storage Description Register
[0120] Example registers that may be initialized by the operating system are shown in Table 2.
[0121] Table 2 - Operating System Initialization Registers
[0122] 1 Process and thread identities 2 Effective Address (EA) context save / restore pointer 3 Virtual Address (RA) Accelerator Utilizes Record Pointers 4 Virtual Address (RA) storage segment table pointer 5 Authorization Mask 6 Job Descriptor
[0123] In one embodiment, each WD 484 is specific to a particular graphics acceleration module 446 and / or graphics processing engine 431 to 432, 43N. The WD contains all the information needed by the graphics processing engine 431 to 432, 43N to complete its work, or the WD can be a pointer to a memory location where the application has established a command queue for work to be completed.
[0124] Figure 4E Additional details of one embodiment of the sharing model are shown. The embodiment includes a hypervisor real address space 498 in which a process element list 499 is stored. The hypervisor real address space 498 is accessible via a hypervisor 496 that virtualizes a graphics acceleration module engine of an operating system 495.
[0125] The shared programming model allows all or some processes from all or some partitions in the system to use the graphics acceleration module 446. There are two programming models where the graphics acceleration module 446 is shared by multiple processes and partitions: time-sliced sharing and graphics direct sharing.
[0126] In this model, the hypervisor 496 owns the graphics acceleration module 446 and makes its functionality available to all operating systems 495. In order for the graphics acceleration module 446 to support virtualization of the hypervisor 496, the graphics acceleration module 446 may comply with the following requirements: 1) Application job requests must be autonomous (i.e., no state needs to be maintained between jobs), or the graphics acceleration module 446 must provide a context save and restore mechanism. 2) The graphics acceleration module 446 guarantees that application job requests are completed within a specified amount of time, including any conversion errors, or the graphics acceleration module 446 provides the ability to preempt job processing. 3) When operating in a direct sharing programming model, fairness of the graphics acceleration module 446 in the process must be guaranteed.
[0127] In one embodiment, for the shared model, an application 480 is required to make an operating system 495 system call using a graphics acceleration module 446 type, a work descriptor (WD), an authorization mask register (AMR) value, and a context save / restore region pointer (CSRP). The graphics acceleration module 446 type describes the target acceleration function of the system call. The graphics acceleration module 446 type can be a system-specific value. The WD is formatted specifically for the graphics acceleration module 446 and can be in the following form: 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 used to describe the work to be performed by the graphics acceleration module 446. In one embodiment, the AMR value is the AMR state for the current process. The value passed to the operating system is similar to the application that sets the AMR. If the implementation of the accelerator integrated circuit 436 and the graphics acceleration module 446 does not support the user authorization mask override register (UAMOR), the operating system can apply the current UAMOR value to the AMR value before passing the AMR in the hypervisor call. The hypervisor 496 may optionally apply the current authorization mask override register (AMOR) value before placing the AMR into the process element 483. In one embodiment, the CSRP is one of the registers 449 that contains the effective address of an area in the 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 a plugged in system memory.
[0128] Upon receiving the system call, the operating system 495 can verify that the application 480 is registered and authorized to use the graphics acceleration module 446. The operating system 495 then calls the hypervisor 496 with the information shown in Table 3.
[0129] Table 3 - Parameters of the operating system calling the hypervisor
[0130] 1 Work Descriptor (WD) 2 Authorization Mask Register (AMR) value (may be masked) 3 Effective Address (EA) Context Save / Restore Region Pointer (CSRP) 4 Process ID (PID) and optional thread ID (TID) 5 Virtual Address (VA) Accelerator Utilization Record Pointer (AURP) 6 Virtual address of the storage segment table pointer (SSTP) 7 Logical Interrupt Service Number (LISN)
[0131] Upon receiving the hypervisor call, the hypervisor 496 may verify that the operating system 495 has registered and is authorized to use the graphics acceleration module 446. The hypervisor 496 then places the process element 483 into the process element linked list for the corresponding graphics acceleration module 446 type. The process element may contain the information shown in Table 4.
[0132] Table 4 - Process element information
[0133]
[0134]
[0135] In one embodiment, the hypervisor initializes the plurality of registers 449 of the accelerator integrated slice 490 .
[0136] like Figure 4F As shown, one embodiment of the present invention employs a unified memory addressable via a common virtual memory address space for accessing physical processor memories 401-402 and GPU memories 420-423. In this implementation, operations executed on GPUs 410-413 utilize the same virtual / effective memory address space to access processor memories 401-402, and vice versa, thereby simplifying programmability. In one embodiment, a first portion of the virtual / effective address space is allocated to processor memory 401, a second portion is allocated to second processor memory 402, a third portion is allocated to GPU memory 420, and so on. The entire virtual / effective memory space (sometimes referred to as the effective address space) is thus distributed across each of processor memories 401-402 and GPU memories 420-423, thereby allowing any processor or GPU to access any physical memory having a virtual address mapped to that memory.
[0137] In one embodiment, bias / coherency management circuits 494A-494E within one or more of MMUs 439A-439E ensure cache coherency between the caches of the host processor (e.g., 405) and GPUs 410-413 and implement biasing techniques that indicate where certain types of data should be stored. Figure 4F 4. Although multiple instances of bias / consistency management circuits 494A to 494E are shown in FIG. 4, bias / consistency circuits may also be implemented within an MMU of one or more host processors 405 and / or within an accelerator integrated circuit 436.
[0138] One embodiment allows the GPU-attached memory 420 to 423 to be mapped as part of the system memory and accessed using shared virtual memory (SVM) technology, but without suffering from the typical performance defects associated with full system cache coherence. The ability to access the GPU-attached memory 420 to 423 as system memory does not cause heavy cache coherence overhead, which provides a favorable operating environment for GPU offloading. This arrangement allows the host processor 405 software to set operands and access calculation results without the overhead of traditional I / O DMA data copying. These traditional copies involve driver calls, interrupts, and memory-mapped I / O (MMIO) accesses, which are inefficient relative to simple memory accesses. At the same time, the ability to access the GPU-attached memory 420 to 423 without cache coherence overhead may be critical to the execution time of the offloaded calculation. For example, in the case of a large number of streaming write memory services, the cache coherence overhead can significantly reduce the effective write bandwidth seen by the GPU 410 to 413. The efficiency of operand setting, the efficiency of result access, and the efficiency of GPU calculation all play an important role in determining the effectiveness of GPU offloading.
[0139] In one implementation, the selection between GPU bias and host processor bias is driven by a bias tracker data structure. For example, a bias table may be used, which may be a page granular structure including 1 or 2 bits per GPU attached memory page (i.e., controlled at the granularity of a memory page). The bias table may be implemented in the stolen memory range of one or more GPU attached memories 420 to 423, with or without a bias cache in GPUs 410 to 413 (e.g., to cache frequently / recently used entries of the bias table). Alternatively, the entire bias table may be maintained within the GPU.
[0140] In one implementation, the bias table entry associated with each access to the GPU attached memory 420 to 423 is accessed before the GPU memory is actually accessed, so that the following operations are performed. First, local requests from GPUs 410 to 413 whose pages are found in the GPU bias are forwarded directly to the corresponding GPU memory 420 to 423. Local requests from the GPU whose pages are found in the host bias are forwarded to the processor 405 (e.g., over a high-speed link as described above). In one embodiment, the request from the processor 405 to find the requested page in the host processor bias completes the request like a normal memory read. Alternatively, the request for the GPU bias page can be forwarded to the GPU 410 to 413. If the GPU is not currently using the page, the GPU can convert the page to the host processor bias.
[0141] The bias state of a page can be changed by a software-based mechanism, a hardware-assisted software-based mechanism, or, for a limited set of cases, a hardware-only based mechanism.
[0142] One mechanism for changing the bias state employs an API call (e.g., OpenCL) which in turn calls a GPU device driver which in turn sends a message (or queues a command descriptor) to the GPU, thereby directing the GPU to change the bias state and, for certain transitions, perform a cache flush operation in the host. The cache flush operation is required for a transition from host processor 405 bias to GPU bias, but not for the reverse transition.
[0143] In one embodiment, cache coherency is maintained by temporarily presenting GPU bias pages that are non-cacheable to host processor 405. To access these pages, processor 405 may request access from GPU 410, which may or may not grant access immediately, depending on the implementation. Therefore, to reduce communication between processor 405 and GPU 410, it is advantageous to ensure that GPU bias pages are pages that are needed by the GPU but not by the host processor 405, and vice versa.
[0144] Graphics processing pipeline
[0145] Figure 5 2. A graphics processing pipeline 500 according to an embodiment is shown. In one embodiment, a graphics processor may implement the illustrated graphics processing pipeline 500. The graphics processor may be included in a parallel processing subsystem as described herein, such as the parallel processor 200 of FIG. 2. In one embodiment, the parallel processor is Figure 12 . As described herein, various parallel processing systems may implement the graphics processing pipeline 500 via one or more instances of a parallel processing unit (e.g., parallel processing unit 202 of FIG. 2 ). For example, a shader unit (e.g., graphics multiprocessor 234 of FIG. 3 ) may be configured to perform the functions of one or more of a vertex processing unit 504, a tessellation control processing unit 508, a tessellation evaluation processing unit 512, a geometry processing unit 516, and a fragment / pixel processing unit 524. The functions of the data assembler 502, the primitive assemblers 506, 514, 518, the tessellation unit 510, the rasterizer 522, and the raster operation unit 526 may also be performed by other processing engines within a processing cluster (e.g., processing cluster 214 of FIG. 3 ) and corresponding partition units (e.g., partition units 220A to 220N of FIG. 2 ). The graphics processing pipeline 500 may also be implemented using one or more dedicated processing units for the functions. In one embodiment, one or more portions of the graphics processing pipeline 500 may be executed by parallel processing logic within a general purpose processor (e.g., a CPU). In one embodiment, one or more portions of the graphics processing pipeline 500 may access on-chip memory (e.g., parallel processor memory 222 as shown in FIG. 2 ) via a memory interface 528, which may be an example of the memory interface 218 of FIG. 2 .
[0146] In one embodiment, data assembler 502 is a processing unit that collects vertex data for surfaces and primitives. Data assembler 502 then outputs vertex data including vertex attributes to vertex processing unit 504. Vertex processing unit 504 is a programmable execution unit that executes vertex shader programs to illuminate and transform vertex data as specified by the vertex shader programs. Vertex processing unit 504 reads data stored in cache, local or system memory for processing vertex data, and can be programmed to transform vertex data from an object-based coordinate representation to a world space coordinate space or a normalized device coordinate space.
[0147] A first instance of primitive assembler 506 receives vertex attributes from vertex processing unit 50. Primitive assembler 506 reads the stored vertex attributes and constructs graphics primitives as needed for processing by tessellation control processing unit 508. Graphics primitives include triangles, line segments, points, patches, etc. as supported by various graphics processing application programming interfaces (APIs).
[0148] The tessellation control processing unit 508 treats the input vertices as control points of a geometric patch. These control points are transformed from an input representation from the patch (e.g., a basis for the patch) to a representation suitable for surface evaluation by the tessellation evaluation processing unit 512. The tessellation control processing unit 508 may also calculate tessellation factors for the edges of the geometric patch. The tessellation factors apply to individual edges and quantify the view-dependent level of detail associated with the edge. The tessellation unit 510 is configured to receive the tessellation factors for the edges of the patch and tessellate the patch into a plurality of geometric primitives such as lines, triangles, or 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 tessellated patch to generate a surface representation and vertex attributes for each vertex associated with the geometric primitive.
[0149] A second instance of primitive assembler 514 receives vertex attributes from tessellation evaluation processing unit 512, reads stored vertex attributes as needed, and constructs graphics primitives for processing by geometry processing unit 516. Geometry processing unit 516 is a programmable execution unit that executes geometry shader programs to transform graphics primitives received from primitive assembler 514 as specified by the geometry shader programs. In one embodiment, geometry processing unit 516 is programmed to tessellate the graphics primitives into one or more new graphics primitives and to compute parameters for rasterizing the new graphics primitives.
[0150] In some embodiments, the geometry processing unit 516 may add or delete elements in the geometry stream. The geometry processing unit 516 outputs parameters and vertices specifying new graphics primitives to the primitive assembler 518. The primitive assembler 518 receives the parameters and vertices from the geometry processing unit 516 and constructs graphics primitives for processing by the viewport scaling, picking, and clipping unit 520. The geometry processing unit 516 reads data stored in the parallel processor memory or the system memory for processing geometry data. The viewport scaling, picking, and clipping unit 520 performs clipping, picking, and viewport scaling, and outputs the processed graphics primitives to the rasterizer 522.
[0151] The rasterizer 522 can perform depth picking and other depth-based optimizations. The rasterizer 522 also performs scan conversion on new graphics primitives to generate fragments and output these fragments and associated coverage data to the fragment segment / 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 can be programmed to perform operations including but not limited to texture mapping, shading, blending, texture correction, and perspective correction to generate shaded fragments or pixels output to the raster operation unit 526. The fragment / pixel processing unit 524 can read data stored in a parallel processor memory or system memory to use when processing fragment data. The fragment or pixel shader program can be configured to color with samples, pixels, tiles, or other granularity according to the sampling rate configured for the processing unit.
[0152] The raster operation unit 526 is a processing unit that performs raster operations including but not limited to stencil printing, z-testing, blending, etc., and outputs pixel data as processed graphics data for storage in a graphics memory (e.g., parallel processor memory 222 in FIG. 2, and / or as Figure 1 The raster operation unit 526 may be configured to compress the z or color data written to the memory and to decompress the z or color data read from the memory.
[0153] Optimized computing hardware for machine learning operations
[0154] Deep neural networks (DNNs) are a rapidly growing branch of machine learning based on a set of algorithms that attempt to model high-level abstractions in data using model architectures composed of multiple nonlinear transformations.
[0155] Many neural networks (NNs) and other machine learning computations typically tend to be moderately sparse (with up to 50%-80% sparsity for different operations) for key computation operations - xGEMM and native convolution (which have inner loop instruction sequences similar to xGEMM) due to nonlinear and sparsifying operations within DNNs, such as ReLU, Max-pooling, and Dropout. Here "x" represents the different data types used in these algorithms. This low amount of sparsity means that techniques designed specifically for sparse operations like SpMV, SpMSpV, and SpGEMM will not bring performance gains because sparsity introduces a lot of overhead that limits performance to at most 1 / 10 of the peak (and often worse). Therefore, prior art neural network software uses intensive computations for neural network operations, even though a significant portion of the computation is wasted when multiplying by zero. The instruction sequences generated by such software are sequences of fused multiplication and addition instructions (FMADD) using fp16, fp32, or fixed-point data types.
[0156] Embodiments described herein provide a variety of hardware optimizations to improve the efficiency of machine learning calculations on general-purpose graphics processor units. One embodiment provides a technique for zero squeezing of instructions when operands are loaded. When operands are loaded for instructions, and a zero operand in the instruction can cause a zero-value output (e.g., multiplication), the instruction is marked as a no-op, and the computational operation for the instruction is bypassed. One embodiment provides a technique for implementing low-precision integer multiplication to avoid accumulator register overflow when performing a series of fused or integer multiply-accumulate operations. One embodiment provides hardware logic for performing computational operations with unequal bit-length input operands proportional to the size of the data type, and performing as many fused multiply-add operations or appropriate binary operations or dot products as the data type of the lowest size.
[0157] FIG. Fig. 6A6 is a block diagram of a data processing system 600 according to an embodiment. The data processing system 600 is a heterogeneous processing system having a processor 602, a unified memory 610, and a GPGPU 620 including machine learning acceleration logic. The processor 602 and the GPGPU 620 may be any of a processor and a GPGPU / parallel processor as described herein. The processor 602 may execute instructions for a compiler 615 stored in a system memory 612. The compiler 615 is executed on the processor 602 to compile a source code 614A into a compiled code 614B. The compiled code 614B may include code that may be executed by the processor 602 and / or code that may be executed by the GPGPU 620. During compilation, the compiler 615 may perform operations to insert metadata including hints about the level of data parallelism present in the compiled code 614B and / or hints about data locality associated with threads to be dispatched based on the compiled code 614B. Compiler 615 may include the information necessary to perform such operations, or may perform these operations with the help of runtime library 616. Runtime library 616 may also facilitate compiler 615 to compile source code 614A, and may also include instructions that are associated with compiled code 614B at runtime to facilitate execution of the compiled instructions on GPGPU 620.
[0158] Unified memory 610 represents a unified address space accessible by processor 602 and GPGPU 620. Unified memory includes system memory 612 and GPGPU memory 618. GPGPU memory 618 includes GPGPU local memory 628 within GPGPU 620, and may also include some or all of system memory 612. For example, compiled code 614B stored in system memory 612 may also be mapped into GPGPU memory 618 for access by GPGPU 620.
[0159] GPGPU 620 includes a plurality of computing blocks 624A-624N, which may be Figure 2A An instance of a computing cluster 214A-214N, or Figure 2C624A-624N for power management. Each of the plurality of compute blocks 624A-624N may include a plurality of compute units, which may be a set of cores, multiprocessors, execution units, or other execution resources that may execute threads in a thread group. The GPGPU 620 also includes a set of registers 625, a cache memory 627, and a power and performance module 626, which may be used as a shared resource for the compute blocks 624A-624N. The power and performance module 626 may be configured to adjust the power delivery and clock frequency of the compute blocks 624A-624N for power management (gating) of idle components within the compute blocks 624A-624N under heavy workloads. The GPGPU 620 includes a GPGPU local memory 628, which is physical memory that shares a graphics card or multi-chip module with the GPGPU 620.
[0160] In one embodiment, the GPGPU 620 includes computational logic optimized to accelerate machine learning operations. The computational logic includes an instruction unit 621, a scheduler unit 622, and a variable precision module 623. The instruction unit 621 includes logic for acquiring, decoding, and preprocessing instructions that define complex computational pipeline behaviors. The complex pipeline behaviors specified by the instructions can be sorted and / or serialized via the scheduler unit 622, which can schedule multiple operations of each instruction to computational blocks 624A-624N that include multiple cluster parallel processor units. As described herein, the variable precision module 623 includes additional logic for providing or enhancing support for variable precision and dynamic precision operations. The variable precision module 623 can enable such functionality by providing additional logic that works with the instruction unit 621, the scheduler unit 622, and the computational blocks 624A-624N to implement the execution of variable precision instructions. Figure 7C-7D The operations facilitated by the variable precision module 623 are described in further detail in .
[0161] Zero squeezing for multiplication instructions
[0162] The activated input is often zero, resulting in a false FMA operation. The embodiments described herein provide a hardware technique that utilizes the sparse structure of a neural network and machine learning calculations to skip one or more stages of a multiplication or multiply-add instruction in which one of the multiplicands is zero, so that the multiplication portion of the instruction becomes a "NOP". In various embodiments, the techniques described herein can be implemented in hardware, software, or firmware. In the case of a zero operand being detected for an instruction, one or more parts of the instruction can be bypassed. In one embodiment, a software implementation is provided in which software logic periodically checks a zero-value operand. If a zero operand is detected, the logic can skip one or more instructions that depend on the detected zero-value operand.
[0163] One embodiment exploits the characteristics of neural network computations, where an element is broadcast and then multiplied by an input vector. The result is then accumulated on an output element. Hardware support is added to a broadcast unit of a processor element, where the broadcast unit determines whether the element being broadcast is zero. If the element being broadcast is zero, the broadcast unit can mark the destination register for the broadcast operation. The processing element can then subsequently determine whether a zero tag exists and squeeze the instruction when the output of the instruction will be zero. In one embodiment, a processor with support for out-of-order instruction execution can implement such a technique within out-of-order execution logic. However, such a technique can also be implemented within a processor configured for in-order execution (e.g., a GPGPU). In some embodiments, a GPGPU can be configured to at least partially support out-of-order execution, at least with respect to zero squeeze instructions. Such instructions can be completed out-of-order like NOP instructions before other GPGPU instructions are processed or completed. For processors that are at least partially out-of-order, instruction squeezing can be performed based on tags applied by a broadcast unit, which is configured to broadcast input vectors or input vector elements to functional units (e.g., compute units) within a GPGPU or another processor described herein. The hardware logic used to perform such operations is in Figure 6D-6F is shown in more detail in .
[0164] Figure 6BLogic 630 is shown that provides a technique for zero squeezing instructions. Logic 630 can configure the GPGPU to perform operations, including obtaining an instruction to be executed within the GPGPU at box 632, and decoding the instruction at box 634 to determine the type of the instruction. Determining the type of instruction may include determining the classification of the instruction and / or the type of operation to be performed during the execution of the instruction. If logic 630 determines at box 635 that the instruction is a multiplication operation, logic 630 may determine at box 636 whether the instruction has any operand value that is zero. If a portion of the instruction includes multiplication of input operands, the instruction includes a multiplication operation. For example, a fused multiply-add or fused multiply-accumulate instruction includes an addition operation and a multiplication operation. If the instruction is not a multiplication instruction or does not have any zero operands, logic 630 may schedule the instruction operation at box 638 for execution. If any operand of the multiplication operation is zero, then at box 639, logic 630 may mark the operation as a NOP. During instruction execution, if the output of the instruction is guaranteed to be zero, such as for a matrix or vector multiplication instruction where each multiplication operation includes a zero operand, the execution logic may bypass scheduling of the multiplication instruction entirely. In one embodiment, a subset of the outputs of the operations of the instruction will be zero, while a portion of the outputs will be non-zero. For example, a fused multiply-add operation with zero operands for the multiplication portion of the instruction may simply write the adder operand to the destination register. A fused multiply-accumulate operation may output an existing accumulator value. In one embodiment, a vector or matrix multiplication instruction may have one or more non-zero inputs for some elements of the instruction. During execution of such an instruction, such as Fig. 6E As described in, one or more multiplication operations can be bypassed within a computation unit at the functional unit level.
[0165] Additional techniques are applied in the case of multiple rounds of implementation of compound operations, where four or eight operations are performed in multiple rounds. Exemplary instructions of this type include a quad fused multiply-add (QFMA) instruction or a quad vector neural network instruction (QVNNI). During the execution of such an instruction, multiple rounds through the computational unit are executed, where a subset of the operations are performed in each round. Some embodiments described herein provide a method for identifying and packing non-zero input values (e.g., removing zero input operands) so that if the number of non-zeros is <50%, the operation can be completed in a reduced number of rounds. For example, a dual-round operation can be performed in a single round. Where the input operands are compressed, in one embodiment, the mapping between the original operation and the compressed operation can be maintained by instruction scheduling or reordering logic.
[0166] Figure 6CLogic 640 for implementing round reduction via zero squeezing is shown. The logic 640 may configure the GPGPU to perform operations including obtaining instructions to be executed within the GPGPU at box 642, and decoding the instructions at box 644 to determine the instruction type. If the logic 640 determines at box 645 that the instruction is a two-round vector or matrix multiplication instruction, the logic 640 may then determine at box 646 whether greater than or equal to 50% (e.g., half or more) of the element operations have zero operands. If either of the determinations at boxes 645 and 646 is negative, the logic 640 may perform the instruction operations normally at box 648. If the instruction is a two-round vector or matrix multiplication instruction, and more than 50% of the element operations have zero operands, the logic 640 may compress elements with non-zero operands at box 647. Compressing elements with non-zero operands may include bypassing execution of elements with zero operands, thereby enabling the instruction to be executed in a reduced number of rounds. Compression may be performed on instructions that include two or more rounds, where the degree and threshold of compression is determined based on a known percentage of zero operations. A four-round operation may be compressed into two rounds if at least 50% of the operations will be zero, into one round if at least 75% of the operations will be zero, and into three rounds if at least 25% of the operations will be zero. In the case of a two-round operation where at least 50% of the element operations have one or more zero input operands, logic 640 may perform the two-round multiplication operation in a single round, as shown at block 649.
[0167] Fig.6D 6 shows the round compression of the composite instruction or multi-round instruction according to the embodiment; in one embodiment, the computing unit 660 including a set of functional units 662 can be used to execute instructions that associate multiple operations, such as matrix or vector multiplication instructions. The computing unit 660 can be as follows Fig. 6A The computing unit within the computing block 624A-624N in , or another execution unit or multiprocessor as described herein. The set of functional units 662 includes integer or floating point units as described herein. In one embodiment, the computing unit 660 can be configured to execute an internal hardware thread for each operation. For example, if the computing unit 660 can execute four threads in one cycle, an eight-operation instruction can be executed on a single computing unit as a two-round or two-cycle operation, and a sixteen-operation instruction can be executed in four rounds or four cycles.
[0168] For example, an eight-operation instruction may be executed, where the first input register 651 may store a first vector of eight packed input values, and the second input register 652 may store a second vector of eight packed input values for the operation. Exemplary packed input values may be non-zero (e.g., input 651C, input 652C, input 652F) or zero (e.g., input 651F). In one embodiment, the input mapping and filtering unit 656 is coupled to the input registers 651, 652 via one or more buses 653, 655. In various embodiments, the input mapping and filtering unit 656 may be implemented by an instruction unit or a scheduler unit (e.g., as described herein) as described herein. Fig. 6A The input mapping and filtering unit 656 includes a comparator to determine which multiplication operations to be performed by the computing unit 660 have one or more zero input values. These operations can be marked as zero to indicate that the output of the operation is known to be zero. The input of the multiplication operation with unknown output value (e.g., no zero operand) can be provided to the computing unit via bus 657, and the computing unit can perform the operation on a set of functional units 662 and output the result to the output mapping unit 665 via bus 663. The output mapping unit 665 then outputs a non-zero value to the output register 668.
[0169] For example, an operation to generate a third output value 668C may be performed based on a third input 651C packed into a vector stored in a first input register 651 and a sixth input packed into a vector stored in a second input register 652. Since the input values of the operation or thread are all non-zero, a multiplication operation is performed by the computation unit 660 and a non-zero value is output. The operation for generating a sixth output value 668F may be bypassed, and the output value of the sixth output may be an initialized or pre-existing value of an output register 668. Depending on the number of rounds of operations to be performed for the instruction, the number of rounds for executing the instruction may be reduced based on the percentage of operations known to be zero operations based on the input values.
[0170] Fig. 6E The hardware logic for implementing the zero squeeze technique described herein is shown. Fig. 6A The instruction unit 621, scheduler unit 622, and computational blocks 624A-624N also shown in the figure can improve power efficiency and / or increase throughput by bypassing or combining operations for parallel or vector instructions. Embodiments of the logic shown can be implemented in a parallel processor and / or GPGPU configured for SIMD or SIMT operations.
[0171] In one embodiment, instruction cache 670 includes instructions to be executed by computation blocks 624A-624N, and data cache 671 may include values associated with operands of the instructions to be executed. Instruction fetch unit 672 may fetch instructions from instruction cache 670 for execution and provide these instructions to instruction decode unit 673 for decoding. Based on the decoded instructions, operand fetch unit 674 may retrieve operands for the instructions from data cache 671. In some embodiments, Fig.6D At least a portion of the operation of the input mapping and filtering unit 656 is performed by the instruction unit 621. For example and in one embodiment, the operand broadcast unit 676 resides in the instruction unit 621 and is configured to broadcast instructions and / or operand data to appropriate data consumers within the GPGPU. In various embodiments, the broadcast unit 676 includes a number of comparators for enabling conditional operations based on the data to be broadcast. In one embodiment, the broadcast unit 676 includes an operand comparator 677. The operand comparator 677 can be configured to perform a comparison on the values of the retrieved operands. In the case of a multiplication instruction, or in the case of an instruction including a multiplication operation (e.g., FMADD, FMAC, etc.) or a binary operation (e.g., XNOR) or a dot product operation, the operand comparator 677 can compare the operand value with zero, and if any operand for the multiplication operation is zero, the broadcast unit 676 can set a value in the register tag unit 675 associated with the operation. The zero tag can be associated with the operation in various ways. In one embodiment, the zero tag can be associated with the destination register of the operation.
[0172] In one embodiment, where the result of a multiplication instruction is necessarily a zero value, the scheduler unit 622 may bypass scheduling of the instruction and output the result of the operation as zero. Where a vector or parallel operation is to be performed and a subset of the elements of the operation will be zero, in one embodiment, the operation may be scheduled to a compute block 624A-624N by the scheduler unit 622 and the compute units within the compute block, and the compute units within the compute block may bypass individual operations, thereby allowing for reduced power computation. In embodiments supporting SIMT parallel computation, threads having operations with known zero results may be bypassed or masked in the scheduler unit 622.
[0173] In one embodiment, the scheduler unit 622 includes a controller 678, which may be a microcontroller, and multi-round reducer logic 679, which may work in conjunction with or include logic executed via the controller 678. In such an embodiment, a portion of the operation of the input mapping and filtering unit 656 is performed by the multi-round reducer 669 and / or the controller 678. The illustrated logic within the scheduler unit 622 may be functionally combined with the instruction unit to perform Figure 6C The operation of the logic 640 shown in and Fig.6D The round compression.
[0174] Fig. 6F Hardware for implementing zero squeezing within a compute unit according to an embodiment is shown. In addition to bypassing zero result instructions during scheduling, parallel instructions with partial zero results can be handled at the level of functional units 687 within the compute unit 681. The compute unit 681 may include multiple functional units 687, each of which can be configured to perform operations on elements of a vector input. Four functional units 687 of the compute unit 681 are shown. However, the compute unit 681 is not limited to four functional units 687. The group of functional units within the compute unit 6811 can be configured to perform operations with the data type and precision of the operand 684 (e.g., floating point or integer data types with 8-bit, 16-bit, or 32-bit precision). In one embodiment, the functional unit 687 can perform 64-bit floating point operations.
[0175] In one embodiment, register tag unit 675 includes a vector tag for the instruction that indicates whether any operation output to a vector destination register is marked as zero output. Each functional unit 687 is associated with a multiplexer 686. Multiplexer 686 can use elements of the vector tag from register tag unit 675 to select between a primitive operation 682 (e.g., multiplication, etc.) and a no operation (NOP 683). The selected operation 688 for each functional unit 687 is then performed on the vector elements of operand 684 associated with the functional unit 687.
[0176] Low-precision integer multiplication to avoid accumulator register overflow
[0177] In deep learning, INT16-INT32 precision is widely estimated to be the best precision for deep learning. When performing 16-bit operations that accumulate into a 32-bit accumulator, overflow conditions may occur because the accumulator may not have enough bit width to accumulate a long chain of 16-bit multiplications. One solution is to multiply INT16-INT16 and right-shift the intermediate INT32 results before accumulation.
[0178] Fig. 7A Logic 710 of providing a technique for low-precision integer multiplication according to an embodiment is shown. As shown at block 711, logic 710 performs an operation including decoding an instruction specifying a multiplication-accumulation operation. As shown at block 712, logic 710 then performs a multiplication operation to generate a product with a higher precision than the input to the multiplication operation. For example, 16-bit operands can be multiplied to generate a 32-bit intermediate value. As shown at block 714, logic 710 can then determine whether the accumulation operation will overflow the accumulator. As shown at block 715, logic 710 determines that the operation will overflow, and the logic can right-shift the product and accumulator value, as shown at block 716, and add the shifted value at block 718. The number of shifted positions can be stored in a scaling factor register. Before output, for example, after a series of accumulator operations, the accumulated value can be left-shifted before output based on the number of right shifts performed during accumulation, as shown at block 719. If overflow will not occur at block 715 , logic 710 may simply add the shifted values at block 717 .
[0179] Figure 7BA logic unit 720 configured for low-precision integer multiplication to avoid accumulator register overflow according to an embodiment is shown. The logic unit 720 accepts two or more inputs 721 (e.g., input a, b) to perform a multiplication-accumulation operation. In one embodiment, the input 721 is provided to a 16-bit multiplication-addition unit 722 including a 16-bit × 16-bit multiplier 724 and a 32-bit adder 726. The input 721 is multiplied by the multiplier 724 to produce a product 725. Depending on the output configuration of the multiplier 724, the product can be a 16-bit product or can have a larger width. For example, the product 725 can be a 32-bit product. When accumulation is enabled, the 32-bit adder 726 adds the product 725 to the accumulator input value 723 (e.g., input c) from the accumulator 732. Although a 32-bit adder 726 is shown, in one embodiment, an adder with higher bit precision, such as a 40-bit adder, can be used. Shift logic 727 can evaluate product 725 to determine whether overflow may occur when product 725 is accumulated with accumulator input value 723. In one embodiment, shift logic 727 can also evaluate the value in accumulator 732 or accumulator input value 723. If overflow will occur, shift logic 727 can right shift product 725 and accumulator input 723 before adding the value via 32-bit adder 726. Integer sum 728 can then be added to accumulator register 732. Once the accumulation chain is completed, the accumulated value can be left shifted by shift logic 734. The degree of right shift can be tracked by scaling factor register 730, which tracks the degree of reduction that has been performed during the accumulation chain. Based on the degree of right shift, scaling can be undone by left shift operation via shift logic 734. For example, where the output result is to be stored in a register of sufficient size to store the full value, the shift logic 734 may scale the value in the accumulator 732 prior to output. In one embodiment, the scaled value may be output, and a consumer of the scaled value may store the scale factor from the scale factor register along with the output value for use when performing subsequent operations using the scaled value.
[0180] In one embodiment, the logic unit 720 is additionally configured with a precision configuration 731, which can be used to adjust the precision of the 16-bit×16-bit multiplier 724 and / or the 32-bit adder 726. In one embodiment, the precision configuration 731 can be a two-bit input signal, where the first bit is used to select between two multiplier configurations and the second bit is used to select between two adder configurations. The multiplication configuration can be a 16-bit x 16-bit multiplication configuration and an 8-bit x 8-bit multiplication configuration. The adder configuration can be a 32-bit adder configuration and a 20-bit adder configuration. The unused bits of the lower precision configuration can be power managed to reduce the power consumption of the logic unit 720, thereby potentially enabling the use of an additional number of logic units under a given power budget.
[0181] Parallel processing of unequal bit lengths for variable precision input operands
[0182] Deep learning inference and training are rapidly moving toward lower precision arithmetic, where the existing technology performs inference operations with 8-bit precision. By implementing lower precision inference, greater inference performance can be achieved relative to the existing technology. However, extremely low precision operations, especially symmetric low precision operations, do not produce accurate results in real world applications. For example, it has been shown that inference produces acceptably accurate results using 2-bit inputs and 32-bit activations, while knowing that 2-bit activations and weights do not produce good results. However, using 32-bit activations may hinder results due to the relatively large size of the operands, leading to increased cache pressure within the processing unit.
[0183] The embodiments described herein provide instructions and associated logic to implement a general method for computing unequal bit length input operands proportional to the size of the data type. In such an embodiment, multiple 32-bit lanes are used for high precision, while one 32-bit lane is used for low precision operands. Low precision operands can be packed into one 32-bit lane, and parallel unequal bit length operations are performed within the computational unit. One embodiment implementation uses 8-bit activations and 2-bit weights. One embodiment implementation uses 8-bit activations and 4-bit weights. Such an embodiment achieves improved performance while maintaining accurate inference results.
[0184] In some embodiments, the instruction set of the processor described herein is extended to include unequal bit lengths and variable precision input operand instructions. Various parallel processing operations for variable precision machine learning are implemented by such instructions. In one embodiment, the computing unit is configured to perform operations on a first input value across multiple 32-bit input channels and a second input value packed in a single 32-bit input channel. The output value is then packed into a single 32-bit output channel. For example, one embodiment provides an instruction set that consumes a 16-byte input (inp1) and a 4-byte input (inp2) to generate a 4-byte output (out). For example, a dp_8_2_4a instruction can be provided, which performs the operation shown in equation (1).
[0185] out[31...0]+=sum_{i=1..16}inp1[i*8-1...(i-1)*8]*inp2[i*2-1...(i-1)*2]}.(1)
[0186] A 16-byte input is a 128-bit input that can contain sixteen 8-bit input values, for example, the 8-bit input value can be an input value used in a convolution operation. A 4-byte input is a 32-bit input that can contain sixteen 2-bit inputs, for example, the 2-bit input can be a ternary weight for a convolution operation. This type of instruction can perform a variable number of fused multiplications and additions (FMADD), binary operations (e.g., XNOR), or certain matrix operations, such as dot products. The number of operations performed in one cycle can be determined based on the size of the data type of the minimum size relative to the size of the 32-bit input channel. For example, in the case where the instruction operates on the second value of a vector including sixteen 2-bit inputs, sixteen operations are performed. In the case where the instruction operates on the second input of a vector including eight four-bit values, eight operations can be performed.
[0187] Figure 7C Logic 740 for implementing unequal bit length parallel processing according to an embodiment is shown. As shown at block 742, logic 740 can obtain a single instruction with multiple input operands of unequal bit lengths, wherein the multiple operands include a first input with a first bit length and a second input with a second bit length. As shown at block 744, logic 740 can then decode the single instruction into a decoded instruction and determine the smaller bit length of the first bit length and the second bit length. Then, logic 740 can perform matrix operations on multiple operands to generate an output value with a bit length of a smaller bit length, as shown at block 746.
[0188] Fig.7DAn exemplary instruction architecture 750 for performing unequal bit length parallel processing according to an embodiment is shown. In one embodiment, the instruction accepts a 128-bit input 751 operand packed with 16 inputs, which are grouped into four 32-bit blocks 752. The 128-bit input 751 can represent a tensor of 8-bit activations. The 128-bit input 751 can be processed in a double-round operation against a weight input 753 including multiple groups of 2-bit weights, each group including sixteen 2-bit weights (e.g., W00-W0F) in a 32-bit block 754 packed into a 64-bit weight operand 753. A fused multiply-add (FMADD) operation can be performed using the 128-bit input 751 and the 32-bit block 754 of the weight input 753 to generate a 32-bit output 756. The remaining 32 bits of the output 755 can be generated by performing a second FMA operation using the remaining 32 bits of the 128-bit input 751 and the weight operand 753.
[0189] Fig.7D The exemplary instruction architecture 750 can be used as a general architecture for multiple machine learning operations, including fused multiply-add or multiply-accumulate operations, XNOR operations, or dot product operations such as dp_8_2_4a described above. Additional exemplary operations include QVNNI-8-2 or QVNNI-8-4 instructions as shown in Tables 5 and 6.
[0190] Table 5 - QVNNI-8-2 instructions
[0191]
[0192] Table 6-QVNNI-8-4 instructions
[0193]
[0194] The QVNNI-8-2 instruction shown in Table 5 provides 4*16*16=1024 fused multiply-add operations per cycle, which yields a 4x throughput increase relative to the QVNNI-8 instruction, which provides a throughput of 4*16*4=256 fused multiply-add instructions per cycle. Similar instructions can be defined for QVNNI-4-2, QVNNI-4-1, QVNNI-2-1, and QVNNI-8-1 according to the template described above.
[0195] Any and all of the embodiments described herein may be combined to produce more complex embodiments. For example, zero squeeze may be combined with low precision integer multiplication and / or unequal bit length or variable precision operations. The multiply-add operation of the QVNNI instruction may use the same Figure 7B The logic unit 720 shown in FIG. 1 may perform similarly to the logic unit 720 shown in FIG. 1 and may include overflow protection logic.
[0196] Fig. 7E Variable precision execution logic 760 is shown that can be used to implement unequal bit length parallel processing according to an embodiment. In some embodiments, the variable precision logic 760 includes a computation unit 770 coupled to or including a variable precision module 623. The variable precision module 623 can be Fig. 6A The logical OR of the variable precision module 623 includes Fig. 6A The logic of the variable precision module 623. The calculation unit 770 can be Fig. 6A The variable precision module 623 may be a computational unit of one of the plurality of computational blocks 624A-624N. In one embodiment, the variable precision module 623 includes an operand length unit 765 and a precision configuration unit 766. The operand length unit 765 may be used to compare the bit lengths of the input operands (e.g., operand 761, operand 762) to determine the smaller bit length. The precision configuration unit 766 may then provide a precision configuration 768 to each functional unit in a set of functional units 767 within the computational block 624. In one embodiment, the precision configuration 768 configures the operational precision for one or more components of each functional unit in the set of functional units 767. For example, where the first input operand 761 is a 128-bit operand and the second input operand 762 is a 32-bit operand, the precision configuration 768 may specify a 32-bit output 769. In one embodiment, the set of functional units 767 may include one or more floating point and / or integer logic units as described herein, such as, Figure 7B 720. In such an embodiment, the precision configuration 768 can configure multiple elements of the functional unit to a precision such as associated with a multiplier or adder within the functional unit. The set of functional units 767 in each computational unit 770 can be configured to include various numbers of functional units (e.g., 4, 8, 16, 32, 64, etc.), and the functional units can be power managed when not in use, so that the number of active functional units varies based on the current power consumption and the power budget available for the computational unit 770.
[0197] The input operands 761, 762 may be vector input operands storing multiple packed input values. For example, the first input operand 761 may be a 128-bit vector storing four packed 32-bit input values. The second input operand 762 may be a 32-bit vector storing four packed 8-bit values. In one embodiment, the four packed 32-bit input values and the four packed 8-bit values may be additional subdivided packed vectors storing values. For example, the first input operand 761 may be a 128-bit vector storing four packed 32-bit input values. Fig.7DThe first 128-bit input 751 in the embodiment of the present invention stores a plurality of packed 32-bit blocks 752. The second input operand 762 may be the first 32 bits 754 of the 64-bit weight input 753. The precision configuration 768 for the functional unit 767 includes data for configuring the element size within each functional unit 767.
[0198] In various embodiments, the instruction set architecture of the processor described herein is extensible. In such embodiments, the instruction set architecture is extended to include instructions that support these feature combinations. In addition, the techniques described herein can be implemented in a parallel-focused general-purpose processor, a general-purpose graphics processor, or a parallel processor optimized to perform large-scale vector operations.
[0199] Machine Learning Overview
[0200] A machine learning algorithm is an algorithm that can learn based on a set of data. Embodiments of machine learning algorithms can be designed to model high-level abstractions within a data set. For example, an image recognition algorithm can be used to determine which of several categories a given input belongs to; a regression algorithm can output a numerical value given an input; and a pattern recognition algorithm can be used to generate translated text or perform text-to-speech and / or speech recognition.
[0201] One example type of machine learning algorithm is a neural network. There are many types of neural networks; a simple type of neural network is a feedforward network. A feedforward network can be implemented as an acyclic graph in which nodes are arranged in layers. Typically, a feedforward network topology includes an input layer and an output layer, which are separated by at least one hidden layer. The hidden layer transforms the input received by the input layer into a representation useful for generating outputs in the output layer. The network nodes are fully connected to the nodes in the adjacent layers via edges, but there are no edges between the nodes in each layer. Data received at the nodes of the input layer of the feedforward network is propagated (i.e., "fed forward") to the nodes of the output layer via an activation function, which calculates the state of the nodes of each successive layer in the network based on coefficients ("weights"), which are respectively associated with each of the edges connecting these layers. Depending on the specific model represented by the algorithm being executed, the output from the neural network algorithm can take various forms.
[0202] Before a machine learning algorithm can be used to model a specific problem, the algorithm is trained using a training data set. Training a neural network involves: selecting a network topology; using a set of training data representing the problem being modeled by the network; and adjusting weights until the network model behaves with minimal error for all instances of the training data set. For example, during a supervised learning training process for a neural network, the output generated by the network in response to an input representing an instance in the training data set is compared to the "correct" labeled output for the instance; an error signal representing the difference between the output and the labeled output is calculated; and when the error signal is propagated back through the layers of the network, the weights associated with the connections are adjusted to minimize the error. The network is considered "trained" when the error for each output generated from an instance of the training data set is minimized.
[0203] The accuracy of a machine learning algorithm 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 take a significant amount of time on a conventional general purpose processor. Therefore, many types of machine learning algorithms are trained using parallel processing hardware. This is particularly useful for optimizing the training of neural networks, as the calculations performed when adjusting the coefficients in a neural network are naturally suited to parallel implementations. In particular, many machine learning algorithms and software applications have been adapted to use parallel processing hardware within general purpose graphics processing devices.
[0204] Figure 8 is a generalized diagram of a machine learning software stack 800. Machine learning applications 802 may be configured to train a neural network using a training data set or to implement machine intelligence using a trained deep neural network. Machine learning applications 802 may include training and inference capabilities for a neural network and / or specialized software that may be used to train a neural network prior to deployment. Machine learning applications 802 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.
[0205] Hardware acceleration for machine learning applications 802 can be implemented via a machine learning framework 804. The machine learning framework 804 can provide a library of machine learning primitives. Machine learning primitives are basic operations commonly performed by machine learning algorithms. Without the machine learning framework 804, developers of machine learning algorithms would be required to create and optimize the main computational logic associated with the machine learning algorithm, and then re-optimize the computational logic when a new parallel processor is developed. Instead, machine learning applications can be configured to use primitives provided by the machine learning framework 804 to perform necessary calculations. Exemplary primitives include tensor convolutions, activation functions, and pooling, which are computational operations performed when training a convolutional neural network (CNN). The machine learning framework 804 can also provide primitives for implementing basic linear algebra subroutines, such as matrix and vector operations, performed by many machine learning algorithms.
[0206] The machine learning framework 804 can process input data received from the machine learning application 802 and generate appropriate inputs to the computation framework 806. The computation framework 806 can abstract the underlying instructions provided to the GPGPU driver 808 so that the machine learning framework 804 can take advantage of hardware acceleration via the GPGPU hardware 810 without requiring the machine learning framework 804 to be intimately familiar with the architecture of the GPGPU hardware 810. In addition, the computation framework 806 can implement hardware acceleration for the machine learning framework 804 across multiple types and generations of GPGPU hardware 810.
[0207] GPGPU machine learning acceleration
[0208] Fig. 9 A highly parallel general purpose graphics processing unit 900 is shown according to an embodiment. In one embodiment, a general purpose processing unit (GPGPU) 900 can be configured to be particularly efficient in processing the type of computational workload associated with training deep neural networks. In addition, GPGPU 900 can be directly linked to other instances of GPGPU for creating a multi-GPU cluster, thereby improving the training speed of particularly deep neural networks.
[0209] GPGPU 900 includes a host interface 902 for implementing a connection with a host processor. In one embodiment, host interface 902 is a PCI Express interface. However, the host interface can also be a supplier-specific communication interface or communication structure. GPGPU 900 receives commands from the host processor and uses a global scheduler 904 to distribute the execution threads associated with those commands to a group of computing clusters 906A to 906H. Computing clusters 906A to 906H share a cache memory 908. Cache memory 908 can act as a high-level cache in the cache memory within the computing clusters 906A to 906H.
[0210] GPGPU 900 includes memory 914A-914B coupled to computing clusters 906A-906H via a set of memory controllers 912A-912B. In various embodiments, memory 914A-914B may include various types of memory devices, including dynamic random access memory (DRAM) or graphics random access memory (e.g., synchronous graphics random access memory (SGRAM), including graphics double data rate (GDDR) memory), and may also include 3D stacked memory, including but not limited to high bandwidth memory (HBM).
[0211] In one embodiment, each computing cluster 906A-906H includes a set of graphics multiprocessors, such as Figure 4A The graphics multiprocessor 400 of the computing cluster includes multiple types of integer and floating point logic units that can perform computational operations at a range of precisions, including precisions suitable for machine learning computations. For example and in one embodiment, at least a subset of the floating point units of each of the computing clusters 906A to 906H can be configured to perform 16-bit or 32-bit floating point operations, while a different subset of the floating point units can be configured to perform 64-bit floating point operations.
[0212] Multiple instances of GPGPU 900 can be configured to operate as a computing cluster. The communication mechanism used by the computing cluster for synchronization and data exchange varies across embodiments. In one embodiment, multiple instances of GPGPU 900 communicate through a host interface 902. In one embodiment, GPGPU 900 includes an I / O hub 909 that couples GPGPU 900 with a GPU link 910, which implements direct connection to other instances of GPGPU. In one embodiment, GPU link 910 is coupled to a dedicated GPU-GPU bridge, which implements communication and synchronization between multiple instances of GPGPU 900. In one embodiment, GPU link 910 is coupled to a high-speed interconnect for transmitting and receiving data to other GPGPUs or parallel processors. In one embodiment, multiple instances of GPGPU 900 are located in a separate data processing system and communicate via a network device, which can be accessed via a host interface 902. In one embodiment, in addition to host interface 902 or as an alternative to the host interface, GPU link 910 can also be configured to enable connection to a host processor.
[0213] Although the illustrated configuration of GPGPU 900 can be configured to train a neural network, one embodiment provides an alternative configuration of GPGPU 900 that can be configured for deployment in a high-performance or low-power inference platform. In the inference configuration, GPGPU 900 includes fewer computing clusters 906A to 906H relative to the training configuration. In addition, the memory technology associated with memory 914A to 914B may differ between the inference and training configurations. In one embodiment, the inference configuration of GPGPU 900 may support inference-specific instructions. For example, the inference configuration may provide support for one or more 8-bit integer dot product instructions, which are typically used during inference operations for deployed neural networks.
[0214] Fig.10 A multi-GPU computing system 1000 according to an embodiment is shown. The multi-GPU computing system 1000 may include a processor 1002 coupled to a plurality of GPGPUs 1006A to 1006D via a host interface switch 1004. In one embodiment, the host interface switch 1004 is a PCI Express switch device that couples the processor 1002 to a PCI Express bus, through which the processor 1002 can communicate with the set of GPGPUs 1006A to 1006D. Each of the plurality of GPGPUs 1006A to 1006D may be Fig. 91006A to 1006D can be interconnected via a set of high-speed point-to-point GPU-GPU links 1016. The high-speed GPU-GPU links can be connected via dedicated GPU links (e.g., Fig. 9 1006D). The P2P GPU link 1016 enables each of the GPGPUs 1006A to 1006D to communicate directly with each other without having to communicate through a host interface bus (to which the processor 1002 is connected). In the case where GPU-GPU traffic is directed to the P2P GPU link, the host interface bus can still be used for system memory access or communication with other instances of the multi-GPU computing system 1000 (e.g., via one or more network devices). Although in the illustrated embodiment GPGPUs 1006A to 1006D are connected to the processor 1002 via the host interface switch 1004, in one embodiment, the processor 1002 includes direct support for the P2P GPU link 1016 and can be directly connected to the GPGPUs 1006A to 1006D.
[0215] Machine Learning Neural Network Implementation
[0216] The computing architecture provided by the embodiments described herein can be configured to perform these types of parallel processing that are particularly suitable for training and deploying neural networks for machine learning. A neural network can be generalized as a network of functions with a graph relationship. As is well known in the art, there are many types of neural network implementations used in machine learning. One exemplary type of neural network is a feedforward network as previously described.
[0217] The second exemplary type of neural network is a convolutional neural network (CNN). CNN is a specialized feedforward neural network for processing data (e.g., image data) with a known, grid-like topology. Therefore, CNNs are commonly used in computer vision and image recognition applications, but they can also be used for other types of pattern recognition, such as speech and language processing. The nodes in the input layer of a CNN are organized into a set of "filters" (feature detectors inspired by the receptive fields found in the retina), and the output of each set of filters is propagated to the nodes in the successive layers of the network. The calculations used for CNNs include applying a convolution mathematical operation to each filter to produce the output of the filter. Convolution is a specialized mathematical operation performed by two functions to produce a third function, which is a modified version of one of the two original functions. In convolutional network terminology, the first function about convolution can be called the input, and the second function can be called the convolution kernel. The output can be called a feature map. For example, the input to the convolution layer can be a multidimensional data array that defines the various color components of the input image. The convolution kernel can be a multidimensional parameter array, where the parameters are adapted by a training process for the neural network.
[0218] Recurrent neural networks (RNNs) are a class of feedforward neural networks that include feedback connections between layers. RNNs enable modeling of sequence data by sharing parameter data across different parts of the neural network. The architecture of RNNs includes loops. These loops represent the effect of the current value of a variable on its own value at a future time, because at least a portion of the output data from the RNN is used as feedback for processing subsequent inputs in the sequence. This feature makes RNNs particularly useful for language processing due to the mutable nature of language data that can be composed.
[0219] The figures described below present exemplary feedforward, CNN, and RNN networks, and describe the general process for training and deploying each of those types of networks, respectively. It will be understood that these descriptions are exemplary and non-limiting with respect to any specific embodiment described herein, and that the concepts presented can generally be applied to deep neural networks and machine learning techniques in general.
[0220] The exemplary neural network described above can be used to perform deep learning. Deep learning is machine learning performed using deep neural networks. In contrast to shallow neural networks that include only a single hidden layer, the deep neural networks used in deep learning are artificial neural networks composed of multiple hidden layers. Deeper neural networks are generally more computationally intensive to train. However, the additional hidden layers of the network enable multi-step pattern recognition, which results in reduced output errors relative to shallow machine learning techniques.
[0221] The deep neural network used in deep learning typically includes a front-end network for performing feature recognition coupled to a back-end network representing a mathematical model, which can perform operations (e.g., object classification, speech recognition, etc.) based on the feature representation provided to the model. Deep learning enables machine learning to be performed without the need to perform manual feature engineering for the model. In contrast, deep neural networks can learn features based on statistical structures or correlations within the input data. The learned features can be provided to a mathematical model, which can map the detected features to an output. The mathematical model used by the network is typically dedicated to a specific task to be performed, and different models will be used to perform different tasks.
[0222] Once a neural network is structured, a learning model can be applied to the network to train the network to perform a specific task. The learning model describes how to adjust the weights within the model to reduce the output error of the network. Back propagation of errors is a common method for training neural networks. An input vector is presented to the network for processing. The output of the network is compared to the desired output using a loss function, and an error value is calculated for each neuron in the output layer. These error values are then propagated backward until each neuron has an associated error value that roughly represents its contribution to the original output. The network can then learn from those errors using an algorithm (such as a stochastic gradient descent algorithm) to update the weights of the neural network.
[0223] Figures 11A-11B Showing an example convolutional neural network. Fig.11A Show the various layers in CNN. Fig.11A As shown in , an exemplary CNN for modeling image processing can receive an input 1102, which describes the red, green, and blue (RGB) components of an input image. The input 1102 can be processed by multiple convolutional layers (e.g., convolutional layer 1104, convolutional layer 1106). Optionally, the output from the multiple convolutional layers can be processed by a set of fully connected layers 1108. The neurons in the fully connected layer have full connections to all activation functions in the previous layer, as previously described for feedforward networks. The output from the fully connected layer 1108 can be used to generate output results from the network. Matrix multiplication can be used instead of convolution to calculate the activation function in the fully connected layer 1108. Not all CNN implementations use the fully connected layer 1108. For example, in some implementations, the convolutional layer 1106 can generate the output of the CNN.
[0224] The convolutional layers are sparsely connected, which is different from the traditional neural network configuration found in the fully connected layer 1108. Traditional neural network layers are fully connected so that each output unit interacts with each input unit. However, the convolutional layers are sparsely connected because the output of the convolution of the receptive field (rather than the corresponding state value of each node in the receptive field) is input to the nodes of the subsequent layer, as shown. The kernel associated with the convolutional layer performs a convolution operation, the output of which is sent to the next layer. The dimensionality reduction performed within the convolutional layer is one aspect that enables CNNs to scale to process large images.
[0225] Fig. 11B Exemplary computational stages within a convolutional layer of a CNN are shown. Input 1112 to a convolutional layer of a CNN may be processed in three stages of a convolutional layer 1114. The three stages may include a convolution stage 1116, a detector stage 1118, and a pooling stage 1120. The convolutional layer 1114 may then output data to a successive convolutional layer. The last convolutional layer of the network may generate output feature map data or provide input to a fully connected layer, for example to generate a classification value for input to the CNN.
[0226] Several convolutions are performed in parallel in the convolution stage 1116 to produce a set of linear activation functions. The convolution stage 1116 may include an affine transformation, which is any transformation that can be specified as a linear transformation plus a translation. Affine transformations include rotations, translations, scaling, and combinations of these transformations. The convolution stage calculates the output of a function (e.g., a neuron) connected to a specific region in the input, which can be determined as a local region associated with the neuron. The neuron calculates the dot product between the weight of the neuron and the region in the local input (the neuron is connected to the local input). The output from the convolution stage 1116 defines a set of linear activation functions processed by the successive stages of the convolution layer 1114.
[0227] The linear activation functions may be processed by the detector stage 1118. In the detector stage 1118, each linear activation function is processed by a non-linear activation function. The non-linear activation function increases the non-linear nature of the overall network without affecting the receptive field of the convolutional layer. Several types of non-linear activation functions may be used. One specific type is the rectified linear unit (ReLU), which uses an activation function defined as f(x) = max(0, x) such that the activation function is thresholded to zero.
[0228] The pooling stage 1120 uses a pooling function that replaces the output of the convolutional layer 1106 with a summary statistic of nearby outputs. The pooling function can be used to introduce translation invariance into the neural network so that a slight translation to the input does not change the pooled output. The invariance of local translation can be useful when the feature existence of the input data is more important than the precise location of the feature. Various types of pooling functions can be used during the pooling stage 1120, including maximum pooling, average pooling, and L2 norm pooling. In addition, some CNN implementations do not include a pooling stage. Instead, such an implementation substitutes an additional convolution stage, which has an increased stride relative to the previous convolution stage.
[0229] The output from the convolutional layer 1114 may then be processed by the next layer 1122. The next layer 1122 may be an additional convolutional layer or one of the fully connected layers 1108. For example, Fig.11A The first convolutional layer 1104 can output to the second convolutional layer 1106, and the second convolutional layer can output to the first layer in the fully connected layer 1108.
[0230] Fig.12 An exemplary recurrent neural network 1200 is shown. In a recurrent neural network (RNN), the previous state of the network affects the output of the current state of the network. RNNs can be established in a variety of ways using a variety of functions. The use of RNNs generally revolves around the use of mathematical models to predict the future based on previous input sequences. For example, RNNs can be used to perform statistical language modeling to predict upcoming words given a previous word sequence. The RNN 1200 shown can be described as having the following: an input layer 1202, which receives an input vector; a hidden layer 1204, for implementing a recursive function; a feedback mechanism 1205, for implementing a 'memory' of previous states; and an output layer 1206, for outputting a result. RNN 1200 operates based on time steps. The state of the RNN at a given time step is affected based on the previous time step via the feedback mechanism 1205. For a given time step, the state of the hidden layer 1204 is defined by the previous state and the input at the current time step. The initial input (x1) at the first time step can be processed by the hidden layer 1204. The second input (x2) can be processed by the hidden layer 1204 using the state information determined during the processing of the initial input (x1). A given state can be calculated as f(Uxt+Wst-1), where U and W are parameter matrices. The function f is typically nonlinear, such as a variant of the hyperbolic tangent function (Tanh) or a modified function f(x)=max(0,x). However, the specific mathematical function used in the hidden layer 1204 can vary depending on the specific implementation details of the RNN 1200.
[0231] In addition to the basic CNN and RNN networks described, variations of those networks can also be implemented. An example RNN variant is the long short-term memory (LSTM) RNN. LSTM RNN is able to learn long-term dependencies that may be necessary for processing longer language sequences. A variant of CNN is a convolutional deep belief network, which has a structure similar to that of a CNN and is trained in a manner similar to that of a deep belief network. A deep belief network (DBN) is a generative neural network consisting of multiple layers of stochastic (random) variables. Greedy unsupervised learning can be used to train DBN layer by layer. The learned weights of the DBN can then be used to provide a pre-trained neural network by determining a set of optimal initial weights for the neural network.
[0232] Fig.13 Demonstrates the training and deployment of a deep neural network. Once a given network has been structured for a task, the neural network is trained using a training data set 1302. Various training frameworks have been developed to enable hardware acceleration of the training process. For example, Figure 8 The machine learning framework 804 can be configured as a training framework 1304. The training framework 604 can be hooked up to the untrained neural network 1306 and enable the untrained neural network to be trained to generate a trained neural network 1308 using the parallel processing resources described herein.
[0233] To start the training process, initial weights can be chosen randomly or by pre-training using a deep belief network. The training cycle is then performed in a supervised or unsupervised manner.
[0234] Supervised learning is a learning method in which training is performed as an arbitration operation, such as when the training data set 1302 includes inputs (which are paired with the expected outputs of 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 with a set of expected or desired outputs. Then, the error is back-propagated through the system. The training framework 1304 can be adjusted to adjust the weights that control the untrained neural network 1306. The training framework 1304 can provide tools for monitoring the extent to which the untrained neural network 1306 converges to a model suitable for generating the correct answer based on the known input data. The training process occurs repeatedly when the weights of the network are adjusted to improve the output generated by the neural network. The training process can continue until the neural network reaches a statistically expected accuracy associated with the trained neural network 1308. The trained neural network 1308 can then be deployed to implement any number of machine learning operations.
[0235] Unsupervised learning is a learning method in which a network attempts to train itself using unlabeled data. Thus, for unsupervised learning, the training data set 1302 will include input data without any associated output data. The untrained neural network 1306 can learn groupings within the unlabeled inputs and can determine how individual inputs relate to the overall data set. Unsupervised training can be used to generate a self-organizing map, which is a type of trained neural network 1307 that can perform operations useful in data dimensionality reduction. Unsupervised training can also be used to perform anomaly detection, which allows identification of data points in the input data set that deviate from the normal pattern of the data.
[0236] Variations of supervised and unsupervised training may also be employed. Semi-supervised learning is a technique in which the training data set 1302 includes a mixture of labeled and unlabeled data of the same distribution. Incremental learning is a variation of supervised learning in which input data is continually used for further training the model. Incremental learning enables a trained neural network 1308 to adapt to new data 1312 without forgetting the knowledge embedded within the network during initial training.
[0237] Whether supervised or unsupervised, the training process for particularly deep neural networks may be too computationally intensive for a single computing node. The training process can be accelerated using a distributed network of computing nodes rather than a single computing node.
[0238] Fig.14 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. The distributed computing nodes may each include one or more host processors and one or more general processing nodes, such as Fig. 9 A highly parallel general purpose graphics processing unit 900 in FIG. As shown, distributed learning can perform model parallelism 1402, data parallelism 1404, or a combination of model and data parallelism 1404.
[0239] In model parallelization 1402, different computing nodes in a distributed system can perform training calculations for different parts of a single network. For example, each layer of a neural network can be trained by a different processing node of the distributed system. The benefits of model parallelization include the ability to scale to particularly large models. Splitting the calculations associated with different layers of a neural network enables training of very large neural networks, where the weights of all layers will not fit into the memory of a single computing node. In some instances, model parallelism can be particularly useful in performing unsupervised training of large neural networks.
[0240] In data parallelization 1404, different nodes of the distributed network have complete instances of the model, and each node receives a different part of the data. Then, the results from different nodes are combined. Although different methods for data parallelization are possible, data parallel training methods all require a technology for combining results and synchronizing model parameters between each node. Exemplary methods for combining data include parameter averaging and update-based data parallelization. Parameter averaging trains each node on a subset of the training data, and sets global parameters (e.g., weights, biases) to the average value of the parameters from each node. Parameter averaging uses a central parameter server that maintains parameter data. Update-based data parallelism is similar to parameter averaging, except that updates to the model are transmitted instead of parameters from the node being transmitted to the parameter server. In addition, update-based data parallelism can be performed in a decentralized manner, where updates are compressed and transmitted between nodes.
[0241] For example, the hybrid parallelization technique of combined model and data parallelism 1406 can be implemented in a distributed system where each computing node includes multiple GPUs. Each node can have a complete instance of the model, with separate GPUs within each node used to train different parts of the model.
[0242] Distributed training has increased overhead relative to training on a single machine. However, the parallel processors and GPGPUs described herein can each implement various techniques for reducing the overhead of distributed training, including techniques for implementing high-bandwidth GPU-GPU data transfer and accelerated remote data synchronization.
[0243] Example Machine Learning Applications
[0244] Machine learning can be applied to solve a number of technical problems, including but not limited to computer vision, autonomous driving and navigation, speech recognition, and language processing. Computer vision has traditionally been one of the most active research areas for machine learning applications. Applications of computer vision range from reproducing human visual capabilities (e.g., recognizing faces) to creating new categories of visual capabilities. For example, computer vision applications can be configured to recognize sound waves from vibrations induced in objects visible in a video. Parallel processor-accelerated machine learning enables the use of significantly larger training data sets than previously feasible training data sets to train computer vision applications, and enables the use of low-power parallel processors to deploy inference systems.
[0245] Parallel processor-accelerated machine learning has autonomous driving applications, including lane and road sign recognition, obstacle avoidance, navigation, and driving control. Accelerated machine learning techniques can be used to train a driving model based on a data set that defines the appropriate response to a specific training input. The parallel processors described herein can enable rapid training of increasingly complex neural networks for autonomous driving solutions and enable the deployment of low-power inference processors in mobile platforms suitable for integration into autonomous vehicles.
[0246] Deep neural networks accelerated by parallel processors have enabled machine learning methods for automatic speech recognition (ASR). ASR involves creating a function that computes the most likely speech sequence given a sequence of input sounds. Accelerated machine learning using deep neural networks has been implemented to replace the hidden Markov models (HMMs) and Gaussian mixture models (GMMs) previously used for ASR.
[0247] Parallel processor accelerated machine learning can also be used to accelerate natural language processing. Automatic learning programs can use statistical inference algorithms to produce models that are robust to erroneous or unfamiliar inputs. Exemplary natural language processor applications include automatic machine translation between human languages.
[0248] Parallel processing platforms for machine learning can be divided into training platforms and deployment platforms. Training platforms are typically 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 Fig. 9 The highly parallel general purpose graphics processing unit 900 and Fig.10 The multi-GPU computing system 1000 of FIG. In contrast, deployed machine learning platforms typically include low-power parallel processors suitable for use in products such as cameras, autonomous robots, and autonomous vehicles.
[0249] Fig.15An exemplary inference system on chip (SOC) 1500 suitable for performing inference using a training model is shown. The SOC 1500 can integrate multiple processing components, including a media processor 1502, a visual processor 1504, a GPGPU 1506, and a multi-core processor 1508. The SOC 1500 can additionally include an on-chip memory 1505, which can implement a shared on-chip data pool accessible by each of the processing components. The processing components can be optimized for low-power operation to enable deployment to a variety of machine learning platforms (including autonomous vehicles and autonomous robots). For example, an implementation of the SOC 1500 can be used as part of a master control system for an autonomous vehicle. In the case where the SOC 1500 is configured for use in an autonomous vehicle, the SOC is designed and configured to comply with the relevant functional safety standards of the deployment jurisdiction.
[0250] During operation, the media processor 1502 and the visual processor 1504 can work in unison to accelerate computer vision operations. The media processor 1502 can enable low-latency decoding of multiple high-resolution (e.g., 4K, 8K) video streams. The decoded video streams can be written to a buffer in the on-chip memory 1505. The visual processor 1504 can then parse the decoded video and perform preliminary processing operations on the frames of the decoded video in preparation for processing the frames using the trained image recognition model. For example, the visual processor 1504 can accelerate convolution operations for CNN (for performing image recognition on high-resolution video data), while the back-end model calculations are performed by the GPGPU 1506.
[0251] The multi-core processor 1508 may include control logic for facilitating the sequencing and synchronization of data transfers and shared memory operations performed by the media processor 1502 and the vision processor 1504. The multi-core processor 1508 may also act as an application processor for executing software applications that may use the inference computing capabilities of the GPGPU 1506. For example, at least a portion of navigation and driving logic may be implemented in software executing on the multi-core processor 1508. Such software may issue computational workloads directly to the GPGPU 1506, or may issue computational workloads to the multi-core processor 1508, which may offload at least a portion of those operations to the GPGPU 1506.
[0252] GPGPU 1506 may include a computing cluster, such as a low-power configuration of computing clusters 906A to 906H within a highly parallel general purpose graphics processing unit 700. The computing cluster within GPGPU 1506 may support instructions that are explicitly optimized for performing inference calculations on trained neural networks. For example, GPGPU 1506 may support instructions for performing low-precision calculations (e.g., 8-bit and 4-bit integer vector operations).
[0253] Additional Exemplary Graphics Processing Systems
[0254] Details of the embodiments described above may be included in the graphics processing systems and apparatus described below. Figures 16 to 29 The graphics processing systems and devices of exemplify alternative systems and graphics processing hardware that can implement any and all of the techniques described above.
[0255] Additional Exemplary Graphics Processing System Overview
[0256] Fig.16 1600 is a block diagram of a processing system 1600 according to an embodiment. In various embodiments, the system 1600 includes one or more processors 1602 and one or more graphics processors 1608, and may be a single processor desktop system, a multi-processor workstation system, or a server system with a large number of processors 1602 or processor cores 1607. In one embodiment, the system 1600 is a processing platform incorporated into a system on a chip (SoC) integrated circuit for use in a mobile device, handheld device, or embedded device.
[0257] Embodiments of system 1600 may include or incorporate a server-based game platform, a game console, including a game and media console, a mobile game console, a handheld game console, or an online game console. In some embodiments, system 1600 is a mobile phone, a smart phone, a tablet computing device, or a mobile Internet device. Data processing system 1600 may also include a wearable device (such as a smart watch wearable device, a smart glasses device, an augmented reality device, or a virtual reality device), coupled to the wearable device, or integrated in the wearable device. In some embodiments, data processing system 1600 is a television or set-top box device having one or more processors 1602 and a graphical interface generated by one or more graphics processors 1608.
[0258] In some embodiments, one or more processors 1602 each include one or more processor cores 1607 for processing instructions, which perform the operation of the system and user software when executed. In some embodiments, each processor core in the one or more processor cores 1607 is configured to process a specific instruction set 1609. In some embodiments, the instruction set 1609 can facilitate complex instruction set computing (CISC), reduced instruction set computing (RISC), or computing via very long instruction words (VLIW). Multiple processor cores 1607 can each process different instruction sets 1609, and the instruction set may include instructions for facilitating emulation of other instruction sets. The processor core 1607 may also include other processing devices, such as a digital signal processor (DSP).
[0259] In some embodiments, the processor 1602 includes a cache memory 1604. Depending on the architecture, the processor 1602 may have a single internal cache or multiple levels of internal cache. In some embodiments, the cache memory is shared among the components of the processor 1602. In some embodiments, the processor 1602 also uses an external cache (e.g., a level 3 (L3) cache or a last level cache (LLC)) (not shown), and known cache coherence techniques may be used to share the external cache among the processor cores 1607. Additionally, a register file 1606 is included in the processor 1602, 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 1602.
[0260] In some embodiments, the processor 1602 is coupled to a processor bus 1610, which is used to transmit communication signals, such as address, data, or control signals, between the processor 1602 and other components within the system 1600. In one embodiment, the system 1600 uses an exemplary 'hub' system architecture, including a memory controller hub 1616 and an input-output (I / O) controller hub 1630. The memory controller hub 1616 facilitates communication between memory devices and other components of the system 1600, while the I / O controller hub (ICH) 1630 provides connections to I / O devices via a local I / O bus. In one embodiment, the logic of the memory controller hub 1616 is integrated within the processor.
[0261] Memory device 1620 may be a dynamic random access memory (DRAM) device, a static random access memory (SRAM) device, a flash memory device, a phase change memory device, or some other memory device having suitable properties for use as processing memory. In one embodiment, memory device 1620 may operate as system memory for system 1600 to store data 1622 and instructions 1621 for use when one or more processors 1602 execute applications or processes. Memory controller hub 1616 is also coupled to an optional external graphics processor 1612, which may communicate with one or more graphics processors 1608 in processor 1602 to perform graphics and media operations.
[0262] In some embodiments, the ICH 1630 enables peripheral components to be connected to the memory devices 1620 and the processor 1602 via a high-speed I / O bus. The I / O peripherals include, but are not limited to, an audio controller 1646, a firmware interface 1628, a wireless transceiver 1626 (e.g., Wi-Fi, Bluetooth), a data storage device 1624 (e.g., a hard drive, flash memory, etc.), and a traditional I / O controller 1640 for coupling legacy (e.g., Personal System 2 (PS / 2)) devices to the system. One or more Universal Serial Bus (USB) controllers 1642 connect multiple input devices, such as a keyboard and mouse 1644 combination. A network controller 1634 may also be coupled to the ICH 1630. In some embodiments, a high-performance network controller (not shown) is coupled to the processor bus 1610. It should be understood that the system 1600 shown is exemplary and not limiting, as other types of data processing systems configured in different ways may also be used. For example, I / O controller hub 1630 may be integrated within one or more processors 1602 , or memory controller hub 1616 and I / O controller hub 1630 may be integrated within a discrete external graphics processor (such as external graphics processor 1612 ).
[0263] Fig.17 is a block diagram of an embodiment of a processor 1700 having one or more processor cores 1702A- 1702N, an integrated memory controller 1714 , and an integrated graphics processor 1708 . Fig.17Those elements having the same reference numbers (or names) as those in any other figure herein may operate or function in any manner similar to, but not limited to, those described elsewhere herein. Processor 1700 may include additional cores up to and including additional core 1702N represented by a dashed box. Processor cores 1702A to 1702N each include one or more internal cache units 1704A to 1704N. In some embodiments, each processor core may also access one or more shared cache units 1706.
[0264] Internal cache units 1704A to 1704N and shared cache unit 1706 represent a cache memory hierarchy internal to processor 1700. The cache memory hierarchy may include at least one level of instruction and data cache within each processor core and one or more levels of shared mid-level cache, such as level 2 (L2), level 3 (L3), level 4 (L4), or other levels of cache, where the highest level of cache is classified as LLC before external memory. In some embodiments, cache coherence logic maintains coherence between each cache unit 1706 and 1704A to 1704N.
[0265] In some embodiments, the processor 1700 may further include a set of one or more bus controller units 1716 and a system agent core 1710. The one or more bus controller units 1716 manage a set of peripheral buses, such as one or more peripheral component interconnect buses (e.g., PCI, PCI Express). The system agent core 1710 provides management functions for each processor component. In some embodiments, the system agent core 1710 includes one or more integrated memory controllers 1714 for managing access to each external memory device (not shown).
[0266] In some embodiments, one or more of the processor cores 1702A to 1702N include support for simultaneous multithreading. In such embodiments, the system agent core 1710 includes components for coordinating and operating the processor cores 1702A to 1702N during multithreaded processing. In addition, the system agent core 1710 may also include a power control unit (PCU) including logic and components for adjusting the power state of the processor cores 1702A to 1702N and the graphics processor 1708.
[0267] In some embodiments, in addition, the processor 1700 further includes a graphics processor 1708 for performing graphics processing operations. In some embodiments, the graphics processor 1708 is coupled to a set of shared cache units 1706 and a system agent core 1710, which includes one or more integrated memory controllers 1714. In some embodiments, a display controller 1711 is coupled to the graphics processor 1708 to drive the graphics processor output to one or more coupled displays. In some embodiments, the display controller 1711 can be a separate module coupled to the graphics processor via at least one interconnect, or can be integrated within the graphics processor 1708 or the system agent core 1710.
[0268] In some embodiments, a ring-based interconnect unit 1712 is used to couple the internal components of the processor 1700. However, alternative interconnect units may be used, such as point-to-point interconnects, switched interconnects, or other technologies, including those well known in the art. In some embodiments, the graphics processor 1708 is coupled to the ring interconnect 1712 via an I / O link 1713.
[0269] Exemplary I / O links 1713 represent at least one of a plurality of varieties of I / O interconnects, including package I / O interconnects that facilitate communication between various processor components and high-performance embedded memory modules 1718 (such as eDRAM modules). In some embodiments, each of processor cores 1702A to 1702N and graphics processor 1708 use embedded memory modules 1718 as a shared last-level cache.
[0270] In some embodiments, processor cores 1702A to 1702N are homogeneous cores that execute the same instruction set architecture. In another embodiment, processor cores 1702A to 1702N are heterogeneous in terms of instruction set architecture (ISA), wherein one or more of processor cores 1702A to 1702N execute a first instruction set, while at least one of the other cores executes a subset of the first instruction set or a different instruction set. In one embodiment, processor cores 1702A to 1702N are homogeneous in terms of microarchitecture, wherein one or more cores with relatively high power consumption are coupled with one or more power cores with lower power consumption. In addition, processor 1700 may be implemented on one or more chips or as a SoC integrated circuit having the components shown in addition to other components.
[0271] Fig.181 is a block diagram of a graphics processor 1800, which may be a discrete graphics processing unit or may be a graphics processor integrated with multiple processing cores. In some embodiments, the graphics processor communicates with memory via a mapped I / O interface to registers on the graphics processor and using commands placed in processor memory. In some embodiments, the graphics processor 1800 includes a memory interface 1814 for accessing memory. The memory interface 1814 may be an interface to local memory, one or more internal caches, one or more shared external caches, and / or to system memory.
[0272] In some embodiments, the graphics processor 1800 also includes a display controller 1802 for driving display output data to a display device 1820. The display controller 1802 includes hardware for one or more overlapping planes of the display and a composition of multiple layers of video or user interface elements. In some embodiments, the graphics processor 1800 includes a video codec engine 1806 for encoding, decoding, or media code conversion to, from, or between one or more media coding formats, including but not limited to: Moving Picture Experts Group (MPEG) (such as MPEG-2), Advanced Video Coding (AVC) format (such as H.264 / MPEG-4 AVC), and Society of Motion Picture & Television Engineers (SMPTE) 421M / VC-1, and Joint Photographic Experts Group (JPEG) format (such as JPEG, and Motion JPEG (MJPEG) format).
[0273] In some embodiments, graphics processor 1800 includes a block image transfer (BLIT) engine 1804 for performing two-dimensional (2D) rasterizer operations including, for example, bit-boundary block transfers. However, in one embodiment, 2D graphics operations are performed using one or more components of a graphics processing engine (GPE) 1810. In some embodiments, GPE 1810 is a compute engine for performing graphics operations, including three-dimensional (3D) graphics operations and media operations.
[0274] In some embodiments, GPE 1810 includes a 3D pipeline 1812 for performing 3D operations, such as rendering three-dimensional images and scenes using processing functions that act on 3D primitive shapes (e.g., rectangles, triangles, etc.). 3D pipeline 1812 includes programmable and fixed functional elements that perform various tasks within the elements and / or generated execution threads to 3D / media subsystem 1815. Although 3D pipeline 1812 can be used to perform media operations, embodiments of GPE 1810 also include a media pipeline 1816 that is specifically used to perform media operations, such as video post-processing and image enhancement.
[0275] In some embodiments, the media pipeline 1816 includes fixed-function or programmable logic units to replace or perform one or more specialized media operations, such as video decoding acceleration, video deinterlacing, and video encoding acceleration, on behalf of the video codec engine 1806. In some embodiments, in addition, the media pipeline 1816 also includes a thread generation unit to generate threads for execution on the 3D / media subsystem 1815. The generated threads perform calculations for media operations on one or more graphics execution units included in the 3D / media subsystem 1815.
[0276] In some embodiments, the 3D / media subsystem 1815 includes logic for executing threads generated by the 3D pipeline 1812 and the media pipeline 1816. In one embodiment, the pipeline sends thread execution requests to the 3D / media subsystem 1815, which includes thread dispatch logic for arbitrating and dispatching each request to available thread execution resources. The execution resources include an array of graphics execution units for processing 3D and media threads. In some embodiments, the 3D / media subsystem 1815 includes one or more internal caches for thread instructions and data. In some embodiments, the subsystem also includes shared memory (including registers and addressable memory) to share data between threads and for storing output data.
[0277] Graphics processing engine
[0278] Fig.19 is a block diagram of a graphics processing engine 1910 of a graphics processor according to some embodiments. In one embodiment, the graphics processing engine (GPE) 1910 is Fig.18 A version of the GPE 1810 is shown. Fig.19 Those elements having the same reference number (or name) as elements in any other figure herein may operate or function in any manner similar to, but not limited to, those described elsewhere herein. Fig.18 1910. The 3D pipeline 1812 and the media pipeline 1816 of the GPE 1910. The media pipeline 1816 is optional in some embodiments of the GPE 1910 and may not be explicitly included in the GPE 1910. For example and in at least one embodiment, separate media and / or image processors are coupled to the GPE 1910.
[0279] In some embodiments, GPE 1910 is coupled to or includes a command stream converter 1903, which provides a command stream to 3D pipeline 1812 and / or media pipeline 1816. In some embodiments, command stream converter 1903 is coupled to a memory, which may be a system memory, or one or more cache memories of an internal cache memory and a shared cache memory. In some embodiments, command stream converter 1903 receives commands from the memory and sends these commands to 3D pipeline 1812 and / or media pipeline 1816. The commands are instructions obtained from a ring buffer storing commands for 3D pipeline 1812 and media pipeline 1816. In one embodiment, in addition, the ring buffer may also include a batch command buffer storing multiple batches of multiple commands. Commands for 3D pipeline 1812 may also include references to data stored in memory, such as, but not limited to, vertex and geometry data for 3D pipeline 1812 and / or image data and memory objects for media pipeline 1816. The 3D pipeline 1812 and the media pipeline 1816 process the commands by performing operations via logic within the respective pipelines or by dispatching one or more execution threads to the execution unit array 1914 .
[0280] In various embodiments, the 3D pipeline 1812 can execute one or more shader programs, such as vertex shaders, geometry shaders, pixel shaders, fragment shaders, compute shaders, or other shader programs, by processing instructions and dispatching execution threads to the graphics core array 1914. The graphics core array 1914 provides a unified execution resource block. The multi-purpose execution logic (e.g., execution unit) within the graphics core array 1914 includes support for various 3D API shader languages and can execute multiple simultaneous execution threads associated with multiple shaders.
[0281] In some embodiments, graphics core array 1914 also includes execution logic for performing media functions such as video and / or image processing. In one embodiment, in addition to graphics processing operations, the execution unit also includes general logic that can be programmed to perform parallel general computing operations. The general logic can be connected to Fig.16 (multiple) processor cores 1607 or Fig.17 The general logic within the processor cores 1702A to 1702N in the embodiment performs processing operations in parallel or in combination.
[0282] Output data generated by threads executing on graphics core array 1914 can output data to memory in unified return buffer (URB) 1918. URB 1918 can store data for multiple threads. In some embodiments, URB 1918 can be used to send data between different threads executing on graphics core array 1914. In some embodiments, URB 1918 can also be used for synchronization between threads on the graphics core array and fixed function logic within shared function logic 1920.
[0283] In some embodiments, graphics core array 1914 is 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 level of GPE 1910. In one embodiment, execution resources are dynamically scalable such that execution resources can be enabled or disabled as needed.
[0284] The graphics core array 1914 is coupled to shared function logic 1920, which includes a plurality of resources shared between the graphics cores in the graphics core array. The shared functions within the shared function logic 1920 are hardware logic units that provide specialized supplementary functions to the graphics core array 1914. In various embodiments, the shared function logic 1920 includes, but is not limited to, samplers 1921, math 1922, and inter-thread communication (ITC) 1923 logic. In addition, some embodiments implement one or more caches 1925 within the shared function logic 1920. The shared functions are implemented in situations where the demand for a given specialized function is insufficient to be included in the graphics core array 1914. Instead, a single instance of the specialized function is implemented as an independent entity in the shared function logic 1920 and shared between execution resources within the graphics core array 1914. The exact set of functions shared between and included within the graphics core array 1914 varies between embodiments.
[0285] Fig. 20 is a block diagram of another embodiment of a graphics processor 2000 . Fig. 20 Those elements having the same reference numbers (or names) as elements in any other figure herein may operate or function in any manner similar to, but not limited to, those described elsewhere herein.
[0286] In some embodiments, graphics processor 2000 includes ring interconnect 2002, pipeline front end 2004, media engine 2037, and graphics cores 2080A to 2080N. In some embodiments, ring interconnect 2002 couples the graphics processor to other processing units, including other graphics processors or one or more general-purpose processor cores. In some embodiments, the graphics processor is one of multiple processors integrated into a multi-core processing system.
[0287] In some embodiments, the graphics processor 2000 receives batches of commands via a ring interconnect 2002. The incoming commands are interpreted by a command stream converter 2003 in a pipeline front end 2004. In some embodiments, the graphics processor 2000 includes scalable execution logic for performing 3D geometry processing and media processing via (multiple) graphics cores 2080A to 2080N. For 3D geometry processing commands, the command stream converter 2003 supplies the commands to a geometry pipeline 2036. For at least some media processing commands, the command stream converter 2003 supplies the commands to a video front end 2034, which is coupled to a media engine 2037. In some embodiments, the media engine 2037 includes a video quality engine (VQE) 2030 for video and image post-processing and a multi-format encoding / decoding (MFX) 2033 engine for providing hardware accelerated media data encoding and decoding. In some embodiments, the geometry pipeline 2036 and the media engine 2037 each generate an execution thread, which is used for thread execution resources provided by at least one graphics core 2080A.
[0288] In some embodiments, the graphics processor 2000 includes an extensible thread execution resource characterization module core 2080A to 2080N (sometimes referred to as a core slice), each of which has a plurality of sub-cores 2050A to 550N, 2060A to 2060N (sometimes referred to as a core sub-slice). In some embodiments, the graphics processor 2000 may have any number of graphics cores 2080A to 2080N. In some embodiments, the graphics processor 2000 includes a graphics core 2080A, which has at least a first sub-core 2050A and a second sub-core 2060A. In other embodiments, the graphics processor is a low-power processor having a single sub-core (e.g., 2050A). In some embodiments, the graphics processor 2000 includes a plurality of graphics cores 2080A to 2080N, each of which includes a group of first sub-cores 2050A to 2050N and a group of second sub-cores 2060A to 2060N. Each of the group of first sub-cores 2050A to 2050N includes at least a first group of execution units 2052A to 2052N and a media / texture sampler 2054A to 2054N. Each of the group of second sub-cores 2060A to 2060N includes at least a second group of execution units 2062A to 2062N and a sampler 2064A to 2064N. In some embodiments, each sub-core 2050A to 2050N, 2060A to 2060N shares a group of shared resources 2070A to 2070N. In some embodiments, the shared resources include a shared cache memory and a pixel operation logic. Other shared resources may also be included in various embodiments of the graphics processor.
[0289] Execution Unit
[0290] Fig.21 Thread execution logic 2100 is shown, which includes an array of processing elements employed in some embodiments of a GPE. Fig.21 Those elements having the same reference numbers (or names) as elements in any other figure herein may operate or function in any manner similar to, but not limited to, those described elsewhere herein.
[0291] In some embodiments, the thread execution logic 2100 includes a shader processor 2102, a thread dispatcher 2104, an instruction cache 2106, a scalable execution unit array including a plurality of execution units 2108A to 2108N, a sampler 2110, a data cache 2112, and a data port 2114. In one embodiment, the scalable execution unit array can be dynamically scaled by enabling or disabling one or more execution units (e.g., execution units 2108A, 2108B, 2108C, 2108D, up to any one of 2108N-1 and 2108N) based on the computational requirements of the workload. In one embodiment, the included components are interconnected via an interconnect structure that links to each of the components. In some embodiments, the thread execution logic 2100 includes one or more connections to a memory (such as a system memory or cache memory) through the instruction cache 2106, the data port 2114, the sampler 2110, and one or more of the execution unit arrays 2108A to 2108N. In some embodiments, each execution unit (e.g., 2108A) is an independently programmable general-purpose computing unit capable of executing multiple simultaneous hardware threads while processing multiple data elements in parallel for each thread. In various embodiments, the array of execution units 2108A to 2108N is scalable to include any number of separate execution units.
[0292] In some embodiments, execution units 2108A to 2108N are primarily used to execute shader programs. Shader processor 2102 can process various shader programs and dispatch execution threads associated with the shader programs via thread dispatcher 2104. In one embodiment, thread dispatcher includes logic for arbitrating thread initiation requests from graphics and media pipelines and instantiating the requested threads on one or more execution units 2108A to 2108N. For example, the geometry pipeline (e.g., Fig. 20 2036) can dispatch vertex processing, tessellation or geometry processing threads to thread execution logic 2100 ( Fig.21) for processing. In some embodiments, the thread dispatcher 2104 can also process runtime thread generation requests from executing shader programs.
[0293] In some embodiments, execution units 2108A to 2108N support instruction sets (the instruction sets include 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 conversion. These 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 processing (e.g., compute and media shaders). Each of execution units 2108A to 2108N is capable of executing multiple-issue single instruction multiple data (SIMD), and multi-threaded operations can achieve an efficient execution environment in the face of high latency memory access. Each hardware thread within each execution unit has a dedicated high-bandwidth register stack and associated independent thread state. For pipelines with integers, single-precision floating-point operations and double-precision floating-point operations, SIMD branch functions, logical operations, transcendental operations, and other miscellaneous operations, execution is multiple issues per clock. While waiting for data from memory or one of the shared functions, dependency logic within execution units 2108A to 2108N causes the waiting thread to sleep until the requested data has returned. While the waiting thread is sleeping, hardware resources may be dedicated to processing other threads. For example, during a delay associated with a vertex shader operation, an execution unit may execute operations of a pixel shader, a fragment shader, or another type of shader program including a different vertex shader.
[0294] Each of the execution units 2108A to 2108N operates on an array of data elements. The number of data elements is the "execution size," or number of channels of an instruction. An execution channel is a logical unit that performs 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) or floating point units (FPUs) for a particular graphics processor. In some embodiments, the execution units 2108A to 2108N support integer and floating point data types.
[0295] The execution unit instruction set includes SIMD instructions. Various data elements can be stored in registers as compressed data types, and the execution unit will process various elements based on the data size of the element. For example, when operating on a 256-bit wide vector, the 256-bit vector is stored in a register, and the execution unit operates on the vector as four separate 64-bit compressed data elements (data elements of quadruple word length (QW) size), eight separate 32-bit compressed data elements (data elements of double word length (DW) size), sixteen separate 16-bit compressed data elements (data elements of word length (W) size), or thirty-two separate 8-bit data elements (data elements of byte (B) size). However, different vector widths and register sizes are possible.
[0296] One or more internal instruction caches (e.g., 2106) are included in the thread execution logic 2100 to cache thread instructions for the execution unit. In some embodiments, one or more data caches (e.g., 2112) are included to cache thread data during thread execution. In some embodiments, a sampler 2110 is included to provide texture sampling for 3D operations and media sampling for media operations. In some embodiments, the sampler 2110 includes a dedicated texture or media sampling function to process texture or media data during the sampling process before providing the sampled data to the execution unit.
[0297] During execution, the graphics and media pipeline sends a thread initiation request to the thread execution logic 2100 via the thread generation and dispatch logic. Once a set of geometric objects has been processed and rasterized into pixel data, the pixel processor logic (e.g., pixel shader logic, fragment shader logic, etc.) within the shader processor 2102 is called to further calculate output information and cause the result to be written to the output surface (e.g., color buffer, depth buffer, stencil printing buffer, etc.). In some embodiments, the pixel shader or fragment shader calculates the value of each vertex attribute, which is interpolated across the rasterized object. In some embodiments, the pixel processor logic within the shader processor 2102 then executes the pixel or fragment shader program supplied by the application programming interface (API). In order to execute the shader program, the shader processor 2102 dispatches the thread to the execution unit (e.g., 2108A) via the thread dispatcher 2104. In some embodiments, the pixel shader 2102 uses the texture sampling logic in the sampler 2110 to access the texture data in the texture map stored in the memory. Arithmetic operations on texture data and input geometry data compute pixel color data for each geometry fragment, or discard one or more pixels without further processing.
[0298] In some embodiments, data port 2114 provides a memory access mechanism for thread execution logic 2100 to output processed data to memory for processing on the graphics processor output pipeline. In some embodiments, data port 2114 includes or is coupled to one or more cache memories (e.g., data cache 2112) to cache data via the data port for memory access.
[0299] Fig. 22 2200 is a block diagram illustrating a graphics processor instruction format 2200 according to some embodiments. In one or more embodiments, a graphics processor execution unit supports an instruction set having instructions in multiple formats. Solid line boxes illustrate components that are typically included in execution unit instructions, while dashed lines include optional components or components that are only included in a subset of instructions. In some embodiments, the instruction format 2200 described and illustrated are macroinstructions because they are instructions supplied to the execution unit, as opposed to micro-operations generated from instruction decoding (once the instruction is processed).
[0300] In some embodiments, the graphics processor execution unit natively supports instructions in 128-bit instruction format 2210. 64-bit compact instruction format 2230 can be used for some instructions based on the selected instruction, multiple instruction options and the number of operands. Native 128-bit instruction format 2210 provides access to all instruction options, while some options and operations are limited to 64-bit format 2230. The native instructions available in 64-bit format 2230 vary according to the embodiment. In some embodiments, the instructions are partially compressed using a set of index values in index field 2213. The execution unit hardware references a set of compression tables based on the index values and uses the compression table output to reconstruct the native instructions in 128-bit instruction format 2210.
[0301] For each format, the instruction opcode 2212 defines the operation to be performed by the execution unit. The execution unit executes each instruction in parallel across multiple data elements of each operand. For example, in response to an add instruction, the execution unit performs a synchronous add operation across each color channel, and the color channel represents a texture element or a picture element. By default, the execution unit executes each instruction across all data channels of the operand. In some embodiments, the instruction control field 2214 enables control of certain execution options, such as channel selection (e.g., prediction) and data channel sorting (e.g., mixing). For instructions using the 128-bit instruction format 2210, the execution size field 2216 limits the number of data channels that will be executed in parallel. In some embodiments, the execution size field 2216 is not available for the 64-bit compact instruction format 2230.
[0302] Some execution unit instructions have up to three operands, including two source operands (src0 2220, src1 2222) and a destination 2218. In some embodiments, the execution unit supports dual destination instructions, where one of the destinations is implicit. Data manipulation instructions may have a third source operand (e.g., SRC2 2224), where the instruction opcode 2212 determines the number of source operands. The last source operand of an instruction may be an immediate (e.g., hard-coded) value passed with the instruction.
[0303] In some embodiments, the 128-bit instruction format 2210 includes an access / address mode field 2226, which defines, for example, whether direct register addressing mode or indirect register addressing mode is used. When direct register addressing mode is used, the register address of one or more operands is provided directly by bits in the instruction.
[0304] In some embodiments, the 128-bit instruction format 2210 includes an access / address mode field 2226, which specifies the address mode and / or access mode of the instruction. In one embodiment, the access mode is used to define the data access alignment for the instruction. Some embodiments support access modes, including 16-byte aligned access modes and 1-byte aligned access modes, wherein the byte alignment of the access mode determines the access alignment of the instruction operands. For example, when in the first mode, the instruction can use byte-aligned addressing for source operands and destination operands, and when in the second mode, the instruction can use 16-byte aligned addressing for all source operands and destination operands.
[0305] In one embodiment, the address mode portion of the access / address mode field 2226 determines whether the instruction uses direct addressing or indirect addressing. When direct register addressing mode is used, the bits in the instruction directly provide the register address of one or more operands. When indirect register addressing mode is used, the register address of one or more operands can be calculated based on the address register value and the address immediate field in the instruction.
[0306] In some embodiments, instructions are grouped based on the opcode 2212 bit field to simplify opcode decoding 2240. For 8-bit opcodes, the 4th, 5th, and 6th bits allow the execution unit to determine the type of opcode. The precise opcode grouping shown is exemplary only. In some embodiments, the move and logic opcode group 2242 includes data movement and logic instructions (e.g., move (mov), compare (cmp)). In some embodiments, the move and logic opcode group 2242 shares five most significant bits (MSBs), wherein the move (mov) instruction adopts the form of 0000xxxxb, and the logic instruction adopts the form of 0001xxxxb. The flow control instruction group 2244 (e.g., call (call), jump (jmp)) includes instructions in the form of 0010xxxxb (e.g., 0x20). The miscellaneous instruction group 2246 includes a mixture of instructions, including synchronization instructions (e.g., wait (wait), send (send)) in the form of 0011xxxxb (e.g., 0x30). The parallel math instruction group 2248 includes component-wise arithmetic instructions (e.g., add, mul) in the form of 0100xxxxb (e.g., 0x40). The parallel math group 2248 performs arithmetic operations in parallel across data lanes. The vector math group 2250 includes arithmetic instructions (e.g., dp4) in the form of 0101xxxxb (e.g., 0x50). The vector math group performs arithmetic operations on vector operands, such as dot product operations.
[0307] Graphics Pipeline
[0308] Fig.23 is a block diagram of another embodiment of a graphics processor 2300 . Fig.23 Those elements having the same reference numbers (or names) as elements in any other figure herein may operate or function in any manner similar to, but not limited to, those described elsewhere herein.
[0309] In some embodiments, the graphics processor 2300 includes a graphics pipeline 2320, a media pipeline 2330, a display engine 2340, a thread execution logic 2350, and a rendering output pipeline 2370. In some embodiments, the graphics processor 2300 is a graphics processor within a multi-core processing system that includes one or more general-purpose processing cores. The graphics processor is controlled by register writes to one or more control registers (not shown) or by commands issued to the graphics processor 2300 via the ring interconnect 2302. In some embodiments, the ring interconnect 2302 couples the graphics processor 2300 to other processing components, such as other graphics processors or general-purpose processors. Commands from the ring interconnect 2302 are interpreted by a command stream converter 2303, which supplies instructions to separate components of the graphics pipeline 2320 or the media pipeline 2330.
[0310] In some embodiments, command stream converter 2303 directs the operation of vertex fetcher 2305, which reads vertex data from memory and executes vertex processing commands provided by command stream converter 2303. In some embodiments, vertex fetcher 2305 provides vertex data to vertex shader 2307, which performs coordinate space transformation and lighting operations on each vertex. In some embodiments, vertex fetcher 2305 and vertex shader 2307 execute vertex processing instructions by dispatching execution threads to execution units 2352A to 2352B via thread dispatcher 2331.
[0311] In some embodiments, execution units 2352A-2352B are vector processor arrays with instruction sets for performing graphics and media operations. In some embodiments, execution units 2352A-2352B have an attached L1 cache 2351 that is dedicated to each array or shared between arrays. The cache can be configured as a data cache, an instruction cache, or a single cache that is partitioned to contain data and instructions in different partitions.
[0312] In some embodiments, the graphics pipeline 2320 includes a tessellation component for performing hardware accelerated tessellation of 3D objects. In some embodiments, the programmable hull shader 811 configures the tessellation operation. The programmable domain shader 817 provides back-end evaluation of the tessellation output. The tessellation 2313 operates at the direction of the hull shader 2311 and contains dedicated logic for generating a detailed set of geometric objects based on a coarse geometric model that is provided as input to the graphics pipeline 2320. In some embodiments, if tessellation is not used, the tessellation components (e.g., hull shader 2311, tessellation 2313, domain shader 2317) can be bypassed.
[0313] In some embodiments, the complete geometric object may be processed by the geometry shader 2319 via one or more threads dispatched to the execution units 2352A-2352B, or may proceed directly to the clipper 2329. In some embodiments, the geometry shader operates on entire geometric objects (rather than vertices or vertex patches as in previous stages of the graphics pipeline). If tessellation is disabled, the geometry shader 2319 receives input from the vertex shader 2307. In some embodiments, the geometry shader 2319 may be programmed by a geometry shader program to perform geometry tessellation when the tessellation unit is disabled.
[0314] Before rasterization, the clipper 2329 processes the vertex data. The clipper 2329 can be a fixed function clipper or a programmable clipper with clipping and geometry shader functions. In some embodiments, the rasterizer and depth test component 2373 in the render output pipeline 2370 dispatches a pixel shader to convert the geometric object into its per-pixel representation. In some embodiments, the pixel shader logic is included in the thread execution logic 2350. In some embodiments, the application can bypass the rasterizer and depth test component 2373 and access the unrasterized vertex data via the outflow unit 2323.
[0315] The graphics processor 2300 has an interconnect bus, interconnect structure, or some other interconnect mechanism that allows data and messages to be passed among the main components of the graphics processor. In some embodiments, execution units 2352A-2352B and associated cache(s) 2351, texture and media samplers 2354, and texture / sampler cache 2358 are interconnected via data ports 2356 to perform memory accesses and communicate with the processor's rendering output pipeline components. In some embodiments, samplers 2354, caches 2351, 2358, and execution units 2352A-2352B each have separate memory access paths.
[0316] In some embodiments, the rendering output pipeline 2370 includes a rasterizer and a depth test component 2373, which converts vertex-based objects into associated pixel-based representations. In some embodiments, the rasterizer logic includes a window device / masker unit for performing fixed-function triangle and line rasterization. Associated rendering cache 2378 and depth cache 2379 are also available in some embodiments. Pixel operation component 2377 performs pixel-based operations on data, but in some instances, pixel operations associated with 2D operations (e.g., using mixed bit block image transfer) are performed by 2D engine 2341, or replaced by display controller 2343 using overlapping display planes at display time. In some embodiments, a shared L3 cache 2375 can be used for all graphics components, thereby allowing data to be shared without using main system memory.
[0317] In some embodiments, the graphics processor media pipeline 2330 includes a media engine 2337 and a video front end 2334. In some embodiments, the video front end 2334 receives pipeline commands from the command stream converter 2303. In some embodiments, the media pipeline 2330 includes a separate command stream converter. In some embodiments, the video front end 2334 processes the media commands before sending the commands to the media engine 2337. In some embodiments, the media engine 2337 includes a thread generation function for generating threads for dispatching to the thread execution logic 2350 via the thread dispatcher 2331.
[0318] In some embodiments, the graphics processor 2300 includes a display engine 2340. In some embodiments, the display engine 2340 is external to the processor 2300 and is coupled to the graphics processor via the ring interconnect 2302, or some other interconnect bus or mechanism. In some embodiments, the display engine 2340 includes a 2D engine 2341 and a display controller 2343. In some embodiments, the display engine 2340 includes dedicated logic that can operate independently of the 3D pipeline. In some embodiments, the display controller 2343 is coupled to a display device (not shown), which can be a system integrated display device (such as in a laptop computer), or an external display device attached via a display device connector.
[0319] In some embodiments, graphics pipeline 2320 and media pipeline 2330 can be configured to perform operations based on multiple graphics and media programming interfaces and are not dedicated to any application programming interface (API). In some embodiments, the driver software of graphics processor converts the API dispatch dedicated to specific graphics or media library into a command that can be processed by graphics processor. In some embodiments, support is provided for all open graphics libraries (OpenGL), open computing language (OpenCL) and / or Vulkan graphics and computing API from Khronos Group. In some embodiments, support can also be provided for Microsoft's Direct3D library. In some embodiments, the combination of these libraries can be supported. Support can also be provided for open source computer vision library (OpenCV). If the mapping from the pipeline of future API to the pipeline of graphics processor can be made, the future API with compatible 3D pipeline will also be supported.
[0320] Graphics Pipeline Programming
[0321] Fig.24A is a block diagram illustrating a graphics processor command format 2400 according to some embodiments. Fig. 24B is a block diagram illustrating a graphics processor command sequence 2410 according to an embodiment. Fig.24A The solid-line boxes in show components that are typically included in a graphics command, while the dashed lines include components that are optional or included only in a subset of the graphics commands. Fig.24A The exemplary graphics processor command format 2400 includes a data field for identifying the target client 2402 of the command, a command operation code (opcode) 2404, and an associated data field 2406 for the command. Some commands also include a sub-opcode 2405 and a command size 2408.
[0322] In some embodiments, client 2402 defines the client unit of the graphics device that processes command data. In some embodiments, the graphics processor command parser checks the client field of each command to adjust the further processing of the command and routes the command data to the appropriate client unit. In some embodiments, the graphics processor client unit includes a memory interface unit, a rendering unit, a 2D unit, a 3D unit, and a media unit. Each client unit has a corresponding processing pipeline that processes the command. Once the command is received by the client unit, the client unit reads the opcode 2404 and the sub-opcode 2405 (if present) to determine the operation to be performed. The client unit uses the information in the data field 2406 to execute the command. For some commands, it is expected that the explicit command size 2408 is limited to the size of the command. In some embodiments, the command parser automatically determines the size of at least some commands in the command based on the command opcode. In some embodiments, the command is aligned via a multiple of a double word length.
[0323] Fig. 24B An exemplary graphics processor command sequence 2410 is shown in the flowchart in FIG. In some embodiments, software or firmware of a data processing system featuring an embodiment of a graphics processor uses the version of the command sequence shown to initiate, execute, and terminate a set of graphics operations. The sample command sequence is shown and described for exemplary purposes only, as the embodiments are not limited to these specific commands or this command sequence. Moreover, the commands may be issued as a batch of commands in a command sequence so that the graphics processor will process the command sequence in an at least partially simultaneous manner.
[0324] In some embodiments, the graphics processor command sequence 2410 may begin with a pipeline flush command 2412 to cause any active graphics pipeline to complete currently pending commands for that pipeline. In some embodiments, the 3D pipeline 2422 and the media pipeline 2424 are not operating simultaneously. The pipeline flush is performed to cause the active graphics pipeline to complete any pending commands. In response to the pipeline flush, the command parser for the graphics processor will stop command processing until the active drawing engine completes pending operations and invalidates the associated read cache. Optionally, any data marked as 'dirty' in the render cache may be flushed to memory. In some embodiments, the pipeline flush command 2412 may be used for pipeline synchronization or before placing the graphics processor in a low power state.
[0325] In some embodiments, pipeline select command 2413 is used when a command sequence requires the graphics processor to explicitly switch between pipelines. In some embodiments, pipeline select command 2413 is only required once in an execution context before issuing pipeline commands, unless the context is to issue commands for two pipelines. In some embodiments, pipeline flush command 2412 is required just before a pipeline switch via pipeline select command 2413.
[0326] In some embodiments, pipeline control commands 2414 configure the graphics pipeline for operation and are used to program 3D pipeline 2422 and media pipeline 2424. In some embodiments, pipeline control commands 2414 configure the pipeline state of the active pipeline. In one embodiment, pipeline control commands 2414 are used for pipeline synchronization and for clearing data from one or more cache memories within the active pipeline before processing a batch of commands.
[0327] In some embodiments, return buffer state command 2416 is used to configure a set of return buffers for corresponding pipelines to write data. Some pipeline operations require allocating, selecting, or configuring one or more return buffers, and the operation writes intermediate data to the one or more return buffers during processing. In some embodiments, the graphics processor also uses one or more return buffers to store output data and perform cross-thread communication. In some embodiments, return buffer state 2416 includes selecting the size and number of return buffers for the set of pipeline operations.
[0328] The remaining commands in the command sequence differ based on the active pipeline for operation. Based on pipeline decision 2420 , the command sequence is tailored for either the 3D pipeline 2422 starting at 3D pipeline state 2430 , or the media pipeline 2424 starting at media pipeline state 2440 .
[0329] Commands for 3D pipeline state 2430 include 3D state setting commands for vertex buffer state, vertex element state, constant color state, depth buffer state, and other state variables to be configured before processing 3D primitive commands. The values of these commands are determined at least in part based on the specific 3D API in use. In some embodiments, 3D pipeline state 2430 commands can also selectively disable or bypass specific pipeline elements if those elements are not to be used.
[0330] In some embodiments, 3D primitive 2432 commands are used to submit 3D primitives to be processed by the 3D pipeline. The commands and associated parameters passed to the graphics processor via the 3D primitive 2432 commands will be forwarded to the vertex acquisition function in the graphics pipeline. The vertex acquisition function uses the 3D primitive 2432 command data to generate multiple vertex data structures. The vertex data structures are stored in one or more return buffers. In some embodiments, 3D primitive 2432 commands are used to perform vertex operations on 3D primitives via vertex shaders. In order to process vertex shaders, the 3D pipeline 2422 dispatches the shader execution thread to the graphics processor execution unit.
[0331] In some embodiments, the 3D pipeline 2422 is triggered via an execution 2434 command or event. In some embodiments, a register write triggers the command execution. In some embodiments, the execution is triggered via a 'go' or 'kick' command in the command sequence. In one embodiment, the command execution is triggered using a pipeline synchronization command to clear the command sequence through the graphics pipeline dump. The 3D pipeline will perform geometry processing for the 3D primitives. Once the operation is completed, the generated geometric objects are rasterized and the pixel engine shades the generated pixels. For these operations, additional commands for controlling pixel shading and pixel backend operations may also be included.
[0332] In some embodiments, when performing media operations, the graphics processor command sequence 2410 follows the media pipeline 2424 path. Generally, the specific purpose and manner of programming the media pipeline 2424 depends on the media or computing operation to be performed. During the media decoding process, specific media decoding operations can be offloaded to the media pipeline. In some embodiments, the media pipeline can also be bypassed, and the media decoding can be performed in whole or in part using resources provided by one or more general processing cores. In one embodiment, the media pipeline also includes elements for general purpose graphics processor unit (GPGPU) operations, wherein the graphics processor is used to perform SIMD vector operations using a compute shader program that is not explicitly related to rendering graphics primitives.
[0333] In some embodiments, the media pipeline 2424 is configured in a similar manner to the 3D pipeline 2422. A set of commands for configuring the media pipeline state 2440 is dispatched or placed into a command queue, before the media object commands 2442. In some embodiments, the commands 2440 for the media pipeline state include data for configuring the media pipeline elements that will be used to process the media objects. This includes data for configuring the video decoding and video encoding logic within the media pipeline, such as encoding or decoding formats. In some embodiments, the commands 2440 for the media pipeline state also implement support for using one or more pointers for an "indirect" state element that contains a batch of state settings.
[0334] In some embodiments, media object commands 2442 supply pointers to media objects for processing by the media pipeline. The media object includes a memory buffer that contains video data to be processed. In some embodiments, all media pipeline states must be valid before issuing media object commands 2442. Once the pipeline state is configured and media object commands 2442 are queued, media pipeline 2424 is triggered via an execute 2444 command or an equivalent execution event (e.g., a register write). The output from media pipeline 2424 can then be post-processed by operations provided by 3D pipeline 2422 or media pipeline 2424. In some embodiments, GPGPU operations are configured and executed in a manner similar to media operations.
[0335] Graphics software architecture
[0336] Fig.25 An exemplary graphics software architecture of a data processing system 2500 according to some embodiments is shown. In some embodiments, the software architecture includes a 3D graphics application 2510, an operating system 2520, and at least one processor 2530. In some embodiments, processor 2530 includes a graphics processor 2532 and one or more general purpose processor cores 2534. Graphics application 2510 and operating system 2520 are each executed in a system memory 2550 of the data processing system.
[0337] In some embodiments, the 3D graphics application 2510 includes one or more shader programs that include shader instructions 2512. The shader language instructions may be in a high-level shader language, such as High Level Shader Language (HLSL) or OpenGL Shader Language (GLSL). The application also includes executable instructions 2514 in a machine language suitable for execution by (multiple) general purpose processor cores 2534. The application also includes graphics objects 2516 defined by vertex data.
[0338] In some embodiments, operating system 2520 is from Microsoft Corporation Operating system, dedicated UNIX operating system, or open source UNIX operating system using Linux kernel variant. Operating system 2520 can support graphics API 2522, such as Direct3D API, OpenGL API or Vulkan API. When Direct3D API is in use, operating system 2520 uses front-end shader compiler 2524 to compile any shader instruction 2512 in HLSL into a lower-level shader language. The compilation can be just-in-time (JIT) compilation, or the application executable shader precompilation. In some embodiments, in the process of compiling 3D graphics application 2510, high-level shaders are compiled into low-level shaders. In some embodiments, shader instructions 2512 are provided in an intermediate form, such as a version of the standard portable intermediate representation (SPIR) used by Vulkan API.
[0339] In some embodiments, the user mode graphics driver 2526 includes a backend shader compiler 2527 that converts shader instructions 2512 into hardware-specific representations. When using the OpenGL API, the shader instructions 2512 in the GLSL high-level language are passed to the user mode graphics driver 2526 for compilation. In some embodiments, the user mode graphics driver 2526 uses the operating system kernel mode function 2528 to communicate with the kernel mode graphics driver 2529. In some embodiments, the kernel mode graphics driver 2529 communicates with the graphics processor 2532 to dispatch commands and instructions.
[0340] IP Core Implementation
[0341] One or more aspects of at least one embodiment may be implemented by representative code stored on a machine-readable medium, which represents and / or defines logic within an integrated circuit such as a processor. For example, a machine-readable medium may include instructions representing the various logics within a processor. When read by a machine, the instructions may enable the machine to manufacture logic for performing the techniques described herein. This type of representation (referred to as an "IP core") is a reusable unit of logic for an integrated circuit, which may be stored on a tangible, machine-readable medium as a hardware model describing the structure of the integrated circuit. The hardware model may be supplied to each consumer or manufacturing facility that loads the hardware model on a manufacturing machine that manufactures the integrated circuit. The integrated circuit may be manufactured so that the circuit performs the operations described in association with any of the embodiments described herein.
[0342] Fig.26 26 is a block diagram showing an IP core development system 2600 that can be used to manufacture an integrated circuit to perform operations according to an embodiment. The IP core development system 2600 can be used to generate a modular, reusable design that can be incorporated into a larger design or used to build an entire integrated circuit (e.g., a SOC integrated circuit). The design facility 2630 can use a high-level programming language (e.g., C / C++) to generate a software simulation 2610 for the IP core design. The software simulation 2610 can be used to design, test and verify the behavior of the IP core using a simulation model 2612. The simulation model 2612 can include functional, behavioral and / or timing simulations. Then the register transfer level (RTL) design 2615 can be created or synthesized by the simulation model 2612. The RTL design 2615 is an abstraction of the behavior of an integrated circuit (including associated logic executed using the modeled digital signals) that models the flow of digital signals between hardware registers. In addition to the RTL design 2615, a lower level design at a logic level or transistor level can also be created, designed or synthesized. Thus, the specific details of the initial design and simulation can change.
[0343] The RTL design 2615 or equivalent can be further synthesized into a hardware model 2620 by the design facility, which can adopt a hardware description language (HDL) or some other representation of physical design data. The HDL can be further simulated or tested to verify the IP core design. The IP core design can be stored using a non-volatile memory 2640 (e.g., a hard disk, flash memory, or any non-volatile storage medium) for delivery to a third-party manufacturing facility 2665. Alternatively, the IP core design can be transmitted (e.g., via the Internet) via a wired connection 2650 or a wireless connection 2660. The manufacturing facility 2665 can then manufacture an integrated circuit based at least in part on the IP core design. The manufactured integrated circuit can be configured to perform operations according to at least one embodiment described herein.
[0344] Exemplary System-on-Chip Integrated Circuit
[0345] Figure 27 to Figure 29 An exemplary integrated circuit and related graphics processor that can be manufactured using one or more IP cores according to various embodiments described herein are shown. In addition to what is shown, other logic and circuits may also be included, including additional graphics processors / cores, peripheral interface controllers, or general purpose processor cores.
[0346] Fig. 272700, which may be manufactured using one or more IP cores in accordance with an embodiment. The exemplary integrated circuit 2700 includes one or more application processors 2705 (e.g., CPUs), at least one graphics processor 2710, and may additionally include an image processor 2715 and / or a video processor 2720, any of which may be modular IP cores from the same or multiple different design facilities. The integrated circuit 2700 includes peripheral or bus logic, including a USB controller 2725, a UART controller 2730, an SPI / SDIO controller 2735, and an I 2 S / I 2 The integrated circuit may include a display device 2745 coupled to one or more of a high-definition multimedia interface (HDMI) controller 2750 and a mobile industry processor interface (MIPI) display interface 2755. Storage may be provided by a flash memory subsystem 2760 (including flash memory and a flash memory controller). A memory interface may be provided via a memory controller 2765 to access SDRAM or SRAM memory devices. In addition, some integrated circuits also include an embedded security engine 2770.
[0347] Fig.28 28 is a block diagram illustrating an exemplary graphics processor 2810 of a system-on-chip integrated circuit that may be fabricated using one or more IP cores in accordance with an embodiment. The graphics processor 2810 may be Fig. 27 A variation of the graphics processor 2710 of FIG. The graphics processor 2810 includes a vertex processor 2805 and one or more fragment processors 2815A to 2815N (e.g., 2815A, 2815B, 2815C, 2815D, all the way to 2815N-1 and 2815N). The graphics processor 2810 can execute different shader programs via separate logic, so that the vertex processor 2805 is optimized to perform operations of the vertex shader program, while one or more fragment processors 2815A to 2815N perform fragment (e.g., pixel) shading operations for fragment or pixel shader programs. The vertex processor 2805 performs the vertex processing stage of the 3D graphics pipeline and generates primitives and vertex data. (Multiple) fragment processors 2815A to 2815N use the primitives and vertex data generated by the vertex processor 2805 to generate a frame buffer displayed on a display device. In one embodiment, the fragment processor(s) 2815A-2815N are optimized to execute fragment shader programs provided in the OpenGL API, which can be used to perform similar operations as pixel shader programs provided in the Direct 3D API.
[0348] In addition, the graphics processor 2810 also includes one or more memory management units (MMUs) 2820A-2820B, one or more caches 2825A-2825B, and (multiple) circuit interconnects 2830A-2830B. The one or more MMUs 2820A-2820B provide virtual to physical address mappings for the graphics processor 2810, including for the vertex processor 2805 and / or one or more fragment processors 2815A-2815N, which can reference vertex or image / texture data stored in memory in addition to the vertex or image / texture data stored in the one or more caches 2825A-2825B. In one embodiment, the one or more MMUs 2820A-2820B can communicate with other MMUs within the system, including with Fig. 27 The graphics processor 2810 may be synchronized with one or more MMUs associated with one or more application processors 2705, image processor 2715, and / or video processor 2720 so that each processor 2705 to 2720 may participate in a shared or unified virtual memory system. According to an embodiment, one or more circuit interconnects 2830A to 2830B may enable the graphics processor 2810 to interact with other IP cores within the SoC via an internal bus of the SoC or via a direct connection.
[0349] Fig.29 2910 is a block diagram illustrating an additional exemplary graphics processor 2910 of a system-on-chip integrated circuit that may be fabricated using one or more IP cores in accordance with an embodiment. The graphics processor 2910 may be Fig. 27 A variation of the graphics processor 2710 of FIG. The graphics processor 2910 includes Fig.28 One or more MMUs 2820A-2820B, cache(s) 2825A-2825B, and circuit interconnect(s) 2830A-2830B of the integrated circuit 2800.
[0350] The graphics processor 2910 includes one or more shader cores 2915A to 2915N (e.g., 2915A, 2915B, 2915C, 2915D, 2915E, 2915F, all the way to 2915N-1 and 2915N), which provide a unified shader core architecture in which a single core or type or core can execute all types of programmable shader code including shader program code to implement vertex shaders, fragment shaders and / or compute shaders. The exact number of shader cores present may vary in embodiments and implementations. In addition, the graphics processor 2910 also includes an inter-core task manager 2905, which acts as a thread dispatcher for dispatching execution threads to one or more shader cores 2915A to 2915N and a tiling unit 2918 for accelerating tiling operations for tile-based rendering, wherein the rendering operations of a scene are subdivided in image space, for example to exploit local spatial consistency within a scene or to optimize the use of internal caches.
[0351] The following clauses and / or examples relate to specific embodiments or examples thereof. The details in these examples may be used anywhere in one or more embodiments. The various features of different embodiments or examples can be combined in various ways, with certain features being included and others being excluded, to accommodate a variety of different applications. Each example may include subject matter such as a method, a device for performing the actions of the method, at least one machine-readable medium, the machine-readable medium including instructions that, when executed by a machine, cause the machine to perform the actions of the method, or the actions of an apparatus or system according to the embodiments and examples described herein. The various components may be devices for performing the described operations or functions.
[0352] One embodiment provides a computing device for performing machine learning operations, the computing device comprising: an acquisition unit for acquiring a single instruction having multiple input operands, the multiple operands having unequal bit lengths, the multiple operands including a first input having a first bit length and a second input having a second bit length; a decoding unit for decoding the single instruction into a decoded instruction; an operand length unit for determining a smaller bit length of a first bit length and a second bit length; and a computation unit for performing a matrix operation on the multiple operands to generate an output value having a bit length equal to the smaller bit length.
[0353] The embodiments described herein relate to specific configurations of hardware that is configured to perform certain operations or have predetermined functions, such as application specific integrated circuits (ASICs). Such electronic devices generally include a collection of one or more processors coupled to one or more other components, such as one or more storage devices (non-transient machine-readable storage media), user input / output devices (e.g., keyboards, touch screens, and / or displays), and network connections. The coupling of the group of processors and other components is generally achieved through one or more buses and bridges (also referred to as bus controllers). The storage device and the signal carrying the network traffic represent one or more machine-readable storage media and machine-readable communication media, respectively. Therefore, the storage device of a given electronic device generally stores code and / or data for execution on a collection of one or more processors of the electronic device.
[0354] Of course, one or more parts of the embodiment can be implemented using different combinations of software, firmware and / or hardware. Throughout the detailed description of this article, for the purpose of explanation, numerous specific details are set forth in order to provide a thorough understanding of the present invention. However, it is obvious to those skilled in the art that embodiments can be practiced without some of these specific details. In some instances, well-known structures and functions are not described in detail to avoid obscuring the inventive subject matter of the embodiment. Therefore, the scope and spirit of the present invention should be judged according to the appended claims.
Claims
1. A device for data processing, include: Interconnection structure; a memory interface coupled to the interconnect structure; an input / output (IO) unit coupled to the interconnect structure; a processing cluster array of one or more processing clusters coupled to the interconnect structure, Each processing cluster in the processing cluster array is used to execute mixed precision dot product instructions in parallel across multiple threads; The processing clusters in the processing cluster array include: a plurality of registers for storing a plurality of input values of the vector input operands, the input values of at least some of the vector input operands having a bit length different from the bit lengths of other input values of other vector input operands, and a computation unit for executing the mixed precision dot product instruction using the vector input operands to perform a plurality of parallel multiply and accumulate operations for each 32-bit lane based on a bit length of an input value of a minimum size relative to a first vector input operand of the 32-bit lanes, The computing unit comprises: a multiplier for performing parallel multiplication of each of the minimum-sized input values with a corresponding input value of the second vector input operand to generate a corresponding plurality of products; and An adder is configured to add the corresponding plurality of products to an accumulator value to generate an accumulation result.
2. The device according to claim 1, further comprising: include: a parallel processor die comprising said interconnect structure, said memory interface, said input / output (IO) unit and an array of said processing clusters, The parallel processor die further comprises a local memory interconnect for coupling the memory interface to the stacked memory die, the local memory interconnect comprising independent sets of memory interfaces associated with respective ones of the plurality of stacked memory dies.
3. The device according to claim 1, in, At least some of the plurality of input values comprise data elements of a matrix.
4. The device as claimed in claim 3, in, The mixed precision dot product instruction is a primitive of the machine learning framework.
5. The device as claimed in claim 4, in, The matrix is associated with a convolutional layer of the machine learning framework.
6. The device as claimed in claim 5, in, The machine learning framework includes a neural network.
7. The device according to claim 6, in, The neural network includes a recurrent neural network (RNN).
8. The device according to claim 1, further comprising: include: A virtualization circuit is used to share the array of the processing cluster with multiple virtual machines.
9. The device as claimed in claim 8, in, The virtualization circuit includes multiple sets of control registers, the multiple sets of control registers are used to associate with multiple corresponding virtual machines, and a group of control registers is used to store one or more address pointers to identify memory regions associated with corresponding virtual machines.
10. The device according to claim 1, in, The plurality of threads are arranged into thread groups, and wherein a first thread group is for processing by the computing unit.
11. The device according to claim 10, in, The computing unit is configured to execute a first mixed precision dot product instruction in each thread in the first thread group using different 32-bit SIMD lanes.
12. The device of claim 11, further comprising: include: The scheduling circuit is used to distribute a plurality of thread groups across the processing cluster, each thread including a plurality of instructions.
13. The device according to claim 12, in, The computation unit is configured to be allocated to process a first thread group including a first plurality of threads, and the first mixed-precision dot product instruction is configured to be executed in each thread of the first plurality of threads.
14. The device according to claim 1, in, The minimum size input value includes a 16-bit value, an 8-bit value, or a 4-bit value.
15. The device according to claim 14, in, When the minimum size input value is a 16-bit value, the multiple parallel multiplication operations include two parallel multiplication operations, when the minimum size input value is an 8-bit value, the multiple parallel multiplication operations include four parallel multiplication operations, and when the minimum size input value is a 4-bit value, the multiple parallel multiplication operations include eight parallel multiplication operations.
16. The device according to claim 1, in, When the minimum size input value is a 4-bit value, eight parallel multiplication operations are performed.
17. A method for data processing, include: fetching a plurality of instructions from a memory; storing the plurality of instructions in an instruction cache; storing a vector input operand of the instruction in a data cache; Executing an instruction from the plurality of instructions on a processing cluster in an array of processing clusters, the processing cluster being configured to execute the instruction in parallel across a plurality of threads, wherein the instruction is a mixed precision dot product instruction, and executing the instruction further comprises: storing a plurality of input values of the vector input operands in a plurality of registers, the input values of at least some of the vector input operands having a bit length different from a bit length of other input values of other vector input operands, and performing, via the compute unit, a plurality of parallel multiplication operations and accumulation operations for each 32-bit lane, the number of parallel multiplication operations being based on the bit length of the input value of the minimum size of the first vector input operand relative to the 32-bit lane, wherein the parallel multiplication comprises multiplication of each of the minimum-sized input values with a corresponding input value of the second vector input operand to generate a corresponding plurality of products, and The corresponding plurality of products are added to an accumulator value to generate an accumulated result.
18. The method of claim 17, in, At least some of the plurality of input values comprise data elements of a matrix.
19. The method of claim 18, in, The mixed precision dot product instruction is a primitive of the machine learning framework.
20. The method of claim 19, in, The matrix is associated with a convolutional layer of the machine learning framework.
21. The method of claim 20, in, The machine learning framework includes a neural network.
22. The method of claim 21, in, The neural network includes a recurrent neural network (RNN).
23. The method of claim 17, further comprising: include: The array of processing clusters is shared with a plurality of virtual machines.
24. The method of claim 23, further comprising: include: Associating multiple sets of control registers with multiple corresponding virtual machines; One or more address pointers are stored in one of the sets of control registers to identify a memory region associated with a corresponding virtual machine.
25. The method of claim 17, in, The plurality of threads are arranged into thread groups, and wherein a first thread group is for processing by the computing unit.
26. The method of claim 25, in, The computing unit is configured to execute a first mixed precision dot product instruction in each thread in the first thread group using different 32-bit SIMD lanes.
27. The method of claim 26, further comprising: include: A plurality of thread groups are distributed across the processing cluster via a scheduling circuit, each thread comprising a plurality of instructions.
28. The method of claim 27, in, The computation unit is configured to be allocated to process a first thread group including a first plurality of threads, and the first mixed-precision dot product instruction is configured to be executed in each thread of the first plurality of threads.
29. The method of claim 17, in, The minimum size input value includes a 16-bit value, an 8-bit value, or a 4-bit value.
30. The method of claim 29, in, When the minimum size input value is a 16-bit value, the multiple parallel multiplication operations include two parallel multiplication operations, when the minimum size input value is an 8-bit value, the multiple parallel multiplication operations include four parallel multiplication operations, and when the minimum size input value is a 4-bit value, the multiple parallel multiplication operations include eight parallel multiplication operations.
31. The method of claim 17, in, When the minimum size input value is a 4-bit value, eight parallel multiplication operations are performed.
32. A machine-readable medium having instructions stored thereon, which, when executed by a machine, cause the machine to perform the following operations: fetching a plurality of the instructions from a memory; storing the plurality of instructions in an instruction cache; storing a vector input operand of the instruction in a data cache; executing instructions of the plurality of instructions on a processing cluster in an array of processing clusters, the processing cluster being operable to execute the instructions in parallel across a plurality of threads, in, The instruction is a mixed precision dot product instruction, and executing the instruction further comprises: storing a plurality of input values of the vector input operands in a plurality of registers, the input values of at least some of the vector input operands having a bit length different from a bit length of other input values of other vector input operands, and performing, via the compute unit, a plurality of parallel multiplication operations and accumulation operations for each 32-bit lane, the number of parallel multiplication operations being based on the bit length of the input value of the minimum size of the first vector input operand relative to the 32-bit lane, wherein the parallel multiplication comprises multiplication of each of the minimum-sized input values with a corresponding input value of the second vector input operand to generate a corresponding plurality of products, and The corresponding plurality of products are added to an accumulator value to generate an accumulated result.
33. The machine-readable medium of claim 32, in, At least some of the plurality of input values comprise data elements of a matrix.
34. The machine-readable medium of claim 33, in, The mixed precision dot product instruction is a primitive of the machine learning framework.
35. The machine-readable medium of claim 34, in, The matrix is associated with a convolutional layer of the machine learning framework.
36. The machine-readable medium of claim 35, in, The machine learning framework includes a neural network.
37. The machine-readable medium of claim 36, in, The neural network includes a recurrent neural network (RNN).
38. The machine-readable medium of claim 32, further comprising: include: The array of processing clusters is shared with a plurality of virtual machines.
39. The machine-readable medium of claim 38, further comprising instructions for causing the machine to: Associating multiple sets of control registers with multiple corresponding virtual machines; One or more address pointers are stored in one of the sets of control registers to identify a memory region associated with a corresponding virtual machine.
40. The machine-readable medium of claim 32, in, The plurality of threads are arranged into thread groups, and wherein a first thread group is for processing by the computing unit.
41. The machine-readable medium of claim 40, in, The computing unit is configured to execute a first mixed precision dot product instruction in each thread in the first thread group using different 32-bit SIMD lanes.
42. The machine-readable medium of claim 41, further comprising instructions for causing the machine to: A plurality of thread groups are distributed across the processing cluster via a scheduling circuit, each thread comprising a plurality of instructions.
43. The machine-readable medium of claim 42, in, The computation unit is configured to be allocated to process a first thread group including a first plurality of threads, and the first mixed-precision dot product instruction is configured to be executed in each thread of the first plurality of threads.
44. The machine-readable medium of claim 32, in, The minimum size input value includes a 16-bit value, an 8-bit value, or a 4-bit value.
45. The machine-readable medium of claim 44, in, When the minimum size input value is a 16-bit value, the multiple parallel multiplication operations include two parallel multiplication operations, when the minimum size input value is an 8-bit value, the multiple parallel multiplication operations include four parallel multiplication operations, and when the minimum size input value is a 4-bit value, the multiple parallel multiplication operations include eight parallel multiplication operations.
46. The machine-readable medium of claim 32, in, When the minimum size input value is a 4-bit value, eight parallel multiplication operations are performed.
47. A system for data processing, include: A system memory for storing a plurality of instructions; a processor coupled to the system memory to process the instructions, the processor comprising: a memory interface for coupling the processor to the system memory; an interconnect structure coupled to the memory interface; an input / output (IO) unit coupled to the interconnect structure; a processing cluster array of one or more processing clusters coupled to the interconnect structure, Each processing cluster in the processing cluster array is used to execute a mixed precision dot product instruction among the plurality of instructions in parallel across a plurality of threads; The processing clusters in the processing cluster array include: a plurality of registers for storing a plurality of input values of the vector input operands, the input values of at least some of the vector input operands having a bit length different from the bit lengths of other input values of other vector input operands, and a computation unit for executing the mixed precision dot product instruction using the vector input operands to perform a plurality of parallel multiply and accumulate operations for each 32-bit lane based on a bit length of an input value of a minimum size relative to a first vector input operand of the 32-bit lanes, The computing unit comprises: a multiplier for performing parallel multiplication of each of the minimum-sized input values with a corresponding input value of the second vector input operand to generate a corresponding plurality of products; and An adder is configured to add the corresponding plurality of products to an accumulator value to generate an accumulation result.
48. The system of claim 47, further comprising: include: a parallel processor die comprising said interconnect structure, said memory interface, said input / output (IO) unit and an array of said processing clusters, The parallel processor die further comprises a local memory interconnect for coupling the memory interface to the stacked memory die, the local memory interconnect comprising independent sets of memory interfaces associated with respective ones of the plurality of stacked memory dies.
49. The system of claim 47, in, At least some of the plurality of input values comprise data elements of a matrix.
50. The system of claim 49, in, The mixed precision dot product instruction is a primitive of the machine learning framework.
51. The system of claim 50, in, The matrix is associated with a convolutional layer of the machine learning framework.
52. The system of claim 51, in, The machine learning framework includes a neural network.
53. The system of claim 52, in, The neural network includes a recurrent neural network (RNN).
54. The system of claim 47, further comprising: include: A virtualization circuit is used to share the array of the processing cluster with multiple virtual machines.
55. The system of claim 54, in, The virtualization circuit includes multiple sets of control registers, the multiple sets of control registers are used to associate with multiple corresponding virtual machines, and a group of control registers is used to store one or more address pointers to identify memory regions associated with corresponding virtual machines.
56. The system of claim 47, in, The plurality of threads are arranged into thread groups, and wherein a first thread group is for processing by the computing unit.
57. The system of claim 56, in, The computing unit is configured to execute a first mixed precision dot product instruction in each thread in the first thread group using different 32-bit SIMD lanes.
58. The system of claim 57, further comprising: include: The scheduling circuit is used to distribute a plurality of thread groups across the processing cluster, each thread including a plurality of instructions.
59. The system of claim 58, in, The computation unit is configured to be allocated to process a first thread group including a first plurality of threads, and the first mixed-precision dot product instruction is configured to be executed in each thread of the first plurality of threads.
60. The system of claim 47, in, The minimum size input value includes a 16-bit value, an 8-bit value, or a 4-bit value.
61. The system of claim 60, in, When the minimum size input value is a 16-bit value, the multiple parallel multiplication operations include two parallel multiplication operations, when the minimum size input value is an 8-bit value, the multiple parallel multiplication operations include four parallel multiplication operations, and when the minimum size input value is a 4-bit value, the multiple parallel multiplication operations include eight parallel multiplication operations.
62. The system of claim 47, in, When the minimum size input value is a 4-bit value, eight parallel multiplication operations are performed.
