Dynamic partitioning of launches and kernels to improve memory efficiency

The SIMT architecture in GPGPUs addresses inefficiencies in GPU processing by optimizing memory usage and parallelism, enhancing performance in graphics and machine learning tasks through dynamic partitioning of boot and kernels.

JP7574523B2Active Publication Date: 2024-10-29INTEL CORP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2020150177
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-11-07
Filing Date
2020-09-07
Publication Date
2024-10-29
Estimated Expiration
2040-09-07

AI Technical Summary

Technical Problem

Current graphics processing units (GPUs) face inefficiencies in processing graphics data due to fixed-function computational units and limited parallel processing capabilities, particularly in handling complex operations like machine learning tasks, which require more sophisticated architectures to maximize parallelism and improve performance.

Method used

Implementing a general-purpose graphics processing unit (GPGPU) with a single-instruction, multiple-thread (SIMT) architecture that allows for dynamic partitioning of boot and kernels to optimize memory usage and enhance parallel processing capabilities, enabling efficient execution of graphics and machine learning operations.

Benefits of technology

The SIMT architecture enhances processing efficiency by synchronously executing parallel threads, improving performance in graphics and machine learning tasks, and facilitating the training of larger datasets with reduced computational time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007574523000005
    Figure 0007574523000005
  • Figure 0007574523000006
    Figure 0007574523000006
  • Figure 0007574523000007
    Figure 0007574523000007
Patent Text Reader

Abstract

To dynamically divide activation and kernels for improving memory efficiency.SOLUTION: A method in a compute engine performing machine learning comprises: receiving, by a convolutional layer of a convolutional neural network (CNN) implemented on the compute engine, a plurality of activation groups contained in an input data, where the convolutional layer includes one or more kernel groups each including a plurality of kernels; determining a plurality of memory efficiency metrics based on the number of activation groups of the plurality of activation groups and the number of kernels of the plurality of kernels; selecting a first optimal number of activation groups and a second optimal number of kernels that are associated with an optimal memory efficiency metric in the plurality of memory efficiency metrics; and performing a convolutional operation on the input data based on the first optimal number and the second optimal number.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] FIELD OF THE DISCLOSURE Embodiments relate generally to data processing, and more particularly to data processing via general purpose graphics processing units. [Background technology]

[0002] Modern parallel graphics data processing includes systems and methods developed to perform specific operations on graphics data, such as, for example, linear interpolation, tessellation, rasterization, texture mapping, depth testing, etc. Traditionally, graphics processors processed graphics data using fixed function computational units. Recently, however, portions of graphics processors have become programmable, enabling such processors to support a variety of operations for processing vertex and fragment data.

[0003] To further increase performance, graphics processors typically implement processing techniques such as pipelining, which attempts to process as much graphics data as possible in parallel across different parts of the graphics pipeline. Parallel graphics processors with single instruction, multiple threads (SIMT) architectures are designed to maximize the amount of parallelism in the graphics pipeline. In a SIMT architecture, a group of parallel threads attempt to execute a program's instructions together synchronously and simultaneously as much as possible to increase processing efficiency. A general overview of the software and hardware of a SIMT architecture can be found in Shane Cook, CUDA Programming, Chapter 3, pages 37-51 (2013). [Brief description of the drawings]

[0004] The above-described features of the present embodiments may thus be understood in detail, and a more particular description of the above briefly summarized embodiments may be had by reference to the embodiments, some of which are illustrated in the accompanying drawings, It should be noted, however, that the accompanying drawings depict only typical embodiments and therefore should not be considered as limiting the scope thereof.

[0005] [Figure 1] FIG. 1 is a block diagram illustrating a computer system configured to implement one or more aspects of the embodiments described herein.

[0006] [Figure 2A] 1 illustrates a parallel processor component, according to one embodiment. [Figure 2B] 1 illustrates a parallel processor component, according to one embodiment. [Figure 2C] 1 illustrates a parallel processor component, according to one embodiment. [Figure 2D] 1 illustrates a parallel processor component, according to one embodiment.

[0007] [Figure 3A] FIG. 2 is a block diagram of a graphics multiprocessor and a multiprocessor-based GPU, according to an embodiment. [Figure 3B] FIG. 2 is a block diagram of a graphics multiprocessor and a multiprocessor-based GPU, according to an embodiment. [Figure 3C] FIG. 2 is a block diagram of a graphics multiprocessor and a multiprocessor-based GPU according to an embodiment.

[0008] [Figure 4A] 1 illustrates an exemplary architecture in which multiple GPUs are communicatively coupled to multiple multi-core processors. [Figure 4B] 1 illustrates an exemplary architecture in which multiple GPUs are communicatively coupled to multiple multi-core processors. [Figure 4C]1 illustrates an exemplary architecture in which multiple GPUs are communicatively coupled to multiple multi-core processors. [Figure 4D] 1 illustrates an exemplary architecture in which multiple GPUs are communicatively coupled to multiple multi-core processors. [Figure 4E] 1 illustrates an exemplary architecture in which multiple GPUs are communicatively coupled to multiple multi-core processors. [Figure 4F] 1 illustrates an exemplary architecture in which multiple GPUs are communicatively coupled to multiple multi-core processors.

[0009] [Diagram 5] 1 illustrates a graphics processing pipeline, according to one embodiment.

[0010] [Figure 6] 1 illustrates a machine learning software stack, according to one embodiment.

[0011] [Figure 7] 1 illustrates a general purpose graphics processing unit, according to one embodiment.

[0012] [Figure 8] 1 illustrates a multi-GPU computing system, according to one embodiment.

[0013] [Figure 9A] 1 illustrates layers of an exemplary deep neural network. [Figure 9B] 1 illustrates layers of an exemplary deep neural network.

[0014] [Figure 10] 1 illustrates an exemplary recurrent neural network.

[0015] [Figure 11] Illustrates training and deployment of deep neural networks.

[0016] [Figure 12] FIG. 2 is a block diagram illustrating distributed learning.

[0017] [Figure 13] 1 illustrates an exemplary inference system-on-chip (SOC) suitable for performing inference using a trained model.

[0018] [Figure 14] FIG. 1 is a block diagram of a processing system, according to one embodiment.

[0019] [Figure 15A] 1 illustrates a computing system and a graphics processor provided by embodiments described herein. [Figure 15B] 1 illustrates a computing system and a graphics processor provided by embodiments described herein. [Figure 15C] 1 illustrates a computing system and a graphics processor provided by embodiments described herein.

[0020] [Figure 16A] FIG. 2 illustrates a block diagram of an additional graphics processor and computational accelerator architecture provided by embodiments described herein. [Figure 16B] FIG. 2 illustrates a block diagram of an additional graphics processor and computational accelerator architecture provided by embodiments described herein. [Figure 16C] FIG. 2 illustrates a block diagram of an additional graphics processor and computational accelerator architecture provided by embodiments described herein.

[0021] [Figure 17] FIG. 2 is a block diagram of a graphics processing engine of a graphics processor according to some embodiments.

[0022] [Figure 18A] 1 illustrates thread execution logic including an array of processing elements used in a graphics processor core according to embodiments described herein. [Figure 18B] 1 illustrates thread execution logic including an array of processing elements used in a graphics processor core according to embodiments described herein.

[0023] [Figure 19] 1 illustrates an additional execution unit according to one embodiment.

[0024] [Figure 20] FIG. 2 is a block diagram illustrating a graphics processor instruction format according to some embodiments.

[0025] [Figure 21] FIG. 2 is a block diagram of a graphics processor according to another embodiment.

[0026] [Figure 22A] 1 illustrates a graphics processor command format and command sequence according to some embodiments. [Figure 22B] 1 illustrates a graphics processor command format and command sequence according to some embodiments.

[0027] [Figure 23] 1 illustrates an exemplary graphics software architecture for a data processing system according to some embodiments.

[0028] [Figure 24A] FIG. 1 is a block diagram illustrating an IP core development system, according to one embodiment.

[0029] [Figure 24B] 1 illustrates a vertical cross-sectional view of an integrated circuit package assembly according to some embodiments described herein.

[0030] [Figure 24C] 1 illustrates a package assembly that includes multiple units of hardware logic chiplets connected to a substrate (e.g., a base die).

[0031] [Figure 24D] 1 illustrates a packaging assembly including replaceable chiplets, according to one embodiment.

[0032] [Diagram 25] FIG. 1 is a block diagram illustrating an exemplary system on a chip integrated circuit, according to one embodiment.

[0033] [Figure 26A] FIG. 2 is a block diagram illustrating an example graphics processor for use within a SoC in accordance with embodiments described herein. [Figure 26B] FIG. 2 is a block diagram illustrating an example graphics processor for use within a SoC in accordance with embodiments described herein.

[0034] [Figure 27A] 1 illustrates a convolutional layer according to one embodiment.

[0035] [Figure 27B] 1 illustrates performing a convolution operation on input data and a kernel, according to one embodiment.

[0036] [Figure 28] 1 illustrates a method for machine learning, according to one embodiment; and

[0037] [Figure 29] 1 illustrates a method for machine learning, according to one embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0038] In some embodiments, a graphics processing unit (GPU) is communicatively coupled to a host / processor core to accelerate graphics operations, machine learning operations, pattern analysis operations, and various general-purpose GPU (GPGPU) functions. The GPU may be communicatively coupled to the host processor / core via a bus or another interconnect (e.g., a high-speed interconnect such as PCIe or NVLink). In other embodiments, the GPU may be integrated in the same package or chip as the cores and communicatively coupled to the cores via an internal processor bus / interconnect (i.e., internal to the package or chip). Regardless of how the GPU is connected, the processor core may be able to assign work to the GPU in the form of a sequence of commands / instructions contained in a work descriptor. The GPU then uses dedicated circuitry / logic to efficiently process these commands / instructions.

[0039] In the following description, numerous specific details are set forth to provide a more thorough understanding. However, it will be apparent to one of ordinary skill 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 have not been described to avoid obscuring the details of the embodiments. [System Overview]

[0040] 1 is a block diagram illustrating a computing system 100 configured to implement one or more aspects of the embodiments described herein. The computing system 100 includes a processing subsystem 101 having one or more processors 102 and a system memory 104 that communicate over an interconnect path, which may include a memory hub 105. The memory hub 105 may be a separate component in a chipset component or may be integrated within the one or more processors 102. The memory hub 105 couples to an I / O subsystem 111 over a communication link 106. The I / O subsystem 111 includes an I / O hub 107 that may enable the computing system 100 to receive input from one or more input devices 108. Additionally, the I / O hub 107 may enable a display controller that may be included in the one or more processors 102 to provide output to one or more display devices 110A. In one embodiment, the one or more display devices 110A coupled to the I / O hub 107 may include local, built-in, or embedded display devices.

[0041] In one embodiment, the processing subsystem 101 includes one or more parallel processors 112 coupled to the memory hub 105 via a bus or other communication link 113. The communication link 113 may be one of any number of standard-based communication link technologies or protocols, such as, but not limited to, PCI Express, or may be a vendor-specific communication interface or fabric. In one embodiment, the one or more parallel processors 112 form a computationally focused parallel or vector processing system that may include multiple processing cores and / or processing clusters, such as, for example, a many integrated core (MIC) processor. In one embodiment, the one or more parallel processors 112 form a graphics processing subsystem that may output pixels to one of one or more display devices 110A coupled via the I / O hub 107. The one or more parallel processors 112 may also include a display controller and display interface (not shown) to enable direct connection to one or more display devices 110B.

[0042] Within the I / O subsystem 111, a system storage unit 114 may connect to the I / O hub 107 to provide a storage mechanism for the computing system 100. An I / O switch 116 may be used to provide an interface mechanism to enable connections between the I / O hub 107 and other components, such as a network adapter 118 and / or a wireless network adapter 119, which may be integrated into the platform, as well as various other devices that may be added via one or more add-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 radios.

[0043] Computing system 100 may include other components not explicitly shown, including USB or other port connections, optical storage drives, video capture devices, and the like, and may be connected to I / O hub 107. The communication paths interconnecting the various components of Figure 1 may be implemented using any suitable protocol, such as a Peripheral Component Interconnect (PCI) based protocol (e.g., PCI-Express), or any other bus or point-to-point communication interface and / or protocol, such as an NV-Link high speed interconnect, or interconnect protocol known in the art.

[0044] In one embodiment, the one or more parallel processors 112 incorporate circuitry optimized for graphics and video processing, including, for example, video output circuitry, to form a graphics processing unit (GPU). In another embodiment, the one or more parallel processors 112 incorporate circuitry optimized for general purpose processing while maintaining an underlying computational architecture, described in more detail herein. In yet another embodiment, the components of the computing system 100 may be integrated with one or more other system elements on a single integrated circuit. For example, the one or more parallel processors 112, the memory hub 105, the processor 102, and the I / O hub 107 may be integrated into a system-on-chip (SoC) integrated circuit. Alternatively, the components of the computing system 100 may be integrated into a single package to form a system-in-package (SIP) configuration. In one embodiment, at least some of the components of the computing system 100 may be integrated into a multi-chip module (MCM), which may be interconnected with other multi-chip modules to form a modular computing system.

[0045] It will be understood that the computing system 100 shown herein is exemplary and that variations and modifications are possible. The connection topology, including the number and arrangement of bridges, the number of processors 102, and the number of parallel processors 112, may be modified as desired. For example, in some embodiments, the system memory 104 is connected directly to the processors 102 rather than through a bridge, while other devices communicate with the system memory 104 through the memory hub 105 and the processors 102. In other alternative topologies, the parallel processors 112 are connected directly to the I / O hub 107 or 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 may be integrated into a single chip. Some embodiments may include two or more sets of processors 102 attached via multiple sockets that may be coupled with two or more instances of the parallel processors 112.

[0046] Some of the specific components illustrated herein are optional and may not be included in all implementations of computing system 100. For example, any number of add-in cards or peripherals may be supported, or some components may be omitted. Additionally, some architectures may use different terminology for components similar to those illustrated in FIG. 1. For example, memory hub 105 may be referred to as a northbridge in some architectures, while I / O hub 107 may be referred to as a southbridge.

[0047] 2A illustrates a parallel processor 200, according to one embodiment. Various components of the parallel processor 200 may be implemented using one or more integrated circuit devices, such as, for example, a programmable processor, an application specific integrated circuit (ASIC), or a field programmable gate array (FPGA). The illustrated parallel processor 200 is a variation of the one or more parallel processors 112 shown in FIG. 1, according to one embodiment.

[0048] In one embodiment, parallel processor 200 includes parallel processing units 202. The parallel processing units include I / O units 204 that enable communication with other devices, including other instances of parallel processing units 202. I / O units 204 may be directly connected to other devices. In one embodiment, I / O units 204 connect to other devices through the use of a hub or switch interface, such as memory hub 105. The connection between memory hub 105 and I / O units 204 forms communication link 113. Within parallel processing units 202, I / O units 204 connect to host interface 206 and memory crossbar 216, where host interface 206 receives commands related to the execution of processing operations and memory crossbar 216 receives commands related to the execution of memory operations.

[0049] When the host interface 206 receives command buffers via the I / O unit 204, the host interface 206 can direct work operations to the front end 208 to execute those commands. In one embodiment, the front end 208 interfaces with a scheduler 210 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 valid before tasks are distributed to the processing clusters of the processing cluster array 212. In one embodiment, the scheduler 210 is implemented via firmware logic executing on a microcontroller. The microcontroller-implemented scheduler 210 can be configured to perform complex scheduling and work distribution operations at a coarse and fine granularity, allowing for rapid preemption and context switching of threads executing on the processing array 212. In one embodiment, the host software can reveal workloads for scheduling on the processing array 212 via one of a number of graphics processing doorbells. The workload may then be automatically distributed across the processing array 212 by scheduler 210 logic in the scheduler microcontroller.

[0050] The processing cluster array 212 may include up to "N" processing clusters (e.g., cluster 214A, cluster 214B through cluster 214N). Each cluster 214A-214N of the processing cluster array 212 may execute multiple concurrent threads. The scheduler 210 may use various scheduling and / or work allocation algorithms to assign work to the clusters 214A-214N of the processing cluster array 212, which may vary depending on the workload generated by each type of program or operation. Scheduling may be handled dynamically by the scheduler 210 or may be partially assisted by compiler logic during compilation of program logic configured for execution by the processing cluster array 212. In one embodiment, different clusters 214A-214N of the processing cluster array 212 may be assigned to process different types of programs or to execute different types of operations.

[0051] The processing cluster array 212 can be configured to perform various types of parallel processing operations. In one embodiment, the processing cluster array 212 is configured to perform general-purpose parallel computing operations. For example, the processing cluster array 212 can include logic to perform processing tasks including filtering video and / or audio data, performing modeling operations including physics operations, and performing data transformations.

[0052] In one embodiment, the processing cluster array 212 is configured to perform parallel graphics processing operations. In embodiments in which the parallel processor 200 is configured to perform graphics processing operations, the processing cluster array 212 may include additional logic to support the execution of such graphics processing operations, including, but not limited to, texture sampling logic for performing texture operations, as well as tessellation logic and other vertex processing logic. Additionally, the processing cluster array 212 may be configured to execute graphics processing related shader programs, such as, but not limited to, vertex shaders, tessellation shaders, geometry shaders, and pixel shaders. The parallel processing units 202 may transfer data from a system memory via the I / O units 204 for processing. During processing, the transferred data may be stored in an on-chip memory (e.g., the parallel processor memory 222) during processing and then written back to the system memory.

[0053] In one embodiment, when the parallel processing units 202 are used to perform graphics processing, the scheduler 210 can be configured to divide the processing workload into tasks of approximately equal size to more effectively distribute the graphics processing operations to the multiple clusters 214A-214N of the processing cluster array 212. In some embodiments, portions of the 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 the clusters 214A-214N can be stored in a buffer to allow the intermediate data to be transmitted between the clusters 214A-214N for further processing.

[0054] In operation, the processing cluster array 212 may receive processing tasks to be performed via the scheduler 210, which receives commands that define the processing tasks from the front end 208. For graphics processing operations, the processing tasks may include indices of data to be processed, e.g., surface (patch) data, primitive data, vertex data, and / or pixel data, as well as state parameters and commands that specify how the data is processed (e.g., which program to execute). The scheduler 210 may be configured to fetch an index corresponding to a task or may receive an index from the front end 208. The front end 208 may be configured to ensure that the processing cluster array 212 is configured to a valid state before a workload specified by a received command buffer (e.g., a batch buffer, a push buffer, etc.) is initiated.

[0055] Each of the one or more instances of the parallel processing unit 202 can be coupled to a parallel processor memory 222. The parallel processor memory 222 can be accessed via a memory crossbar 216, which can receive memory requests from the processing cluster array 212 and the I / O unit 204. The memory crossbar 216 can access the parallel processor memory 222 via a memory interface 218. The memory interface 218 can include a number of partition units (e.g., partition unit 220A, partition unit 220B through partition unit 220N), each of which can be coupled to a portion (e.g., a memory unit) of the parallel processor memory 222. In one implementation, the number of partition units 220A-220N is configured to be equal to the number of memory 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-220N may not be equal to the number of memory devices.

[0056] In various embodiments, the memory units 224A-224N may include various types of memory devices including dynamic random access memory (DRAM) or graphic random access memory such as synchronous graphic random access memory (SGRAM) including, for example, graphic double data rate (GDDR) memory. In one embodiment, the memory units 224A-224N may also include 3D stacked memory including, but not limited to, high bandwidth memory (HBM). Those skilled in the art will appreciate that the specific implementation of the memory units 224A-224N may vary and may be selected from one of a variety of conventional designs. For example, render targets such as frame buffers or texture maps may be stored across the memory units 224A-224N, allowing the partition units 220A-220N to write portions of each render target in parallel to effectively use the available bandwidth of the parallel processor memory 222. In some embodiments, local instances of the parallel processor memory 222 may be omitted in favor of a unified memory design that utilizes system memory in conjunction with local cache memory.

[0057] In one embodiment, any one of the clusters 214A-214N of the processing cluster array 212 can process data that will be written to any one of the memory units 224A-224N in the parallel processor memory 222. The memory crossbar 216 can be configured to forward the output of each cluster 214A-214N to any partition unit 220A-220N or to another cluster 214A-214N, which can perform additional processing operations on the output. Each cluster 214A-214N can communicate with a memory interface 218 through the memory crossbar 216 to read from or write to various external memory devices. In one embodiment, the memory crossbar 216 has a connection to the memory interface 218 for communication with the I / O unit 204, and a connection to a local instance of the parallel processor memory 222, allowing the processing units in different processing clusters 214A-214N to communicate with system memory or other memory that is not local to the parallel processing units 202. In one embodiment, the memory crossbar 216 can use virtual channels to separate traffic streams between the clusters 214A-214N and the partition units 220A-220N.

[0058] Although a single instance of parallel processing unit 202 is shown in parallel processor 200, any number of instances of parallel processing unit 202 may be included. For example, multiple instances of parallel processing unit 202 may be provided on a single add-in card, or multiple add-in cards may be interconnected. Different instances of parallel processing unit 202 may be configured to interoperate even when different instances have different numbers of processing cores, different amounts of local parallel processor memory, and / or other configuration differences. For example, 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 a variety of configurations and form factors, including, but not limited to, desktop, laptop, or handheld personal computers, servers, workstations, game consoles, and / or embedded systems.

[0059] FIG. 2B is a block diagram of partition unit 220, according to one embodiment. In one embodiment, partition unit 220 is an instance of one of partition units 220A-220N of FIG. 2A. As shown, partition unit 220 includes L2 cache 221, frame buffer interface 225, and ROP 226 (raster operation unit). L2 cache 221 is a read / write cache configured to execute load and store operations received from memory crossbar 216 and ROP 226. Read misses and urgent writeback requests are output by L2 cache 221 to frame buffer interface 225 for processing. Updates can also be sent to a frame buffer via frame buffer interface 225 for processing. In one embodiment, frame buffer interface 225 interfaces with one of the memory units in a parallel processor memory (e.g., in parallel processor memory 222), such as, for example, memory units 224A-224N of FIG. 2A.

[0060] In a graphics application, ROP 226 is a processing unit that performs raster operations such as, for example, stencil, z-test, blending, etc. ROP 226 then outputs the processed graphics data that is stored in the graphics memory. In some embodiments, ROP 226 includes compression logic to compress depth or color data that is written to memory and to decompress depth or color data that is read from memory. The compression logic can be lossless compression logic that utilizes one or more of a number of compression algorithms. The type of compression performed by ROP 226 can vary based on statistical characteristics of the data being compressed. For example, in one embodiment, differential color compression is performed on the depth and color data for each tile.

[0061] In some embodiments, ROP 226 is included within each processing cluster (e.g., clusters 214A-214N of FIG. 2A) instead of within partition unit 220. In such embodiments, read and write requests for pixel data are transmitted through memory crossbar 216 instead of pixel fragment data. The processed graphics data may be displayed on a display device, such as, for example, one of one or more display devices 110 of FIG. 1, routed for further processing by processor 102, or routed for further processing by one of the processing entities in parallel processor 200 of FIG. 2A.

[0062] FIG. 2C is a block diagram of a processing cluster 214 in a parallel processing unit, according to one embodiment. In one embodiment, the processing cluster is an instance of one of the processing clusters 214A-214N of FIG. 2A. The processing cluster 214 may be configured to execute many threads in parallel, with the term "thread" referring to an instance of a particular program executing on a particular set of input data. In some embodiments, a single instruction, multiple data (SIMD) instruction issue technique is used to support the parallel execution of many threads without providing multiple independent instruction units. In other embodiments, a single instruction, multiple threads (SIMT) technique is used to support the parallel execution of many generally synchronized threads, using a common instruction unit configured to issue instructions to a set of processing engines within each one of the processing clusters. Unlike a SIMD execution scheme, where all processing engines typically execute the same instructions, SIMT execution allows different threads to more easily follow divergent execution paths through a given thread program. Those skilled in the art will appreciate that the SIMD processing scheme represents a functional subset of the SIMT processing scheme.

[0063] The operation of the processing clusters 214 can be controlled through a pipeline manager 232 that distributes processing tasks to the SIMT parallel processors. The pipeline manager 232 receives instructions from the scheduler 210 of FIG. 2A and manages the execution of these instructions through the graphics multiprocessor 234 and / or the texture unit 236. The illustrated graphics multiprocessor 234 is an exemplary instance of a SIMT parallel processor. However, various types of SIMT parallel processors of different architectures can be included in the processing clusters 214. One or more instances of the graphics multiprocessor 234 can be included in the processing clusters 214. The graphics multiprocessor 234 can process data, and a data crossbar 240 can be used to distribute the processed data to one of multiple possible destinations, including other shader units. The pipeline manager 232 can facilitate the distribution of the processed data by specifying the destination of the processed data to be distributed through the data crossbar 240.

[0064] Each graphics multiprocessor 234 in a processing cluster 214 may include an identical set of function execution logic (e.g., arithmetic logic unit, load store unit, etc.). The function execution logic may be configured in a pipelined manner such that a new instruction may be issued before a previous instruction is completed. The function execution logic supports a variety of operations including integer and floating point operations, 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 be present.

[0065] An instruction sent to the processing cluster 214 constitutes a thread. A set of threads that execute across a set of parallel processing engines is a thread group. A thread group executes the same program on different input data. Each thread in a thread group 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. If a thread group includes fewer threads than the number of processing engines, one or more of these processing engines can be idle during a cycle in which the thread group is being processed. A thread group can also include more threads than the number of processing engines in the graphics multiprocessor 234. If a thread group includes more threads than the number of processing engines in the graphics multiprocessor 234, processing can be executed over consecutive clock cycles. In one embodiment, multiple thread groups can be executed simultaneously on the graphics multiprocessor 234.

[0066] 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 dispense with an internal cache and use a cache memory (e.g., L1 cache 248) in the processing cluster 214. Each graphics multiprocessor 234 also has access to an L2 cache in a partition unit (e.g., partition units 220A-220N of FIG. 2A) that is shared among all processing clusters 214 and can be used to transfer data between threads. The graphics multiprocessor 234 can also access an off-chip global memory, which can include one or more of the local parallel processor memories and / or system memories. Any memory external to the parallel processing unit 202 can be used as global memory. An embodiment in which the processing cluster 214 includes multiple instances of the graphics multiprocessor 234 can share common instructions and data, which can be stored in the L1 cache 248.

[0067] Each processing cluster 214 may include a memory management unit (MMU) 245 configured to map virtual addresses to physical addresses. In other embodiments, one or more instances of MMU 245 may be present in memory interface 218 of FIG. 2A. MMU 245 includes a set of page table entries (PTEs) used to map virtual addresses to physical addresses of tiles and optionally cache line indexes. MMU 245 may include an address translation lookaside buffer (TLB) or cache that may be present in graphics multiprocessor 234 or an L1 cache or processing cluster 214. The physical addresses are processed to distribute surface data access locality and enable efficient request interleaving among partition units. The cache line index may be used to determine whether a request for a cache line is a hit or a miss.

[0068] In graphics and computing applications, the processing clusters 214 may be configured such that each graphics multiprocessor 234 is coupled to a texture unit 236 that performs texture mapping operations, such as determining texture sample locations, retrieving texture data, and filtering the texture data. Texture data is retrieved from an internal texture L1 cache (not shown) or, in some embodiments, from an L1 cache within the graphics multiprocessor 234, and fetched from an L2 cache, local parallel processor memory, or system memory, as needed. Each graphics multiprocessor 234 outputs processed tasks to the data crossbar 240 and provides the processed tasks to another processing cluster 214 for further processing or stores the processed tasks in an L2 cache, local parallel processor memory, or system memory via the memory crossbar 216. A pre-ROP 242 (pre-raster operation unit) is configured to receive data from the graphics multiprocessor 234 and direct the data to the ROP unit, which may be arranged with the partition units described herein (e.g., partition units 220A-220N of FIG. 2A). The Pre-ROP 242 unit can perform color blending optimizations, organize pixel color data, and perform address conversions.

[0069] It will be understood that the core architecture described herein is exemplary and that variations and modifications are possible. Any number of processing units, such as graphics multiprocessor 234, texture unit 236, pre-ROP 242, etc., may be included within processing cluster 214. Additionally, while only one processing cluster 214 is shown, the parallel processing units 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 from the other processing clusters 214, using separate and distinct processing units, L1 caches, etc.

[0070] 2D illustrates a graphics multiprocessor 234 according to one embodiment. In such an embodiment, the graphics multiprocessor 234 couples with the pipeline manager 232 of the processing cluster 214. The graphics multiprocessor 234 has an execution pipeline and 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. In one embodiment, the graphics multiprocessor 234 further includes a tensor and / or ray tracing core 263 that includes hardware logic for accelerating matrix and / or ray tracing operations.

[0071] In one embodiment, instruction cache 252 receives a stream of instructions to execute from pipeline manager 232. The instructions are cached in instruction cache 252 and dispatched for execution by instruction unit 254. Instruction unit 254 may dispatch instructions as thread groups (e.g., warps), with each thread of a thread group being assigned to a different execution unit in GPGPU core 262. Instructions may access either local, shared, or global address spaces by specifying addresses in the unified address space. Address mapping unit 256 may be used to translate addresses in the unified address space into separate memory addresses that load / store unit 266 can access.

[0072] Register file 258 provides a set of registers to the functional units of graphics multiprocessor 234. Register file 258 provides temporary storage for operands and is connected to the data paths of the functional units (e.g., GPGPU cores 262, load / store unit 266) of graphics multiprocessor 234. In one embodiment, register file 258 is split among each of the functional units such that each functional unit is assigned a dedicated portion of register file 258. In one embodiment, register file 258 is split among the different warps being executed by graphics multiprocessor 234.

[0073] Each of the GPGPU cores 262 may include a floating point unit (FPU) and / or an integer arithmetic logic unit (ALU) used to execute instructions of the graphics multiprocessor 234. Depending on the embodiment, the GPGPU cores 262 may be similar in architecture or may differ in architecture. For example, in one embodiment, a first portion of the GPGPU cores 262 includes a single precision FPU and an integer ALU, while a second portion of the GPGPU cores includes a double precision FPU. In one embodiment, the FPU may implement the IEEE 754-2008 standard for floating point arithmetic or enable variable precision floating point arithmetic. The graphics multiprocessor 234 may further include one or more fixed function units or special function units to perform specific functions, such as, for example, a rectangular region copy operation or a pixel blending operation. In one embodiment, one or more of the GPGPU cores may also include fixed or special function logic.

[0074] In one embodiment, GPGPU core 262 includes SIMD logic capable of executing single instructions on multiple data sets. In one embodiment, GPGPU core 262 physically executes SIMD4, SIMD8, and SIMD16 instructions, and logically executes SIMD1, SIMD2, and SIMD32 instructions. The SIMD instructions of the GPGPU core can be generated at compile time by a shader compiler, or can be generated automatically 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, in one embodiment, eight SIMT threads performing the same or similar operations can be executed in parallel via a single SIMD8 logical unit.

[0075] Memory and cache interconnect 268 is an interconnect network connecting each functional unit of graphics multiprocessor 234 to register file 258 and shared memory 270. In one embodiment, memory and cache interconnect 268 is a crossbar interconnect that allows load / store unit 266 to perform load and store operations between shared memory 270 and register file 258. Register file 258 can operate at the same frequency as GPGPU cores 262, and therefore data transfers between GPGPU cores 262 and register file 258 are very low latency. Shared memory 270 can be used to enable communication between threads executing on functional units in graphics multiprocessor 234. Cache memory 272 can be used as a data cache, for example, to cache texture data communicated between functional units and texture unit 236. Shared memory 270 can also be used as a program managed cache. Threads executing on GPGPU cores 262 can programmatically store data in the shared memory in addition to the automatically cached data stored in cache memory 272.

[0076] Figures 3A-3C show additional graphics multiprocessors, according to embodiments. Figures 3A-3B show graphics multiprocessors 325, 350 that are variations of the graphics multiprocessor 234 of Figure 2C. Figure 3C shows a graphics processing unit (GPU) 380 that includes a dedicated set of graphics processing resources arranged into multi-core groups 365A-365N. The illustrated graphics multiprocessors 325, 350 and multi-core groups 365A-365N may be streaming multiprocessors (SMs) capable of simultaneously executing multiple threads of execution.

[0077] FIG. 3A illustrates a graphics multiprocessor 325 according to an additional embodiment. The graphics multiprocessor 325 includes multiple additional instances of execution resource units relative to the graphics multiprocessor 234 of FIG. 2D. For example, the graphics multiprocessor 325 may include multiple instances of instruction units 332A-332B, register files 334A-334B, and texture units 344A-344B. The graphics multiprocessor 325 also includes multiple sets of graphics or compute execution units (e.g., GPGPU cores 336A-336B, tensor cores 337A-337B, ray tracing cores 338A-338B) and multiple sets of load / store units 340A-340B. In one embodiment, the execution resource units include a common instruction cache 330, texture and / or data cache memory 342, and shared memory 346.

[0078] The various components can communicate through interconnect fabric 327. In one embodiment, interconnect fabric 327 includes one or more crossbar switches that enable communication between the various components of graphics multiprocessor 325. In one embodiment, interconnect fabric 327 is a separate high-speed network fabric layer on which each component of graphics multiprocessor 325 is stacked. The components of graphics multiprocessor 325 communicate with remote components through interconnect fabric 327. For example, GPGPU cores 336A-336B, 337A-337B, and 338A-338B can each communicate with shared memory 346 through interconnect fabric 327. Interconnect fabric 327 can arbitrate communications within graphics multiprocessor 325 to ensure fair bandwidth allocation between components.

[0079] FIG. 3B illustrates a graphics multiprocessor 350 according to an additional embodiment. The graphics processor includes multiple sets of execution resources 356A-356D, each set of execution resources including multiple instruction units, register files, GPGPU cores, and load store units as shown in FIG. 2D and FIG. 3A. The execution resources 356A-356D can perform texture operations in conjunction with texture units 360A-360D while sharing instruction cache 354 and shared memory 353. In one embodiment, the execution resources 356A-356D can share instruction cache 354 and shared memory 353, as well as multiple instances of texture and / or data cache memories 358A-358B. The various components can communicate via an interconnect fabric 352 similar to interconnect fabric 327 of FIG. 3A.

[0080] Those skilled in the art will appreciate that the architectures described in Figures 1, 2A-2D, and 3A-3B are illustrative and not limiting on the scope of the embodiments. Thus, the techniques described herein may be implemented on any suitably configured processing unit, including, but not limited to, one or more mobile application processors, one or more desktop or server central processing units (CPUs), including multi-core CPUs, one or more parallel processing units, such as parallel processing unit 202 of Figure 2A, and one or more graphics processors or special purpose processing units, without departing from the scope of the embodiments described herein.

[0081] In some embodiments, a parallel processor or GPGPU as described herein is communicatively coupled to a host / processor core to accelerate graphics operations, machine learning operations, pattern analysis operations, and various general-purpose GPU (GPGPU) functions. The GPU may be communicatively coupled to the host processor / core via a bus or other interconnect (e.g., a high-speed interconnect such as PCIe or NVLink). In other embodiments, the GPU may be integrated in the same package or chip as the core and communicatively coupled to the core via an internal processor bus / interconnect (i.e., internal to the package or chip). Regardless of how the GPU is connected, the processor core may assign work to the GPU in the form of a sequence of commands / instructions contained in a work descriptor. The GPU then uses dedicated circuitry / logic to efficiently process these commands / instructions.

[0082] 3C illustrates a graphics processing unit (GPU) 380 that includes a dedicated set of graphics processing resources arranged into multi-core groups 365A-N. Although details of only a single multi-core group 365A are provided, it will be understood that the other multi-core groups 365B-365N may include the same or similar sets of graphics processing resources.

[0083] As shown, multicore group 365A may include a set of graphics cores 370, a set of tensor cores 371, and a set of ray tracing cores 372. Scheduler / dispatcher 368 schedules and dispatches the graphics threads for execution on the various cores 370, 371, 372. A set of register files 369 store operand values ​​used by the cores 370, 371, 372 when executing the graphics threads. These may include, for example, integer registers for storing integer values, floating point registers for storing floating point values, vector registers for storing packed data elements (integer and / or floating point data elements), and tile registers for storing tensor / matrix values. In one embodiment, the tile registers are implemented as a composite set of vector registers.

[0084] One or more combined level 1 (L1) cache and shared memory units 373 store graphics data, such as texture data, vertex data, pixel data, ray data, bounding volume data, etc., locally within each multicore group 365A. One or more texture units 374 may also be used to perform texturing operations, such as texture mapping and sampling. A level 2 (L2) cache 375, shared by all or a subset of the multicore groups 365A-365N, stores graphics data and / or instructions for multiple simultaneous graphics threads. As shown, the L2 cache 375 may be shared across multiple multicore groups 365A-365N. One or more memory controllers 367 couple the GPU 380 to memory 366, which may be system memory (e.g., DRAM) and / or dedicated graphics memory (e.g., GDDR6 memory).

[0085] Input / output (I / O) circuitry 363 couples GPU 380 to one or more I / O devices 362, such as, for example, a digital signal processor (DSP), a network controller, or a user input device. An on-chip interconnect may be used to couple I / O device 362 to GPU 380 and memory 366. One or more I / O memory management units (IOMMUs) 364 of I / O circuitry 363 directly couple I / O device 362 to system memory 366. In one embodiment, IOMMU 364 manages multiple sets of page tables to map virtual addresses to physical addresses in system memory 366. In this embodiment, I / O device 362, CPU 361, and GPU 380 may share the same virtual address space.

[0086] In one implementation, IOMMU 364 supports virtualization. In this case, IOMMU 364 may manage a first set of page tables to map guest / graphics virtual addresses to guest / graphics physical addresses and a second set of page tables to map guest / graphics physical addresses to system / host physical addresses (e.g., in system memory 366). The base addresses of each of the first and second sets of page tables may be stored in control registers and swapped out on a context switch (e.g., to provide a new context with access to the associated set of page tables). Although not shown in FIG. 3C, each of cores 370, 371, 372 and / or multicore groups 365A-365N may include a translation lookaside buffer (TLB) to cache guest virtual to guest physical, guest physical to host physical, and guest virtual to host physical translations.

[0087] In one embodiment, CPU 361, GPU 380, and I / O devices 362 are integrated into a single semiconductor chip and / or chip package. The illustrated memory 366 may be integrated on the same chip or may be coupled to memory controller 367 via an off-chip interface. In one implementation, memory 366 includes GDDR6 memory that shares the same virtual address space as other physical system-level memory, although the underlying principles of the invention are not limited to this particular implementation.

[0088] In one embodiment, tensor cores 371 include multiple execution units specifically designed to perform matrix operations, which are fundamental computational operations used to perform deep learning operations. For example, simultaneous matrix multiplication operations may be used for training and inference of neural networks. Tensor cores 371 may perform matrix processing using a variety of operand precisions, including single-precision floating point (e.g., 32-bit), half-precision floating point (e.g., 16-bit), integer word (16-bit), byte (8-bit), and half-byte (4-bit). In one embodiment, a neural network implementation extracts features of each rendered scene and potentially combines details from multiple frames to construct a high-quality final image.

[0089] In a deep learning implementation, parallel matrix multiplication operations may be scheduled for execution on tensor cores 371. In particular, training neural networks requires a significant number of matrix dot product operations. To process the inner product formulation of N×N×N matrix multiplication, tensor cores 371 may include at least N dot product processing elements. Before the matrix multiplication begins, an entire matrix is ​​loaded into a tile register, and at least one column of a second matrix is ​​loaded every N cycles. In each cycle, there are N dot products processed.

[0090] Matrix elements may be stored with different precisions depending on the particular implementation, including 16-bit words, 8-bit bytes (e.g., INT8), and 4-bit half-bytes (e.g., INT4). Different precision modes may be specified for tensor core 371 to ensure that the most efficient precision is used for different workloads (e.g., inference workloads that can tolerate quantization into bytes and half-bytes).

[0091] In one embodiment, ray tracing core 372 accelerates ray tracing operations for both real-time ray tracing and non-real-time ray tracing implementations. In particular, ray tracing core 372 includes ray traversal / intersection circuitry for performing ray traversal using a bounding volume hierarchy (BVH) and identifying intersections between rays and primitives enclosed within the BVH volume. Ray tracing core 372 may also include circuitry for performing depth testing and culling (e.g., using a Z-buffer or similar arrangement). In one implementation, ray tracing core 372 performs traversal and intersection operations in conjunction with image denoising techniques described herein, at least some of which may be executed on tensor core 371. For example, in one embodiment, tensor core 371 implements a deep learning neural network to perform denoising of frames generated by ray tracing core 372. However, the CPU 361, the graphics core 370, and / or the ray tracing core 372 may also implement all or part of the denoising and / or deep learning algorithms.

[0092] Additionally, as noted above, a distributed approach to denoising may be used, in which the GPU 380 resides in a computing device that is linked to other computing devices via a network or high speed interconnect. In this embodiment, the interconnected computing devices share neural network learning / training data to improve the speed at which the overall system learns and performs denoising on different types of image frames and / or different graphics applications.

[0093] In one embodiment, the ray tracing core 372 handles all BVH traversal and ray-primitive intersections, preventing the graphics core 370 from being overloaded with thousands of instructions per ray. In one embodiment, each ray tracing core 372 includes a first set of dedicated circuitry for performing bounding box tests (e.g., for traversal operations) and a second set of dedicated circuitry for performing ray-triangle intersection tests (e.g., traversed intersection rays). Thus, in one embodiment, the multi-core group 365A can simply initiate ray probes, and the ray tracing core 372 independently performs ray traversal and intersections and returns hit data (e.g., hit, no hit, multiple hits, etc.) to the thread context. The other cores 370, 371 are freed to perform other graphics or computational work while the ray tracing core 372 performs traversal and intersection operations.

[0094] In one embodiment, each ray tracing core 372 includes a traversal unit that performs BVH test operations and an intersection unit that performs ray-primitive intersection tests. The intersection unit generates and provides a "hit," "no hit," or "multiple hit" response to the appropriate thread. During traversal and intersection operations, the execution resources of other cores (e.g., graphics core 370 and tensor core 371) are freed to perform other forms of graphics work.

[0095] In one particular embodiment described below, a hybrid rasterization / ray tracing approach is used in which work is distributed between the graphics core 370 and the ray tracing core 372.

[0096] In one embodiment, the ray tracing core 372 (and / or other cores 370, 371) includes hardware support for a ray tracing instruction set, such as Microsoft's DirectX Ray Tracing (DXR), including, for example, the DispatchRays command, as well as ray-generation, closest-hit, any-hit, and miss shaders, enabling allocation of a unique set of shaders and textures per object. Another ray tracing platform that may be supported by the ray tracing core 372, graphics core 370, and tensor core 371 is Vulkan 1.1.85. However, it should be noted that the principles underlying the present invention are not limited to any particular ray tracing ISA.

[0097] In general, the various cores 372, 371, 370 may support a ray tracing instruction set, including instructions / functions for ray generation, closest hit, any hit, ray-primitive intersection, per-primitive and hierarchical bounding box construction, miss, visit, and exceptions. More specifically, one embodiment includes ray tracing instructions for performing the following functions:

[0098] Ray Generation: Ray Generation commands can be executed per pixel, sample, or other user-defined work allocation.

[0099] Closest Hit: The Closest Hit command may be executed to find the closest intersection of a ray with a primitive in a scene.

[0100] Any Hit: The Any Hit command identifies multiple intersections between a ray and a primitive in the scene and potentially identifies a new closest intersection point.

[0101] Intersection: The Intersection instruction performs a ray-primitive intersection test and outputs the result.

[0102] Per-primitive Bounding box Construction: This instruction constructs a bounding box around a given primitive or group of primitives (e.g., when constructing a new BVH or other acceleration data structure).

[0103] Miss: indicates that the ray is missing all geometry in the scene or in a specified region of the scene.

[0104] Visit: indicates the child volumes that the ray will traverse.

[0105] Exceptions: Contains exception handlers of various types (e.g., called for various error conditions). GPU to host processor interconnect technology

[0106] 4A illustrates an exemplary architecture in which multiple GPUs 410-413 are communicatively coupled to multiple multi-core processors 405-406 via high-speed links 440A-440D (e.g., buses, point-to-point interconnects, etc.). In one embodiment, the high-speed links 440A-440D support a communication throughput of 4 GB / s, 30 GB / s, 80 GB / s, or higher, depending on the implementation. A variety of interconnect protocols may be used, including, but not limited to, PCIe 4.0 or 5.0, and NVLink 2.0. However, the principles underlying the present invention are not limited to any particular communication protocol or throughput.

[0107] Further, in one embodiment, two or more of the GPUs 410-413 are interconnected via high speed links 442A-442B, which may be implemented using the same or different protocol / link as used for the high speed links 440A-440D. Similarly, two or more of the multi-core processors 405-406 may be connected via high speed link 443, which may be a symmetric multi-processor (SMP) bus operating at 20 GB / s, 30 GB / s, 120 GB / s or faster. Alternatively, all communications between the various system components shown in FIG. 4A may be achieved using the same protocol / link (e.g., via a common interconnect fabric). However, as previously noted, the principles underlying the present invention are not limited to any particular type of interconnect technology.

[0108] In one embodiment, each multi-core processor 405-406 is communicatively coupled to a processor memory 401-402 via a memory interconnect 430A-430B, respectively, and each GPU 410-413 is communicatively coupled to a GPU memory 420-423 via a GPU memory interconnect 450A-450D, respectively. The memory interconnects 430A-430B and 450A-450D may 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, for example, 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, for example, 3D XPoint or Nano-Ram. In one embodiment, one portion of the memory may be volatile memory and another portion may be non-volatile memory (eg, using a two-level memory (2LM) hierarchy).

[0109] As described below, the various processors 405-406 and GPUs 410-413 may each be physically coupled to a particular memory 401-402, 420-423, but a unified memory architecture may be implemented in which the same virtual system address space (also referred to as the "effective address" space) is allocated to all of the various physical memories. For example, the processor memories 401-402 may each include 64 GB of system memory address space, and the GPU memories 420-423 may each include 32 GB of system memory address space (yielding a total of 256 GB of addressable memory in this example).

[0110] 4B shows further details of the interconnection between multi-core processor 407 and graphics acceleration module 446, according to one embodiment. Graphics acceleration module 446 may include one or more GPU chips integrated on a line card coupled to processor 407 via high-speed link 440. Alternatively, graphics acceleration module 446 may be integrated on the same package or chip as processor 407.

[0111] The illustrated processor 407 includes multiple cores 460A-460D, each having a translation lookaside buffer 461A-461D and one or more caches 462A-462D. The cores may include various other components for executing instructions and processing data (e.g., instruction fetch units, branch prediction units, decoders, execution units, reorder buffers, etc.), which are not illustrated to avoid obscuring the principles underlying the invention. The caches 462A-462D may include level 1 (L1) and level 2 (L2) caches. Additionally, one or more shared caches 456 may be included in the caching hierarchy and shared by the set of cores 460A-460D. For example, one embodiment of the processor 407 includes 24 cores, each with its own L1 cache, 12 shared L2 caches, and 12 shared L3 caches. In this embodiment, one of the L2 and L3 caches is shared by two adjacent cores. The processor 407 and the integrated graphics accelerator module 446 are connected to a system memory 441 which may include the processor memories 401-402.

[0112] Coherency is maintained for data and instructions stored in the various caches 462A-462D, 456 and system memory 441 via inter-core communication over a coherence bus 464. For example, each cache may have cache coherency logic / circuitry associated therewith to communicate over the coherence bus 464 in response to a detected read or write to a particular cache line. In one implementation, a cache snooping protocol is implemented over the coherence bus 464 to snoop cache accesses. Cache snooping / coherency techniques are well understood by those skilled in the art and will not be described in detail herein to avoid obscuring the principles underlying the present invention.

[0113] In one embodiment, proxy circuit 425 communicatively couples graphics acceleration module 446 to coherence bus 464, enabling graphics acceleration module 446 to participate in cache coherence protocols as a peer of the cores. In particular, interface 435 provides connectivity to proxy circuit 425 via high-speed link 440 (e.g., PCIe bus, NVLink, etc.), and interface 437 connects graphics acceleration module 446 to high-speed link 440.

[0114] In one implementation, the accelerator integrated circuit 436 provides cache management, memory access, context management, and interrupt management services on behalf of the multiple graphics processing engines 431, 432, N of the graphics acceleration module 446. The graphics processing engines 431, 432, N may each include a separate graphics processing unit (GPU). Alternatively, the graphics processing engines 431, 432, N may include different types of graphics processing engines within a GPU, such as, for example, a graphics execution unit, a media processing engine (e.g., a video encoder / decoder), a sampler, and a blit engine. In other words, the graphics acceleration module may be a GPU with multiple graphics processing engines 431-432, N, or the graphics processing engines 431-432, N may be separate GPUs integrated on a common package, line card, or chip.

[0115] 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 referred to as effective to real memory translation), and a memory access protocol for accessing the system memory 441. The MMU 439 may also include a translation lookaside buffer (TLB) (not shown) for caching virtual / effective to physical / real address translations. In one implementation, a cache 438 stores commands and data for efficient access by the graphics processing engines 431-432, N. In one embodiment, data stored in the cache 438 and the graphics memory 433-434, M is maintained coherently with the core caches 462A-462D, 456 and the system memory 411. As already mentioned, this may be achieved via a proxy circuit 425 which participates in the cache coherency mechanism on behalf of cache 438 and memories 433-434, M (e.g., sending updates to and receiving updates from cache 438 related to modifications / accesses of cache lines on processor caches 462A-462D, 456).

[0116] A set of registers 445 stores context data for threads executed by the graphics processing engines 431-432,N, and a context management circuit 448 manages thread contexts. For example, the context management circuit 448 may perform save and restore operations to save and restore the context of various threads during a context switch (e.g., a first thread is saved and a second thread is stored so that the second thread can be executed by the graphics processing engine). For example, in a context switch, the context management circuit 448 may store current register values ​​in a designated area in memory (e.g., identified by a context pointer). It may then restore the register values ​​when returning to the context. In one embodiment, an interrupt management circuit 447 receives and processes interrupts received from system devices.

[0117] In one implementation, virtual / effective addresses from the graphics processing engine 431 are translated by the MMU 439 to real / physical addresses in the system memory 411. One embodiment of the accelerator integrated circuit 436 supports multiple (e.g., 4, 8, 16) graphics accelerator modules 446 and / or other accelerator devices. The graphics accelerator modules 446 may be dedicated to a single application running on the processor 407 or may be shared among multiple applications. In one embodiment, a virtualized graphics execution environment is presented in which the resources of the graphics processing engines 431-432, N are shared with multiple applications or virtual machines (VMs). The resources may be subdivided into "slices" and these slices are allocated to different VMs and / or applications based on the processing requirements and priorities associated with the VMs and / or applications.

[0118] Thus, the accelerator integrated circuit acts as a bridge to the system for the graphics acceleration module 446, providing address translation and system memory caching services. Additionally, the accelerator integrated circuit 436 may provide virtualization functions to the host processor to manage the virtualization of the graphics processing engine, interrupts, and memory management.

[0119] The hardware resources of the graphics processing engines 431-432, N are explicitly mapped into the real address space seen by the host processor 407 so that any host processor can directly address these resources using effective address values. In one embodiment, one feature of the accelerator integrated circuit 436 is the physical separation of the graphics processing engines 431-432, N so that they appear to the system as independent units.

[0120] As previously mentioned, in the illustrated embodiment, one or more graphics memories 433-434, M are coupled to each of the graphics processing engines 431-432, N, respectively. The graphics memories 433-434, M store instructions and data being processed by each of the graphics processing engines 431-432, N. The graphics memories 433-434, M may be volatile memory, such as, for example, DRAM (including stacked DRAM), GDDR memory (e.g., GDDR5, GDDR6), or HBM, and / or may be non-volatile memory, such as, for example, 3D XPoint or Nano-Ram.

[0121] In one embodiment, to reduce data traffic over high speed link 440, biasing techniques are used to ensure that the data stored in graphics memories 433-434,M is data that will be used most frequently by graphics processing engines 431-432,N and preferably not (or at least not frequently) used by cores 460A-460D. Similarly, biasing mechanisms attempt to keep data needed by a core (preferably not a graphics processing engine 431-432,N) in the core's caches 462A-462D,456 and system memory 411.

[0122] 4C illustrates another embodiment in which accelerator integrated circuit 436 is integrated within processor 407. In this embodiment, graphics processing engines 431-432,N communicate directly to accelerator integrated circuit 436 over high-speed link 440 via interface 437 and interface 435 (again, these interfaces may utilize any type of bus or interface protocol). Accelerator integrated circuit 436 may perform the same operations as described for FIG. 4B, but may have higher throughput due to its proximity to coherency bus 464 and caches 462A-462D, 456.

[0123] One embodiment supports different programming models, including a dedicated process programming model (without graphics acceleration module virtualization) and a shared programming model (with virtualization), which may include a programming model controlled by the accelerator integrated circuit 436 and a programming model controlled by the graphics acceleration module 446.

[0124] In one embodiment of the dedicated process model, the graphics processing engines 431-432,N are dedicated to a single application or process under a single operating system. A single application can send other application requests to the graphics engines 431-432,N to provide virtualization within a VM / partition.

[0125] In a dedicated process programming model, the graphics processing engines 431-432, N may be shared among multiple VM / application partitions. The shared model requires a system hypervisor to virtualize the graphics processing engines 431-432, N to allow access by each operating system. In a single partition system without a hypervisor, the graphics processing engines 431-432, N are owned by the operating system. In both cases, the operating system can virtualize the graphics processing engines 431-432, N to provide access to each process or application.

[0126] In the case of a shared programming model, the graphics acceleration module 446 or the individual graphics processing engines 431-432 select a process element using a process handle. In one embodiment, the process element is stored in the system memory 411 and is addressable using the effective address to real address translation techniques described herein. The process handle may be an implementation-specific value provided to the host process when it registers its context with the graphics processing engines 431-432, N (i.e., when it calls the system software to add the process element to the linked list of process elements). The lower 16 bits of the process handle may be the offset of the process element in the linked list of process elements.

[0127] 4D illustrates an exemplary accelerator integration slice 490. As used herein, a "slice" includes a designated portion of the processing resources of an accelerator integrated circuit 436. An application effective address space 482 in the system memory 411 stores a process element 483. In one embodiment, the process element 483 is stored in response to a GPU call 481 from an application 480 executing on the processor 407. The process element 483 includes a processing state of the corresponding application 480. A work descriptor (WD) 484 included in the process element 483 can be a single job requested by the application or can include a pointer to a queue of jobs. In the latter case, the WD 484 is a pointer to a job request queue in the application's address space 482.

[0128] The graphics acceleration module 446 and / or the individual graphics processing engines 431-432, N can be shared by all or a subset of the processes in the system. Embodiments of the invention include an infrastructure for sending WD484 to the graphics acceleration module 446 to set processing state and initiate jobs in a virtualized environment.

[0129] In one implementation, the dedicated process programming model is implementation specific, in which a single process owns the graphics acceleration module 446 or a separate graphics processing engine 431. Because the graphics acceleration module 446 is owned by a single process, the hypervisor initializes the accelerator integrated circuit 436 of the owning partition, and the operating system initializes the accelerator integrated circuit 436 of the owning process when the graphics acceleration module 446 is allocated.

[0130] During operation, a WD fetch unit 491 in accelerator integration slice 490 fetches the next WD 484, which contains an index of work to be done by one of the graphics processing engines of graphics acceleration module 446. Data from the WD 484 is stored in register 445 and may be used by MMU 439, interrupt management circuitry 447, and / or context management circuitry 448, as shown. For example, one embodiment of MMU 439 includes segment / page walk circuitry for accessing segment / page table 486 in OS virtual address space 485. Interrupt management circuitry 447 may process interrupt events 492 received from graphics acceleration module 446. When performing graphics operations, effective addresses 493 generated by graphics processing engines 431-432,N are translated to real addresses by MMU 439.

[0131] In one embodiment, the same set of registers 445 may be replicated for each graphics processing engine 431-432,N and / or graphics acceleration module 446 and initialized by the hypervisor or operating system. Each of these replicated registers may be included in an accelerator integration slice 490. Exemplary registers that may be initialized by the hypervisor are shown in Table 1. [Table 1]

[0132] Exemplary registers that may be initialized by the operating system are shown in Table 2. [Table 2]

[0133] In one embodiment, each WD 484 is specific to a particular graphics acceleration module 446 and / or graphics processing engine 431-432, N. Each WD 484 contains all the information for each graphics processing engine 431-432, N needed to perform its work, or it can be a pointer to a memory location where the application has set up a command queue for work to be completed.

[0134] 4E shows further details of one embodiment of the sharing model. This embodiment includes a hypervisor real address space 498 in which a process element list 499 is stored. The hypervisor real address space 498 is accessible via a hypervisor 496, which virtualizes the graphics acceleration module engine of the operating system 495.

[0135] A shared programming model allows all or a subset of processes from all or a subset of the partitions in a system to use the graphics acceleration module 446. There are two programming models in which the graphics acceleration module 446 is shared by multiple processes and partitions: timeslice sharing and graphics-oriented sharing.

[0136] In this model, the system 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 by the system hypervisor 496, the graphics acceleration module 446 may comply with the following requirements: 1) the application's 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 application's job requests are guaranteed by the graphics acceleration module 446 to be completed within a specified time, including any transformation failures, or the graphics acceleration module 446 provides the ability to preempt the processing of jobs; and 3) the graphics acceleration module 446 must ensure fairness between processes when operating in a oriented sharing programming model.

[0137] In one embodiment, for the shared model, the application 480 is required to make a system call to the operating system 495 with the type of the graphics acceleration module 446, a working descriptor (WD), an authority mask register (AMR) value, and a context save / restore area pointer (CSRP). The type of the graphics acceleration module 446 indicates the target acceleration function of the system call. The type of the graphics acceleration module 446 can be a system specific value. The WD is formatted specifically for the graphics acceleration module 446 and can be in the form of a graphics acceleration module 446 command, an effective address pointer to a user defined type structure, an effective address pointer to a queue of commands, or any other data structure to describe the work done by the graphics acceleration module 446. In one embodiment, the AMR value is the AMR state to use for the current process. The value passed to the operating system is similar to the application setting the AMR. If the implementation of the accelerator integrated circuit 436 and the graphics acceleration module 446 does not support a user authority mask override register (UAMOR), the operating system may 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 authority mask override register (AMOR) value before placing the AMR in the process element 483. In one embodiment, the CSRP is one of the registers 445 that contains the effective address of an area in the application's 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 if the job is preempted. The context save / restore area may be pinned to system memory.

[0138] Upon receiving the system call, operating system 495 may verify that application 480 has registered and is authorized to use graphics acceleration module 446. Operating system 495 then calls hypervisor 496 with the information shown in Table 3. [Table 3]

[0139] Upon receiving the hypervisor call, the hypervisor 496 verifies that the operating system 495 has registered and authorized the use of the graphics acceleration module 446. The hypervisor 496 then places the process element 483 in a linked list of process elements of the corresponding graphics acceleration module 446 type. The process element may include the information shown in Table 4. [Table 4]

[0140] In one embodiment, the hypervisor initializes registers 445 of multiple accelerator integration slices 490.

[0141] As illustrated in FIG. 4F, one embodiment of the present invention uses a unified memory addressable via a common virtual memory address space that is used to access the physical processor memories 401-402 and the GPU memories 420-423. In this implementation, operations performed on the GPUs 410-413 utilize the same virtual / effective memory address space to access the processor memories 401-402 and vice versa, simplifying programmability. In one embodiment, a first portion of the virtual / effective address space is assigned to the processor memory 401, a second portion to the second processor memory 402, a third portion to the GPU memory 420, and so on. This allows the entire virtual / effective memory space (sometimes referred to as the effective address space) to be distributed across each of the processor memories 401-402 and the GPU memories 420-423, allowing any processor or GPU to access any physical memory with virtual addresses mapped to that memory.

[0142] In one embodiment, bias / coherence management circuits 494A-494E within one or more of MMUs 439A-439E ensure cache coherence between the caches of a host processor (e.g., 405) and the GPUs 410-413, and also implement biasing techniques to indicate the physical memory in which particular types of data should be stored. Although multiple instances of bias / coherence management circuits 494A-494E are shown in FIG. 4F, the bias / coherence circuits may be implemented within the MMUs of one or more host processors 405 and / or within accelerator integrated circuits 436.

[0143] One embodiment allows the GPU-attached memory 420-423 to be mapped as part of system memory and accessed using shared virtual memory (SVM) techniques, but without experiencing the typical performance drawbacks associated with full system cache coherence. The ability of the GPU-attached memory 420-423 to be accessed as system memory without the burdensome cache coherence overhead provides a beneficial operating environment for GPU offload. This arrangement allows the host processor 405 software to set operands and access computation results without the overhead of traditional I / O DMA data copies. Such traditional copies include driver calls, interrupts, and memory-mapped I / O (MMIO) accesses, all of which are inefficient for simple memory accesses. At the same time, the ability to access the GPU-attached memory 420-423 without cache coherence overhead can be critical to the execution time of the offloaded computations. For example, in the presence of a large amount of streaming write memory traffic, cache coherence overhead can significantly reduce the effective write bandwidth seen by the GPUs 410-413. The efficiency of operand setup, the efficiency of result access, and the efficiency of GPU computation all play important roles in determining the effectiveness of GPU offloading.

[0144] 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 that may be a page-granular structure (i.e., controlled at the granularity of a memory page) that includes one or two bits per GPU-attached memory page. The bias table may be implemented in stolen memory ranges of one or more GPU-attached memories 420-423, with or without a bias cache in the GPUs 410-413 (e.g., to cache frequently / recently used entries of the bias table). Alternatively, the entire bias table may be maintained within the GPU.

[0145] In one implementation, the bias table entry associated with each access to the GPU attached memory 420-423 is accessed before the actual access to the GPU memory, resulting in the following operations: First, local requests from the GPUs 410-413 to find these pages in the GPU bias are forwarded directly to the corresponding GPU memory 420-423. Local requests from the GPUs to find these pages in the host bias are forwarded to the processor 405 (e.g., via the high-speed link discussed above). In one embodiment, a request from the processor 405 to find the requested page in the host processor bias completes the request similar to a normal memory read. Alternatively, a request for a GPU bias page may be forwarded to the GPU 410-413. If the GPU is not currently using the page, it may then migrate the page to the host processor bias.

[0146] The bias state of a page can be changed either by a software-based mechanism, a hardware-assisted software-based mechanism, or, in a limited set of cases, a purely hardware-based mechanism.

[0147] One mechanism for changing the bias state is to use an API call (e.g., OpenCL, etc.) that in turn calls the GPU's device driver, which in turn sends a message (or enqueues a command descriptor) to the GPU instructing it to change the bias state and, in some transitions, perform a cache flush operation on the host. A cache flush operation is required to transition from host processor 405 bias to GPU bias, but not the opposite transition.

[0148] In one embodiment, cache coherency is maintained by making the GPU bias pages temporarily non-cacheable by the host processor 405. To access these pages, the processor 405 may request access from the GPU 410, which may or may not immediately grant the access, depending on the implementation. Thus, to reduce communication between the host processor 405 and the GPU 410, it is beneficial to ensure that the GPU bias pages are those that are needed by the GPU but not by the host processor 405, and vice versa. Graphics Processing Pipeline

[0149] FIG. 5 illustrates a graphics processing pipeline 500, according to one embodiment. In one embodiment, a graphics processor may implement the illustrated graphics processing pipeline 500. The graphics processor may be included within a parallel processing subsystem as described herein, such as, for example, parallel processor 200 of FIG. 2A, which in one embodiment is a variation of parallel processor 112 of FIG. 1. Various parallel processing systems may implement the graphics processing pipeline 500 via one or more instances of parallel processing units (e.g., parallel processing units 202 of FIG. 2A), as described herein. For example, a shader unit (e.g., graphics multiprocessor 234 of FIG. 2C) may be configured to perform one or more functions 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 data assembler 502, primitive assemblers 506, 514, 518, tessellation unit 510, rasterizer 522, and raster operation unit 526 may also be performed by other processing engines within a processing cluster (e.g., processing cluster 214 of FIG. 2A) and corresponding partition unit (e.g., partition units 220A-220N of FIG. 2A). Graphics processing pipeline 500 may also be implemented using dedicated processing units for one or more functions. In one embodiment, one or more portions of graphics processing pipeline 500 may be performed by parallel processing logic within a general-purpose processor (e.g., CPU). In one embodiment, one or more portions of graphics processing pipeline 500 may access on-chip memory (e.g., parallel processor memory 222 as in FIG. 2A) via memory interface 528, which may be an instance of memory interface 218 of FIG. 2A.

[0150] 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 runs vertex shader programs and lights and transforms the vertex data specified by the vertex shader programs. Vertex processing unit 504 can be programmed to read data stored in cache, local, or system memory and transform the vertex data from an object-based coordinate representation to a world space coordinate space or a standardized device coordinate space for use in processing the vertex data.

[0151] A first instance of primitive assembler 506 receives vertex attributes from vertex processing unit 504. Primitive assembler 506 reads stored vertex attributes as needed and constructs graphics primitives for processing by tessellation control processing unit 508. Graphics primitives include triangles, lines, points, patches, etc., and are supported by a variety of graphics processing application programming interfaces (APIs).

[0152] The tessellation control processing unit 508 treats the input vertices as control points of a geometric patch. The control points are converted from an input representation from the patch (e.g., the base of the patch) to a representation suitable for use in surface evaluation by the tessellation evaluation processing unit 512. The tessellation control processing unit 508 can also calculate tessellation factors for the edges of the geometric patch. The tessellation factor is applied to a single edge to quantify a display dependent level of detail associated with the edge. The tessellation unit 510 is configured to receive the tessellation factor for the edges of the patch and tessellate the patch into multiple geometric primitives, such as, for example, line, triangle, or quadrilateral primitives, which are sent to the tessellation evaluation processing unit 512. The tessellation evaluation processing unit 512 operates on the parameterized coordinates of the subdivided patch to generate a surface representation and vertex attributes for each vertex associated with the geometric primitive.

[0153] The second instance of primitive assembler 514 receives vertex attributes from tessellation evaluation processing unit 512, reads stored vertex attributes as necessary, and constructs graphics primitives for processing by geometry processing unit 516. Geometry processing unit 516 is a programmable execution unit that executes geometry shader programs and transforms the graphics primitives received from primitive assembler 514 as specified by the geometry shader programs. In one embodiment, geometry processing unit 516 is programmed to subdivide the graphics primitives into one or more new graphics primitives and calculate parameters used to rasterize the new graphics primitives.

[0154] In some embodiments, geometry processing unit 516 can add or remove elements in the geometry stream. Geometry processing unit 516 outputs parameters and vertices that specify new graphics primitives to primitive assembler 518. Primitive assembler 518 receives parameters and vertices from geometry processing unit 516 and builds graphics primitives for processing by viewport scale, cull, and clip unit 520. Geometry processing unit 516 reads data stored in parallel processor memory or system memory for use in processing the geometry data. Viewport scale, cull, and clip unit 520 performs clipping, culling, and viewport scaling and outputs processed graphics primitives to rasterizer 522.

[0155] Rasterizer 522 may perform depth sculling and other depth-based optimizations. Rasterizer 522 also performs scan conversion on new graphics primitives to generate fragments and outputs the fragments and associated coverage data to fragment / pixel processing unit 524. Fragment / pixel processing unit 524 is a programmable execution unit configured to execute a fragment shader program or a pixel shader program. Fragment / pixel processing unit 524 transforms fragments or pixels received from rasterizer 522 as specified by the fragment or pixel shader program. For example, fragment / pixel processing unit 524 may be programmed to perform operations including, but not limited to, texture mapping, shading, blending, texture correction, and perspective correction to generate shaded fragments or pixels that are output to raster operation unit 526. Fragment / pixel processing unit 524 may read data stored in either parallel processor memory or system memory for use when processing fragment data. The fragment or pixel shader programs may be configured to shade at a sample, pixel, tile, or other granularity, depending on the sampling rate configured on the processing unit.

[0156] Raster operation unit 526 is a processing unit that performs raster operations, including but not limited to stencil, z-test, blending, etc., and outputs pixel data as processed graphics data to be stored in a graphics memory (e.g., parallel processor memory 222 as in FIG. 2A and / or system memory 104 as in FIG. 1), displayed on one or more display devices 110, or further processed by one of one or more processors 102 or parallel processors 112. In some embodiments, raster operation unit 526 is configured to compress z or color data being written to memory and decompress z or color data being read from memory. [Machine Learning Overview]

[0157] The above architectures can be applied to perform training and inference operations using machine learning models. Machine learning has been successful in solving many types of tasks. The operations that occur when training and using machine learning algorithms (e.g., neural networks) are inherently amenable to efficient parallel implementation. Thus, parallel processors, such as general purpose graphic processing units (GPGPUs), have played an important role in practical implementation of deep neural networks. Parallel graphic processors with single instruction, multiple threads (SIMT) architecture are designed to maximize the amount of parallelism in the graphic pipeline. In a SIMT architecture, a group of parallel threads attempts to synchronously execute the instructions of a program together as simultaneously as possible to increase processing efficiency. The efficiency provided by the implementation of parallel machine learning algorithms enables the use of high capacity networks, enabling them to be trained on larger datasets.

[0158] Machine learning algorithms are algorithms that can learn based on a set of data. Embodiments of machine learning algorithms can be designed to model high-level abstractions within a dataset. 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 for a given input. A pattern recognition algorithm can be used to generate converted text or perform text-to-speech conversion and / or speech recognition.

[0159] An exemplary type of machine learning algorithm is a neural network. There are many types of neural networks. A simple type of neural network is a feedforward network. A feedforward network may be implemented as an acyclic graph with nodes arranged in layers. Typically, a feedforward network topology includes an input layer and an output layer separated by at least one hidden layer. The hidden layer converts the inputs received by the input layer into a representation useful for generating outputs at the output layer. The network nodes are fully connected via edges to the nodes of adjacent layers, but there are no edges between the nodes within each layer. Data received at the nodes of the input layer of a feedforward network is propagated (i.e., "feed 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 the coefficients ("weights") respectively associated with each edge connecting the layers. Depending on the particular model represented by the algorithm being executed, the output from a neural network algorithm can take a variety of forms.

[0160] Before a machine learning algorithm can be used to model a particular problem, the algorithm is trained using a training dataset. Training a neural network involves selecting a network topology using a set of training data representative of the problem being modeled by the network, and adjusting weights until the network model runs with minimal error for all instances of the training dataset. For example, during a supervised learning training process for a neural network, outputs generated by the network in response to inputs representing instances in the training dataset are compared with outputs classified as "correct" for that instance, an error signal representing the difference between the output and the classified output is calculated, and weights associated with the connections are adjusted to minimize the error as the error signal propagates backwards through the layers of the network. The network is considered "trained" if the error is minimized for each output generated from an instance of the training dataset.

[0161] The accuracy of machine learning algorithms can be greatly affected by the quality of the data set used to train the algorithm. The training process can be computationally intensive and can require a significant amount of time on a conventional general-purpose processor. Therefore, parallel processing hardware is used to train many types of machine learning algorithms. This is particularly useful for optimizing the training of neural networks, since the operations performed in adjusting the coefficients of a neural network are inherently suited to parallel implementation. In particular, many machine learning algorithms and software applications are adapted to take advantage of parallel processing hardware in general-purpose graphics processing devices.

[0162] 6 is a generalized diagram of a machine learning software stack 600. A machine learning application 602 can be configured to train a neural network using a training dataset or to implement machine intelligence using a trained deep neural network. The machine learning application 602 can include training and inference functions for the neural network and / or specialized software that can be used to train the neural network prior to deployment. The machine learning application 602 can 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.

[0163] Hardware acceleration of the machine learning application 602 can be enabled through the machine learning framework 604. The machine learning framework 604 can provide a library of machine learning primitives. Machine learning primitives are basic operations typically performed by machine learning algorithms. Without the machine learning framework 604, a developer of a machine learning algorithm would be required to create and optimize the main computational logic associated with the machine learning algorithm, and then reoptimize the computational logic when new parallel processors are developed. Instead, a machine learning application can be configured to perform the necessary operations using primitives provided by the machine learning framework 604. Exemplary primitives include tensor convolution, activation functions, and pooling. These are computational operations performed during the training of a convolutional neural network (CNN). The machine learning framework 604 can also provide primitives for implementing basic linear algebra subprograms performed by many machine learning algorithms, such as matrix and vector operations.

[0164] The machine learning framework 604 can process input data received from the machine learning application 602 and generate appropriate inputs to the computation framework 606. The computation framework 606 can abstract the underlying instructions provided to the GPGPU driver 608 to enable the machine learning framework 604 to leverage hardware acceleration via the GPGPU hardware 610 without requiring the machine learning framework 604 to have detailed knowledge of the architecture of the GPGPU hardware 610. Furthermore, the computation framework 606 can enable hardware acceleration of the machine learning framework 604 across different types and generations of GPGPU hardware 610. [GPGPU Machine Learning Acceleration]

[0165] 7 illustrates a general purpose graphics processing unit 700, according to one embodiment. In one embodiment, the general purpose processing unit (GPGPU) 700 can be configured to be particularly efficient at processing computational workloads of the type associated with training deep neural networks. Furthermore, the GPGPU 700 can be directly linked to other instances of GPGPUs to create multi-GPU clusters, particularly to improve the speed of training deep neural networks.

[0166] The GPGPU 700 includes a host interface 702 to allow connection to a host processor. In one embodiment, the host interface 702 is a PCI Express interface. However, the host interface can also be a vendor-specific communication interface or fabric. The GPGPU 700 receives commands from the host processor and distributes execution threads associated with those commands to a set of compute clusters 706A-706H using a global scheduler 704. The compute clusters 706A-706H share a cache memory 708. The cache memory 708 can act as a higher level cache for the cache memories in the compute clusters 706A-706H.

[0167] The GPGPU 700 includes memories 714A-B coupled to the compute clusters 706A-H via a set of memory controllers 712A-B. In various embodiments, the memories 714A-B can include various types of memory devices including dynamic random access memory (DRAM) or graphic random access memory such as synchronous graphic random access memory (SGRAM) including, for example, graphic double data rate (GDDR) memory. In one embodiment, the memories 714A-N can also include 3D stacked memory including, but not limited to, high bandwidth memory (HBM).

[0168] In one embodiment, each of the compute clusters 706A-H includes a set of graphics multiprocessors, such as, for example, graphics multiprocessor 400 of FIG. 4A. The graphics multiprocessors of a compute cluster include multiple types of integer and floating point logic units capable of performing computational operations with a range of precision, including those suitable for machine learning computations. For example, in one embodiment, at least a subset of the floating point units in each of the compute clusters 706A-H may be configured to perform 16-bit or 32-bit floating point operations, while a different subset of the floating point units may be configured to perform 64-bit floating point operations.

[0169] Multiple instances of GPGPU 700 can be configured to operate as a compute cluster. The communication mechanisms used by the compute cluster for synchronization and data exchange vary across embodiments. In one embodiment, multiple instances of GPGPU 700 communicate via host interface 702. In one embodiment, GPGPU 700 includes an I / O hub 709 that couples GPGPU 700 with GPU link 710 that allows direct connection to other instances of GPGPU. In one embodiment, GPU link 710 is coupled to a dedicated GPU-to-GPU bridge that enables communication and synchronization between multiple instances of GPGPU 700. In one embodiment, GPU link 710 couples with a high-speed interconnect to send and receive data to other GPGPUs or parallel processors. In one embodiment, multiple instances of GPGPU 700 communicate via a network device located in separate data processing systems and accessible via host interface 702. In one embodiment, GPU link 710 can be configured to allow connection to a host processor in addition to or instead of host interface 702.

[0170] While the illustrated configuration of GPGPU 700 may be configured to train a neural network, one embodiment provides an alternative configuration of GPGPU 700 that may be configured to be deployed in a high performance or low power inference platform. In the inference configuration, GPGPU 700 includes fewer compute clusters 706A-706H relative to the training configuration. Additionally, the memory technology associated with memories 714A-714B may differ between the inference and training configurations. In one embodiment, the inference configuration of GPGPU 700 may support inference specific instructions. For example, the inference configuration may provide support for one or more 8-bit integer dot product instructions that are commonly used during inference operations of deployed neural networks.

[0171] FIG. 8 illustrates a multi-GPU computing system 800, according to one embodiment. The multi-GPU computing system 800 may include a processor 802 coupled to a plurality of GPGPUs 806A-806D via a host interface switch 804. In one embodiment, the host interface switch 804 is a PCI Express switch device that couples the processor 802 to a PCI Express bus through which the processor 802 can communicate with the set of GPGPUs 806A-806D. Each of the plurality of GPGPUs 806A-806D may be an instance of the GPGPU 700 of FIG. 7. The GPGPUs 806A-806D may be interconnected via GPU links 816 from a set of high-speed point-to-point GPUs. The high-speed inter-GPU links may be connected to each of the GPGPUs 806A-806D via dedicated GPU links, such as, for example, GPU links 710 as in FIG. 7. The P2P GPU links 816 allow direct communication between each of the GPGPUs 806A-806D without requiring communication through the host interface bus to which the processor 802 is connected. Inter-GPU traffic on the P2P GPU links allows the host interface bus to remain available for system memory access or for communicating with other instances of the multi-GPU computing system 800, for example, via one or more network devices. In the illustrated embodiment, the GPGPUs 806A-D connect to the processor 802 through the host interface switch 804, although in one embodiment, the processor 802 includes direct support for the P2P GPU links 816 and can connect directly to the GPGPUs 806A-806D. [Implementation of machine learning neural network]

[0172] The computing architecture provided by the embodiments described herein can be configured to perform a type of parallel processing that is particularly suitable for training and deploying neural networks for machine learning. A neural network can be generalized as a network of functions with graph relationships. As known in the art, there are various types of neural network implementations used in machine learning. One exemplary type of neural network is a feedforward network, as previously described.

[0173] A second exemplary type of neural network is the Convolutional Neural Network (CNN). CNNs are feed-forward neural networks dedicated to processing data with a known grid-like topology, such as image data. Thus, CNNs are commonly used in vision computing or image recognition applications, but they can also be used for other types of pattern recognition, such as speech and language processing. The nodes of the CNN input layer are organized into a set of "filters" (feature detectors inspired by the receptive fields found in the retina), and the output of each filter set is propagated to the nodes of successive layers of the network. The operation of a CNN involves applying a convolutional mathematical operation to each filter to generate the output of that filter. Convolution is a dedicated type of mathematical operation performed by two functions to generate a third function, which is a modified version of one of the two original functions. In convolutional network terminology, the first function into the convolution can be referred to as the input, while the second function can be referred to as the convolution kernel. The output can be referred to as a feature map. For example, the input to a convolutional layer can be a multidimensional array of data that defines the various color components of the input image, and the convolution kernel can be a multidimensional array of parameters, which are adapted by a neural network training process.

[0174] Recurrent neural networks (RNNs) are a family of feedforward neural networks that contain feedback connections between layers. RNNs enable modeling of sequential data by sharing parameter data across different parts of the neural network. The architecture of an RNN contains cycles. A cycle represents the effect of a variable's current value at a future time on its own value, as at least a portion of the output data from the RNN is used as feedback to process subsequent inputs in turn. This feature makes RNNs particularly useful for language processing due to the variability with which language data can be constructed.

[0175] The figures currently described below present exemplary feedforward, CNN, and RNN networks and explain the general process for training and deploying each of these types of networks, respectively. It will be understood that these descriptions are illustrative and not limiting with respect to any particular embodiment described herein, and that the illustrated concepts may be generally applied to deep neural networks and machine learning techniques in general.

[0176] The above exemplary neural network can be used to perform deep learning. Deep learning is machine learning using deep neural networks. Deep neural networks used in deep learning are artificial neural networks that are composed of multiple hidden layers, unlike shallow neural networks that contain only a single hidden layer. Deeper neural networks are generally more computationally intensive to train. However, the additional hidden layers of the network enable multi-step pattern recognition that reduces output error relative to shallow machine learning techniques.

[0177] Deep neural networks used in deep learning typically include a front-end network that performs feature recognition coupled to a back-end network that represents a mathematical model that can perform operations (e.g., object classification, speech recognition, etc.) based on feature representations provided to the model. Deep learning allows machine learning to be performed without requiring hand-crafted feature engineering to be performed on the model. Instead, deep neural networks can learn features based on statistical structures or correlations in the input data. The learned features can be provided to a mathematical model that can map the detected features to an output. The mathematical model used by the network is generally specialized for the particular task being performed, and different models will be used to perform different tasks.

[0178] Once a neural network is constructed, a learning model can be applied to the network to train the network to perform a specific task. The learning model describes how to adjust the weights in the model to reduce the network's output error. Backpropagation of errors is a common method used to train neural networks. Input vectors are 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. The error values ​​are then propagated backwards until each neuron has an associated error value that roughly represents its contribution to the original output. The network can then learn from these errors using an algorithm such as, for example, a stochastic gradient descent algorithm to update the neural network weights.

[0179] 9A-9B show an exemplary convolutional neural network. FIG. 9A shows various layers within a CNN. As shown in FIG. 9A, an exemplary CNN used to model image processing can receive an input 902 describing the red, green, and blue (RGB) components of an input image. The input 902 can be processed by multiple convolutional layers (e.g., convolutional layer 904, convolutional layer 906). The output from the multiple convolutional layers can optionally be processed by a set of fully connected layers 908. The neurons of the fully connected layers fully connect to all activations of the previous layer, as previously described in the feedforward network. The output from the fully connected layers 908 can be used to generate an output result from the network. The activations in the fully connected layers 908 can be calculated using matrix multiplication instead of convolutions. Not all CNN implementations utilize fully connected layers 908. For example, in some implementations, the convolutional layers 906 can generate the output of the CNN.

[0180] Convolutional layers are sparsely connected and differ from traditional neural network configurations found in fully connected layers 908. Traditional neural network layers are fully connected, so every output unit interacts with every input unit. However, as shown, convolutional layers are sparsely connected because the output of the convolution of the field (instead of the respective state values ​​of each node in the field) is input to the nodes of the subsequent layer. The kernels associated with the convolutional layers perform the convolution operation, and the output is sent to the next layer. The dimensionality reduction performed within the convolutional layers is one aspect that allows CNNs to scale and process large images.

[0181] 9B shows exemplary computational steps within a convolutional layer of a CNN. An input to the convolutional layer 912 of a CNN can be processed in three stages in the convolutional layer 914. The three stages can include a convolution stage 916, a detection stage 918, and a pooling stage 920. The convolutional layer 914 can then output data to successive convolutional layers. The final convolutional layer of the network can generate output feature map data or provide input to a fully connected layer, for example, to generate a classification value for the input to the CNN.

[0182] The convolution stage 916 performs several convolutions in parallel to generate a set of linear activations. The convolution stage 916 can include an affine transformation, which is any transformation that can be specified as a linear transformation plus a translation. Affine transformations include rotation, translation, scaling, and combinations of these transformations. The convolution stage calculates the output of a function (e.g., a neuron) that is connected to a unique region in the input. This can be determined as a local region associated with the neuron. The neuron calculates a dot product between the neuron's weight and the region of the local input to which the neuron is connected. The output from the convolution stage 916 defines a set of linear activations that are processed by successive stages of the convolution layer 914.

[0183] The linear activations can be processed by a detection stage 918, where each linear activation is processed by a nonlinear activation function. The nonlinear activation function enhances the nonlinear nature of the entire network without affecting the receptive fields of the convolutional layers. Several types of nonlinear activation functions can be used. One particular type is the rectified linear unit (ReLU), which uses an activation function defined as f(x)=max(0,x), so that the activations are thresholded at zero.

[0184] The pooling stage 920 uses a pooling function that replaces the output of the convolutional layer 906 with a summary statistic of nearby outputs. The pooling function can be used to introduce translation invariance to the neural network, so that small translations to the input do not change the pooled output. Invariance to local translations can be useful in scenarios where the presence of a feature in the input data is more important than the exact location of the feature. Various types of pooling functions can be used during the pooling stage 920, including max pooling, average pooling, and l2-norm pooling. Furthermore, some CNN implementations do not include a pooling stage. Instead, such implementations substitute an additional convolution stage with an increased stride relative to the preceding convolution stage.

[0185] The output from the convolutional layer 914 may then be processed by a next layer 922, which may be an additional convolutional layer or one of the fully connected layers 908. For example, the first convolutional layer 904 in FIG. 9A may output to a second convolutional layer 906, which in turn may output to the first layer of the fully connected layers 908.

[0186] FIG. 10 illustrates an exemplary recurrent neural network 1000. In a recurrent neural network (RNN), the previous state of the network influences the output of the current state of the network. RNNs can be constructed in a variety of ways using a variety of functions. The use of RNNs generally revolves around using mathematical models to predict the future based on a previous series of inputs. For example, RNNs can be used to perform statistical language modeling and predict the next word given a previous series of words. The illustrated RNN 1000 can be described as having an input layer 1002 that receives input vectors, a hidden layer 1004 to implement a recurrent function, a feedback mechanism 1005 enabling a "memory" of previous states, and an output layer 1006 to output results. The RNN 1000 operates based on time steps. The state of the RNN at a given time step is influenced based on the previous time step via the feedback mechanism 1005. For a given time step, the state of the hidden layer 1004 is dictated by the previous state and the input at the current time step. An initial input (x1) at a first time step can be processed by the hidden layer 1004. A second input (x2) can be processed by the hidden layer 1004 using state information determined during the processing of the initial input (x1). A given state can be s t =f(Ux t +Ws t-1 ) where U and W are parameter matrices. The function f is typically a nonlinearity, such as, for example, the hyperbolic tangent function (Tanh), or a variation of the rectifier function f(x)=max(0,x). However, the particular mathematical function used in the hidden layer 1004 can vary depending on the details of a particular implementation of the RNN 1000.

[0187] In addition to the basic CNN and RNN networks described, modifications of these networks may be useful. One exemplary RNN variant is the Long Short-Term Memory (LSTM) RNN. LSTM RNNs can learn long-term dependencies that may be necessary to process longer sequences of language. A variant of CNN is the Convolutional Deep Belief Network, which has a similar structure to CNNs and is trained in a similar manner to deep belief networks. Deep Belief Networks (DBNs) are generative neural networks that consist of multiple layers of random (random) variables. DBNs can be trained layer-by-layer using greedy unsupervised learning. The learned weights of the DBN can then be used to provide a pre-trained neural network by determining an optimal initial set of weights for the neural network.

[0188] FIG. 11 illustrates the training and deployment of deep neural networks. Once a network is constructed for a given task, the neural network is trained using a training dataset 1102. To enable hardware acceleration of the training process, various training frameworks 1104 have been developed. For example, the machine learning framework 604 of FIG. 6 may be configured as a training framework 604. The training framework 604 may be connected to an untrained neural network 1106, allowing the untrained neural net to be trained using parallel processing resources as described herein to generate a trained neural net 1108.

[0189] To begin the training process, initial weights can be selected randomly or by pre-training using a deep belief network. Training cycles are then performed in either a supervised or unsupervised manner.

[0190] Supervised learning is a learning method in which training is performed as an intervention, for example when a training data set 1102 includes inputs that are combined with desired outputs, or when a training data set includes inputs with known outputs and outputs of a neural network, and the network's outputs are manually graded. The network processes the inputs and compares the resulting outputs against a set of expected or desired outputs. Errors are then propagated back through the system. The training framework 1104 can be adjusted to adjust the weights that control the untrained neural network 1106. The training framework 1104 can provide tools to monitor how well the untrained neural network 1106 is converging to a model suitable for generating correct answers based on known input data. Once the network weights have been adjusted to improve the outputs generated by the neural network, the training process is repeated. The training process can continue until the neural network reaches a desired statistical accuracy associated with the trained neural net 1108. The trained neural network 1108 can then be deployed to implement any number of machine learning operations to generate inference results 1114 based on the input of new data 1112.

[0191] Unsupervised learning is a learning method in which a network attempts to train itself using unlabeled data. Thus, in the case of unsupervised learning, the training data set 1102 would include input data without any associated output data. The untrained neural network 1106 can learn groupings within the unlabeled inputs and determine how individual inputs are associated with the entire data set. Unsupervised training can be used to generate self-organizing maps. Self-organizing maps are a type of trained neural network 1108 that can perform operations that are useful for reducing the dimensionality of data. Unsupervised training can also be used to perform anomaly detection. This allows for the identification of data points within the input data set that deviate from the normal patterns of the data.

[0192] Variations of supervised and unsupervised training can also be used. Semi-supervised learning is a technique in which the training data set 1102 contains a mixture of labeled and unlabeled data of the same variance. Incremental learning is a variation of supervised learning in which input data is successively used to further train the model. Incremental learning allows the trained neural network 1108 to adapt to new data 1112 without forgetting the knowledge pumped into the network during initial training.

[0193] The training process, especially of deep neural networks, whether supervised or unsupervised, can be very computationally intensive for a single computational node. Instead of using a single computational node, a distributed network of computational nodes can be used to accelerate the training process.

[0194] 12 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 neural networks. Each distributed computing node may include one or more host processors and one or more general-purpose processing nodes, such as the highly parallel general-purpose graphics processing unit 700 in FIG. 7. As shown, distributed learning can be performed with model parallelism 1202, data parallelism 1204, or a combination of model and data parallelism 1204.

[0195] In model parallelism 1202, different computational nodes of a distributed system can perform training operations 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. Advantages of model parallelism include the ability to scale to particularly large models. Splitting up the operations associated with different layers of a neural network allows for the training of very large neural networks where all the layer weights would not fit into the memory of a single computational node. In some examples, model parallelism can be particularly useful in performing unsupervised training of large neural networks.

[0196] In data parallelism 1204, different nodes of the distributed network have a complete instance of the model, and each node receives a different portion of the data. The results from the different nodes are then combined. Different approaches to data parallelism are possible, but all data parallel training approaches require techniques to combine the results and synchronize the model parameters between each node. Exemplary approaches to data combination include parameter averaging and update-based data parallelism. Parameter averaging trains each node on a subset of the training data and sets the global parameters (e.g., weights, biases) to the average of each node's parameters. Parameter averaging uses a central parameter server that maintains the parameter data. Update-based data parallelism is similar to parameter averaging, except that instead of transferring parameters from nodes to a parameter server, updates to the model are transferred. Additionally, update-based data parallelism can be performed in a distributed manner where updates are compressed and transferred between nodes.

[0197] The combined model and data parallelism 1206 can be implemented, for example, in a distributed system where each computational node contains multiple GPUs. Each node can have a complete instance of the model, and separate GPUs within each node are used to train different parts of the model.

[0198] Distributed training incurs increased overhead relative to training on a single machine, but the parallel processors and GPGPUs described herein can each implement various techniques to reduce the overhead of distributed training, including techniques to enable high-bandwidth inter-GPU data transfers and accelerated remote data synchronization. [Example machine learning application]

[0199] Machine learning can be applied to solve a variety of technical problems, including, but not limited to, computer vision, autonomous driving and navigation, speech recognition, and language processing. Computer vision has traditionally been one of the most active research areas for machine learning applications. Applications of computer vision range from reproducing human visual capabilities, such as recognizing faces, to creating new categories of visual capabilities. For example, a computer vision application can be configured to recognize sound waves from vibrations caused by objects visible in a video. Parallel processor-accelerated machine learning allows computer vision applications to be trained using much larger training datasets than was previously feasible, and allows inference systems to be deployed using low-power parallel processors.

[0200] Parallel processor accelerated machine learning has applications in autonomous driving, including lane and road sign recognition, obstacle avoidance, navigation, and driving control. Accelerated machine learning techniques can be used to train driving models based on data sets that define appropriate responses to specific training inputs. The parallel processors described herein can enable rapid training of increasingly complex neural networks used in autonomous driving solutions, enabling the deployment of low-power inference processors on mobile platforms suitable for integration into autonomous vehicles.

[0201] Parallel processor accelerated deep neural networks have enabled a machine learning approach to automatic speech recognition (ASR). ASR involves creating a function that calculates the most likely linguistic sequence given an input acoustic sequence. Accelerated machine learning using deep neural networks has enabled the replacement of hidden Markov models (HMMs) and Gaussian mixture models (GMMs) that were already used for ASR.

[0202] Parallel processor-accelerated machine learning can also be used to accelerate natural language processing. Automated learning procedures can utilize statistical inference algorithms to generate models that are robust to erroneous or unfamiliar inputs. Exemplary natural language processor applications include automatic machine translation between human languages.

[0203] Parallel processing platforms used for machine learning can be divided into training platforms and deployment platforms. Training platforms are generally highly parallel and include optimizations to accelerate multi-GPU single-node training and multi-node, multi-GPU training. Exemplary parallel processors suitable for training include the general-purpose graphics processing unit 700 of FIG. 7 and the multi-GPU computing system 800 of FIG. 8. Instead, deployed machine learning platforms generally include low-power parallel processors suitable for use in products such as cameras, autonomous robots, and autonomous vehicles.

[0204] FIG. 13 illustrates an exemplary inference system-on-chip (SOC) 1300 suitable for performing inference using a trained model. The SOC 1300 can integrate processing components including a media processor 1302, a vision processor 1304, a GPGPU 1306, and a multi-core processor 1308. The SOC 1300 can further include an on-chip memory 1305 that can enable a shared on-chip data pool accessible by each of the processing components. The processing components can be optimized for low-power operation, enabling deployment in a variety of machine learning platforms, including autonomous vehicles and autonomous robots. For example, an implementation of the SOC 1300 can be used as part of the main control system of an autonomous vehicle. When the SOC 1300 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.

[0205] In operation, the media processor 1302 and the vision processor 1304 can operate simultaneously to accelerate computer vision operations. The media processor 1302 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 1305. The vision processor 1304 can then analyze the decoded video and perform pre-processing operations on frames of the decoded video in preparation for processing the frames using a trained image recognition model. For example, the vision processor 1304 can accelerate convolution operations for a CNN used to perform image recognition on high resolution video data, while back-end model operations are performed by the GPGPU 1306.

[0206] The multicore processor 1308 may include control logic that assists in sequencing and synchronization of data transfer and shared memory operations performed by the media processor 1302 and the vision processor 1304. The multicore processor 1308 may also function as an application processor for executing software applications that may utilize the inference computation capabilities of the GPGPU 1306. For example, at least a portion of the navigation and driving logic may be implemented in software that runs on the multicore processor 1308. Such software may issue computational workloads directly to the GPGPU 1306, or computational workloads may be issued to the multicore processor 1308, which may offload at least a portion of these operations to the GPGPU 1306.

[0207] GPGPU 1306 may include a compute cluster, such as, for example, a low power configuration of compute clusters 706A-706H in general purpose graphics processing unit 700. The compute cluster in GPGPU 1306 may support instructions specifically optimized to perform inference operations on trained neural networks. For example, GPGPU 1306 may support instructions for performing low precision operations, such as, for example, 8-bit and 4-bit integer vector operations. [System Overview]

[0208] 14 is a block diagram of a processing system 1400, according to one embodiment. System 1400 may be used in a single processor desktop system, a multiprocessor workstation system, or a server system having multiple processors 1402 or processor cores 1407. In one embodiment, system 1400 is a processing platform integrated into a system-on-chip (SoC) integrated circuit for use in mobile, handheld, or embedded devices, such as in Internet of Things (IoT) devices with wired or wireless connectivity to local or wide area networks.

[0209] In one embodiment, the system 1400 can include, couple to, or be integrated with a server-based gaming platform, a gaming console, including a game and media console, a mobile gaming console, a handheld gaming console, or an online gaming console. In some embodiments, the system 1400 is part of a mobile internet-connected device, such as a mobile phone, a smart phone, a tablet computing device, or a laptop, for example, with low internal storage capacity. The processing system 1400 can also include, couple to, or be integrated with a wearable device, such as, for example, a smart watch wearable device, smart eyewear or clothing, other augmented reality (AR) devices, or other virtual reality (VR) devices that provide visual, audio, or haptic output enhanced with augmented reality (AR) or virtual reality (VR) capabilities to supplement a real-world visual, audio, or haptic experience, or provide text, audio, graphics, video, holographic images or video, or otherwise haptic feedback. In some embodiments, the processing system 1400 includes, or is part of, a television or set-top box device. In one embodiment, system 1400 can include, be coupled to, or be integrated into an autonomous vehicle, such as, for example, a bus, a tractor trailer, an automobile, a motor or power cycle, an airplane or glider (or any combination thereof), etc. The autonomous vehicle can use system 1400 to process the sensed environment around the vehicle.

[0210] In some embodiments, the one or more processors 1402 each include one or more processor cores 1407 for processing instructions that, when executed, perform operations of system or user software. In some embodiments, at least one of the one or more processor cores 1407 is configured to process a particular instruction set 1409. In some embodiments, the instruction set 1409 may facilitate computing via complex instruction set computing (CISC), reduced instruction set computing (RISC), or computing via very long instruction words (VLIW). The one or more processor cores 1407 may process different instruction sets 1409, which may include instructions to facilitate emulation of other instruction sets. The processor cores 1407 may also include other processing devices, such as, for example, digital signal processors (DSPs).

[0211] In some embodiments, the processor 1402 includes cache memory 1404. Depending on the architecture, the processor 1402 may have a single internal cache or multiple levels of internal cache. In some embodiments, the cache memory is shared among various components of the processor 1402. In some embodiments, the processor 1402 also uses an external cache (e.g., a level 3 (L3) cache or a last level cache (LLC)) (not shown), which may be shared among the processor cores 1407 using known cache coherency techniques. A register file 1406 may also be included in the processor 1402 and may include different types of registers for storing different types of data (e.g., integer registers, floating point registers, status registers, and an instruction pointer register). Some registers may be general purpose registers, while other registers may be specific to the design of the processor 1402.

[0212] In some embodiments, the one or more processors 1402 are coupled to one or more interface buses 1410 to transmit communication signals, such as, for example, address, data, or control signals, between the processor 1402 and other components of the system 1400. In one embodiment, the interface bus 1410 may be a processor bus, such as, for example, a version of a Direct Media Interface (DMI) bus. However, the processor bus is not limited to a DMI bus and may include one or more peripheral component interconnect buses (e.g., PCI, PCI Express), memory buses, or other types of interface buses. In one embodiment, the processor 1402 includes an integrated memory controller 1416 and a platform controller hub 1430. The memory controller 1416 facilitates communication between memory devices and other components of the system 1400, while the platform controller hub (PCH) 1430 provides connectivity to I / O devices via a local I / O bus.

[0213] The memory device 1420 can be a dynamic random access memory (DRAM) device, a static random access memory (SRAM) device, a flash memory device, a phase change memory device, or some other memory device with suitable performance to function as a process memory. In one embodiment, the memory device 1420 can operate as a system memory for the system 1400 to store data 1422 and instructions 1421 for use when the one or more processors 1402 execute applications or processes. The memory controller 1416 can also couple with an optional external graphics processor 1418 and communicate with one or more graphics processors 1408 within the processor 1402 to perform graphics and media operations. In some embodiments, graphics, media, or computational operations can be assisted by an accelerator 1412, which is a co-processor that can be configured to perform a dedicated set of graphics, media, and / or computational operations. For example, in one embodiment, the accelerator 1412 is a matrix multiplication accelerator used to optimize machine learning or computational operations. In one embodiment, accelerator 1412 is a ray tracing accelerator that can be used in conjunction with graphics processor 1408 to perform ray tracing operations. In one embodiment, an external accelerator 1419 can be used instead of or in conjunction with accelerator 1412.

[0214] In some embodiments, a display device 1411 can be connected to the processor 1402. The display device 1411 can be one or more internal display devices, such as those found in a mobile electronic device or laptop device, or an external display device attached via a display interface (e.g., DisplayPort, etc.). In one embodiment, the display device 1411 can be a head mounted display (HMD), such as a stereoscopic display device for use in virtual reality (VR) or augmented reality (AR) applications.

[0215] In some embodiments, the platform controller hub 1430 allows peripherals to connect to the memory device 1420 and the processor 1402 via a high-speed I / O bus. The I / O peripherals include, but are not limited to, an audio controller 1446, a network controller 1434, a firmware interface 1428, a wireless transceiver 1426, a touch sensor 1425, and a data storage device 1424 (e.g., non-volatile memory, volatile memory, hard disk drive, flash memory, NAND, 3D NAND, 3D XPoint, etc.). The data storage device 1424 can be connected via a storage interface (e.g., SATA) or via a peripheral bus, such as, for example, a Peripheral Component Interconnect bus (e.g., PCI, PCI Express). The touch sensor 1425 can include a touch screen sensor, a pressure sensor, or a fingerprint sensor. The wireless transceiver 1426 may be a Wi-Fi transceiver, a Bluetooth transceiver, or a mobile network transceiver such as, for example, a 3G, 4G, 5G, or Long Term Evolution (LTE) transceiver. The firmware interface 1428 enables communication with system firmware and may be, for example, a Unified Extensible Firmware Interface (UEFI). The network controller 1434 may enable network connectivity to a wired network. In some embodiments, a high performance network controller (not shown) couples to the interface bus 1410. The audio controller 1446, in one embodiment, is a multi-channel high definition audio controller. In one embodiment, the system 1400 includes an optional legacy I / O controller 1440 for coupling legacy (e.g., Personal System 2 (PS / 2)) devices to the system.The platform controller hub 1430 may also be connected to one or more Universal Serial Bus (USB) controllers 1442 for connecting input devices such as a keyboard and mouse combination 1443, a camera 1444, or other USB input devices.

[0216] It will be understood that the illustrated system 1400 is illustrative and not limiting, as other types of separately configured data processing systems may also be used. For example, instances of memory controller 1416 and platform controller hub 1430 may be integrated into a separate external graphics processor, such as external graphics processor 1418. In one embodiment, platform controller hub 1430 and / or memory controller 1416 may be external to one or more processors 1402. For example, system 1400 may include platform controller hub 1430, which may be configured as a memory controller hub and peripheral controller hub within a system chipset that communicates with external memory controller 1416 and processor 1402.

[0217] Circuit boards ("sleds") on which components such as, for example, CPUs, memory, and other components are located can be used and designed to enhance thermal performance. In some examples, processing components such as, for example, processors are located on the top side of the sled, while nearby memory such as, for example, DIMMs are located on the bottom side of the sled. As a result of the enhanced airflow provided by this design, the components can operate at higher frequencies and power levels than typical systems, thereby increasing performance. Additionally, the sleds are configured to blindly mate with power and data communication cables in the rack, thus enhancing their ability to be quickly removed, upgraded, and / or reinstalled or replaced. Similarly, the processor-specific components located on the sleds, such as, for example, processors, accelerators, memory, and data storage drives, are configured to be easily upgraded due to their increased spacing from one another. In an exemplary embodiment, the components further include hardware attestation features to attest to their authenticity.

[0218] Data centers can utilize a single network architecture ("fabric") that supports multiple network architectures including Ethernet and omnipath. The threads can be coupled to switches via optical fiber, providing higher bandwidth and lower latency than typical twisted pair cabling (e.g., Cat5, Cat5e, Cat6, etc.). With a high bandwidth, low latency interconnect and network architecture, data centers can pool resources in use, such as memory, accelerators (e.g., GPUs, graphic accelerators, FPGAs, ASICs, neural network and / or artificial intelligence accelerators, etc.), and data storage drives, which can be physically disaggregated and provided to computational resources (e.g., processors) as needed, allowing the computational resources to access the pooled resources as if they were local.

[0219] A power supply or source can provide voltage and / or current to system 1400 or any component or system described herein. In one example, the power supply includes an AC-DC (alternating current to direct current) adapter for plugging into a wall outlet. Such AC power can be a renewable energy (e.g., solar power) source. In one example, the power source includes a DC power source, such as, for example, an external AC-DC converter. In one example, the power source or power supply includes wireless charging hardware that charges via proximity of a charging field. In one example, the power source can include an internal battery, an alternating current supply, a motion-based power supply, a solar power supply, or a fuel cell power source.

[0220] 15A-15C illustrate a computing system and a graphics processor provided by embodiments described herein. Elements of FIG. 15A-15C having the same reference numbers (or names) as elements of any other figure herein may operate or function in any manner similar to that described elsewhere herein, but are not limited to such.

[0221] FIG. 15A is a block diagram of one embodiment of a processor 1500 having one or more processor cores 1502A-1502N, an integrated memory controller 1514, and an integrated graphics processor 1508. The processor 1500 may include additional cores, up to an additional core 1502N, represented by a dashed box. Each of the processor cores 1502A-1502N includes one or more internal cache units 1504A-1504N. In some embodiments, each processor core also has access to one or more shared cache units 1506. The internal cache units 1504A-1504N and the shared cache unit 1506 represent a cache memory hierarchy within the processor 1500. The cache memory hierarchy may include at least one level of instruction and data cache within each processor core, and one or more levels of shared mid-level cache, such as, for example, a level 15 (L2), level 3 (L3), level 4 (L4), or other level cache. The highest level of cache before external memory is classified as an LLC. In some embodiments, cache coherency logic maintains coherency between the various cache units 1506 and 1504A-1504N.

[0222] In some embodiments, processor 1500 may also include a set of one or more bus controller units 1616 and a system agent core 1510. The one or more bus controller units 1616 manage a set of peripheral buses, such as, for example, one or more PCI or PCI Express buses. System agent core 1510 provides management functions for various processor components. In some embodiments, system agent core 1510 includes one or more integrated memory controllers 1514 for managing access to various external memory devices (not shown).

[0223] In some embodiments, one or more of the processor cores 1502A-1502N include support for simultaneous multithreading. In such embodiments, the system agent core 1510 includes components for coordinating and operating the cores 1502A-1502N during multiple thread processing. The system agent core 1510 may further include a power control unit (PCU) that includes logic and components for regulating the power state of the processor cores 1502A-1502N and the graphics processor 1508.

[0224] In some embodiments, the processor 1500 further includes a graphics processor 1508 for performing graphics processing operations. In some embodiments, the graphics processor 1508 couples to a system agent core 1510 that includes a set of shared cache units 1506 and one or more integrated memory controllers 1514. In some embodiments, the system agent core 1510 also includes a display controller 1511 that drives the graphics processor output to one or more coupled displays. In some embodiments, the display controller 1511 may also be a separate module coupled to the graphics processor via at least one interconnect or may be integrated within the graphics processor 1508.

[0225] In some embodiments, a ring-based interconnect unit 1512 is used to connect the internal components of the processor 1500. However, alternative interconnect units may be used, such as, for example, a point-to-point interconnect, a switched interconnect, or other technologies, including those known in the art. In some embodiments, the graphics processor 1508 connects to the ring interconnect 1512 via an I / O link 1513.

[0226] The exemplary I / O link 1513 represents at least one of a number of different I / O interconnects, including an on-package I / O interconnect that facilitates communication between various processor components and a high-performance embedded memory module 1518, such as, for example, an eDRAM module. In some embodiments, each of the processor cores 1502A-1502N and the graphics processor 1508 may use the embedded memory module 1518 as a shared last-level cache.

[0227] In some embodiments, the processor cores 1502A-1502N are homogenous cores executing the same instruction set architecture. In another embodiment, the processor cores 1502A-1502N are heterogeneous with respect to instruction set architecture (ISA), where one or more of the processor cores 1502A-1502N execute a first instruction set while at least one of the other cores executes a subset of the first instruction set or a different instruction set. In one embodiment, the processor cores 1502A-1502N are heterogeneous with respect to microarchitecture, where one or more cores consuming relatively high power are coupled with one or more cores consuming relatively low power. In one embodiment, the processor cores 1502A-1502N are heterogeneous with respect to computing functionality. Additionally, the processor 1500 can be implemented on one or more chips or as a SoC integrated circuit having the illustrated components in addition to other components.

[0228] FIG. 15B is a block diagram of hardware logic of a graphics processor core 1519 according to some embodiments described herein. Elements of FIG. 15B having the same reference number (or name) as elements of any other figure herein may operate or function in any manner similar to that described elsewhere herein, but are not limited to such. The graphics processor core 1519, sometimes referred to as a core slice, may be one or more graphics cores in a modular graphics processor. The graphics processor core 1519 is an example of one graphics core slice, and the graphics processors described herein may include multiple graphics core slices based on target power and performance envelopes. Each graphics processor core 1519 may include a fixed function block 1530 coupled with multiple sub-cores 1521A-1521F, also referred to as sub-slices, that include modular blocks of general purpose and fixed function logic.

[0229] In some embodiments, fixed function block 1530 includes a geometry / fixed function pipeline 1531 that can be shared by all sub-cores of graphics processor core 1519, e.g., in lower performance and / or lower power graphics processor implementations. In various embodiments, geometry / fixed function pipeline 1531 includes a 3D fixed function pipeline (e.g., 3D pipeline 1612 as in FIG. 16A described below), a video front end unit, a thread spawner and thread dispatcher, and a unified return buffer manager, which manages a unified return buffer (e.g., unified return buffer 1718 of FIG. 17, described below).

[0230] In one embodiment, the fixed function block 1530 also includes a graphics SoC interface 1532, a graphics microcontroller 1533, and a media pipeline 1534. The graphics SoC interface 1532 provides an interface between the graphics processor core 1519 and other processor cores in a system on a chip integrated circuit. The graphics microcontroller 1533 is a programmable sub-processor that can be configured to manage various functions of the graphics processor core 1519, including thread dispatch, scheduling, and prefetching. The media pipeline 1534 (e.g., the media pipeline 1616 of Figures 16A and 17) includes logic that facilitates decoding, encoding, pre-processing, and / or post-processing of multimedia data, including image and video data. The media pipeline 1534 implements media operations via requests to computation or sampling logic in the sub-cores 1521-1521F.

[0231] In one embodiment, the SoC interface 1532 enables the graphics processor core 1519 to communicate with general-purpose application processor cores (e.g., CPUs) and / or other components in the SoC, including memory hierarchy elements such as, for example, shared last-level cache memory, system RAM, and / or embedded on-chip or on-package DRAM. The SoC interface 1532 may also enable communication with fixed function devices in the SoC, such as, for example, a camera imaging pipeline, and may enable the use and / or implementation of global memory atomics that may be shared between the graphics processor core 1519 and CPUs in the SoC. The SoC interface 1532 may also implement power management controls for the graphics processor core 1519 and enable an interface between the clock domain of the graphics core 1519 and other clock domains in the SoC. In one embodiment, the SoC interface 1532 enables the receipt of command buffers from a command streamer and a global thread dispatcher configured to provide commands and instructions to each of one or more graphics cores in the graphics processor. Commands and instructions can be dispatched to the media pipeline 1534 if media operations are to be performed, or to the geometry and fixed function pipelines (e.g., geometry and fixed function pipelines 1531, geometry and fixed function pipelines 1537) if graphics processing operations are to be performed.

[0232] Graphics microcontroller 1533 can be configured to perform various scheduling and management tasks for graphics processor core 1519. In one embodiment, graphics microcontroller 1533 can execute graphics on various graphics parallel engines in execution unit (EU) arrays 1522A-1522F, 1524A-1524F in sub-cores 1521A-1521F and / or compute workload scheduling. In this scheduling model, host software running on a CPU core of a SoC including graphics processor core 1519 can present a workload to one of multiple graphics processor doorbells which invokes a scheduling operation on the appropriate graphics engine. Scheduling operations include determining which workload to run next, presenting the workload to a command streamer, preempting existing workloads running on the engines, monitoring the progress of the workload, and notifying host software when the workload is complete. In one embodiment, the graphics microcontroller 1533 can also facilitate low power or idle states for the graphics processor core 1519, providing the graphics processor core 1519 with the ability to save and restore registers within the graphics processor core 1519 across low power state transitions independent of the operating system and / or graphics driver software on the system.

[0233] The graphics processor core 1519 may have up to N modular sub-cores, which may be greater or less than the illustrated sub-cores 1521A-1521F. For each set of N sub-cores, the graphics processor core 1519 may also include shared function logic 1535, shared and / or cache memory 1536, geometry / fixed function pipeline 1537, and additional fixed function logic 1538 to accelerate various graphics and computational processing operations. The shared function logic 1535 may include logic units associated with the shared function logic 1720 of FIG. 17 (e.g., sampler, math, and / or inter-thread communication logic). It may be shared by each of the N sub-cores in the graphics processor core 1519. The shared and / or cache memory 1536 may be a last-level cache for the set of N sub-cores 1521A-1521F in the graphics processor core 1519, and may function as a shared memory accessible by multiple sub-cores. Geometry / fixed function pipeline 1537 may be included in place of geometry / fixed function pipeline 1531 in fixed function block 1530 and may include the same or similar logical units.

[0234] In one embodiment, graphics processor core 1519 includes additional fixed function logic 1538, which may include various fixed function acceleration logic used by graphics processor core 1519. In one embodiment, additional fixed function logic 1538 includes an additional geometry pipeline for use in position-only shading. In position-only shading, there are two geometry pipelines: a complete geometry pipeline in geometry / fixed function pipeline 1538, 1531, and a cull pipeline, which is an additional geometry pipeline that may be included in additional fixed function logic 1538. In one embodiment, the cull pipeline is a scaled-down version of the complete geometry pipeline. The complete pipeline and the cull pipeline can run different instances of the same application. Each instance has a separate context. In position-only shading, shading can be completed sooner in some instances because long cull runs of discarded triangles can be hidden. For example, in one embodiment, the cull pipeline logic in the additional fixed function logic 1538 can execute position shaders in parallel with the main application and generally produce significant results faster than the full pipeline because the cull pipeline only fetches and shades position attributes of vertices without rasterizing and rendering pixels to the frame buffer. The cull pipeline can use the significant results produced to calculate visibility information for all triangles, regardless of whether these triangles have been culled or not. The full pipeline (which may be referred to in this instance as the replay pipeline) can consume the visibility information, skipping culled triangles, and shading only visible triangles that are eventually passed to the rasterization phase.

[0235] In one embodiment, the additional fixed function logic 1538 may also include machine learning acceleration logic, such as fixed function matrix multiplication logic, for implementations involving optimization of machine learning training or inference.

[0236] Contained within each graphics sub-core 1521A-1521F is a set of execution resources that can be used to execute graphics, media, and compute operations in response to requests by graphics pipelines, media pipelines, or shader programs. The graphics sub-cores 1521A-1521F include a number of EU arrays 1522A-1522F, 1524A-1524F, thread dispatch and inter-thread communication (TD / IC) logic 1523A-1523F, 3D (e.g., texture) samplers 1525A-1525F, media samplers 1506A-1506F, shader processors 1527A-1527F, and shared local memories (SLMs) 1528A-1528F. The EU arrays 1522A-1522F, 1524A-1524F each include multiple execution units, which are general-purpose graphics processing units capable of performing floating-point and integer / fixed-point logical operations during the execution of graphics, media, or compute operations, including graphics, media, or compute shader programs. The TD / IC logic 1523A-1523F performs local thread dispatch and thread control operations for the execution units in the sub-cores and facilitates communication between threads running on the execution units of the sub-cores. The 3D samplers 1525A-1525F can read textures or other 3D graphics related data into memory. The 3D samplers can separately read texture data based on the configured sample state and the texture format associated with a given texture. The media samplers 1506A-1506F can perform similar read operations based on the type and format associated with the media data. In one embodiment, each graphics sub-core 1521A-1521F may alternately include an integrated 3D and media sampler. Threads executing on execution units within each of the sub-cores 1521A-1521F may utilize shared local memory 1528A-1528F within each sub-core, allowing threads executing within a thread group to execute using a common pool of on-chip memory.

[0237] FIG. 15C is a block diagram of a general purpose graphics processing unit (GPGPU) 1570 that can be configured as a graphics processor and / or computational accelerator, according to embodiments described herein. The GPGPU 1570 can be interconnected with a host processor (e.g., one or more CPUs 1546) and memories 1571, 1572 via one or more system and / or memory buses. In one embodiment, the memory 1571 is a system memory that can be shared with one or more CPUs 1546, while the memory 1572 is a device memory dedicated to the GPGPU 1570. In one embodiment, components within the GPGPU 1570 and the device memory 1572 can be mapped to memory addresses accessible to one or more CPUs 1546. Access to the memories 1571 and 1572 can be facilitated via a memory controller 1568. In one embodiment, the memory controller 1568 includes an internal direct memory access (DMA) controller 1569, or can include logic to perform operations that would otherwise be performed by a DMA controller.

[0238] The GPGPU 1570 includes a number of cache memories, including an L2 cache 1553, an L1 cache 1554, an instruction cache 1555, and a shared memory 1556, at least some of which may also be partitioned as cache memories. The GPGPU 1570 also includes a number of compute units 1560A-1560N. Each compute unit 1560A-1560N includes a set of vector registers 1561, scalar registers 1562, a vector logic unit 1563, and a scalar logic unit 1564. The compute units 1560A-1560N may also include a local shared memory 1565 and a program counter 1566. The compute units 1560A-1560N may be coupled with a constant cache 1567, which may be used to store constant data, which is data that will not be changed during execution of a kernel or shader program executing on the GPGPU 1570. In one embodiment, constant cache 1567 is a scalar data cache, and cached data can be fetched directly into scalar registers 1562.

[0239] During operation, one or more CPUs 1546 can write commands to registers or memory in the GPGPU 1570 that are mapped to an accessible address space. A command processor 1557 can read commands from the registers or memory and determine how those commands will be processed in the GPGPU 1570. A thread dispatcher 1558 can then be used to dispatch threads to the compute units 1560A-1560N to execute those commands. Each compute unit 1560A-1560N can execute threads independently of the other compute units. Additionally, each compute unit 1560A-1560N can be independently configured for conditional operations and can conditionally output the results of the operations to memory. The command processor 1557 can interrupt one or more CPUs 1546 when a submitted command is completed.

[0240] 16A-16C show block diagrams of additional graphics processor and computational accelerator architectures provided by embodiments described herein. Elements of FIGs. 16A-16C having the same reference numbers (or names) as elements of any other figure herein may operate or function in any manner similar to that described elsewhere herein, but are not limited to such.

[0241] FIG. 16A is a block diagram of a graphics processor 1600, which may be a discrete graphics processing unit or a graphics processor integrated with multiple processing cores or other semiconductor devices, such as, but not limited to, a memory device or a network interface. In some embodiments, the graphics processor communicates with registers on the graphics processor and commands placed in the processor memory via a memory-mapped I / O interface. In some embodiments, the graphics processor 1600 includes a memory interface 1614 for accessing memory. The memory interface 1614 may be an interface to local memory, one or more internal caches, one or more shared external caches, and / or system memory.

[0242] In some embodiments, graphics processor 1600 also includes a display controller 1602 for driving display output data to a display device 1618. Display controller 1602 includes hardware for one or more overlay planes for the display and composition of multiple layers of video or user interface elements. Display device 1618 can be an internal or external display device. In one embodiment, display device 1618 is a head-mounted display device, such as, for example, a virtual reality (VR) display device or an augmented reality (AR) display device. In some embodiments, graphics processor 1600 includes a video codec engine 1606 that encodes, decodes, or transcodes media to, from, or between one or more media encoding formats, including, but not limited to, Moving Picture Experts Group (MPEG) formats such as MPEG-2, Advanced Video Coding (AVC) formats such as H.264 / MPEG-4 AVC, H.265 / HEVC, Alliance for Open Media (AOMedia) VP8, VP9, ​​and Society of Motion Picture & Television Engineers (SMPTE) 421 M / VC-1, and Joint Photographic Experts Group (JPEG) formats such as JPEG, and Motion JPEG (MJPEG) formats.

[0243] In some embodiments, graphics processor 1600 includes a block image transfer (BLIT) engine 1604 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) 1610. In some embodiments, GPE 1610 is a computation engine for performing graphics operations, including three-dimensional (3D) graphics operations and media operations.

[0244] In some embodiments, GPE 1610 includes a 16D pipeline 1612 for performing 16D operations, such as, for example, rendering three-dimensional images and scenes using processing functions that operate on 16D primitive shapes (e.g., rectangles, triangles, etc.). The 16D pipeline 1612 includes programmable and fixed function elements that perform various tasks within the elements and / or generate execution threads to the 3D / media subsystem 1615. While the 3D pipeline 1612 may be used to perform media operations, one embodiment of GPE 1610 also includes a media pipeline 1616 that is used specifically to perform media operations, such as, for example, video post-processing and image enhancement.

[0245] In some embodiments, media pipeline 1616 includes fixed function or programmable logic units that perform one or more specialized media operations, such as, for example, video decode acceleration, video deinterlacing, and video encode acceleration, instead of or in lieu of video codec engine 1606. In some embodiments, media pipeline 1616 further includes a thread generation unit that generates threads for execution on 3D / media subsystem 1615. The generated threads perform computation of the media operations on one or more graphics execution units included in 3D / media subsystem 1615.

[0246] In some embodiments, the 3D / Media subsystem 1615 includes logic for executing threads created by the 3D pipeline 1612 and the media pipeline 1616. In one embodiment, the pipelines send thread execution requests to the 3D / Media subsystem 1615, which includes thread dispatch logic that arbitrates and dispatches the various requests to available thread execution resources. The execution resources include an array of graphics execution units that process the 3D and media threads. In some embodiments, the 3D / Media subsystem 1615 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, for sharing data between threads and storing output data.

[0247] FIG. 16B illustrates a graphics processor 1620 having a tiled architecture according to an embodiment described herein. In one embodiment, the graphics processor 1620 includes a graphics processing engine cluster 1622 having multiple instances of the graphics processing engine 1610 of FIG. 16A in graphics engine tiles 1610A-1610D. Each graphics engine tile 1610A-1610D can be interconnected via a set of tile interconnects 1623A-1623F. Each graphics engine tile 1610A-1610D can also be connected to a memory module or memory device 1626A-1626D via memory interconnects 1625A-1625D. The memory devices 1626A-1626D can use any graphics memory technology. For example, the memory devices 1626A-1626D can be graphics double data rate (GDDR) memory. Memory devices 1626A-1626D, in one embodiment, are high bandwidth memory (HBM) modules that may be on-die with their respective graphics engine tiles 1610A-1610D. In one embodiment, memory devices 1626A-1626D are stacked memory devices that may be stacked on top of their respective graphics engine tiles 1610A-1610D. In one embodiment, each graphics engine tile 1610A-1610D and associated memory 1626A-1626D resides on a separate chiplet that is coupled to a base die or base substrate, as described in further detail in Figures 24B-24D.

[0248] The graphics processing engine cluster 1622 may connect with an on-chip or on-package fabric interconnect 1624. The fabric interconnect 1624 may enable communication between the graphics engine tiles 1610A-1610D and components such as, for example, the video codec 1606 and one or more copy engines 1604. The copy engines 1604 may be used to move data to, from, and between the memory devices 1626A-1626D and memory external to the graphics processor 1620 (e.g., system memory). The fabric interconnect 1624 may also be used to interconnect the graphics engine tiles 1610A-1610D. The graphics processor 1620 may optionally include a display controller 1602 that enables connection to an external display device 1618. The graphics processor may also be configured as a graphics or computation accelerator. In an accelerator configuration, the display controller 1602 and the display device 1618 may be omitted.

[0249] Graphics processor 1620 may be connected to a host system via host interface 1628. Host interface 1628 may enable communication between graphics processor 1620, system memory, and / or other system components. Host interface 1628 may be, for example, a PCI Express bus or another type of host system interface.

[0250] FIG. 16C illustrates a compute accelerator 1630 according to an embodiment described herein. The compute accelerator 1630 may include architectural similarities to the graphics processor 1620 of FIG. 16B and is optimized for compute acceleration. The compute engine cluster 1632 may include a set of compute engine tiles 1640A-1640D that include execution logic optimized for parallel or vector-based general-purpose compute operations. In some embodiments, the compute engine tiles 1640A-1640D do not include fixed-function graphics processing logic, while in one embodiment, one or more of the compute engine tiles 1640A-1640D may include logic to perform media acceleration. The compute engine tiles 1640A-1640D may be connected to memories 1626A-1626D via memory interconnects 1625A-1625D. The memories 1626A-1626D and memory interconnects 1625A-1625D may be of similar technology as in the graphics processor 1620 or may be different. The graphics compute engine tiles 1640A-1640D may also be interconnected via a set of tile interconnects 1623A-1623F, which may be connected and / or interconnected with the fabric interconnect 1624. In one embodiment, the compute accelerator 1630 includes a large L3 cache 1636, which may be configured as a device-wide cache. The compute accelerator 1630 may also be connected to a host processor and memory via a host interface 1628, in a manner similar to the graphics processor 1620 of FIG. 16B. [Graphics processing engine]

[0251] FIG. 17 is a block diagram of a graphics processing engine 1710 of a graphics processor according to some embodiments. In one embodiment, the graphics processing engine (GPE) 1710 is a version of the GPE 1510 shown in FIG. 15A and may also represent the graphics engine tiles 1510A-1510D of FIG. 15B. Elements of FIG. 17 having the same reference numbers (or names) as elements of any other figure herein may operate or function in any manner similar to that described elsewhere herein, but are not limited to such. For example, the 3D pipeline 1612 and media pipeline 1616 of FIG. 15A are shown. The media pipeline 1616 is optional in some embodiments of the GPE 1710 and may not be explicitly included within the GPE 1710. For example, in at least one embodiment, a separate media and / or image processor is coupled to the GPE 1710.

[0252] In some embodiments, the GPE 1710 couples with or includes a command streamer 1703 that provides a command stream to the 3D pipeline 1612 and / or the media pipeline 1616. In some embodiments, the command streamer 1703 couples with a memory that may be one or more of a system memory or an internal cache memory and a shared cache memory. In some embodiments, the command streamer 1703 receives commands from memory and sends the commands to the 3D pipeline 1612 and / or the media pipeline 1616. The commands are directives fetched from a ring buffer that stores commands for the 3D pipeline 1612 and the media pipeline 1616. In one embodiment, the ring buffer may further include a batch command buffer that stores a batch of multiple commands. The commands for the 3D pipeline 1612 may also include references to data stored in memory, such as, but not limited to, vertex and geometry data for the 3D pipeline 1612 and / or image data and memory objects for the media pipeline 316. The 3D pipeline 1612 and the media pipeline 1616 process commands and data by executing operations via logic within the respective pipelines or by dispatching one or more execution threads to the graphics core array 1714. In one embodiment, the graphics core array 1714 includes one or more blocks of graphics cores (e.g., graphics core 1715A, graphics core 1715B), each block including one or more graphics cores. Each graphics core includes a set of graphics execution resources including general-purpose and graphics-specific execution logic for performing graphics and computational operations, and fixed-function texture processing and / or machine learning and artificial intelligence acceleration logic.

[0253] In various embodiments, the 3D pipeline 1612 may include fixed function and programmable logic for processing one or more shader programs, such as vertex shaders, geometry shaders, pixel shaders, fragment shaders, compute shaders, or other shader programs, for example, by processing instructions and dispatching execution threads to the graphics core array 1714. The graphics core array 1714 provides a unified block of execution resources for use in processing these shader programs. General purpose execution logic (e.g., execution units) within the graphics cores 1715A-1714B of the graphics core array 1714 includes support for a variety of 3D API shader languages ​​and can execute multiple concurrent threads associated with multiple shaders.

[0254] In some embodiments, the graphics core arrangement 1714 includes execution logic for performing media functions, such as, for example, video and / or image processing. In one embodiment, the execution unit includes general purpose logic that is programmable to perform parallel general purpose computing operations in addition to graphics processing operations. The general purpose logic can perform processing operations in parallel with or in conjunction with general purpose logic in processor core 1407 of FIG. 14 or cores 1502A-1502N as in FIG. 15A.

[0255] Output data generated by threads executing on the graphics core array 1714 can output data to memory in a unified return buffer (URB) 1718. The URB 1718 can store data for multiple threads. In some embodiments, the URB 1718 can be used to send data between different threads executing on the graphics core array 1714. In some embodiments, the URB 1718 can also be used for synchronization between threads on the graphics core array and fixed function logic in the shared function logic 1720.

[0256] In some embodiments, graphics core array 1714 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 levels of GPE 1710. In one embodiment, execution resources are dynamically scalable, such that execution resources can be enabled or disabled as needed.

[0257] The graphics core array 1714 couples with shared functionality logic 1720 that includes multiple resources shared among the graphics cores in the graphics core array. The shared functionality in the shared functionality logic 1720 is a hardware logic unit that provides complementary functionality dedicated to the graphics core array 1714. In various embodiments, the shared functionality logic 1720 includes, but is not limited to, sampler 1721, math 1722, and inter-thread communication (ITC) 1723 logic. Additionally, some embodiments implement one or more caches 1725 in the shared functionality logic 1720.

[0258] Shared functions are implemented at least when the demand for a given dedicated function is insufficient for inclusion in the graphics core array 1714. Instead, a single instantiation of that dedicated function is implemented as a standalone entity in the shared function logic 1720 and shared among the execution resources in the graphics core array 1714. The exact set of functions shared among and included in the graphics core array 1714 varies across embodiments. In some embodiments, unique shared functions in the shared function logic 1720 that are used extensively by the graphics core array 1714 may be included in the shared function logic 1716 in the graphics core array 1714. In various embodiments, the shared function logic 1716 in the graphics core array 1714 may include some or all of the logic in the shared function logic 1720. In one embodiment, all logical elements in the shared function logic 1720 may be duplicated in the shared function logic 1716 of the graphics core array 1714. In one embodiment, the shared functionality logic 1720 is excluded in favor of the shared functionality logic 1716 in the graphics core arrangement 1714. [Execution unit]

[0259] 18A-18B illustrate thread execution logic 1800 including an array of processing elements used in a graphics processor core according to an embodiment described herein. Elements of FIG. 18A-18B having the same reference number (or name) as elements of any other figure herein may operate or function in any manner similar to that described elsewhere herein, but are not limited to such. FIG. 18A-18B illustrates an overview of thread execution logic 1800 that may represent the hardware logic shown in each of sub-cores 221A-221F of FIG. 2B. FIG. 18A illustrates an execution unit in a general-purpose graphics processor, while FIG. 18B illustrates an execution unit that may be used in a computational accelerator.

[0260] 18A, in some embodiments, thread execution logic 1800 includes a shader processor 1802, a thread dispatcher 1804, an instruction cache 1806, a scalable execution unit array including multiple execution units 1808A-1808N, a sampler 1810, a shared local memory 1811, a data cache 1812, and a data port 1814. In one embodiment, the scalable execution unit array can be dynamically scaled by enabling or disabling one or more execution units (e.g., any of execution units 1808A, 1808B, 1808C, 1808D through 1808N-1 and 1808N) based on the computational requirements of the workload. In one embodiment, the included components are interconnected via an interconnect fabric that links each of the components. In some embodiments, the thread execution logic 1800 includes one or more connections to memory, such as system memory or cache memory, via, for example, one or more of the instruction cache 1806, data port 1814, sampler 1810, and execution units 1808A-1808N. In some embodiments, each execution unit (e.g., 1808A) is a standalone programmable general-purpose computational unit capable of executing multiple simultaneous hardware threads, processing multiple data elements in parallel per thread. In various embodiments, the array of execution units 1808A-1808N is scalable to include any number of individual execution units.

[0261] In some embodiments, the execution units 1808A-1808N are primarily used to execute shader programs. The shader processor 1802 can process various shader programs and dispatch execution threads associated with the shader programs via the thread dispatcher 1804. In one embodiment, the thread dispatcher includes logic to arbitrate thread initiation requests from the graphics and media pipelines and instantiate the requested threads on one or more of the execution units 1808A-1808N. For example, the geometry pipeline can dispatch vertex, tessellation, or geometry shaders to thread execution logic for processing. In some embodiments, the thread dispatcher 1804 can also handle run-time thread creation requests from executing shader programs.

[0262] In some embodiments, the execution units 1808A-1808N support an instruction set that includes native support for many standard 3D graphics shader instructions so that shader programs from graphics libraries (e.g., Direct 3D and OpenGL) are executed with minimal movement. The execution units support vertex and geometry processing (e.g., vertex programs, geometry programs, vertex shaders), pixel processing (e.g., pixel shaders, fragment shaders), and general-purpose processing (e.g., compute and media shaders). Each of the execution units 1808A-1808N can execute multi-issue single instruction multiple data (SIMD), multiple threaded operation enabling an efficient execution environment in the face of higher latency memory accesses. Each hardware thread within each execution unit has an independent thread state associated with a dedicated high-bandwidth register file. Execution is multi-issue per clock into a pipeline capable of integer, single and double precision floating point operations, SIMD branch functions, logical operations, transcendental operations, and other jumble operations. While waiting for data from memory or one of the shared functions, dependency logic within the execution units 1808A-1808N puts the waiting thread to sleep until the requested data returns. 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, the execution unit may execute operations of another type of shader program, including a pixel shader, a fragment shader, or a different vertex shader. Various embodiments may apply to using execution by using single instruction multiple threads (SIMT) as an alternative to or in addition to using SIMD. References to SIMD cores or operations may also apply to SIMT or to SIMD in combination with SIMT.

[0263] Each execution unit in execution units 1808A-1808N 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 of execution for accessing data elements, 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) of a particular graphics processor. In some embodiments, execution units 1808A-1808N support integer and floating point data types.

[0264] The execution unit instruction set includes SIMD instructions. Various data elements can be stored in registers as a type of packed data, and the execution unit will process the various elements based on the data size of the elements. For example, when operating on a 256-bit wide vector, the 256 bits of the vector are stored in a register, and the execution unit operates on the vector as four separate 184-bit packed data elements (quadword (QW) sized data elements), eight separate 32-bit packed data elements (doubleword (DW) sized data elements), sixteen separate 16-bit packed data elements (word (W) sized data elements), or thirty-two separate 8-bit data elements (byte (B) sized data elements). However, different vector widths and register sizes are possible.

[0265] In one embodiment, one or more execution units may be combined into a fused execution unit 1809A-1809N with thread control logic (1807A-1807N) common to the fused EU. Multiple EUs may be fused into an EU group. Each EU of the fused EU group may be configured to execute a separate SIMD hardware thread. The number of EUs in a fused EU group may vary depending on the embodiment. Furthermore, various SIMD widths may be executed per EU, including but not limited to SIMD8, SIMD16, and SIMD32. Each fused graphics execution unit 1809A-1809N includes at least two execution units. For example, the fused execution unit 1809A includes a first EU 1808A, a second EU 1808B, and thread control logic 1807A common to the first EU 1808A and the second EU 1808B. Thread control logic 1807A controls the threads executing on the fused graphic execution unit 1809A, and each EU in the fused execution units 1809A to 1809N is executable using a common instruction pointer register.

[0266] One or more internal instruction caches (e.g., 1806) are included in the thread execution logic 1800 to cache thread instructions for the execution units. In some embodiments, one or more data caches (e.g., 1812) are included to cache thread data during thread execution. Threads executing on the execution logic 1800 can also store explicitly managed data in the shared local memory 1811. In some embodiments, a sampler 1810 is included to provide texture sampling for 3D operations and media sampling for media operations. In some embodiments, the sampler 1810 includes dedicated texture or media sampling functionality for processing texture or media data during the sampling process before providing the sampled data to the execution units.

[0267] During execution, the graphics and media pipelines send thread start requests to the thread execution logic 1800 via thread creation and dispatch logic. As groups of geometric objects are processed and rasterized into pixel data, pixel processor logic (e.g., pixel shader logic, fragment shader logic, etc.) in the shader processor 1802 is invoked to further compute output information and write the results to an output surface (e.g., color buffer, depth buffer, stencil buffer, etc.). In some embodiments, a pixel shader or fragment shader calculates values ​​for various vertex attributes that are interpolated across the rasterized objects. In some embodiments, the pixel processor logic in the shader processor 1802 then executes pixel or fragment shader programs provided by an application programming interface (API). To execute the shader programs, the shader processor 1802 dispatches threads to the execution units (e.g., 1808A) via the thread dispatcher 1804. In some embodiments, the shader processor 1802 uses texture sampling logic in the sampler 1810 to access texture data from texture maps stored in memory. Arithmetic operations on the texture data and the input geometry data compute pixel color data for each geometric fragment or discard one or more pixels from further processing.

[0268] In some embodiments, data port 1814 provides a memory access mechanism for thread execution logic 1800 to output processed data to memory for further processing in the graphics processor output pipeline. In some embodiments, data port 1814 includes or couples to one or more cache memories (e.g., data cache 1812) to cache data for memory access via the data port.

[0269] In one embodiment, the execution logic 1800 may also include a ray tracer 1805 that may provide ray tracing acceleration functionality. The ray tracer 1805 may support a ray tracing instruction set that includes instructions / functions for ray generation. The ray tracing instruction set may be similar to or different from the ray tracing instruction set supported by the ray tracing core 245 of FIG. 2C.

[0270] 18B illustrates exemplary internal details of an execution unit 1808, according to an embodiment. The graphics execution unit 1808 may include an instruction fetch unit 1837, a general purpose register file array (GRF) 1824, an architectural register file array (ARF) 1826, a thread arbiter 1822, a send unit 1830, a branch unit 1832, a set of SIMD floating point units (FPUs) 1834, and, in one embodiment, a set of dedicated integer SIMD ALUs 1835. The GRF 1824 and ARF 1826 include a general purpose register file and a set of architectural register files associated with each concurrent hardware thread that may be active in the graphics execution unit 1808. In one embodiment, data used during thread execution is stored in the GRF 1824, while per-thread architectural state is maintained in the ARF 1826. The execution state of each thread, including an instruction pointer for each thread, may be kept in thread-specific registers in the ARF 1826.

[0271] In one embodiment, the graphics execution unit 1808 has an architecture that is a combination of simultaneous multithreading (SMT) and fine-grained interleaved multithreading (IMT). The architecture has a modular structure that can be tuned at design time based on the target number of simultaneous threads and the number of registers per execution unit, and the resources of the execution unit are divided across the logic used to execute multiple simultaneous threads. The number of logical threads that can be executed by the graphics execution unit 1808 is not limited to the number of hardware threads, and multiple logical threads can be assigned to each hardware thread.

[0272] In one embodiment, the graphics execution unit 1808 can issue multiple instructions simultaneously, each of which can be a different instruction. The thread arbiter 1822 of a graphics execution unit thread 1808 can dispatch instructions to one of the send unit 1830, the branch unit 1832, or the SIMD FPU 1834 for execution. Each execution thread has access to 128 general purpose registers in the GRF 1824. Each register can store 32 bytes and is accessible as a SIMD 8-element vector of 32-bit data elements. In one embodiment, each execution unit thread has access to 4K bytes in the GRF 1824, although embodiments are not so limited and in other embodiments, greater or less register resources may be provided. In one embodiment, the graphics execution unit 1808 is also partitioned into seven hardware threads that can independently perform computational operations, although the number of threads per execution unit can also vary by embodiment. For example, in one embodiment, up to 16 hardware threads are supported. In one embodiment where seven threads can access 4K bytes, the GRF 1824 can store a total of 28K bytes. If 16 threads can access 4K bytes, the GRF 1824 can store a total of 64K bytes. Flexible addressing modes allow registers to be addressed together, effectively building wider registers or representing strided rectangular block data structures.

[0273] In one embodiment, memory operations, sampler operations, and other longer latency system communications are dispatched via "send" instructions executed by a message passing send unit 1830. In one embodiment, branch instructions are dispatched to a dedicated branch unit 1832 to facilitate SIMD branching and eventual convergence.

[0274] In one embodiment, the graphics execution unit 1808 includes one or more SIMD floating point units (FPUs) 1834 for performing floating point operations. In one embodiment, the FPUs 1834 also support integer operations. In one embodiment, the FPU(s) 1834 can SIMD execute up to M 32-bit floating point (or integer) operations, or SIMD execute up to 2M 16-bit integer or 16-bit floating point operations. In one embodiment, at least one of the FPUs provides extended math capabilities supporting high throughput transcendental math functions and double precision 184-bit floating point. In some embodiments, a set of 8-bit integer SIMD ALUs 1835 are also present and may be specifically optimized to perform operations associated with machine learning computations.

[0275] In one embodiment, an array of multiple instances of the graphics execution unit 1808 can be instantiated in a graphics sub-core grouping (e.g., a sub-slice). For scalability, a product architect can select the exact number of execution units per sub-core grouping. In one embodiment, the execution unit 1808 can execute instructions across multiple execution channels. In a further embodiment, each thread executing on the graphics execution unit 1808 executes on a different channel.

[0276] FIG. 19 illustrates an additional execution unit 1900, according to one embodiment. The execution unit 1900 may be a compute-optimized execution unit for use in, for example, but not limited to, the compute engine tiles 1540A-1540D as in FIG. 15C. A variation of the execution unit 1900 may also be used in the graphics engine tiles 1510A-1510D as in FIG. 15B. In one embodiment, the execution unit 1900 includes a thread control unit 1901, a thread state unit 1902, an instruction fetch / prefetch unit 1903, and an instruction decode unit 1904. The execution unit 1900 further includes a register file 1906 that stores registers that can be assigned to hardware threads within the execution unit. The execution unit 1900 further includes a send unit 1907 and a branch unit 1908. In one embodiment, the sending unit 1907 and branching unit 1908 may operate similarly to the sending unit 1830 and branching unit 1832 of the graphics execution unit 1808 in FIG. 18B.

[0277] The execution unit 1900 also includes a computation unit 1910 that includes multiple different types of functional units. In one embodiment, the computation unit 1910 includes an ALU unit 1911 that includes an array of arithmetic logic units. The ALU unit 1911 can be configured to perform 64-bit, 32-bit, and 16-bit integer and floating point operations. The integer and floating point operations can be performed simultaneously. The computation unit 1910 can also include a systolic array 1912 and a math unit 1913. The systolic array 1912 includes a W-wide and D-deep network of data processing units that can be used to perform vector or other data parallel operations in a systolic manner. In one embodiment, the systolic array 1912 can be configured to perform matrix operations, such as, for example, a matrix dot product operation. In one embodiment, the systolic array 1912 supports 16-bit floating point operations, and 8-bit and 4-bit integer operations. In one embodiment, the systolic array 1912 can be configured to accelerate machine learning operations. In such an embodiment, systolic array 1912 can be configured to support b-float 16-bit floating point format. In one embodiment, math unit 1913 is included and can perform a unique subset of mathematical operations in a more efficient and lower power manner than ALU unit 1911. Math unit 1913 can include variations of math logic that may be found in shared function logic of graphics processing engines provided by other embodiments (e.g., math logic 1722 of shared function logic 1720 of FIG. 17 ). In one embodiment, math unit 1913 can be configured to perform 32-bit and 64-bit floating point operations.

[0278] The thread control unit 1901 includes logic to control the execution of threads in the execution units. The thread control unit 1901 may include thread arbitration logic to start, stop, and pre-empt the execution of threads in the execution units 1900. The thread state unit 1902 may be used to store thread states of threads assigned to execute on the execution units 1900. Storing thread states in the execution units 1900 allows for rapid pre-emption of threads when they become blocked or idle. The instruction fetch / pre-fetch unit 1903 may fetch instructions from an instruction cache of a higher level execution logic (e.g., instruction cache 1806 as in FIG. 18A). The instruction fetch / pre-fetch unit 1903 may also issue pre-fetch requests for instructions to be loaded into the instruction cache based on an analysis of currently executing threads. The instruction decode unit 1904 may be used to decode instructions to be executed by the computation units. In one embodiment, the instruction decode unit 1904 can be used as a secondary decoder to decode complex instructions into constituent micro-operations.

[0279] The execution unit 1900 further includes a register file 1906 that can be used by the hardware threads executing on the execution unit 1900. The registers in the register file 1906 can be divided across logic used to execute multiple simultaneous threads within the computational units 1910 of the execution unit 1900. The number of logical threads that can be executed by the graphics execution unit 1900 is not limited to the number of hardware threads, and multiple logical threads can be assigned to each hardware thread. The size of the register file 1906 can vary across embodiments based on the number of hardware threads supported. In one embodiment, register renaming may be used to dynamically allocate registers to hardware threads.

[0280] 20 is a block diagram illustrating a graphics processor instruction format 2000 according to some embodiments. In one or more embodiments, a graphics processor execution unit supports an instruction set having multiple instructions in multiple formats. Solid boxes indicate 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 the instructions. In some embodiments, the instruction format 2000 described and illustrated are macro-instructions in that they are instructions that are supplied to the execution units as the instructions are processed, as opposed to micro-operations that result from instruction decode.

[0281] In some embodiments, the graphics processor execution units natively support multiple instructions in a 128-bit instruction format 2010. A 64-bit compressed instruction format 2030 is available for some instructions based on the selected instruction, instruction options, and number of operands. The native 128-bit instruction format 2010 provides access to all instruction options, while some options and operations are restricted in the 64-bit format 2030. The native instructions available in the 64-bit format 2030 vary by embodiment. In some embodiments, the instruction is partially compressed using a set of index values ​​in an index field 2013. The execution unit hardware looks up a set of compression tables based on the index values ​​and uses the output of the compression tables to reconstruct the native instruction in the 128-bit instruction format 2010. Instructions of other sizes and formats may be used.

[0282] For each format, the instruction opcode 2012 specifies the operation that the execution unit performs. The execution unit executes each instruction in parallel on multiple data elements of each operand. For example, in response to an add instruction, the execution unit performs an add operation simultaneously across each color channel representing a texture or picture element. By default, the execution unit executes each instruction across all data channels of an operand. In some embodiments, the instruction control field 2014 allows control over certain execution options, such as channel selection (e.g., prediction) and data channel order (e.g., swizzle). For instructions of the 128-bit instruction format 2010, the execution size field 2016 limits the number of data channels that will be executed in parallel. In some embodiments, the execution size field 2016 is not available for use with the 64-bit compressed instruction format 2030.

[0283] Some execution unit instructions have up to three operands, including two source operands (src0 2020, src1 2022, and one destination 2018). In some embodiments, the execution units support dual destination instructions where one of the destinations is implicit. Data manipulation instructions may have a third source operand (e.g., SRC2 2024), with the instruction opcode 2012 determining 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.

[0284] In some embodiments, the 128-bit instruction format 2010 includes an access / address mode field 2026 that specifies, for example, whether a direct register addressing mode or an indirect register addressing mode is used. When a direct register addressing mode is used, the register addresses of one or more operands are provided directly by bits of the instruction.

[0285] In some embodiments, the 128-bit instruction format 2010 includes an access / address mode field 2026 that specifies the address mode and / or access mode of the instruction. In one embodiment, the access mode is used to define the data access alignment of the instruction. Some embodiments support access modes including a 16-byte aligned access mode and a 1-byte aligned access mode, where the byte alignment of the access mode determines the access alignment of the instruction operands. For example, in a first mode, the instruction may use byte-aligned addressing for source and destination operands, and in a second mode, the instruction may use 16-byte aligned addressing for all source and destination operands.

[0286] In one embodiment, the address mode portion of the access / address mode field 2026 determines whether the instruction uses direct or indirect addressing. If the direct register addressing mode is used, bits of the instruction directly provide the register address of one or more operands. If the indirect register addressing mode is used, the register address of one or more operands may be calculated based on an address register value and an address immediate field of the instruction.

[0287] In some embodiments, instructions are grouped based on opcode 2012 bit fields to simplify opcode decode 2040. For 8-bit opcodes, bits 4, 5, and 6 allow the execution unit to determine the type of opcode. The exact opcode groupings shown are only examples. In some embodiments, the move and logic opcode group 2042 includes data movement and logical instructions (e.g., move (mov), compare (cmp)). In some embodiments, the move and logic group 2042 shares the five most significant bits (MSBs), with move (mov) instructions being of the form 0000xxxxb and logical instructions being of the form 0001xxxxb. The flow control instruction group 2044 (e.g., call, jump (jmp)) includes instructions of the form 0010xxxxb (e.g., 0x20). The miscellaneous instruction group 2046 includes a mix of instructions including synchronization instructions (e.g., wait, send) in the format of 0011xxxxb (e.g., 0x30). The parallel math instruction group 2048 includes component-wise arithmetic instructions (e.g., add, multiply (mul)) in the format of 0100xxxxb (e.g., 0x40). The parallel math group 2048 performs arithmetic operations in parallel on data channels. The vector math group 2050 includes arithmetic instructions (e.g., dp4) in the format of 0101xxxxb (e.g., 0x50). The vector math group performs operations such as, for example, dot product calculations of vector operands. The illustrated opcode decode 2040, in one embodiment, may be used to determine which portion of the execution units will be used to execute the decoded instruction. For example, some instructions may be designated as systolic instructions that will be executed by a systolic array. Other instructions, such as, for example, ray tracing instructions (not shown), may be routed to a ray tracing core or ray tracing logic within a slice or partition of the execution logic. [Graphics Pipeline]

[0288] Figure 21 is a block diagram of a graphics processor 2100 according to another embodiment. Elements of Figure 21 having the same reference numbers (or names) as elements of any other figure herein may operate or function in any manner similar to that described elsewhere herein, but are not limited to such.

[0289] In some embodiments, the graphics processor 2100 includes a geometry pipeline 2120, a media pipeline 2130, a display engine 2140, thread execution logic 2150, and a render output pipeline 2170. In some embodiments, the graphics processor 2100 is a graphics processor in a multi-core processing system that includes one or more general-purpose processing cores. The graphics processor is controlled by register writes to one or more control registers (not shown) or via commands issued to the graphics processor 2100 via a ring interconnect 2102. In some embodiments, the ring interconnect 2102 couples the graphics processor 2100 to other processing components, such as, for example, other graphics processors or general-purpose processors. Commands from the ring interconnect 2102 are interpreted by a command streamer 2103, which provides instructions to individual components of the geometry pipeline 2120 or the media pipeline 2130.

[0290] In some embodiments, command streamer 2103 reads vertex data from memory and directs the operation of vertex fetcher 2105, which executes the vertex processing commands provided by command streamer 2103. In some embodiments, vertex fetcher 2105 provides the vertex data to vertex shader 2107, which performs coordinate space transformation and lighting operations for each vertex. In some embodiments, vertex fetcher 2105 and vertex shader 2107 execute the vertex processing instructions by dispatching execution threads to execution units 2152A-2152B via thread dispatcher 2131.

[0291] In some embodiments, the execution units 2152A-B are an array of vector processors with an instruction set for performing graphics and media operations. In some embodiments, the execution units 2152A-B have an attached L1 cache 2151 that is unique per array or shared between arrays. The cache can be configured as a data cache, an instruction cache, or a single cache partitioned to contain different partitions of data and instructions.

[0292] In some embodiments, the geometry pipeline 2120 includes a tessellation component that performs hardware accelerated tessellation of 3D objects. In some embodiments, the programmable hull shader 2111 configures the tessellation operations. The programmable domain shader 2117 provides back-end evaluation of the tessellation output. The tessellator 2113 operates under the direction of the hull shader 2111 and includes dedicated logic to generate a set of detailed geometric objects based on a coarse geometric model provided as input to the geometry pipeline 2120. In some embodiments, if tessellation is not used, the tessellation components (e.g., the hull shader 2111, the tessellator 2113, and the domain shader 2117) can be bypassed.

[0293] In some embodiments, a complete geometric object can be processed by the geometry shader 2119 via one or more threads dispatched to the execution units 2152A-2152B, or can proceed directly to the clipper 2129. In some embodiments, the geometry shader operates on entire geometric objects, rather than on vertices or patches of vertices as in earlier stages of the graphics pipeline. If tessellation is disabled, the geometry shader 2119 receives input from the vertex shader 2107. In some embodiments, the geometry shader 2119 is programmable by a geometry shader program to perform geometry tessellation if the tessellation units are disabled.

[0294] Prior to rasterization, a clipper 2129 processes the vertex data. The clipper 2129 can be a fixed function clipper or a programmable clipper with clipping and geometry shader functionality. In some embodiments, a rasterizer and depth test component 2173 of the render output pipeline 2170 dispatches pixel shaders to convert geometric objects into per-pixel representations. In some embodiments, the pixel shader logic is included in the thread execution logic 2150. In some embodiments, an application can bypass the rasterizer and depth test component 2173 and access un-rasterized vertex data via the stream-out unit 2123.

[0295] The graphics processor 2100 has an interconnect bus, interconnect fabric, or some other interconnect mechanism that allows data and message passing between the major components of the processor. In some embodiments, the execution units 2152A-2152B and associated logic units (e.g., L1 cache 2151, sampler 2154, texture cache 2158, etc.) interconnect via data port 2156 to perform memory accesses and communicate with the render output pipeline components of the processor. In some embodiments, the sampler 2154, caches 2151, 2158, and the execution units 2152A-2152B each have a separate memory access path. In one embodiment, the texture cache 2158 can also be configured as a sampler cache.

[0296] In some embodiments, the render output pipeline 2170 includes a rasterizer and depth test component 2173 that converts vertex-based objects into associated pixel-based representations. In some embodiments, the rasterizer logic includes a windower / masker unit for performing fixed-function triangle and line rasterization. In some embodiments, an associated render cache 2178 and depth cache 2179 are also available. A pixel operations component 2177 performs pixel-based operations on the data, although in some instances pixel operations associated with 2D operations (e.g., bit-block image transfer with blending) are performed by the 2D engine 2141 or are substituted at display time by the display controller 2143 using an overlay display surface. In some embodiments, a shared L3 cache 2175 is available to all graphics components, allowing data to be shared without using main system memory.

[0297] In some embodiments, the graphics processor media pipeline 2130 includes a media engine 2137 and a video front end 2134. In some embodiments, the video front end 2134 receives pipeline commands from the command streamer 2103. In some embodiments, the media pipeline 2130 includes a separate command streamer. In some embodiments, the video front end 2134 processes the media commands before sending the commands to the media engine 2137. In some embodiments, the media engine 2137 includes a thread spawning function that spawns threads for dispatch to the thread execution logic 2150 via the thread dispatcher 2131.

[0298] In some embodiments, the graphics processor 2100 includes a display engine 2140. In some embodiments, the display engine 2140 is external to the processor 2100 and couples to the graphics processor via a ring interconnect 2102 or some other interconnect bus or fabric. In some embodiments, the display engine 2140 includes a 2D engine 2141 and a display controller 2143. In some embodiments, the display engine 2140 includes dedicated logic that can operate independently of the 3D pipeline. In some embodiments, the display controller 2143 couples to a display device (not shown), which may be a system integrated display device such as found in a laptop computer, or an external display device attached via a display device connector.

[0299] In some embodiments, the geometry pipeline 2120 and the media pipeline 2130 are configurable to perform operations based on multiple graphics and media programming interfaces and are not specific to any one application programming interface (API). In some embodiments, the graphics processor's driver software translates API calls specific to a particular graphics or media library into commands that can be processed by the graphics processor. In some embodiments, support is provided for all of the Open Graphics Library (OpenGL), Open Computing Language (OpenCL), and / or Vulkan graphics and compute APIs from the Khronos Group. In some embodiments, support for the Direct3D library from Microsoft Corporation may also be provided. In some embodiments, a combination of these libraries may be supported. Support for the open source computer vision library (OpenCV) may also be provided. Future APIs with compatible 3D pipelines will also be supported if a mapping from the future API's pipeline to the graphics processor's pipeline can be made. [Graphics Pipeline Programming]

[0300] Figure 22A is a block diagram illustrating a graphics processor command format 2200 according to some embodiments. Figure 22B is a block diagram illustrating a graphics processor command sequence 2210 according to one embodiment. The solid box in Figure 22A illustrates components that are typically included in a graphics command, while the dashed box includes components that are optional or that are only included in a subset of the graphics commands. The example graphics processor command format 2200 of Figure 22A includes data fields that identify a client 2202, a command operation code (opcode) 2204, and data 2206 for the command. Some commands also include a sub-opcode 2205 and a command size 2208.

[0301] In some embodiments, the client 2202 specifies the client units of the graphics device that will process the command data. In some embodiments, the graphics processor command parser inspects the client field of each command, coordinates further processing of the command, and routes the command data to the appropriate client unit. In some embodiments, the graphics processor client units include a memory interface unit, a render unit, a 2D unit, a 3D unit, and a media unit. Each client unit has a corresponding processing pipeline that processes the command. When a command is received by a client unit, the client unit reads the opcode 2204 and, if present, the sub-opcode 2205 to determine the operation to perform. The client unit executes the command using the information in the data field 2206. In some commands, an explicit command size 2208 is expected to specify the size of the command. In some embodiments, the command parser automatically determines the size of at least some of the commands based on the command opcode. In some embodiments, the commands are aligned via multiples of double words. Other command formats can be used.

[0302] The flow diagram of Figure 22B illustrates an exemplary graphics processor command sequence 2210. In some embodiments, software or firmware of a data processing system featuring an embodiment of a graphics processor uses versions of the command sequence shown to set up, execute, and terminate a set of graphics operations. The sample command sequence is shown and described for illustrative purposes only, as embodiments are not limited to these particular commands or this command sequence. Furthermore, commands may be issued as a batch of commands in the command sequence, such that the graphics processor will process the sequence of commands in at least partial agreement.

[0303] In some embodiments, the graphics processor command sequence 2210 may begin with a pipeline flush command 2212, causing any active graphics pipelines to complete any commands currently pending in the pipeline. In some embodiments, the 3D pipeline 2222 and the media pipeline 2224 do not operate simultaneously. A pipeline flush is performed, causing the active graphics pipelines to complete any pending commands. In response to the pipeline flush, the graphics processor's command parser will pause command processing until the active drawing engines have completed their pending operations and the associated read caches are invalidated. Optionally, any data in the render cache that is marked as "dirty" may be flushed to memory. In some embodiments, the pipeline flush command 2212 may be used for pipeline synchronization or before placing the graphics processor in a low power state.

[0304] In some embodiments, the pipeline select command 2213 is used when a command sequence requires the graphics processor to explicitly switch between pipelines. In some embodiments, the pipeline select command 2213 is only needed once in an execution context before issuing a pipeline command unless the context issues commands to both pipelines. In some embodiments, a pipeline flush command 2212 is needed just before a pipeline switch via the pipeline select command 2213.

[0305] In some embodiments, pipeline control commands 2214 are used to configure the graphics pipeline for operation and to program the 3D pipeline 2222 and the media pipeline 2224. In some embodiments, pipeline control commands 2214 configure the pipeline state of an active pipeline. In one embodiment, pipeline control commands 2214 are used for pipeline synchronization and to clear data from one or more cache memories in an active pipeline before processing a batch of commands.

[0306] In some embodiments, return buffer state commands 2216 are used to configure a set of return buffers for each pipeline to write data to. Some pipeline operations require the allocation, selection, or configuration of one or more return buffers to which the operation writes intermediate data during processing. In some embodiments, the graphics processor also uses one or more return buffers to store output data and perform inter-thread communication. In some embodiments, return buffer state 2216 includes selecting the size and number of return buffers to use for a set of pipeline operations.

[0307] The remaining commands in the command sequence differ based on the active pipeline of the operation. Based on the pipeline decision 2220, the command sequence is adjusted to either the 3D pipeline 2222, beginning with a 3D pipeline state 2230, or the media pipeline 2224, beginning with a media pipeline state 2240.

[0308] The commands that configure the 3D pipeline state 2230 include 3D state setting commands for vertex buffer states, vertex element states, certain color states, depth buffer states, and other state variables that are configured before 3D primitive commands are processed. The values ​​of these commands are determined, at least in part, based on the particular 3D API in use. In some embodiments, the 3D pipeline state 2230 commands can also selectively disable or bypass certain pipeline elements if those elements will not be used.

[0309] In some embodiments, 3D primitive 2232 commands are used to submit 3D primitives to be processed by the 3D pipeline. Commands and associated parameters passed to the graphics processor via 3D primitive 2232 commands are forwarded to a vertex fetch function of the graphics pipeline. The vertex fetch function uses the 3D primitive 2232 command data to generate a vertex data structure. The vertex data structure is stored in one or more return buffers. In some embodiments, 3D primitive 2232 commands are used to perform vertex operations on 3D primitives via vertex shaders. To process vertex shaders, the 3D pipeline 2222 dispatches shader execution threads to the graphics processor execution units.

[0310] In some embodiments, the 3D pipeline 2222 is triggered via an execute 2234 command or event. In some embodiments, a register write triggers command execution. In some embodiments, execution is triggered via a "go" or "kick" command in a command sequence. In one embodiment, command execution is triggered using a pipeline synchronization command to flush the command sequence through the graphics pipeline. The 3D pipeline will perform geometry processing of the 3D primitives. Once the operations are complete, the resulting geometric objects are rasterized and the pixel engine colors the resulting pixels. Additional commands to control pixel shading and pixel backend operations may also be included in these operations.

[0311] In some embodiments, the graphics processor command sequence 2210 follows the media pipeline 2224 path when performing a media operation. In general, the specific use and manner of programming of the media pipeline 2224 depends on the media or computational operations being performed. Specific media decode operations may be offloaded to the media pipeline during media decoding. In some embodiments, the media pipeline may also be bypassed and media decoding may be performed in whole or in part using resources provided by one or more general purpose processing cores. In one embodiment, the media pipeline also includes elements for general purpose graphics processor unit (GPGPU) operation, where the graphics processor is used to perform SIMD vector operations using computation shader programs that are not explicitly related to rendering of graphics primitives.

[0312] In some embodiments, the media pipeline 2224 is configured in a similar manner to the 3D pipeline 2222. A set of commands that configure the media pipeline state 2240 is dispatched or placed in a command queue before the media object commands 2242. In some embodiments, the commands for the media pipeline state 2240 include data for configuring the media pipeline elements that will be used to process the media object. This includes, for example, data for configuring the video decode and video encode logic in the media pipeline, such as the encode or decode format. In some embodiments, the commands for the media pipeline state 2240 also support the use of one or more pointers to "indirect" state elements that contain a batch of state settings.

[0313] In some embodiments, a media object command 2242 provides a pointer to a media object for processing by the media pipeline. A media object includes a memory buffer containing the video data to be processed. In some embodiments, all media pipeline state must be valid before issuing a media object command 2242. Once the pipeline state is configured and the media object command 2242 is queued, the media pipeline 2224 is triggered via an execute command 2244 or equivalent execute event (e.g., a register write). The output from the media pipeline 2224 can then be post-processed by operations provided by the 3D pipeline 2222 or the media pipeline 2224. In some embodiments, GPGPU operations are configured and executed in a similar manner to the media operations. Graphics Software Architecture

[0314] 23 illustrates an exemplary graphics software architecture for a data processing system 2300, according to some embodiments. In some embodiments, the software architecture includes a 3D graphics application 2310, an operating system 2320, and at least one processor 2330. In some embodiments, the processor 2330 includes a graphics processor 2332 and one or more general-purpose processor cores 2334. The graphics application 2310 and the operating system 2320 each execute in system memory 2350 of the data processing system.

[0315] In some embodiments, the 3D graphics application 2310 includes one or more shader programs that include shader instructions 2312. The shader language instructions may be in a high-level shader language, such as Direct3D High Level Shader Language (HLSL), OpenGL Shader Language (GLSL), etc. The application also includes executable instructions 2314 in a machine language suitable for execution by a general-purpose processor core 2334. The application also includes graphics objects 2316 defined by vertex data.

[0316] In some embodiments, the operating system 2320 is a Microsoft® Windows® operating system from Microsoft Corporation, a proprietary UNIX®-style operating system, or an open source UNIX-style operating system that uses a variant of the Linux® kernel. The operating system 2320 can support a graphics API 2322, such as, for example, the Direct3D API, the OpenGL API, or the Vulkan API. If the Direct3D API is used, the operating system 2320 uses a front-end shader compiler 2324 to compile any shader instructions 2312 in HLSL into a lower-level shader language. The compilation can be a just-in-time (JIT) compilation, or the application can perform shader pre-compilation. In some embodiments, the high-level shaders are compiled into low-level shaders during compilation of the 3D graphics application 2310. In some embodiments, the shader instructions 2312 are provided in an intermediate format, such as, for example, a version of the Standard Portable Intermediate Representation (SPIR) used by the Vulkan API.

[0317] In some embodiments, user mode graphics driver 2326 includes a back-end shader compiler 2327 for converting shader instructions 2312 into a hardware-specific representation. If the OpenGL API is used, shader instructions 2312 in the GLSL high-level language are passed to user mode graphics driver 2326 for compilation. In some embodiments, user mode graphics driver 2326 communicates with kernel mode graphics driver 2329 using operating system kernel mode functions 2328. In some embodiments, kernel mode graphics driver 2329 communicates with graphics processor 2332 to dispatch commands and instructions. [IP core implementation]

[0318] One or more aspects of at least one embodiment may be implemented by representative code stored on a machine-readable medium that represents and / or defines logic within an integrated circuit, such as, for example, a processor. For example, the machine-readable medium may include instructions that represent various logic within a processor. When read by a machine, the instructions may cause the machine to manufacture logic for performing the techniques described herein. Such representations, known as "IP cores," are reusable units of integrated circuit logic that may be stored on a tangible machine-readable medium as a hardware model that describes the structure of the integrated circuit. The hardware model may be provided to various customers or manufacturing facilities that load the hardware model into a manufacturing machine that produces the integrated circuit. The integrated circuit may be manufactured such that the circuit performs the operations described in connection with any of the embodiments described herein.

[0319] FIG. 24A is a block diagram illustrating an IP core development system 2400 that can be used to fabricate an integrated circuit to perform operations, according to one embodiment. The IP core development system 2400 can be used to generate modular, reusable designs that can be incorporated into a larger design or used to build an entire integrated circuit (e.g., an SoC integrated circuit). The design facility 2430 can generate a software simulation 2410 of the IP core design in a high-level programming language (e.g., C / C++). The software simulation 2410 can be used to design, test, and verify the behavior of the IP core using a simulation model 2412. The simulation model 2412 can include functional, behavioral, and / or timing simulation. A register transfer level (RTL) design 2415 can then be created or synthesized from the simulation model 2412. The RTL design 2415 is an extraction of the behavior of the integrated circuit that models the flow of digital signals between hardware array registers, including associated logic that is implemented using the modeled digital signals. In addition to the RTL design 2415, a lower level design at the logic or transistor level may also be created, designed, or synthesized. Thus, the specific details of the initial design and simulation may vary.

[0320] The RTL design 2415 or equivalent may be further synthesized by the design facility into a hardware model 2420, which may be a hardware description language (HDL) or some other representation of the physical design data. The HDL may be further simulated or tested to verify the IP core design. The IP core design may be stored using a non-volatile memory 2440 (e.g., a hard disk, a flash memory, or any non-volatile storage medium) for delivery to a third-party manufacturing facility 2465. Alternatively, the IP core design may be transmitted via a wired connection 2450 or a wireless connection 2460 (e.g., via the Internet). The manufacturing facility 2465 may then manufacture an integrated circuit based at least in part on the IP core design. The manufactured integrated circuit may be configured to perform operations according to at least one embodiment described herein.

[0321] 24B illustrates a vertical cross-sectional view of an integrated circuit package assembly 2470 according to some embodiments described herein. The integrated circuit package assembly 2470 illustrates an implementation of one or more processors or accelerator devices as described herein. The package assembly 2470 includes multiple units of hardware logic 2472, 2474 coupled to a substrate 2480. The logic 2472, 2474 may be implemented at least in part in configurable logic or fixed function logic hardware and may include one or more portions of any of the processor cores, graphic processors, or other accelerator devices described herein. Each unit of logic 2472, 2474 may be implemented in a semiconductor die and coupled to the substrate 2480 via an interconnect structure 2473. The interconnect structure 2473 may be configured to route electrical signals between the logic 2472, 2474 and the substrate 2480 and may include interconnects such as, for example, but not limited to, bumps or pillars. In some embodiments, the interconnect structure 2473 may be configured to route electrical signals, such as, for example, input / output (I / O) signals and / or power or ground signals associated with the operation of the logic 2472, 2474. In some embodiments, the substrate 2480 is an epoxy-based laminate substrate. The substrate 2480 may include other suitable types of substrates in other embodiments. The package assembly 2470 may be connected to other electrical devices via the package interconnect 2483. The package interconnect 2483 may be coupled to a surface of the substrate 2480 to route electrical signals to other electrical devices, such as, for example, a motherboard, another chipset, or a multi-chip module.

[0322] In some embodiments, the units of logic 2472, 2474 are electrically coupled with a bridge 2482 configured to route electrical signals between the logic 2472, 2474. The bridge 2482 can be a high density interconnect structure that provides routes for the electrical signals. The bridge 2482 can include a bridge substrate comprised of glass or a suitable semiconductor material. Electrical routing features can be formed on the bridge substrate to provide chip-to-chip connections between the logic 2472, 2474.

[0323] Although two units of logic 2472, 2474 and bridge 2482 are shown, the embodiments described herein may include more or fewer logic units on one or more dies. If logic is included on a single die, bridge 2482 may be omitted, and thus one or more dies may be connected by zero or more bridges. Alternatively, multiple dies or units of logic may be connected with one or more bridges. Additionally, multiple logic units, dies, and bridges may be connected together in other possible configurations, including three-dimensional configurations.

[0324] FIG. 24C illustrates a package assembly 2490 including multiple units of hardware logic chiplets connected to a substrate 2480 (e.g., a base die). The graphics processing units, parallel processors, and / or computational accelerators described herein can be composed of various silicon chiplets that are manufactured separately. In this context, a chiplet is an at least partially packaged integrated circuit that includes separate units of logic that can be assembled with other chiplets into a larger package. A set of various chiplets with different IP core logic can be assembled into a single device. Furthermore, chiplets can be integrated into a base die or base chiplet using active interposer technology. The concepts described herein allow for interconnection and communication between different forms of IP within a GPU. IP cores can be manufactured using different process technologies and configured during manufacturing. This avoids the complexity of converging multiple IPs on the same manufacturing process, especially in large SoCs with several flavors of IP. Enabling the use of multiple process technologies reduces time to market and provides a cost-effective way to create multiple product SKUs. Additionally, the decomposed IP is more amenable to being independently power-gated, allowing components not being used in a given workload to be powered off, reducing overall power consumption.

[0325] The hardware logic chiplets can include dedicated hardware logic chiplets 2472, logic or I / O chiplets 2474, and / or memory chiplets 2475. The hardware logic chiplets 2472 and logic or I / O chiplets 2474 can be implemented at least in part in configurable logic or fixed function logic hardware and can include one or more portions of any of the processor cores, graphics processors, parallel processors, or other accelerator devices described herein. The memory chiplets 2475 can be DRAM (e.g., GDDR, HBM) memory or cache (SRAM) memory.

[0326] Each chiplet can be fabricated as a separate semiconductor die and coupled to substrate 2480 via interconnect structures 2473. Interconnect structures 2473 can be configured to route electrical signals between the various chiplets and logic in substrate 2480. Interconnect structures 2473 can include interconnects such as, for example, but not limited to, bumps or pillars. In some embodiments, interconnect structures 2473 can be configured to route electrical signals such as, for example, input / output (I / O) signals and / or power or ground signals associated with operation of the logic, I / O, and memory chiplets.

[0327] In some embodiments, substrate 2480 is an epoxy-based laminate substrate. Substrate 2480 may include other suitable types of substrates in other embodiments. Package assembly 2490 can be connected to other electrical devices via package interconnect 2483. Package interconnect 2483 may be coupled to a surface of substrate 2480 to route electrical signals to other electrical devices such as, for example, a motherboard, another chipset, or a multi-chip module.

[0328] In some embodiments, the logic or I / O chiplets 2474 and the memory chiplets 2475 can be electrically coupled via a bridge 2487 configured to route electrical signals between the logic or I / O chiplets 2474 and the memory chiplets 2475. The bridge 2487 can be a high density interconnect structure that provides a route for the electrical signals. The bridge 2487 can include a bridge substrate made of glass or a suitable semiconductor material. Electrical routing features can be formed on the bridge substrate to provide chip-to-chip connections between the logic or I / O chiplets 2474 and the memory chiplets 2475. The bridge 2487 may also be referred to as a silicon bridge or an interconnect bridge. For example, in some embodiments, the bridge 2487 is an Embedded Multi-die Interconnect Bridge (EMIB). In some embodiments, the bridge 2487 can simply be a direct connection from one chiplet to another.

[0329] Substrate 2480 can include hardware components for I / O 2491, cache memory 2492, and other hardware logic 2493. Fabric 2485 can be embedded in substrate 2480 and enable communication between various logic chiplets and logic 2491, 2493 within substrate 2480. In one embodiment, I / O 2491, fabric 2485, cache, bridges, and other hardware logic 2493 can be integrated into a base die that is stacked on top of substrate 2480.

[0330] In various embodiments, package assembly 2490 can include fewer or more components and chiplets interconnected by fabric 2485 or one or more bridges 2487. Chiplets in package assembly 2490 can be arranged in a 3D or 2.5D arrangement. In general, bridge structures 2487 can be used to facilitate point-to-point interconnections between, for example, logic or I / O chiplets and memory chiplets. Fabric 2485 can be used to interconnect various logic and / or I / O chiplets (e.g., chiplets 2472, 2474, 2491, 2493) with other logic and / or I / O chiplets. In one embodiment, cache memory 2492 in the substrate can function as a global cache for package assembly 2490, part of a distributed global cache, or a dedicated cache for fabric 2485.

[0331] FIG. 24D illustrates a package assembly 2494 including a replaceable chiplet 2495, according to one embodiment. The replaceable chiplet 2495 can be assembled into a standardized slot of one or more base chiplets 2496, 2498. The base chiplets 2496, 2498 can be coupled via a bridge interconnect 2497, which can be similar to other bridge interconnects described herein and can be, for example, an EMIB. Memory chiplets can also be connected to logic or I / O chiplets via a bridge interconnect. I / O and logic chiplets can communicate via an interconnect fabric. The base chiplets can each support one or more slots in a standardized format for one of logic or I / O or memory / cache.

[0332] In one embodiment, the SRAM and power delivery circuitry can be fabricated in one or more base chiplets 2496, 2498, which can be fabricated using a different process technology relative to the replaceable chiplets 2495 stacked on top of the base chiplets. For example, the base chiplets 2496, 2498 can be fabricated using a larger process technology, while the replaceable chiplets can be fabricated using a smaller process technology. One or more of the replaceable chiplets 2495 can be memory (e.g., DRAM) chiplets. Different memory densities can be selected for the package assembly 2494 based on the power and / or performance targeted for the product using the package assembly 2494. Furthermore, logic chiplets with different numbers and types of functional units can be selected during assembly based on the power and / or performance targeted for the product. Furthermore, chiplets containing different types of IP logic cores can be inserted into the replaceable chiplet slots, enabling hybrid processor designs that can mix and match IP blocks of different technologies. [Example system of chip integrated circuit]

[0333] 25-26B illustrate an example integrated circuit and associated graphics processor that may be manufactured using one or more IP cores according to various embodiments described herein. In addition to what is illustrated, other logic and circuitry may be included, including additional graphics processors / cores, peripheral interface controllers, or general-purpose processor cores.

[0334] 25 is a block diagram illustrating an exemplary system on chip integrated circuit 2500 that may be manufactured using one or more IP cores, according to one embodiment. The exemplary integrated circuit 2500 includes one or more application processors 2505 (e.g., CPU), at least one graphics processor 2510, and may further include an image processor 2515 and / or a video processor 2520, any of which may be modular IP cores from the same or multiple different design facilities. The integrated circuit 2500 includes a USB controller 2525, a UART controller 2530, an SPI / SDIO controller 2535, and an I / O controller 2540. 2 S / I 2 The integrated circuit may further include peripheral or bus logic including a C controller 2540. Additionally, the integrated circuit may include a display device 2545 coupled to one or more of a High-Definition Multimedia Interface (HDMI®) controller 2550 and a Mobile Industry Processor Interface (MIPI) display interface 2555. Storage may be provided by a flash memory subsystem 2560 including a flash memory and a flash memory controller. A memory interface may be provided via a memory controller 2565 to access an SDRAM or SRAM memory device. Some integrated circuits further include an embedded security engine 2570.

[0335] 26A-26B are block diagrams illustrating an example graphics processor for use in a SoC, according to embodiments described herein. FIG. 26A illustrates an example graphics processor 2610 of a system on a chip integrated circuit that may be manufactured using one or more IP cores, according to one embodiment. FIG. 26B illustrates an additional example graphics processor 2640 of a system on a chip integrated circuit that may be manufactured using one or more IP cores, according to one embodiment. The graphics processor 2610 of FIG. 26A is an example of a low power graphics processor core. The graphics processor 2640 of FIG. 26B is an example of a higher performance graphics processor core. Each of the graphics processors 2610, 2640 may be a variation of the graphics processor 2510 of FIG. 25.

[0336] As shown in FIG. 26A, the graphics processor 2610 includes a vertex processor 2605 and one or more fragment processors 2615A-2615N (e.g., 2615A, 2615B, 2615C, 2615D through 2615N-1, and 2615N). The graphics processor 2610 can execute different shader programs through separate logic such that the vertex processor 2605 is optimized to execute operations of a vertex shader program, while the one or more fragment processors 2615A-2615N execute fragment (e.g., pixel) shading operations for a fragment or pixel shader program. The vertex processor 2605 executes the vertex processing stage of the 3D graphics pipeline and generates primitive and vertex data. The fragment processors 2615A-2615N use the primitive and vertex data generated by the vertex processor 2605 to generate a frame buffer that is displayed on a display device. In one embodiment, the fragment processors 2615A-2615N are optimized to execute fragment shader programs provided in the OpenGL API, which can be used to perform operations similar to pixel shader programs provided in the Direct 3D API.

[0337] The graphics processor 2610 further includes one or more memory management units (MMUs) 2620A-2620B, caches 2625A-2625B, and circuit interconnects 2630A-2630B. The one or more MMUs 2620A-2620B provide virtual to physical address mapping for the graphics processor 2610, including the vertex processor 2605 and / or fragment processors 2615A-2615N, and may reference vertex or image / texture data stored in memory in addition to vertex or image / texture data stored in the one or more caches 2625A-2625B. In one embodiment, one or more MMUs 2620A-2620B may be synchronized with other MMUs in the system, including one or more MMUs associated with one or more application processors 2505, image processor 2515, and / or video processor 2520 of FIG. 25, so that each processor 2505-2520 may participate in a shared or unified virtual memory system. According to an embodiment, one or more circuit interconnects 2630A-2630B may enable graphics processor 2610 to interface with other IP cores in the SoC via an internal bus of the SoC or via a direct connection.

[0338] As shown in FIG. 26B, the graphics processor 2640 includes one or more MMUs 2620A-2620B, caches 2625A-2625B, and circuit interconnects 2630A-2630B of the graphics processor 2610 of FIG. 26A. The graphics processor 2640 includes one or more shader cores 2655A-2655N (e.g., 2655A, 2655B, 2655C, 2655D, 2655E, 2655F through 2655N-1, 2655N), which provides a unified shader core architecture in which a single core or type or cores can execute all types of programmable shader code, including shader program code implementing vertex shaders, fragment shaders, and / or compute shaders. The exact number of shader cores present can vary between embodiments and implementations. Additionally, the graphics processor 2640 includes an inter-core task manager 2645 that acts as a thread dispatcher, dispatching execution threads to one or more shader cores 2655A-2655N and tiling unit 2658 to accelerate tiling operations for tile-based rendering, where rendering operations for a scene are subdivided in image space, for example to exploit local spatial coherency within the scene or to optimize internal cache usage.

[0339] FIG. 27A illustrates a convolutional layer 2700 according to one embodiment. In the case of a convolutional neural network (CNN) convolutional layer 2700, input data 2710 to the convolutional layer 2700 may be represented as a H*W*C tensor, where H, W, and C represent the height, width, and number of channels of the input data 2710, respectively. A convolution operation may be performed on the input data 2710 with kernels 2730 to obtain an output 2750. In one embodiment, the kernels 2730 may be represented as several K*K*C tensors, where the height and width of each of the kernels 2730 is the same, denoted by K. In one embodiment, the height and width of the kernels may also be different. The output 2750 of the convolutional layer 2700 may be referred to as a launch. Note that H, W, K, C may be different for different convolutional layers. The size and number of input data 2710 (i.e., H*W*C tensors) and kernels 2730 are exemplary, but not limiting. If the activations of a previous convolutional layer enter the current convolutional layer 2700 as inputs, the inputs of the current convolutional layer 2700 may also be referred to as activations.

[0340] It is generally known to those skilled in the art that improving memory efficiency during the operation of the convolution layer 2700 is beneficial to enhance the computational performance of the CNN. The memory efficiency includes at least the memory load efficiency. As an example, the memory load efficiency may be the memory efficiency indicating the operation cost of the convolution layer relative to the memory cost.

[0341] For different convolution layers of CNN, the size H*W of the input data 2710 may decrease when the operation goes into a deeper layer, while the number of channels C of the input data 2710 may increase accordingly. As a person skilled in the art would understand, 3x3 matrices and 1x1 matrices are commonly used in the art as kernels 2730. Usually, the size of the input data 2710 may be much larger than the size of the kernel 2730 in a shallow layer. The input data 2710 may consume more memory than the kernel 2730 when calculated in a shallower layer, while the input data 2710 may consume less memory than the kernel 2730 when calculated in a deeper layer. The memory cost of the input data 2710 and the kernel 2730 may vary with different convolution layers, and memory cost needs to be saved to improve memory efficiency.

[0342] To solve the technical problem of high memory costs that can lead to low memory efficiency, embodiments relate to dynamically partitioning launches and kernels to improve memory efficiency.

[0343] FIG. 27B illustrates the execution of a convolution operation on input data and kernels according to one embodiment. Input data 2710 (hereinafter referred to as activations 2710) of a convolution layer 2700 may be divided into multiple activation groups 2712-1, 2712-2, ..., 2712-k, where the number of activation groups of activation 2710 is indicated by k. The multiple activation groups 2712-1, 2712-2, ..., 2712-k may have a size smaller than activation 2710, where each activation group corresponds to a portion of activation 2710. Those skilled in the art will appreciate that there are various partitioning strategies that may be used to partition input data into multiple activation groups. It should be noted that the number of activation groups is not limited to the number shown.

[0344] The kernels 2730 in the convolutional layer 2700 may be divided into multiple kernel groups 2732-1, 2732-2, ..., 2732-w, where the number of kernel groups in the kernels 2730 is denoted by w. Each of the multiple kernel groups 2732-1, 2732-2, ..., 2732-w may include multiple kernels 2730. Assume that the number of multiple kernels 2730 in a kernel group is n. Those skilled in the art will understand that there are various division strategies that may be used to divide the kernels into multiple kernel groups. It should be noted that the number of kernel groups and the number of kernels in each kernel group are not limited to the numbers shown.

[0345] 27A and 27B, during operation of the convolutional layer 2700, a convolution operation may be performed on each of a number of kernel groups 2732-1, 2732-2, ..., 2732-w for each of a number of activation groups 2712-1, 2712-2, ..., 2712-k.

[0346] In one embodiment, arrows 2722-1, 2722-2, ..., 2722-k may indicate a convolution operation performed on each of multiple activation groups 2712-1, 2712-2, ..., 2712-k using kernel group 2732-1. At time t1, corresponding to arrow 2722-1, a convolution operation may be performed on activation group 2712-1 using kernel group 2732-1, correspondingly generating a plurality of results. At time t2, corresponding to arrow 2722-2, a convolution operation may be performed on activation group 2712-2 using kernel group 2732-1, correspondingly generating a plurality of results. The operation using kernel group 2732-1 may continue until a convolution operation may be performed on activation group 2712-k using kernel group 2732-1 to generate a plurality of results corresponding to time tk, corresponding to arrow 2722-k.

[0347] The operation may then continue with the convolution operation being performed on each of the multiple activation groups 2712-1, 2712-2, ..., 2712-k using kernel group 2732-2.

[0348] After the convolution operations are performed for each of the multiple activation groups 2712-1, 2712-2, ..., 2712-k using the kernel group 2732-w, the operation for the convolution layer 2700 is completed. All results obtained during the operation of the convolution layer 2700 may be combined together to form an output 2750 of the convolution layer 2700.

[0349] By dividing the multiple activation groups and dividing the multiple kernel groups, a convolution operation can be performed on the activation groups using each kernel in each kernel group. Also, a convolution operation can be performed using multiple kernels in the kernel group of each activation group. The numbers k and n can be dynamically selected for different convolution layers of the CNN. Dynamically dividing the activations and kernels can help significantly reduce the memory cost of the convolution layers and improve memory efficiency. Details will be discussed below.

[0350] 28 illustrates a method for machine learning, according to one embodiment. In one embodiment, the method 2800 for machine learning may be performed by a computation engine. In one embodiment, the method 2800 may be performed by a graphics processing unit, a graphics multiprocessor, a graphics processor, a CPU, or a network processor. In one embodiment, the method 2800 may be performed during training or inference of a CNN.

[0351] At block 2802, the input data may include multiple activation groups received by a convolutional layer of a convolutional neural network (CNN) implemented on a computation engine. The convolutional layer may include one or more kernel groups, each of which may include multiple kernels. In one embodiment, the input data may be obtained from an input to the CNN. In one embodiment, the input data may be obtained from an output of a previous convolutional layer.

[0352] At block 2804, memory efficiency metrics may be determined based on the number of activation groups of the plurality of activation groups and the number of kernels of the plurality of kernels. In one embodiment, a lower limit on the number of activation groups of the plurality of activation groups may be associated with memory capacity, such as, for example, capacity of registers and buffers coupled to the compute engine. In one embodiment, an upper limit on the number of kernels of the plurality of kernels may be associated with arithmetic logic units (ALUs) on the compute engine, such as, for example, number, size, and computing capabilities of ALUs.

[0353] At block 2806, a first optimal number of activation groups and a second optimal number of kernels associated with an optimal memory efficiency metric among the plurality of memory efficiency metrics may be selected.

[0354] At block 2808, a convolution operation may be performed on the input data based on the first optimal number and the second optimal number. By utilizing the first optimal number and the second optimal number, memory efficiency of the convolution layer may be improved. In one embodiment, the memory efficiency metrics may indicate memory load efficiency.

[0355] In one embodiment, the selection of the first and second optimal numbers may be performed independently for different convolutional layers of the CNN. In one embodiment, after the first and second optimal numbers, denoted as p1 and p2, respectively, are selected for a convolutional layer, a convolution operation may be performed for this layer. The operation of the CNN may then continue for another convolutional layer, and another first and second optimal numbers, denoted as p1' and p2', respectively, may be selected for this layer. The number p1' may be greater than, equal to, or less than p1. The number p2' may be greater than, equal to, or less than p2. The method 2800 may be applied to any one or more convolutional layers of the CNN, and the input data and kernels for each one or more convolutional layers may be dynamically divided based on the selected first and second optimal numbers of the convolutional layer.

[0356] 29 illustrates a method for machine learning, according to one embodiment. In one embodiment, the method 2900 for machine learning may be performed by a computation engine. In one embodiment, the method 2900 may be performed by a graphics processing unit, a graphics multiprocessor, a graphics processor, a CPU, or a network processor. In one embodiment, the method 2900 may be performed during training or inference of a CNN.

[0357] At block 2902, the input data may include multiple activation groups received by a convolutional layer of a convolutional neural network (CNN) implemented on a computation engine. The convolutional layer may include one or more kernel groups, each of which may include multiple kernels. In one embodiment, the input data may be obtained from an input to the CNN. In one embodiment, the input data may be obtained from an output of a previous convolutional layer.

[0358] At block 2904, the invocation sparsity and kernel sparsity may be received by the computation engine. In one embodiment, the invocation sparsity may be obtained from an input to the CNN. In one embodiment, the invocation sparsity may be obtained from an output of a previous convolutional layer. In one embodiment, the kernel sparsity may be determined from the CNN.

[0359] Although each data element of the input data and each data element of the kernel must be used for the operation of the convolutional layer, some data elements with a value of zero may generate a result with a value of zero during the operation. These zero-valued data elements may not actually need to be calculated. If there are zero-valued data elements in the input data and kernel, the computing resources of the operation may be saved. The ratio of the number of zero-valued data elements to the number of total data elements of the input data may be referred to as the startup sparsity. The ratio of the number of zero-valued data elements to the number of total data elements of the kernel may be referred to as the kernel sparsity. The amount of computing resources utilized or the operational cost may be affected by the startup sparsity and the kernel sparsity.

[0360] In a single convolutional layer, the kernel sparsity may be fixed, but the invocation sparsity may vary with different input data. In different convolutional layers, the kernel sparsity may vary because different kernels may have different sizes and values ​​for different purposes. Therefore, it may be advantageous to use invocation sparsity and kernel sparsity to improve the memory efficiency of the convolutional layer.

[0361] During the computation of a convolutional layer, the memory efficiency metric to indicate the memory efficiency is given by the following formula: (m×n×k×Sa×Sk) / (m×k×Sa+m×n×Sk)…(1) where m is the number of channels of the input data, n is the number of kernels in the multiple kernels, k is the number of activation groups in the multiple activation groups, Sa is the activation sparsity, and Sk is the kernel sparsity. When removing the common m, the above formula becomes (n×k×Sa×Sk) / (k×Sa+n×Sk)…(2) A memory efficiency metric may be determined based on k, n, Sa, and Sk.

[0362] In one embodiment, during training of the CNN, example input data may be provided to the CNN, and the startup sparsity and kernel sparsity may be determined by a compiler implemented on the computation engine. In one embodiment, during inference of the CNN, the startup sparsity may be determined by a driver implemented on the computation engine, and the kernel sparsity may be received by the driver.

[0363] At block 2906, memory efficiency metrics may be determined based on the number of activation groups of the plurality of activation groups and the number of kernels of the plurality of kernels, and the activation sparsity and kernel sparsity. In one embodiment, a lower bound on the number of activation groups of the plurality of activation groups may be associated with storage capacity, such as, for example, capacity of registers and buffers coupled to the compute engine. In one embodiment, an upper bound on the number of kernels of the plurality of kernels may be associated with arithmetic logic units (ALUs) on the compute engine, such as, for example, number, size, and computing capabilities of ALUs.

[0364] In one embodiment, the memory efficiency metrics are calculated using the formula above. (n×k×Sa×Sk) / (k×Sa+n×Sk) where n is the number of kernels in the plurality of kernels, k is the number of activation groups in the plurality of activation groups, Sa is the activation sparsity, and Sk is the kernel sparsity.

[0365] At block 2908, a first optimal number of activation groups and a second optimal number of kernels associated with an optimal memory efficiency metric among the plurality of memory efficiency metrics may be selected.

[0366] At block 2910, a convolution operation may be performed on the input data based on the first optimal number and the second optimal number. By utilizing the first optimal number and the second optimal number, memory efficiency of the convolution layer may be improved. In one embodiment, the memory efficiency metrics may indicate memory load efficiency.

[0367] In one embodiment, the selection of the first and second optimal numbers may be performed independently for different convolutional layers of the CNN. In one embodiment, after the first and second optimal numbers, denoted as p1 and p2, respectively, are selected for a convolutional layer, a convolution operation may be performed for this layer. The operation of the CNN may then continue for another convolutional layer, and another first and second optimal numbers, denoted as p1' and p2', respectively, may be selected for this layer. The number p1' may be greater than, equal to, or less than p1. The number p2' may be greater than, equal to, or less than p2. The method 2900 may be applied to any one or more convolutional layers of the CNN, and the input data and kernels for each one or more convolutional layers may be dynamically divided based on the selected first and second optimal numbers of the convolutional layer.

[0368] Some of the various embodiments may be provided as a computer program product, which may include a computer-readable medium having computer program instructions stored thereon, which may be used to program a computer (or other electronic device) for execution by one or more processors to perform a process according to a particular embodiment. The computer-readable medium may include, but is not limited to, a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic or optical card, a flash memory, or any other type of computer-readable medium suitable for storing electronic instructions. Furthermore, the embodiments may also be downloaded as a computer program product, and the program may be transferred from a remote computer to a requesting computer. In some embodiments, a non-transitory computer-readable storage medium has stored thereon data representing sequences of instructions that, when executed by a processor, cause the processor to perform certain operations.

[0369] While many of the methods have been described in their most basic form, processes can be added or deleted to any of the methods and information can be added or deleted from any of the messages described without departing from the basic scope of the present embodiments. It will be apparent to those of ordinary skill in the art that many further modifications and adaptations can be made. The specific embodiments are provided to illustrate the concepts, not to limit them. The scope of the embodiments should be determined only by the claims that follow, and not by the specific examples provided above.

[0370] When element "A" is said to be connected to or with element "B," element A may be directly connected to element B or indirectly connected, for example, via element C. When the specification or claims describe component, function, structure, process, or property A as "causing" component, function, structure, process, or property B, it means that "A" is at least partially responsible for "B," but there may also be at least one other component, function, structure, process, or property that helps cause "B." When the specification indicates that a component, function, structure, process, or property "may," "might," or "could" be included, that particular component, function, structure, process, or property is not required to be included. When the specification or claims refer to "a" or "an" element, this does not mean that there is only one of the described element.

[0371] An embodiment is an implementation or example. References herein to "an embodiment," "one embodiment," "some embodiments," or "other embodiments" mean that a particular feature, structure, or characteristic described in connection with an embodiment is included in at least some embodiments, but not necessarily all embodiments. The various occurrences of "an embodiment," "one embodiment," or "some embodiments" do not necessarily all refer to the same embodiment. In the above description of exemplary embodiments, it should be understood that various features may be grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various novel aspects. However, this method of disclosure should not be interpreted as reflecting an intention that the claimed embodiments require more features than are expressly recited in each claim. Rather, as the following claims reflect, the novel aspects lie in less than all features of a single disclosed embodiment as described above. Accordingly, the claims are expressly incorporated into this description, with each claim standing on its own as a separate embodiment.

[0372] The following sections and / or examples relate to further embodiments or examples. Details of the examples may be used anywhere in one or more embodiments. Various features of different embodiments or examples may be combined in various ways with some features included and other features excluded to suit a variety of different applications. Examples may include subject matter such as methods, means for performing the functions of the methods, and at least one machine-readable medium including instructions that, when executed by a machine, cause the machine to perform the operations of a method or apparatus or system for facilitating hybrid communication according to the embodiments and examples described herein.

[0373] Further examples

[0374] Example 1 includes a method in a computational engine for performing machine learning, including receiving a plurality of activation groups included in input data by a convolutional layer of a convolutional neural network (CNN) implemented on the computational engine, the convolutional layer including one or more kernel groups, each of the one or more kernel groups including a plurality of kernels; determining a plurality of memory efficiency metrics based on a number of activation groups of the plurality of activation groups and a number of kernels of the plurality of kernels; selecting a first optimal number of activation groups and a second optimal number of kernels associated with an optimal memory efficiency metric among the plurality of memory efficiency metrics; and performing a convolution operation on the input data based on the first optimal number and the second optimal number.

[0375] Example 2 includes the subject matter of example 1, further including receiving the launch sparsity and the kernel sparsity, and determining the plurality of memory efficiency metrics is further based on the launch sparsity and the kernel sparsity.

[0376] Example 3 includes the subject matter of Example 2, with multiple memory efficiency metrics of the form (n×k×Sa×Sk) / (k×Sa+n×Sk) where n is the number of kernels in the plurality of kernels, k is the number of activation groups in the plurality of activation groups, Sa is the activation sparsity, and Sk is the kernel sparsity.

[0377] Example 4 includes the subject matter of example 1, where the selection of the first optimal number and the second optimal number is performed independently for different convolutional layers of the CNN.

[0378] Example 5 includes the subject matter of example 1, wherein a lower bound on the number of activation groups in the plurality of activation groups is associated with a register or buffer coupled to the computation engine.

[0379] Example 6 includes the subject matter of example 1, wherein an upper limit on the number of kernels in the plurality of kernels is associated with an arithmetic logic unit (ALU) on the computation engine.

[0380] Example 7 includes the subject matter of example 1, wherein a plurality of memory efficiency metrics indicate memory load efficiency.

[0381] Example 8 includes the subject matter of example 1, wherein the method is implemented during training or inference of a CNN.

[0382] Example 9 includes an apparatus for machine learning that includes a data storage device that stores a plurality of activation groups included in input data and one or more kernel groups, each including a plurality of kernels in a convolutional layer of a convolutional neural network (CNN), and one or more processors coupled to the data storage device, the CNN implemented on the one or more processors, the one or more processors receiving the plurality of activation groups by a convolutional layer, the convolutional layer including the one or more kernel groups; determining a plurality of memory efficiency metrics based on a number of activation groups of the plurality of activation groups and a number of kernels of the plurality of kernels; selecting a first optimal number of activation groups and a second optimal number of kernels associated with an optimal memory efficiency metric among the plurality of memory efficiency metrics; and performing a convolution operation on the input data based on the first optimal number and the second optimal number.

[0383] Example 10 includes the subject matter of example 9, and wherein the one or more processors further receive the launch sparsity and the kernel sparsity, and the one or more processors determine a plurality of memory efficiency metrics further based on the launch sparsity and the kernel sparsity.

[0384] Example 11 includes the subject matter of Example 10, and multiple memory efficiency metrics are (n×k×Sa×Sk) / (k×Sa+n×Sk) where n is the number of kernels in the plurality of kernels, k is the number of activation groups in the plurality of activation groups, Sa is the activation sparsity, and Sk is the kernel sparsity.

[0385] Example 12 includes the subject matter of example 9, wherein the one or more processors select the first optimal number and the second optimal number independently for different convolutional layers of the CNN.

[0386] Example 13 includes the subject matter of example 9, wherein the lower bound on the number of activation groups in the plurality of activation groups is associated with a register or buffer coupled to one or more processors.

[0387] Example 14 includes the subject matter of example 9, wherein an upper limit on the number of kernels in the plurality of kernels is associated with an arithmetic logic unit (ALU) on one or more processors.

[0388] Example 15 includes the subject matter of example 9, wherein the plurality of memory efficiency metrics indicate memory load efficiency.

[0389] Example 16 includes the subject matter of example 9, wherein the one or more processors include a graphics processor.

[0390] Example 17 includes a system for machine learning that includes means for performing a method as claimed in any of Examples 1-8.

[0391] Example 18 includes at least one computer-readable medium comprising a plurality of instructions for performing the method claimed in any of Examples 1-8 when executed on a computing device.

[0392] The above description and drawings should be regarded in an illustrative sense and not in a restrictive sense. Those skilled in the art will appreciate that various modifications and changes may be made to the embodiments described herein without departing from the broader spirit and scope of the present invention as set forth in the appended claims. (Item 1) 1. A method in a computational engine for performing machine learning, comprising: receiving a plurality of activation groups included in input data by a convolutional layer of a convolutional neural network (CNN) implemented on the computation engine, the convolutional layer comprising one or more kernel groups, the one or more kernel groups each having a plurality of kernels, the one or more kernel groups each including a plurality of kernels; determining a number of memory efficiency metrics based on a number of activation groups of the number of activation groups and a number of kernels of the number of kernels; selecting a first optimal number of activation groups and a second optimal number of kernels associated with an optimal memory efficiency metric among the plurality of memory efficiency metric; performing a convolution operation on the input data based on the first optimum number and the second optimum number; A method comprising: (Item 2) 2. The method of claim 1, further comprising receiving a launch sparsity and a kernel sparsity, and wherein determining the plurality of memory efficiency metrics is further based on the launch sparsity and the kernel sparsity. (Item 3) The above memory efficiency metrics are calculated using the following formula: (n×k×Sa×Sk) / (k×Sa+n×Sk) It is derived by the calculation of n is the number of kernels in the plurality of kernels; k is the number of activation groups of the plurality of activation groups, Sa is the above starting sparsity, Sk is the kernel sparsity above. The method according to item 2. (Item 4) The steps of selecting the first optimal number and the second optimal number are performed independently for different convolutional layers of the CNN. The method according to item 1. (Item 5) a lower limit on the number of activation groups of the plurality of activation groups is associated with a register or buffer coupled to the computation engine; The method according to item 1. (Item 6) an upper limit on the number of kernels of the plurality of kernels is associated with an arithmetic logic unit (ALU) on the computation engine; The method according to item 1. (Item 7) The plurality of memory efficiency metrics indicate memory load efficiency. The method according to item 1. (Item 8) The method is performed during training or inference of the CNN. The method according to item 1. (Item 9) 1. An apparatus for machine learning, comprising: A data storage device for storing a plurality of activation groups included in the input data and one or more kernel groups, each of which includes a plurality of kernels in a convolutional layer of a convolutional neural network (CNN); one or more processors coupled to the data storage device, the CNN being implemented on the one or more processors; The one or more processors: receiving the plurality of activation groups by the convolutional layer, the convolutional layer including the one or more kernel groups; determining a number of memory efficiency metrics based on a number of activation groups of the number of activation groups and a number of kernels of the number of kernels; selecting a first optimal number of activation groups and a second optimal number of kernels associated with an optimal memory efficiency metric among the plurality of memory efficiency metrics; performing a convolution operation on the input data based on the first optimal number and the second optimal number; Do Device. (Item 10) The one or more processors further include: receiving a launch sparsity and a kernel sparsity, the one or more processors determining the plurality of memory efficiency metrics further based on the launch sparsity and the kernel sparsity; Item 9. The apparatus according to item 9. (Item 11) The above memory efficiency metrics are calculated using the following formula: (n×k×Sa×Sk) / (k×Sa+n×Sk) It is derived by the calculation of n is the number of kernels in the plurality of kernels; k is the number of activation groups of the plurality of activation groups, Sa is the above starting sparsity, Sk is the kernel sparsity above. Item 11. The apparatus according to item 10. (Item 12) The one or more processors select the first optimal number and the second optimal number independently for different convolutional layers of the CNN. Item 9. The apparatus according to item 9. (Item 13) a lower limit on the number of activation groups of the plurality of activation groups is associated with a register or buffer coupled to the one or more processors; Item 9. The apparatus according to item 9. (Item 14) an upper limit on the number of kernels of the plurality of kernels is associated with an arithmetic logic unit (ALU) on the one or more processors; Item 9. The apparatus according to item 9. (Item 15) The plurality of memory efficiency metrics indicate memory load efficiency. Item 9. The apparatus according to item 9. (Item 16) the one or more processors include a graphics processor; Item 9. The apparatus according to item 9. (Item 17) A system for machine learning comprising means for performing the method claimed in any one of items 1 to 8. (Item 18) At least one computer-readable medium comprising a plurality of instructions for performing the method claimed in any of items 1 to 8 when executed on a computing device.

Claims

1. 1. A method in a computational engine for performing machine learning, comprising: receiving a plurality of activation groups included in input data by a convolutional layer of a convolutional neural network (CNN) implemented on the computation engine, the convolutional layer having one or more kernel groups, each of the one or more kernel groups including a plurality of kernels; determining a number of memory efficiency metrics based on a number of activation groups of the number of activation groups and a number of kernels of the number of kernels; selecting a first optimal number of activation groups and a second optimal number of kernels associated with an optimal memory efficiency metric among the plurality of memory efficiency metrics; performing a convolution operation on the input data based on the first optimum number and the second optimum number; A method comprising:

2. 2. The method of claim 1, further comprising receiving a launch sparsity and a kernel sparsity, wherein the determining the plurality of memory efficiency metrics is further based on the launch sparsity and the kernel sparsity.

3. The plurality of memory efficiency metrics may be calculated using the following formula: (n×k×Sa×Sk) / (k×Sa+n×Sk) It is derived by the calculation of n is the number of kernels in the plurality of kernels; k is the number of activation groups of the plurality of activation groups; Sa is the starting sparsity, Sk is the kernel sparsity, The method of claim 2.

4. The steps of selecting the first optimal number and the second optimal number are performed independently for different convolutional layers of the CNN.

4. The method according to any one of claims 1 to 3.

5. a lower limit on the number of activation groups of the plurality of activation groups is associated with a register or buffer coupled to the computation engine; 5. The method according to any one of claims 1 to 4.

6. an upper limit on the number of kernels of the plurality of kernels is associated with an arithmetic logic unit (ALU) on the computation engine; 6. The method according to any one of claims 1 to 5.

7. the plurality of memory efficiency metrics are indicative of memory load efficiency; 7. The method according to any one of claims 1 to 6.

8. The method is performed during training or inference of the CNN.

8. The method according to any one of claims 1 to 7.

9. 1. An apparatus for machine learning, comprising: A data storage device for storing a plurality of activation groups included in the input data and one or more kernel groups, each of which includes a plurality of kernels in a convolutional layer of a convolutional neural network (CNN); one or more processors coupled to the data storage device, the CNN being implemented on the one or more processors; The one or more processors: receiving, by the convolutional layer, the plurality of activation groups, the convolutional layer including the one or more kernel groups; determining a number of memory efficiency metrics based on a number of activation groups of the plurality of activation groups and a number of kernels of the plurality of kernels; and selecting a first optimal number of activation groups and a second optimal number of kernels associated with an optimal memory efficiency metric among the plurality of memory efficiency metrics; performing a convolution operation on the input data based on the first optimal number and the second optimal number; An apparatus for performing the above.

10. The one or more processors further include: receiving a launch sparsity and a kernel sparsity, and the one or more processors determining the plurality of memory efficiency metrics further based on the launch sparsity and the kernel sparsity; 10. The apparatus of claim 9.

11. The plurality of memory efficiency metrics may be calculated using the following formula: (n×k×Sa×Sk) / (k×Sa+n×Sk) It is derived by the calculation of n is the number of kernels in the plurality of kernels; k is the number of activation groups of the plurality of activation groups; Sa is the starting sparsity, Sk is the kernel sparsity, 11. The apparatus of claim 10.

12. The one or more processors select the first optimal number and the second optimal number independently for different convolutional layers of the CNN.

12. Apparatus according to any one of claims 9 to 11.

13. a lower limit on the number of activation groups of the plurality of activation groups is associated with a register or buffer coupled to the one or more processors; 13. Apparatus according to any one of claims 9 to 12.

14. an upper limit on the number of kernels of the plurality of kernels is associated with an arithmetic logic unit (ALU) on the one or more processors; 14. Apparatus according to any one of claims 9 to 13.

15. the plurality of memory efficiency metrics are indicative of memory load efficiency; 15. Apparatus according to any one of claims 9 to 14.

16. the one or more processors include a graphics processor; 16. Apparatus according to any one of claims 9 to 15.

17. A system for machine learning comprising means for carrying out the method according to any one of claims 1 to 8.

18. A program causing a computer to execute the method according to any one of claims 1 to 8.

19. At least one computer readable medium storing a program according to claim 18.

Citation Information

Patent Citations

  • Processing method, program, information processing apparatus, and image processing apparatus

    JP2019008421A

  • Method and apparatus for performing operations in convolutional neural network, and non-temporary storage medium

    JP2019082996A

  • Device and method for processing convolution operation using kernel

    US20190147319A1