Deep Learning Based Sample Selection for Adaptive Supersampling

A deep learning-based approach for sample selection in adaptive supersampling addresses inefficiencies in current methods by dynamically choosing high-quality samples, thereby enhancing rendering quality and performance in graphics processing.

JP7670432B2Active Publication Date: 2025-04-30INTEL CORP
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2020205543
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-06-10
Filing Date
2020-12-11
Publication Date
2025-04-30
Estimated Expiration
2040-12-11

AI Technical Summary

Technical Problem

Current deep learning-based sample selection methods for adaptive supersampling in graphics processing are inefficient due to the lack of effective techniques for dynamically selecting high-quality samples, leading to suboptimal rendering performance.

Method used

The implementation of a deep learning-based approach for sample selection, which utilizes a model trained to select adaptive supersampling samples based on the rendered scene, thereby optimizing the sampling process for improved rendering quality and performance.

Benefits of technology

This solution enhances rendering quality by dynamically selecting high-quality samples, leading to improved performance and efficiency in graphics processing, while also reducing computational overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007670432000001
    Figure 0007670432000001
  • Figure 0007670432000002
    Figure 0007670432000002
  • Figure 0007670432000003
    Figure 0007670432000003
Patent Text Reader

Abstract

To provide an apparatus for facilitating deep learning based selection of samples for adaptive supersampling.SOLUTION: In a computing system, a graphics processing unit includes one or more processing elements to: receive training data comprising input tiles and corresponding supersampling values for the input tiles, where each input tile comprises a plurality of pixels, and train, based on the training data, a machine learning model so as to identify a level of supersampling for a rendered tile of pixels.SELECTED DRAWING: Figure 19
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates generally to data processing, and more particularly to deep learning based sample selection for adaptive supersampling. [Background technology]

[0002] Modern parallel graphics data processing includes systems and methods developed to perform specific operations on graphics data, such as linear interpolation, tessellation, rasterization, texture mapping, depth testing, etc. Traditionally, graphics processors have used fixed function computation units to process graphics data; however, more recently, portions of graphics processors have been made programmable, allowing such processors to support a wider range of operations for processing vertex and fragment data.

[0003] To further improve performance, graphics processors typically implement processing techniques such as pipelining, which attempts to process as much graphics data as possible in parallel through different parts of the graphics pipeline. Parallel graphics processors with single instruction, multiple data (SIMD) or single instruction, multiple threads (SIMT) architectures are designed to maximize the amount of parallelism in the graphics pipeline. In a SIMD architecture, a computer with multiple processing elements attempts to perform the same operation on multiple data points simultaneously. In a SIMT architecture, a group of parallel threads attempts to synchronize and execute program instructions together as often as possible to increase processing efficiency. [Brief description of the drawings]

[0004] So that the above features of the present embodiments can be understood in detail, a more particular description of the embodiments briefly summarized here will be given by reference to the embodiments, some of which are illustrated in the accompanying drawings, which should be noted, however, that the accompanying drawings illustrate exemplary embodiments and therefore should not be construed as limiting the scope thereof.

[0005] [Figure 1] FIG. 1 is a block diagram of a processing system.

[0006] [Figure 2A] A computing system and a graphics processor are shown. [Figure 2B] A computing system and a graphics processor are shown. [Figure 2C] A computing system and a graphics processor are shown. [Figure 2D] A computing system and a graphics processor are shown.

[0007] [Figure 3A] 1 shows a block diagram of an additional graphics processor and computational accelerator architecture. [Figure 3B] 1 shows a block diagram of an additional graphics processor and computational accelerator architecture. [Figure 3C] 1 shows a block diagram of an additional graphics processor and computational accelerator architecture.

[0008] [Figure 4] 1 is a block diagram of a graphics processing engine of a graphics processor.

[0009] [Figure 5A] 1 illustrates the thread execution logic used in a graphics processor core, including an array of processing elements. [Figure 5B]1 illustrates the thread execution logic used in a graphics processor core, including an array of processing elements.

[0010] [Figure 6] 1 shows additional execution units.

[0011] [Figure 7] FIG. 2 is a block diagram showing a graphics processor instruction format.

[0012] [Figure 8] FIG. 13 is a block diagram of an additional graphics architecture.

[0013] [Figure 9A] 2 shows the graphics processor command format and command sequence. [Figure 9B] 2 shows the graphics processor command format and command sequence.

[0014] [Figure 10] 1 illustrates an exemplary graphics software architecture for a data processing system.

[0015] [Figure 11A] FIG. 1 is a block diagram showing an IP core development system.

[0016] [Figure 11B] 1 shows a cross-sectional side view of an integrated circuit package assembly.

[0017] [Figure 11C] A package assembly is shown that includes multiple units of hardware logic chiplets connected to a substrate (e.g., a base die).

[0018] [Figure 11D] 1 shows a package assembly containing replaceable chiplets.

[0019] [Figure 12] FIG. 1 is a block diagram illustrating an exemplary system on a chip integrated circuit.

[0020] [Figure 13A] FIG. 1 is a block diagram illustrating an exemplary graphics processor for use within a SoC. [Figure 13B] FIG. 1 is a block diagram illustrating an exemplary graphics processor for use within a SoC.

[0021] [Figure 14] 1 illustrates a machine learning software stack according to an embodiment.

[0022] [Figure 15A] Illustrates the layers of an exemplary deep neural network. [Figure 15B] Illustrates the layers of an exemplary deep neural network.

[0023] [Figure 16] An exemplary recurrent neural network is shown.

[0024] [Figure 17] Demonstrates training and deployment of deep neural networks.

[0025] [Figure 18] FIG. 2 is a block diagram showing distributed learning.

[0026] [Figure 19] FIG. 1 is a block diagram of an example computing system capable of facilitating deep learning based sample selection for adaptive supersampling in accordance with implementations of the present disclosure.

[0027] [Figure 20A]1 illustrates example tiles of pixels that are part of a rendered scene in accordance with implementations of the present disclosure. [Figure 20B] 1 illustrates example tiles of pixels that are part of a rendered scene in accordance with implementations of the present disclosure.

[0028] [Figure 21] 1 shows a table illustrating supersampling of multiple tiles for purposes of training an AI network according to an implementation of the present disclosure.

[0029] [Figure 22] 1 illustrates an example model for training to select samples for adaptive supersampling of image tiles in accordance with implementations of the present disclosure.

[0030] [Figure 23] FIG. 1 is a flow diagram illustrating an embodiment of a model training method for adaptive supersampling deep learning based sample selection.

[0031] [Figure 24] FIG. 1 is a flow diagram illustrating an embodiment of a model inference method for deep learning based sample selection for adaptive supersampling. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0032] A graphics processing unit (GPU) is communicatively coupled to a host / processor core, for example to accelerate graphics operations, machine learning operations, pattern analysis operations, and / or 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). Alternatively, the GPU may be integrated on the same package or chip as the cores, or may be communicatively coupled to the cores on an internal processor bus / interconnect (i.e., internal to the package or chip). Regardless of how the GPU is connected, the processor cores can assign work to the GPU in the form of a set of commands / instructions contained in a work descriptor. The GPU then uses dedicated circuitry / logic to efficiently process these commands / instructions.

[0033] In the following description, numerous specific details are set forth to provide a more thorough understanding. However, it will be apparent to one skilled in the art that the embodiments described herein may be practiced without one or more of these specific details. In other instances, well-known features have not been described to avoid obscuring the details of the embodiments.

[0034] System Overview 1 is a block diagram of a processing system 100 according to an embodiment. System 100 may be used in a single processor desktop system, a multiprocessor workstation system, or a server system having multiple processors 102 or processor cores 107. In one embodiment, system 100 is a processing platform embedded in 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.

[0035] In one embodiment, the system 100 may include, be coupled to, or be integrated into 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 100 is part of a mobile internet-connected device, such as a mobile phone, a smart phone, a tablet computing device, or a laptop with a small internal storage capacity. The processing system 100 may also include, be coupled to, or be integrated into a wearable device, such as a smart watch wearable device; smart eyewear or clothing enhanced with augmented reality (AR) or virtual reality (VR) capabilities to provide visual, audio, tactile output to supplement a real-world visual, audio, or tactile experience, or to provide other text, audio, graphic, video, holographic images or video, or tactile feedback; other augmented reality (AR) devices; or other virtual reality (VR) devices. In some embodiments, processing system 100 includes or is part of a television or set-top box device. In one embodiment, system 100 can include, be coupled to, or be integrated into an autonomous vehicle, such as a bus, a tractor-trailer, an automobile, a motor or electric bicycle, an airplane or glider (or any combination thereof). The autonomous vehicle can use system 100 to process the sensed environment around the vehicle.

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

[0037] In some embodiments, the processor 102 includes a cache memory 104. Depending on the architecture, the processor 102 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 102. In some embodiments, the processor 102 also uses an external cache (e.g., a level 3 (L3) cache or a last level cache (LLC)) (not shown), which may be shared within the processor core 107 using known cache coherency techniques. A register file 106 may additionally be included in the processor 102 and may include different types of registers (e.g., integer registers, floating point registers, status registers, and an instruction pointer register) for storing different types of data. Some registers may be general purpose registers and other registers may be specific to the design of the processor 102.

[0038] In some embodiments, the one or more processors 102 are coupled to one or more interface buses 110 to carry communication signals, such as address, data, or control signals, between the processors 102 and other components in the system 100. The interface bus 110, in one embodiment, may be a processor bus, such as a version of a Direct Media Interface (DMI) bus. However, the processor bus is not limited to a DMI bus and may include one or more peripheral component interconnect buses (e.g., PCI, PCI Express), memory buses, or other types of interface buses. In one embodiment, the processor 102 includes an integrated memory controller 116 and a platform controller hub 130. The memory controller 116 facilitates communication between memory devices and other components of the system 100, and the platform controller hub (PCH) 130 provides connectivity to I / O devices over a local I / O bus.

[0039] Memory device 120 may be a dynamic random access memory (DRAM) device, a static random access memory (SRAM) device, a flash memory device, a phase change memory device, or any other memory device having suitable performance to act as process memory. In one embodiment, memory device 120 may operate as system memory for system 100 to store data 122 and instructions 121 for use when one or more processors 102 execute applications or processes. Memory controller 116 also couples to an optional external graphics processor 118 that may communicate with one or more graphics processors 108 in processor 102 to perform graphics and media operations. In some embodiments, graphics, media, and / or computation operations may be assisted by accelerator 112, which is a co-processor that may be configured to perform a specialized set of graphics, media, or computation operations. For example, in one embodiment, accelerator 112 is a matrix multiplication accelerator used to optimize machine learning or computation operations. In one embodiment, accelerator 112 is a ray tracing accelerator that may be used to perform ray tracing operations in coordination with graphics processor 108. In one embodiment, external accelerator 119 may be used in place of or in coordination with accelerator 112.

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

[0041] In some embodiments, the platform controller hub 130 allows peripherals to connect to the memory device 120 and the processor 102 via a high-speed I / O bus. The I / O peripherals include, but are not limited to, an audio controller 146, a network controller 134, a firmware interface 128, a wireless transceiver 126, a touch sensor 125, and a data storage device 124 (e.g., non-volatile memory, volatile memory, hard disk drive, flash memory, NAND, 3D NAND, 3D XPoint, etc.). The data storage device 124 can be connected via a storage interface (e.g., SATA) or via a peripheral bus such as a peripheral component interconnect bus (e.g., PCI, PCI Express). The touch sensor 125 can include a touch screen sensor, a pressure sensor, or a fingerprint sensor. The wireless transceiver 126 may be a Wi-Fi transceiver, a Bluetooth transceiver, or a mobile network transceiver such as a 3G, 4G, 5G, or Long Term Evolution (LTE) transceiver. The firmware interface 128 enables communication with system firmware and may be, for example, a unified extensible firmware interface (UEFI). The network controller 134 may enable network connectivity to a wired network. In some embodiments, a high performance network controller (not shown) couples to the interface bus 110. The audio controller 146, in one embodiment, is a multi-channel high definition audio controller. In one embodiment, the system 100 includes an optional legacy I / O controller 140 for coupling legacy (e.g., Personal System 2 (PS / 2)) devices to the system.The platform controller hub 130 may also be connected to one or more universal serial bus (USB) controllers 142 to which input devices such as a keyboard and mouse combination 143, a camera 144, or other USB input devices may be connected.

[0042] It will be understood that the illustrated system 100 is exemplary and not limiting, as other types of data processing systems configured differently may be used. For example, instances of platform controller hub 130 and memory controller 116 may be integrated into a separate external graphics processor, such as external graphics processor 118. In one embodiment, platform controller hub 130 and / or memory controller 116 may be external to one or more processors 102. For example, system 100 may include external memory controller 116 and platform controller hub 130, which may be configured as a memory controller hub and a peripheral controller hub in a system chipset that communicates with processor 102.

[0043] For example, the circuit board (sled) on which components such as the CPU, memory, and other components are placed is designed for increased thermal characteristics. In some examples, processing components such as the processor are placed on the top side of the sled, while memory vicinity such as DIMMs are placed on the bottom side of the sled. As a result of the increased airflow provided by this design, the components can operate at higher frequencies and power levels than in a typical system, thereby improving performance. Additionally, the sled is configured to mate hand-in-hand with power and data communication cables in the rack, thereby enhancing the ability to quickly remove, upgrade, reinstall, and / or replace the sled. Similarly, the individual components placed on the sled, such as the processor, accelerator, memory, and data storage drives, are configured to be easily upgraded due to the increased spacing between each other. In an exemplary embodiment, the components further include hardware authentication features to prove their authenticity.

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

[0045] A power supply or power source can provide voltage and / or current to system 100 or any component or system described herein. In one example, the power source 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) power source. In one example, the power source includes a DC power source, such as an external AC-DC converter. In one example, the power source or power supply includes wireless charging hardware for charging by proximity of a charging field. In one example, the power source can include an internal battery, an AC power source, a motion-based power source, a solar power source, or a fuel cell power source.

[0046] 2A-2D illustrate a computing system and graphics processor provided by embodiments described herein. Elements of FIG. 2A-2D having the same reference number (or name) as elements in any other figure of the present application may operate or function in any manner similar to that described elsewhere in the present application, but are not limited to such.

[0047] 2A is a block diagram of an embodiment of a processor 200 having one or more processor cores 202A-202N, an integrated memory controller 214, and an integrated graphics processor 208. Processor 200 includes and can include additional cores up to additional core 202N, represented by a dashed box. Each of processor cores 202A-202N includes one or more internal cache units 204A-204N. In some embodiments, each processor core also has access to one or more shared cache units 206. The internal cache units 204A-204N and the shared cache unit 206 represent a cache memory hierarchy within processor 200. The cache memory hierarchy may include at least one level of instruction and data cache within each processor core, one or more levels of shared mid-level cache, such as level 2 (L2), level 3 (L3), level 4 (L4), and other cache levels, where the highest level of cache before external memory is classified as an LLC. In some embodiments, cache coherence logic maintains coherency between the various cache units 206 and 204A-204N.

[0048] In some embodiments, processor 200 may include a set of one or more bus controller units 216 and a system agent core 210. The one or more bus controller units 216 manage a set of peripheral buses, such as one or more PCI or PCI Express buses. The system agent core 210 provides management functions for various processor components. In some embodiments, system agent core 210 includes one or more integrated memory controllers 214 to manage access to various external memory devices (not shown).

[0049] In some embodiments, one or more of the processor cores 202A-202N include support for simultaneous multi-threading. In such embodiments, the system agent core 210 includes components for coordinating and operating the cores 202A-202N during multi-threaded processing. The system agent core 210 may further include a power control unit (PCU) that includes logic and components for coordinating the power state of the processor cores 202A-202N and the graphics processor 208.

[0050] In some embodiments, processor 200 further includes a graphics processor 208 for performing graphics processing operations. In some embodiments, graphics processor 208 couples to a set of shared cache units 206, including one or more integrated memory controllers 214, and a system agent core 210. In some embodiments, system agent core 210 also includes a display controller 211 that drives the graphics processor output to one or more coupled displays. In some embodiments, display controller 211 may also be a separate module coupled to the graphics processor via at least one interconnect, or may be integrated within graphics processor 208.

[0051] In some embodiments, a ring-based interconnect unit 212 is used to couple the internal components of processor 200. However, other interconnect units may be used, such as a point-to-point interconnect, a switched interconnect, or other techniques, including those known in the art. In some embodiments, graphics processor 208 couples to ring interconnect 212 via I / O link 213.

[0052] The exemplary I / O link 213 represents at least one of several types of I / O interconnects, including an on-package I / O interconnect that facilitates communication between various processor components and a high-performance embedded memory module 218, such as an eDRAM module. In some embodiments, each of the processor cores 202A-202N and the graphics processor 208 may use the embedded memory module 218 as a shared last-level cache.

[0053] In some embodiments, the processor cores 202A-202N are homogeneous cores that execute the same instruction set architecture. In another embodiment, the processor cores 202A-202N are heterogeneous in terms of instruction set architecture (ISA), where one or more of the processor cores 202A-202N execute a first instruction set and 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 202A-202N are heterogeneous in terms of microarchitecture, where one or more cores having a relatively high power consumption are combined with one or more power cores having a lower power consumption. In one embodiment, the processor cores 202A-202N are heterogeneous in terms of computational capability. Additionally, the processor 200 may be implemented as one or more chips or SoC integrated circuits having the illustrated components, in addition to other components.

[0054] FIG. 2B is a block diagram of hardware logic of a graphics processor core 219 according to some embodiments described herein. Elements of FIG. 2B 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, including, but not limited to, the manner described elsewhere herein. The graphics processor core 219 may be one or more graphics cores, sometimes referred to as a core slice, in a modular graphics processor. The graphics processor core 219 is an example of a graphics core slice, and a graphics processor as described herein may include multiple graphics core slices based on target power and performance envelopes. Each graphics processor core 219 may include a fixed function block 230 coupled with multiple sub-cores 221A-221F, also referred to as sub-slices, which include modular blocks of general purpose and fixed function logic.

[0055] In some embodiments, fixed function block 230 includes a geometry / fixed function pipeline 231 that may be shared by all sub-cores in graphics processor core 219, e.g., in a lower performance and / or lower power graphics processor implementation. In various embodiments, geometry / fixed function pipeline 231 includes a 3D fixed function pipeline (e.g., 3D pipeline 312 as in FIGS. 3A and 4) that includes a video front end unit, a thread spawner and thread dispatcher, and a unified return buffer manager that manages a unified return buffer (e.g., unified return buffer 418 of FIG. 4 as described below).

[0056] In one embodiment, the fixed function block 230 also includes a graphics SoC interface 232, a graphics microcontroller 233, and a media pipeline 234. The graphics SoC interface 232 provides an interface between the graphics processor core 219 and other processor cores in the system on a chip integrated circuit. The graphics microcontroller 233 is a programmable sub-processor that can be configured to manage various functions of the graphics processor core 219, including thread dispatch, scheduling, and preemption. The media pipeline 234 (e.g., media pipeline 316 of FIGS. 3A and 4) includes logic that facilitates decoding, encoding, pre-processing, and / or post-processing of multi-media data, including image and video data. The media pipeline 234 performs media processing via requests for computation or sampling logic in the sub-cores 221-221F.

[0057] In one embodiment, the SoC interface 232 enables the graphics processor core 219 to communicate with general-purpose application processor cores and / or other components in the SoC, including memory hierarchy elements such as shared last level cache memory, system RAM, and / or embedded on-chip or on-package DRAM. The SoC interface 232 also enables communication with fixed function devices in the SoC, such as a camera imaging pipeline, and enables and / or implements the use of global memory atomics that may be shared between a CPU and the graphics processor core 219 in the SoC. The SoC interface 232 may also implement power management controls for the graphics processor core 219 and enable an interface between the clock domain of the graphics core 219 and other clock domains in the SoC. In one embodiment, the SoC interface 232 enables 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 234 if media operations are to be performed, or to the geometry and fixed function pipelines (e.g., to the geometry and fixed function pipelines 231, geometry and fixed function pipelines 237) if graphics processing operations are to be performed.

[0058] The graphics microcontroller 233 can be configured to perform various scheduling and management tasks for the graphics processor core 219. In one embodiment, the graphics microcontroller 233 can perform graphics and / or compute workload scheduling on various graphics parallel engines in the execution unit (EU) arrays 222A-222F, 224A-224F in the sub-cores 221A-221F. In this scheduling model, host software executing on a CPU core of the SoC including the graphics processor core 219 can submit a workload to one of a number of graphics processor doors which initiates a scheduling operation on the appropriate graphics engine. The scheduling operation includes determining which workload to run next, submitting the workload to the command streamer, preempting existing workloads running in the engines, monitoring the progress of the workload, and notifying the host software when the workload is completed. In one embodiment, graphics microcontroller 233 may also facilitate low power or idle states for graphics processor core 219 and may provide graphics processor core 219 with the ability to save and restore registers within graphics processor core 219 across low power state transitions independent of the system's operating system and / or graphics driver software.

[0059] Graphics processor core 219 may have more or less than the illustrated sub-cores 221A-221F and may have up to N modular sub-cores. For each set of N sub-cores, graphics processor core 219 may also include shared function logic 235, shared and / or cache memory 236, geometry / fixed function pipeline 237, and additional fixed function logic 238 for accelerating various graphics and compute processing operations. Shared function logic 235 may include logic units related to shared function logic 420 of FIG. 4 (e.g., sampler, math, and / or inter-thread communication logic) that may be shared by each of the N sub-cores in graphics processor core 219. Shared and / or cache memory 236 may be a last level cache for the set of N sub-cores 221A-221F in graphics processor core 219 and may also function as a shared memory accessible by multiple sub-cores. Geometry / fixed function pipeline 237 may be included in place of geometry / fixed function pipeline 231 in fixed function block 230 and may include the same or similar logical units.

[0060] In one embodiment, graphics processor core 219 includes additional fixed function logic 238, which may include various fixed function acceleration logic used by graphics processor core 219. In one embodiment, additional fixed function logic 238 includes an additional geometry pipeline for use in position-only shading. In position-only shading, there are two geometry pipelines: a full geometry pipeline in geometry / fixed function pipeline 238, 231, and a cull pipeline, which is an additional geometry pipeline that may be included in additional fixed function logic 238. In one embodiment, the cull pipeline is a trimmed-down version of the full geometry pipeline. The full pipeline and the cull pipeline may run different instances of the same application, with each instance having a separate context. Position-only shading may hide long cull runs of discarded triangles, potentially allowing shading to complete sooner. For example, in one embodiment, the cull pipeline logic in the additional fixed function logic 238 can execute position shaders in parallel with the main application, and generally produces critical results faster than the full pipeline because the cull pipeline fetches and shades only the position attributes of vertices without rasterizing and rendering the pixels to the frame buffer. The cull pipeline can use the produced critical results to calculate visibility information for all triangles, whether those triangles are culled or not. The full pipeline (which in this example may be referred to as the reproduction pipeline) can use the visibility information to skip culled triangles in order to occlude only visible triangles that are ultimately passed to the rasterization phase.

[0061] In one embodiment, the additional fixed function logic 238 may also include machine learning acceleration logic, such as fixed function matrix multiplication logic, for implementations that include optimizations for machine learning training or inference.

[0062] Contained within each graphics sub-core 221A-221F is a set of execution resources that can be used to execute graphics, media, and computation operations as requested by the graphics pipeline, media pipeline, or shader programs. The graphics sub-cores 221A-221F include a number of EU arrays 222A-222F, 224A-224F, thread dispatch and inter-thread communication (TD / IC) logic 223A-223F, 3D (e.g., texture) samplers 225A-225F, media samplers 206A-206F, shader processors 227A-227F, and shared local memories (SLMs) 228A-228F. The EU arrays 222A-222F, 224A-224F each include multiple execution units, which are general purpose graphics processing units capable of executing floating point and integer / fixed point logical operations, including graphics, media, or computation shader programs, in service of graphics, media, or computation operations. The TD / IC logic 223A-223F performs local thread dispatch and thread control operations for the execution units in the sub-cores and facilitates communication between threads executing on the execution units of the sub-cores. The 3D samplers 225A-225F can load textures or other 3D graphics related data into memory. The 3D samplers can load texture data differently based on the configured sample state and the texture format associated with a given texture. The media samplers 206A-206F can perform similar load operations based on the type and format associated with the media data. In one embodiment, each graphics sub-core 221A-221F may alternatively include a unified 3D and media sampler. Threads executing in execution units within each sub-core 221A-221F may use shared local memory 228A-228F within each sub-core, allowing threads executing within a thread group to execute using a common pool of on-chip memory.

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

[0064] As shown, multi-core group 240A may include a set of graphics cores 243, a set of tensor cores 244, and a set of ray tracing cores 245. Scheduler / dispatcher 241 schedules and dispatches graphics threads for execution on the various cores 243, 244, 245. A set of register files 242 store operand values ​​used by cores 243, 244, 245 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 combined set of vector registers.

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

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

[0067] In some implementations, IOMMU 251 supports virtualization, where it may manage a first set of page tables for mapping guest / graphics virtual addresses to guest / graphics physical addresses and a second set of page tables for mapping guest / graphics physical addresses to system / host physical addresses (e.g., in system memory 249). The base addresses of each of the first and second sets of page tables may be stored in control registers and swapped in a context switch (e.g., so that a new context is provided for accessing the associated set of page tables). Although not shown in FIG. 2C, each of cores 243, 244, 245 and / or multi-core groups 240A-240N may include a translation lookaside buffer (TLB) for caching guest virtual to guest physical, guest physical to guest virtual, and guest virtual to host physical translations.

[0068] In one embodiment, CPU 246, GPU 239, and I / O devices 252 are integrated into a single semiconductor chip and / or chip package. The illustrated memory 249 may be integrated on the same chip or may be coupled to memory controller 248 via an off-chip interface. In one implementation, memory 249 includes GDDR6 memory that shares the same virtual address space with other physical system-level memory, although the principles underlying the invention are not limited to this particular implementation.

[0069] In one embodiment, tensor core 244 includes 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 can be used for neural network training and inference. Tensor core 244 can perform matrix operations using a variety of operand precisions, including single precision floating point (e.g., 32 bits), half precision floating point (e.g., 16 bits), integer word (16 bits), byte (8 bits), and half byte (4 bits). In one embodiment, the neural network implementation extracts features for each rendered scene, potentially combining details from multiple frames to construct a high-quality final image.

[0070] In a deep learning implementation, parallel matrix multiplication operations may be scheduled for execution on tensor cores 244. Training neural networks, in particular, requires a significant number of matrix dot product operations. To process the inner product formulation of N×N×N matrix multiplication, tensor cores 244 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 each of the N cycles. There are N dot products processed per cycle.

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

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

[0073] Additionally, as discussed above, a distributed approach to denoising may be used where the GPU 239 is in a computing device coupled to other computing devices via a network or high speed interconnect, in which case the interconnected computing devices may share neural network learning / training data to improve the speed at which the entire system learns to perform denoising for different types of image frames and / or different graphics applications.

[0074] In one embodiment, the ray tracing core 245 handles all BVH traversals and ray-primitive intersections, preventing the graphics core 243 from being overloaded with thousands of instructions per ray. In one embodiment, each ray tracing core 245 includes a first set of specialized circuitry for performing bounding box tests (e.g., traverse operations) and a second set of specialized circuitry for performing ray-triangle intersection tests (e.g., intersecting rays that crossed). Thus, in one embodiment, the multi-core group 240A can simply initiate ray probes, and the ray tracing core 245 independently performs ray traversals and intersections and returns hit data (e.g., hit, no hit, multi-hit, etc.) to the thread context. The other cores 243, 244 are freed to perform other graphics or compute other work when the ray tracing core 245 performs traversal and intersection operations.

[0075] In one embodiment, each ray tracing core 245 includes a traversal unit for performing BVH test operations and an intersection unit for performing ray-primitive intersection tests. The intersection unit generates a "hit," "no hit," or "multi-hit" response and provides it to the appropriate thread. Between traversal and intersection operations, the execution resources of other cores (e.g., graphics core 243 and tensor core 244) are freed to perform other forms of graphics work.

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

[0077] In one embodiment, the ray tracing core 245 (and / or other cores 243, 244) includes hardware support for Microsoft's DirectX Ray Tracing (DXR), including the DispatchRays command, and a ray tracing instruction set such as ray generation, nearest hit, any hit, and miss shaders, which allows for the assignment of a unique set of shaders and textures to each object. Another ray tracing platform that may be supported by the ray tracing core 245, graphics core 243, and tensor core 244 is Vulkan 1.1.85. However, the underlying principles of the present invention are not limited to any particular ray tracing ISA.

[0078] In general, the various cores 245, 244, 243 may support a ray tracing instruction set that includes instructions / functions for ray generation, nearest hit, any hit, ray-primitive intersection, primitive and hierarchy related bounding box construction, misses, visits, and exceptions. More specifically, one embodiment includes ray tracing instructions for performing the following functions:

[0079] ray generation - Ray generation commands can be executed for each pixel, sample, or other user-defined work allocation.

[0080] Nearest Hits - A nearest hit command can be executed to find the nearest intersection point of a ray with a primitive in the scene.

[0081] Any hit - The any hit command identifies multiple intersection points between rays and primitives in the scene, and potentially identifies a new closest intersection point.

[0082] Intersection - The intersection commands perform ray-primitive intersection tests and output the results.

[0083] Primitive-related bounding box construction - This command builds a bounding box around a given primitive or group of primitives (e.g., when building a new BVH or other acceleration data structure).

[0084] Miss - Indicates that the ray misses all geometry in the scene, or a specific area of ​​the scene.

[0085] Visit - Indicates the child volume that the ray will traverse.

[0086] exception - Contains different types of exception handling (called for different error conditions).

[0087] FIG. 2D is a block diagram of a general purpose graphics processing unit (GPGPU) 270 that can be configured as a graphics processor and / or computer accelerator according to embodiments described herein. The GPGPU 270 can be interconnected with a host processor (e.g., one or more CPUs 246) and memories 271, 272 via one or more system and / or memory buses. In one embodiment, the memory 271 is a system memory that may be shared with one or more CPUs 246, and the memory 272 is a device memory dedicated to the GPGPU 270. In one embodiment, components within the GPGPU 270 and the device memory 272 may be mapped to memory addresses accessible to one or more CPUs 246. Access to the memories 271 and 272 can be facilitated by a memory controller 268. In one embodiment, the memory controller 268 can include an internal direct memory access (DMA) controller 269 or logic to perform operations that would otherwise be performed by the DMA controller.

[0088] The GPGPU 270 includes a number of cache memories, including an L2 cache 253, an L1 cache 254, an instruction cache 255, and a shared memory 256, at least some of which may be partitioned as cache memories. The GPGPU 270 also includes a number of computational units 260A-260N. Each computational unit 260A-260N includes a set of vector registers 261, scalar registers 262, a vector logic unit 263, and a scalar logic unit 264. The computational units 260A-260N may also include a local shared memory 265 and a program counter 266. The computational units 260A-260N may be coupled with a constant cache 267, which may be used to store constant data, which is data that does not change during the execution of a kernel or shader program executing on the GPGPU 270. In one embodiment, constant cache 267 is a scalar data cache, and cached data can be fetched directly into scalar registers 262 .

[0089] During operation, one or more CPU(s) 246 can write commands to registers or memory in GPGPU 270 that are mapped to an accessible address space. Command processor 257 can read commands from registers or memory and determine how these commands are processed in GPGPU 270. Thread dispatcher 258 can then dispatch threads to compute units 260A-260N to execute these commands. Each compute unit 260A-260N can execute threads independently of the other compute units. Additionally, each compute unit 260A-260N can be independently configured for conditional computation and can conditionally output computation results to memory. Command processor 257 can interrupt one or more CPUs 246 when a submitted command is completed.

[0090] 3A-3C show block diagrams of additional graphics processor and computation accelerator architectures provided by embodiments described herein. Elements of FIG. 3A-3C having the same reference numbers (or the same or similar names) as elements of any other figure of this application may operate or function in a similar manner as described elsewhere in this application, may include the same components, and may be linked to other elements, but are not limited to such.

[0091] 3A is a block diagram of a graphics processor 300, which may be, but is not limited to, a separate graphics processing unit or a graphics processor integrated with multiple processing cores or other semiconductor devices such as memory devices or network interfaces. In some embodiments, the graphics processor communicates through a memory-mapped I / O interface to registers on the graphics processor and with commands located in the processor memory. In some embodiments, the graphics processor 300 includes a memory interface 314 for accessing memory. The memory interface 314 may be an interface to local memory, one or more internal caches, one or more shared external caches, and / or system memory.

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

[0093] In some embodiments, graphics processor 300 includes a block image transfer (BLIT) engine 304 to perform two-dimensional (2D) rasterizer operations, including, for example, bit-boundary block transfers. However, in one embodiment, 2D graphics operations are performed using one or more components of a graphics processing engine (GPE) 310. In some implementations, GPE 310 is a computation engine for performing graphics operations, including three-dimensional (3D) graphics operations and media operations.

[0094] In some embodiments, GPE 310 includes a 3D pipeline 312 for performing 3D processing such as rendering three-dimensional images and scenes using processing functions that operate on 3D primitive shapes (e.g., rectangles, triangles, etc.). 3D pipeline 312 includes programmable and fixed function elements that perform various tasks within the element and / or generate execution threads in 3D / media subsystem 315. While 3D pipeline 312 can be used to perform media processing, embodiments of GPE 310 also include a media pipeline 316 that is used specifically to perform media processing such as video post-processing and image enhancement.

[0095] In some embodiments, the media pipeline 316 includes fixed function or programmable logic units for performing one or more specialized media operations, such as video decode acceleration, video deinterlacing, and video encode acceleration, on behalf of or in lieu of the video codec engine 306. In some embodiments, the media pipeline 316 additionally includes a thread generation unit that generates threads for execution in the 3D / media subsystem 315. The generated threads perform computations for the media operations on one or more graphics execution units included in the 3D / media subsystem 315.

[0096] In some embodiments, the 3D / Media subsystem 315 includes logic for executing threads generated by the 3D pipeline 312 and the media pipeline 316. In one embodiment, the pipelines send thread execution requests to the 3D / Media subsystem 315, which includes thread dispatch logic for arbitrating the various requests and dispatching them to available thread execution resources. The execution resources include an array of graphics execution units for processing the 3D and media threads. In some embodiments, the 3D / Media subsystem 315 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.

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

[0098] The graphics processor 320 may be configured with a non-uniform memory access (NUMA) system in which memory devices 326A-326D are coupled to associated graphics engine tiles 310A-310D. A given memory device may be accessed by graphics engine tiles other than the tile to which it is directly connected. However, access latency to memory devices 326A-326D will be lowest when accessing the local tile. In one embodiment, a cache coherent NUMA (ccNUMA) system uses tile interconnects 323A-323F to enable communication between cache controllers in the graphics engine tiles 310A-310D to maintain a consistent memory image when multiple caches store the same memory locations.

[0099] The graphics processing engine cluster 322 may be connected to an on-chip or on-package fabric interconnect 324. The fabric interconnect 324 may enable communication between the graphics engine tiles 310A-310D and components such as the video codec 306 and one or more copy engines 304. The copy engines 304 may be used to move data to, from, in, and between the memory devices 326A-326D and memory external to the graphics processor 320 (e.g., system memory). The fabric interconnect 324 may also be used to interconnect the graphics engine tiles 310A-310D. The graphics processor 320 may optionally include a display controller 302 to enable connection to an external display device 318. The graphics processor may also be configured as a graphics or computation accelerator. In an accelerator configuration, the display controller 302 and the display device 318 may be omitted.

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

[0101] FIG. 3C illustrates a computation accelerator 330 according to an embodiment described herein. The computation accelerator 330 may include an architecture similar to the graphics processor 320 of FIG. 3B and is optimized for computation acceleration. The computation engine cluster 332 may include a set of computation engine tiles 340A-340D that include execution logic optimized for general-purpose parallel or vector-based computation. In some embodiments, the computation engine tiles 340A-340D do not include fixed-function graphics processing logic, but in one embodiment, one or more of the computation engine tiles 340A-340D may include logic for performing media acceleration. The computation engine tiles 340A-340D may be connected to memories 326A-326D via memory interconnects 325A-325D. The memories 326A-326D and memory interconnects 325A-325D may be of similar technology to the graphics processor 320 or may be different. The graphics compute engine tiles 340A-340D may also be interconnected via a set of tile interconnects 323A-323F, which may be connected to and / or interconnected by the fabric interconnect 324. In one embodiment, the compute accelerator 330 includes a large L3 cache 336, which may be configured as a device-wide cache. The compute accelerator 330 may also be connected to a host processor and memory via a host interface 328, in a manner similar to the graphics processor 320 of FIG. 3B.

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

[0103] In some embodiments, the GPE 410 is coupled to or includes a command streamer 403 that provides a command stream to the 3D pipeline 312 and / or the media pipeline 316. In some embodiments, the command streamer 403 is coupled to a memory, which may be one or more of a system memory or an internal cache memory and a shared cache memory. In some embodiments, the command streamer 403 receives commands from the memory and sends the commands to the 3D pipeline 312 and / or the media pipeline 316. The commands are directives that are fetched from a ring buffer that stores commands for the 3D pipeline 312 and the media pipeline 316. In one embodiment, the ring buffer may additionally include a batch command buffer that stores a batch of multiple commands. The commands for the 3D pipeline 312 may also include references to data stored in memory, such as, but not limited to, vertex and geometric data for the 3D pipeline 312, and / or image data and memory objects for the media pipeline 316. 3D pipeline 312 and media pipeline 316 process commands and data by executing operations on logic within the respective pipelines or by dispatching one or more execution threads to graphics core array 414. In one embodiment, graphics core array 414 includes one or more blocks of graphics cores (e.g., graphics core 415A, graphics core 415B), 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 processing, as well as fixed-function texture processing and / or machine learning and artificial intelligence acceleration logic.

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

[0105] In some embodiments, the graphics core array 414 includes execution logic for performing media functions such as video and / or image processing. In one embodiment, the execution units include general purpose logic that is programmable to perform parallel general purpose computing operations in addition to graphics processing operations. The general purpose logic may perform processing operations in parallel or in conjunction with general purpose logic in the processor core 107 of FIG. 1 or cores 202A-202N such as those in FIG. 2A.

[0106] Output data generated by threads executing on graphics core array 414 may output data to memory in unified return buffer (URB) 418. URB 418 may store data for multiple threads. In some embodiments, URB 418 may be used to transmit data between different threads executing on graphics core array 414. In some embodiments, URB 418 may additionally be used for synchronization between threads on the graphics core array and fixed function logic in shared function logic 420.

[0107] In some implementations, graphics core array 414 is scalable such that the array includes a variable number of graphics cores, each having a variable number of execution units based on the target power and performance level of GPE 410. In one embodiment, the execution resources are dynamically scalable, such that execution resources may be enabled or disabled as needed.

[0108] The graphics core array 414 couples to shared function logic 420 that includes multiple resources shared among the graphics cores in the graphics core array. The shared functions in the shared function logic 420 are hardware logic units that provide specialized complementary functions to the graphics core array 414. In various embodiments, the shared function logic 420 includes, but is not limited to, sampler 421, math 422, and inter-thread communication (ITC) 423 logic. Additionally, some embodiments implement one or more caches 425 in the shared function logic 420.

[0109] Shared functions are implemented at least when the demand for a given specialized function is insufficient for inclusion within the graphics core array 414. Instead, a single instance of that specialized function is implemented as a stand-alone entity within the shared functions logic 420 and shared among the execution resources within the graphics core array 414. The exact set of functions shared among and included within the graphics core array 414 varies from embodiment to embodiment. In some embodiments, certain shared functions within the shared functions logic 420 that are used extensively by the graphics core array 414 may be included within the shared functions logic 416 within the graphics core array 414. In various embodiments, the shared functions logic 416 within the graphics core array 414 may include some or all of the logic within the shared functions logic 420. In one embodiment, all logic elements within the shared functions logic 420 may be duplicated within the shared functions logic 416 of the graphics core array 414. In one embodiment, the shared function logic 420 is omitted in favor of the shared function logic 416 in the graphics core array 414.

[0110] Execution Unit 5A-5B illustrate thread execution logic 500 including an array of processing elements for use in a graphics processor core, according to embodiments described herein. Elements in FIG. 5A-5B having the same reference numbers (or names) as elements in other figures of the present application may operate or function in a manner similar to that described elsewhere in the present application, but are not limited to such. FIG. 5A-5B illustrates an overview of thread execution logic 500 that may represent the hardware logic shown in each of sub-cores 221A-221F of FIG. 2B. FIG. 5A represents an execution unit in a general-purpose graphics processor, while FIG. 5B represents an execution unit that may be used in a computer accelerator.

[0111] 5A, in some embodiments, the thread execution logic 500 includes a shader processor 502, a thread dispatcher 504, an instruction cache 506, a scalable execution unit including multiple execution units 508A-508N, a sampler 510, a shared local memory 511, a data cache 512, and a data port 514. In one embodiment, the scalable execution unit array is capable of dynamically scaling by enabling or disabling one or more execution units (e.g., any of execution units 508A, 508B, 508C, 508D, through 508N-1 and 508N) based on the computational requirements of a workload. In one embodiment, the included components are interconnected via an interconnect structure that links each of the components. In some embodiments, the thread execution logic 500 includes one or more connections to memory, such as system memory or cache memory, via one or more of the instruction cache 506, data port 514, sampler 510, and execution units 508A-508N. In some embodiments, each execution unit (e.g., 508A) is a stand-alone programmable general-purpose computational unit capable of executing multiple simultaneous hardware / threads while processing multiple data elements in parallel for each thread. In various embodiments, the array of execution units 508A-508N is scalable to include any number of individual execution units.

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

[0113] In some embodiments, the execution units 508A-508N support an instruction set that includes native support for many standard 3D graphics shader instructions, so that shader programs from graphics libraries (e.g., Direct3D and OpenGL) execute with minimal translation. The execution units support vertex and geometric 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 508A-508N is capable of multi-issue single instruction multiple data (SIMD) execution, allowing for an efficient execution environment when multi-threaded operation faces higher latency memory accesses. Each hardware thread within each execution unit has a dedicated high-bandwidth register file and associated independent thread state. Execution is multi-issue per clock for a pipeline capable of integer, single and double precision floating point operations, SIMD branching capability, logical operations, transcendental operations, and other operations. While waiting for data from memory or one of the shared functions, dependency logic within the execution units 508A-508N causes the waiting thread to sleep until the requested data is returned. While the waiting thread is sleeping, hardware resources may be allocated to processing other threads. For example, during a delay associated with a vertex shader operation, the execution unit may execute operations of a pixel shader, fragment shader, or another type of shader program (including a vertex shader). Various embodiments may apply to the use of execution through the use of single instruction multiple threads (SIMT) as an alternative to or in addition to using SIMD. References to SIMD cores or operations may also apply to SIMT or SIMD in combination with SIMT.

[0114] Each of the execution units 508A-508N operates on an array of data elements. The number of data elements is the "execution size", or number of channels, of the instruction. An execution channel is a logical unit of execution for data element access, masking, and flow control within an instruction. The number of channels may be independent of the number of physical arithmetic logic units (ALUs) or floating point units (FPUs) for a particular graphics processor. In some embodiments, the execution units 508A-508N support integer and floating point data types.

[0115] The execution unit instruction set includes SIMD instructions. Various data elements can be stored in registers as packed data types, and the execution unit processes 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 54-bit packed data elements (Quad-Word (QW) size data elements), eight separate 32-bit packed data elements (Double-Word (DW) size data elements), sixteen separate 16-bit packed data elements (Word (W) size data elements), or 32 separate 8-bit data elements (Byte (B) size data elements). However, different vector widths and register sizes are possible.

[0116] In one embodiment, one or more execution units may be combined into a fused execution unit 509A-509N with thread control logic (507A-507N) common to the fused EUs. Multiple EUs may be fused into an EU group. Each EU in a 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. Additionally, various SIMD widths may be implemented per EU, including but not limited to SIMD8, SIMD16, and SIMD32. Each fused graphics execution unit 509A-509N includes at least two execution units. For example, fused execution unit 509A includes a first EU 508A, a second EU 508B, and thread control logic 507A common to the first EU 508A and the second EU 508B. Thread control logic 507A controls the threads executing on fused graphics execution unit 509A and allows each EU in fused execution units 509A-509N to execute using a common instruction pointer register.

[0117] One or more internal instruction caches (e.g., 506) are included in the thread execution logic 500 for caching thread instructions for the execution units. In some embodiments, one or more data caches (e.g., 512) are included for caching thread data during thread execution. Threads executing on the execution logic 500 may also store explicitly managed data in the shared local memory 511. In some embodiments, a sampler 510 is included to provide texture sampling for 3D processing and media sampling for media processing. In some embodiments, the sampler 510 includes specialized texture or media sampling functions for processing texture or media data during the sampling process before providing the sampled data to the execution units.

[0118] During execution, the graphics and media pipeline sends thread start requests to the thread execution logic 500 via thread creation and dispatch logic. Once a group of geometric objects has been processed and rasterized into pixel data, pixel processor logic (e.g., pixel shader logic, fragment shader logic, etc.) within the shader processor 502 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, the pixel shader or fragment shader computes values ​​for various vertex attributes to be interpolated across the rasterized objects. In some embodiments, the pixel processor logic within the shader processor 502 then executes application programming interface (API) supplied pixel or fragment shader programs. To execute the shader programs, the shader processor 502 dispatches threads to the execution units (e.g., 508A) via the thread dispatcher 504. In some embodiments, the shader processor 502 uses texture sampling logic in the sampler 510 to access texture data in texture maps stored in memory. Arithmetic operations on the texture data and the input geometry data calculate pixel color data for each geometric piece or eliminate one or more pixels from further processing.

[0119] In some embodiments, the data port 514 provides a memory access mechanism for the thread execution logic 500 and outputs processed data to memory for further processing in the graphics processor output pipeline. In some embodiments, the data port 514 includes or is coupled to one or more cache memories (e.g., data cache 512) for caching data for memory access via the data port.

[0120] In one embodiment, the execution logic 500 may also include a ray tracer 505 capable of providing ray tracing acceleration functionality. The ray tracer 505 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.

[0121] 5B illustrates exemplary internal details of an execution unit 508 according to an embodiment. The graphics execution unit 508 may include an instruction fetch unit 537, a general purpose register file array (GRF) 524, an architectural register file array (ARF) 526, a thread arbiter 522, a send unit 530, a branch unit 532, a set of SIMD floating point units (FPUs) 534, and in one embodiment, a set of dedicated integer SIMD ALUs 535. The GRF 524 and ARF 526 include a set of general purpose register files and architectural register files associated with each concurrent hardware thread that may be active in the graphics execution unit 508. In one embodiment, per-thread architectural state is maintained in the ARF 526, and data used during thread execution is stored in the GRF 524. The execution state of each thread, including an instruction pointer for each thread, may be held in thread-specific registers in the ARF 526.

[0122] In one embodiment, the GSU 508 has an architecture that is a combination of simultaneous multithreading (SMT) and finely interleaved multithreading (IMT). The architecture has a modular organization that is tunable at design time based on the target number of simultaneous threads and the number of registers per execution unit, where the execution unit resources are divided across the logic used to execute the multiple simultaneous threads. The number of logical threads that can be executed by the GSU 508 is not limited to the number of hardware threads, and multiple logical threads can be assigned to each hardware thread.

[0123] In one embodiment, the graphics execution unit 508 can issue multiple instructions together, each of which may be a different instruction. The thread arbiter 522 of the graphics execution unit thread 508 can dispatch the instruction to one of the send unit 530, the branch unit 532, or the SIMD FPU for execution. Each execution thread can access 128 general purpose registers in the GRF 524, each of which 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 524, although embodiments are not so limited and other embodiments may provide greater or lesser register resources. In one embodiment, the graphics execution unit 508 is divided into seven hardware threads capable of independently performing computational operations, although the number of threads per execution unit can vary according to the embodiment. For example, in one embodiment, up to 16 hardware threads are supported. In an embodiment where seven threads may access 4K bytes, the GRF524 can store a total of 28K bytes. If 16 threads can access 4K bytes, the GRF524 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.

[0124] In one embodiment, memory operations, sampler operations, and other longer latency system communications are dispatched by "send" instructions executed by a message passing send unit 530. In one embodiment, branch instructions are dispatched to a dedicated branch unit 532 to facilitate SIMD diversity and eventual convergence.

[0125] In one embodiment, the graphics execution unit 508 includes one or more SIMD floating point units (FPUs) 534 to perform floating point operations. In one embodiment, the FPU(s) 534 also support integer calculations. In one embodiment, the FPU 534 can perform SIMD up to M 32-bit floating point (or integer) operations, or can perform SIMD 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 54-bit floating point. In some embodiments, a set of 8-bit integer SIMD ALUs 535 are also present and may be specially optimized to perform operations related to machine learning calculations.

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

[0127] FIG. 6 illustrates an additional execution unit 600 according to one embodiment. The execution unit 600 may be a computationally optimized execution unit for use in the compute engine tiles 340A-340D, such as those in FIG. 3C, but is not so limited. Variations of the execution unit 600 may also be used in the graphics engine tiles 310A-310D, as shown in FIG. 3B. In one embodiment, the execution unit 600 includes a thread control unit 601, a thread state unit 602, an instruction fetch / prefetch unit 603, and an instruction decode unit 604. The execution unit 600 further includes a register file 606 that stores registers that can be allocated to hardware threads within the execution unit. The execution unit 600 additionally includes a send unit 607 and a branch unit 608. In one embodiment, the send unit 607 and the branch unit 608 may operate similarly to the send unit 530 and the branch unit 532 of the graphics execution unit 508 of FIG. 5B.

[0128] Execution unit 600 also includes a computation unit 610 that includes multiple different types of functional units. In one embodiment, computation unit 610 includes an ALU unit 611 that includes an array of arithmetic logic units. ALU unit 611 can be configured to perform 64-bit, 32-bit, and 16-bit integer and floating point operations. The integer and floating point operations may be performed simultaneously. Computation unit 610 may also include a systolic array 612 and a math unit 613. Systolic array 612 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, systolic array 612 can be configured to perform matrix operations such as matrix dot product operations. In one embodiment, systolic array 612 supports 16-bit floating point operations, and 8-bit and 4-bit integer operations. In one embodiment, systolic array 612 can be configured to accelerate machine learning operations. In such an embodiment, systolic array 612 may be configured to support the bfloat 16-bit floating point format. In one embodiment, math unit 613 may be included to perform a particular subset of mathematical operations in a more efficient and lower power manner than ALU unit 611. Math unit 613 may include variations of math logic found in shared function logic of graphics processing engines provided by other embodiments (e.g., math logic 422 of shared function logic 420 of FIG. 4). In one embodiment, math unit 613 may be configured to perform 32-bit and 64-bit floating point operations.

[0129] The thread control unit 601 includes logic to control the execution of threads in the execution units. The thread control unit 601 may include thread arbitration logic to start, stop, and preempt the execution of threads in the execution units 600. The thread state unit 602 may be used to store thread states for threads assigned to execute on the execution units 600. Storing thread states within the execution units 600 allows for rapid preemption of threads if they become blocked or idle. The instruction fetch / prefetch unit 603 may fetch instructions from an instruction cache of a higher level of execution logic (e.g., instruction cache 506 such as in FIG. 5A). The instruction fetch / prefetch unit 603 may also issue prefetch requests for instructions to be loaded into the instruction cache based on an analysis of currently executing threads. The instruction decode unit 604 may be used to decode instructions to be executed by the compute units. In one embodiment, the instruction decode unit 604 may be used as a secondary decoder to decode complex instructions into micro-operation components.

[0130] The execution unit 600 additionally includes a register file 606 that can be used by the hardware threads executing on the execution unit 600. The registers in the register file 606 can be divided across logic used to execute multiple simultaneous threads within the compute units 610 of the execution unit 600. The number of logical threads that may be executed by the graphics execution unit 600 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 606 can vary depending on the embodiment based on the number of hardware threads supported. In one embodiment, register renaming can be used to dynamically allocate registers to hardware threads.

[0131] 7 is a block diagram illustrating a graphics processor instruction format 700 according to some embodiments. In one or more embodiments, a graphics processor execution unit supports an instruction set having instructions in multiple formats. The solid lined boxes indicate components that are typically included in an execution unit instruction, while the dashed lines include components that are optional or that are only included in a subset of the instructions. In some embodiments, the instruction format 700 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.

[0132] In some embodiments, the graphics processor execution units natively support instructions in the 128-bit instruction format 710. A 64-bit compact instruction format 730 is available for some instructions based on the selected instruction, instruction options, and number of operands. The native 128-bit instruction format 710 provides access to all instruction options, while some options and operations are limited in the 64-bit format 730. The native instructions available in the 64-bit format 730 vary depending on the embodiment. In some embodiments, the instructions are compacted in part using a set of index values ​​in the index field 713. The execution unit hardware looks up a set of compression tables based on the index values ​​and uses the compression table output to reconstruct the native instruction in the 128-bit instruction format 710. Other sizes and formats of instructions are possible.

[0133] For each format, the instruction opcode 712 defines the operation that the execution unit performs. The execution unit executes each instruction in parallel across multiple data elements of each operand. For example, in response to an add instruction, the execution unit performs a simultaneous add operation across each color channel representing a texture or picture element. By default, the execution unit executes each instruction across all data channels of an operand. In some embodiments, the instruction control field 714 allows control of certain execution options such as channel selection (e.g., prediction) and data channel order (e.g., swizzle). For instructions in the 128-bit instruction format 710, the exec-size field 716 limits the number of data channels that are executed in parallel. In some embodiments, the exec-size field 716 is not available for use with the 64-bit compact instruction format 730.

[0134] Some execution unit instructions have up to three operands, including two source operands, src0 720, src1 722, and one destination 718. In some embodiments, the execution units support dual destination instructions where one of the destinations is implied. Data manipulation instructions may have a third source operand (e.g., SRC2 724), and the instruction opcode 712 determines the number of source operands. The last source operand of an instruction may be a direct (e.g., hard-coded) value passed by the instruction.

[0135] In some embodiments, the 128-bit instruction format 710 includes an access / address mode field 726 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 in the instruction.

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

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

[0138] In some embodiments, instructions are grouped based on opcode 712 bit fields to simplify opcode decode 740. In an 8-bit opcode, bits 4, 5, and 6 allow the execution unit to determine the type of opcode. The distinct opcode groupings shown are merely illustrative. In some embodiments, the move and logical opcode group 742 includes data movement and logical instructions (e.g., move (mov), compare (cmp)). In some embodiments, the move and logical group 742 shares five most significant bits (MSBs), where move (mov) instructions are of the form 0000xxxxb and logical instructions are of the form 0001xxxb. The flow control instruction group 744 (e.g., call, jump (jmp)) includes instructions of the form 0010xxxxb (e.g., 0x20). Other instruction group 746 includes a mix of instructions including synchronization instructions (e.g., wait, send) in the format of 0011xxxxb (e.g., 0x30). Parallel math instruction group 748 includes component-wise arithmetic instructions (e.g., add, multiply) in the format of 0100xxxxb (e.g., 0x40). Parallel math group 748 performs arithmetic operations in parallel across data channels. Vector math group 750 includes arithmetic instructions (e.g., dp4) in the format of 0101xxxxb (e.g., 0x50). Vector math group performs operations such as dot product calculations of vector operands. The illustrated opcode decode 740, in one embodiment, can be used to determine which portion of the execution unit is used to execute the decoded instruction. For example, some instructions may be designated as systolic instructions to be executed by a systolic array. Other instructions, such as ray tracing instructions (not shown), may be routed to a ray tracing core or ray tracing logic within a slice or partition of the execution logic.

[0139] Graphics Pipeline Figure 8 is a block diagram of another embodiment of a graphics processor 800. Elements of Figure 8 having the same reference numbers (or names) as elements of any other figure in this application may operate or function in a similar manner as described elsewhere in this application, but are not limited to such.

[0140] In some embodiments, graphics processor 800 includes a geometry pipeline 820, a media pipeline 830, a display engine 840, thread execution logic 850, and a rendering output pipeline 870. In some embodiments, graphics processor 800 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 by commands issued to graphics processor 800 through a ring interconnect 802. In some embodiments, ring interconnect 802 couples graphics processor 800 to other processing components, such as other graphics processors or general-purpose processors. Commands from ring interconnect 802 are interpreted by a command streamer 803, which provides instructions to individual components of geometry pipeline 820 or media pipeline 830.

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

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

[0143] In some embodiments, the geometry pipeline 820 includes a tessellation component for performing hardware accelerated tessellation of 3D objects. In some embodiments, the programmable hull shader 811 configures the tessellation operations. The programmable domain shader 817 provides back-end evaluation of the tessellation output. The tessellator 813 operates at the direction of the hull shader 811 and includes special purpose logic for generating a set of detailed geometric objects based on a coarse geometric model provided as input to the geometry pipeline 820. In some embodiments, the tessellation components (e.g., the hull shader 811, the tessellator 813, and the domain shader 817) can be bypassed when tessellation is not used. The tessellation components can operate based on data received from the vertex shader 807.

[0144] In some embodiments, a complete geometric object can be processed by the geometry shader 819 by one or more threads dispatched to the execution units 852A-852B, or can proceed directly to the clipper 829. In some embodiments, the geometry shader operates on entire geometric objects, rather than vertices or patches of vertices as in previous stages of the graphics pipeline. The geometry shader 819 receives input from the vertex shader 807 when tessellation is disabled. In some embodiments, the geometry shader 819 is programmable by a geometry shader program to perform geometry tessellation when the tessellation unit is disabled.

[0145] Prior to rasterization, a clipper 829 processes the vertex data. The clipper 829 may be a fixed function clipper or a programmable clipper having clipping and geometry shader functions. In some implementations, a rasterizer and depth test component 873 in the rendering output pipeline 870 dispatches pixel shaders to convert the geometric objects into a pixel-by-pixel representation. In some embodiments, the pixel shader logic is included in the thread execution logic 850. In some embodiments, an application can bypass the rasterizer and depth test component 873 and access the unrasterized vertex data via the stream output unit 823.

[0146] Graphics processor 800 includes an interconnect bus, interconnect fabric, or some other interconnect mechanism that allows for the transmission of data and messages between the major components of the processor. In some embodiments, execution units 852A-852B and associated logic units (e.g., L1 cache 851, sampler 854, texture cache 858, etc.) interconnect via data port 856 to perform memory accesses and communicate with the rendering output pipeline components of the processor. In some embodiments, sampler 854, caches 851, 858, and execution units 852A-852B each have a separate memory access path. In one embodiment, texture cache 858 can be configured as a sampler cache.

[0147] In some embodiments, the render output pipeline 870 includes a rasterizer and depth test component 873 that converts vertex-based objects into associated pixel-based representations. In some embodiments, the rasterizer logic includes a window / mask unit for performing fixed function triangle and line rasterization. An associated render cache 878 and depth cache 879 are also available in some embodiments. A pixel operations component 877 performs pixel-based operations on the data, although in some instances pixel operations associated with 2D operations (e.g., bit-block image transfers with blending) are performed by the 2D engine 841 or are replaced by the display controller 843 using overlay display planes at display time. In some embodiments, a shared L3 cache 875 is available to all graphics components, allowing sharing of data without using main system memory.

[0148] In some embodiments, the graphics processor media pipeline 830 includes a media engine 837 and a video front end 834. In some embodiments, the video front end 834 receives pipeline commands from the command streamer 803. In some embodiments, the media pipeline 830 includes individual command streamers. In some embodiments, the video front end 834 processes the media commands before sending the commands to the media engine 837. In some embodiments, the media engine 837 includes a thread generation function that generates threads for dispatch by the thread dispatcher 831 to the thread execution logic 850.

[0149] In some embodiments, graphics processor 800 includes a display engine 840. In some embodiments, display engine 840 is external to processor 800 and couples to the graphics processor via ring interconnect 802, or some other interconnect bus or fabric. In some embodiments, display engine 840 includes a 2D engine 841 and a display controller 843. In some embodiments, display engine 840 includes dedicated logic capable of operating independently from the 3D pipeline. In some embodiments, display controller 843 couples to a display device (not shown), which may be a system integrated display device, such as in a laptop computer, or an external display device attached via a display device connector.

[0150] In some embodiments, the geometry pipeline 820 and the media pipeline 830 can be configured to perform operations based on multiple graphics and media programming interfaces and are not specific to any one application programming interface (API). In some embodiments, driver software for the graphics processor 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 for the Open Graphics Library (OpenGL), Open Computing Language (OpenCL), and / or Vulkan graphics and computation APIs are all provided by the Khronos Group. In some embodiments, support may be provided for the Direct3D library from Microsoft Corporation. In some embodiments, a combination of these libraries may be supported. Support may be provided for the Open Source Computer Vision Library (OpenCV). Future APIs with compatible 3D pipelines may also be supported, provided that a mapping from the pipeline of the future API to the pipeline of the graphics processor is possible.

[0151] Graphics Pipeline Programming FIG 9A is a block diagram illustrating a graphics processor command format 900 according to some embodiments. FIG 9B is a block diagram illustrating a graphics processor command sequence 910 according to an embodiment. The solid lined boxes in FIG 9A indicate components that are typically included in a graphics command, while the dashed lines indicate components that are optional or that are only included in a subset of graphics commands. The example graphics processor command format 900 of FIG 9A includes data fields to identify a client 902, a command operation code (opcode) 904, and data for the command 906. A sub-opcode 905 and a command size 908 are also included in some commands.

[0152] In some embodiments, the client 902 specifies a client unit 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 to condition further processing of the command and route the command data to the appropriate client unit. In some embodiments, the graphics processor client units include a memory interface unit, a rendering unit, a 2D unit, a 3D unit, and a media unit. Each client unit has a corresponding processing pipeline that processes the command. When a command is received by a client unit, the client unit reads the opcode 904 and, if any, the sub-opcode 905 to determine the operation to perform. The client unit executes the command using the information in the data field 906. For some commands, an explicit command size 908 is expected to specify the size of the command. In some embodiments, the command parser automatically determines the size of at least some commands based on the command opcode. In some embodiments, the commands are aligned in multiples of double words. Other command formats may be used.

[0153] The flow diagram of Figure 9B illustrates an exemplary graphics processor command sequence 910. 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 purposes of illustration only, as the embodiment is not limited to these particular commands or this command sequence. Furthermore, commands may be issued as a batch of commands within the command sequence such that the graphics processor processes the sequence of commands at least partially concurrently.

[0154] In some embodiments, the graphics processor command sequence 910 begins with a pipeline flush command 912, which causes any active graphics pipelines to complete any commands currently outstanding for that pipeline. In some embodiments, the 3D pipeline 922 and the media pipeline 924 do not operate simultaneously. The pipeline flush is executed to cause the active graphics pipelines to complete any outstanding commands. In response to the pipeline flush, the graphics processor's command parser pauses command processing until the active drawing engines complete their outstanding operations and the associated read cache is disabled. Optionally, any data in the rendering cache that is marked as "dirty" may be flushed to memory. In some embodiments, the pipeline flush command 912 may be used for pipeline synchronization or before placing the graphics processor in a low power state.

[0155] In some embodiments, a pipeline select command 913 is used when a command sequence instructs the graphics processor to explicitly switch between pipelines. In some embodiments, the pipeline select command 913 is used only once in an execution context prior to issuing a pipeline command unless the context issues commands to both pipelines. In some embodiments, a pipeline flush command 912 is used immediately prior to pipeline switching via the pipeline select command 913.

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

[0157] In some embodiments, the return buffer state command 916 is 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 operations write intermediate data during processing. In some embodiments, the graphics processor also uses one or more return buffers to store output data and for cross-thread communication. In some embodiments, the return buffer state 916 includes selecting the size and number of return buffers to use for a set of pipeline operations.

[0158] The remaining commands in the command sequence differ based on the active pipeline for the operation. Based on the pipeline decision 920, the command sequence is aligned to the 3D pipeline 922 beginning with a 3D pipeline state 930, or the media pipeline 924 beginning with a media pipeline state 940.

[0159] Commands for setting the 3D pipeline state 930 include set 3D state commands for vertex buffer state, vertex element state, constant color state, depth buffer state, and other state variables that should be set before 3D primitive commands are processed. The values ​​of these commands are determined at least in part based on the particular 3D API being used. In some embodiments, the 3D pipeline state 930 commands may also selectively disable or bypass certain pipeline elements if those elements are not used.

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

[0161] In some embodiments, the 3D pipeline 922 is triggered by an execute 934 command or event. In some embodiments, a register write triggers command execution. In some embodiments, execution is triggered by 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 with the graphics pipeline. The 3D pipeline performs geometric operations on 3D primitives. Once the operations are complete, the resulting geometric objects are rasterized and the pixel engine colors the resulting pixels. Additional commands to control pixel shading and pixel backend operations may be included for these operations.

[0162] In some embodiments, the graphics processor command sequence 910 follows the path of the media pipeline 924 when executing media video. In general, the specific use and manner of programming the media pipeline 924 depends on the media and computational operations being performed. Certain media decode operations may be offloaded to the media pipeline during media decoding. In some embodiments, the media pipeline may 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) operations, where the graphics processor is used to perform SIMD vector operations using computational shader programs that are not explicitly related to rendering graphics primitives.

[0163] In some embodiments, the media pipeline 924 is configured similarly to the 3D pipeline 922. A set of commands to set the media pipeline state 940 is dispatched or placed in the command queue before the media object commands 942. In some embodiments, the commands for the media pipeline state 940 include data to configure the media pipeline elements used to process the media objects. This includes data to configure 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 940 also support the use of one or more pointers to "indirect" state elements that contain a batch of state settings.

[0164] In some embodiments, the media object command 942 provides a pointer to a media object for processing by the media pipeline. The media object contains a memory buffer that contains the video data to be processed. In some embodiments, all media pipeline state must be “valid” before issuing the media object command 942. Once the pipeline state is set and the media object command 942 is queued, the media pipeline 924 is triggered by an execute command 944 or an equivalent execution event (e.g., a register write). The output from the media pipeline 924 can then be post-processed by operations provided by the 3D pipeline 922 or the media pipeline 924. In some embodiments, GPGPU operations are configured and executed in a similar manner to media operations.

[0165] Graphics Software Architecture 10 illustrates an exemplary graphics software architecture for a data processing system 1000 according to some embodiments. In some embodiments, the software architecture includes a 3D graphics application 1010, an operating system 1020, and at least one processor 1030. In some embodiments, the processor 1030 includes a graphics processor 1032 and one or more general-purpose processor cores 1034. The graphics application 1010 and the operating system 1020 each execute within the system memory 1050 of the data processing system.

[0166] In some embodiments, the 3D graphics application 1010 includes one or more shader programs that include shader instructions 1012. The shader language instructions may be in a high-level shader language such as Direct3D's High-level Shader Language (HLSL), OpenGL Shader Language (GLSL), etc. The application also includes executable instructions 1014 in a machine language suitable for execution by a general-purpose processor core 1034. The application also includes graphics objects 1016 defined by vertex data.

[0167] In some embodiments, the operating system 1020 is a Microsoft® Windows® operating system from Microsoft Corporation, a proprietary UNIX®-like operating system, or an open source UNIX®-like operating system using a variant of the Linux® kernel. The operating system 1020 may support a graphics API 1022, such as the Direct3D API, the OpenGL API, or the Vulkan API. If the Direct3D API is used, the operating system 1020 uses a front-end shader compiler 1024 to compile the HLSL shader instructions 1012 into a lower level shader language. The compilation may be a just-in-time (JIT) compilation, or the application may perform shader pre-compilation. In some embodiments, the high-level shaders are compiled into low-level shaders during compilation of the 3D graphics application 1010. In some embodiments, the shader instructions 1012 are provided in an intermediate format, such as a version of the Standard Portable Intermediate Representation (SPIR) used by the Vulkan API.

[0168] In some embodiments, the user mode graphics driver 1026 includes a back end shader compiler 1027 for converting the shader instructions 1012 into a hardware specific representation. If the OpenGL API is used, the shader instructions 1012 in the GLSL high level language are passed to the user mode graphics driver 1026 for compilation. In some embodiments, the user mode graphics driver 1026 communicates with the kernel mode graphics driver 1029 using operating system kernel mode functions 1028. In some embodiments, the kernel mode graphics driver 1029 communicates with the graphics processor 1032 for dispatching commands and instructions. IP Core Implementations

[0169] IP Core Implementation 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 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 cause the machine to form logic to perform the techniques described herein. Such representations, known as "IP cores," are reusable logic units for integrated circuits 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, which 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.

[0170] FIG. 11A is a block diagram illustrating an IP core development system 1100 that can be used to fabricate an integrated circuit to perform operations according to an embodiment. The IP core development system 1100 may 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., a SOC integrated circuit). A design facility 1130 can generate a software simulation 1110 of the IP core design in a high-level programming language (e.g., C / C++). The software simulation 1110 can be used to design, test, and verify the behavior of the IP core using a simulation model 1112. The simulation model 1112 may include functional, behavioral, and / or timing simulation. A register transfer level (RTL) design 1115 can then be created or synthesized from the simulation model 1112. The RTL design 1115 is an abstraction of the behavior of the integrated circuit that models the flow of digital signals between hardware registers, including associated logic that is implemented with the modeled digital signals. In addition to the RTL design 1115, lower level designs at the logic level or transistor level may be generated, designed, or synthesized. Thus, the specific details of the initial design and simulation may vary.

[0171] The RTL design 1115 or equivalent may be further synthesized by the design facility into a hardware model 1120, which may be in 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 1140 (e.g., a hard disk, a flash memory, or any non-volatile storage medium) for delivery to a third-party manufacturing facility 1165. Alternatively, the IP core design may be transmitted via a wired connection 1150 or a wireless connection 1160 (e.g., via the Internet). The manufacturing facility 1165 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.

[0172] 11B illustrates a cross-sectional side view of an integrated circuit package assembly 1170 according to some embodiments described herein. The integrated circuit package assembly 1170 illustrates an implementation of one or more processors or accelerator devices described herein. The package assembly 1170 includes multiple units of hardware logic 1172, 1174 coupled to a substrate 1180. The logic 1172, 1174 may be implemented, at least in part, in hardware of configurable logic or fixed function logic and may include any one or more portions of a processor core, graphics processor, or other accelerator device described herein. Each unit of logic 1172, 1174 may be implemented in a semiconductor die and coupled to the substrate 1180 via an interconnect structure 1173. The interconnect structure 1173 may be configured to route electrical signals between the logic 1172, 1174 and the substrate 1180 and may include, but is not limited to, interconnects such as bumps or pillars. In some embodiments, the interconnect structure 1173 may be configured to route electrical signals, such as input / output (I / O) signals and / or power or ground signals associated with the operation of the logic 1172, 1174. In some implementations, the substrate 1180 is an epoxy-based laminate substrate. The substrate 1180 may include other suitable types of substrates in other embodiments. The package assembly 1170 may be connected to other electrical devices via the package interconnect 1183. The package interconnect 1183 may be coupled to a surface of the substrate 1180 to route electrical signals to other electrical devices, such as a motherboard, another chipset, or a multi-chip module.

[0173] In some embodiments, the units of logic 1172, 1174 are electrically coupled to a bridge 1182 configured to route electrical signals between the logic 1172, 1174. The bridge 1182 may be a high density interconnect structure that provides paths for the electrical signals. The bridge 1182 may include a bridge substrate comprised of glass or a suitable semiconductor material. Electrical routing features can be formed in the bridge substrate to provide chip-to-chip connections between the logic 1172, 1174.

[0174] Although two units of logic 1172, 1174 and a bridge 1182 are shown, embodiments described herein may include more or less logic units on one or more dies. If the logic is included on a single die, bridge 1182 may be omitted, such that one or more dies can be connected by zero or more bridges. Alternatively, multiple dies or logic units can be connected by one or more bridges. Additionally, multiple logic units, dies, and bridges can be connected to each other in other possible configurations, including three-dimensional configurations.

[0175] FIG. 11C illustrates a package assembly 1190 including multiple units of hardware logic chiplets connected to a substrate 1180 (e.g., a base die). Graphics processing units, parallel processors, and / or computational accelerators as described herein can be composed of multiple silicon chiplets that are manufactured separately. In this context, a chiplet is an at least partially packaged integrated circuit that includes individual logic units that can be assembled into a larger package with other chiplets. A diverse set of 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 interconnection and communication between various forms of IP within a GPU. IP cores can be manufactured using various process technologies and configured during manufacturing, which avoids the complexity of concentrating multiple IPs, especially on a large SoC with multiple flavors of IP, in the same manufacturing process. Having multiple process technologies available improves time to market and provides a cost-effective way to create multiple product SKUs. In addition, the de-aggregated IP can be independently power-gated; components not used in a given workload can be powered off, reducing overall power consumption.

[0176] The hardware logic chiplets may include special purpose hardware logic chiplets 1172, logic or I / O chiplets 1174, and / or memory chiplets 1175. The hardware logic chiplets 1172 and logic or I / O chiplets 1174 may be implemented, at least in part, in configurable logic or fixed function logic hardware and may include any one or more portions of the processor cores, graphics processors, parallel processors, or other accelerator devices described herein. The memory chiplets 1175 may be DRAM (e.g., GDDR, HBM) memory or cache (SRAM) memory.

[0177] Each chiplet may be fabricated as a separate conductor die and coupled to substrate 1180 via interconnect structures 1173. Interconnect structures 1173 may be configured to route electrical signals between the various chiplets and logic in substrate 1180. Interconnect structures 1173 may include interconnects such as, but are not limited to, bumps or pillars. In some embodiments, interconnect structures 1173 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, I / O, and memory chiplets.

[0178] In some embodiments, the substrate 1180 is an epoxy-based laminate substrate. The substrate 1180 may include other suitable types of substrates in other embodiments. The package assembly 1190 may be connected to other electrical devices via the package interconnect 1183. The package interconnect 1183 may be coupled to a surface of the substrate 1180 for routing electrical signals to other electrical devices, such as a motherboard, another chipset, or a multi-chip module.

[0179] In some embodiments, the logic or I / O chiplets 1174 and the memory chiplets 1175 can be electrically coupled through a bridge 1187 configured to route electrical signals between the logic or I / O chiplets 1174 and the memory chiplets 1175. The bridge 1187 can be a high density interconnect structure that provides a route for the electrical signals. The bridge 1187 can include a bridge substrate that is constructed 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 1174 and the memory chiplets 1175. The bridge 1187 can also be referred to as a silicon bridge or an interconnect bridge. For example, the bridge 1187 can be an embedded multi-die interconnect bridge (EMIB) in some embodiments. In some embodiments, the bridge 1187 can simply be a direct connection from one chiplet to another.

[0180] The substrate 1180 may include hardware components for I / O 1191, cache memory 1192, and other hardware logic 1193. A fabric 1185 may be embedded within the substrate 1180 to enable communication between the various logic chiplets and the logic 1191, 1193 within the substrate 1180. In one embodiment, the I / O 1191, fabric 1185, cache, bridges, and other hardware logic 1193 may be integrated into a base die that is stacked on top of the substrate 1180. The fabric 1185 may be a network of over chip interconnects or another form of packet switched fabric that switches data packets between components of a package assembly.

[0181] In various embodiments, package assembly 1190 can include fewer or more components and chiplets interconnected by fabric 1185 or one or more bridges 1187. Chiplets within package assembly 1190 can be arranged in a 3D or 2.5D format. In general, bridge structures 1187 can be used to facilitate point-to-point interconnections between, for example, logic or I / O chiplets and memory chiplets. Fabric 1185 can be used to interconnect various logic and / or I / O chiplets (e.g., chiplets 1172, 1174, 1191, 1193) with other logic and / or I / O chiplets. In one embodiment, cache memory 1192 within the substrate can function as a global cache for package assembly 1190, part of a distributed global cache, or a dedicated cache for fabric 1185.

[0182] FIG. 11D illustrates a package assembly 1194 including a replaceable chiplet 1195, according to one embodiment. The replaceable chiplet 1195 can be assembled into a standardized slot on one or more base chiplets 1196, 1198. The base chiplets 1196, 1198 can be coupled via a bridge interconnect 1197, which can be similar to other bridge interconnects described herein, such as an EMIB. Memory chiplets can also be connected to logic or I / O chiplets via a bridge interconnect. The I / O and logic chiplets can communicate via an interconnect fabric. Each of the base chiplets can support one or more slots in a standardized format for one of logic or I / O or memory / cache.

[0183] In one embodiment, the SRAM and power distribution circuitry can be fabricated in one or more of the base chiplets 1196, 1198, which can be fabricated using a different process technology relative to the replaceable chiplets 1195 that are stacked on top of the base chiplets. For example, the base chiplets 1196, 1198 can be fabricated using a larger process technology and the replaceable chiplets can be fabricated using a smaller process technology. One or more of the replaceable chiplets 1195 can be memory (e.g., DRAM) chiplets. Various memory densities can be selected for the package assembly 1194 based on the target power and / or performance for the product that uses the package assembly 1194. Furthermore, logic chiplets with a variety of functional units can be selected at assembly time based on the target power and / or performance of the product. Furthermore, chiplets containing different types of IP logic cores can be inserted into the replaceable chiplet slots, allowing for hybrid processor designs where different technology IP blocks can be mixed and matched.

[0184] System example for chip integrated circuit 12-13 illustrate example integrated circuits and associated graphics processors 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.

[0185] 12 is a block diagram illustrating an exemplary system on a chip integrated circuit 1200 that can be manufactured using one or more IP cores according to one embodiment. The exemplary integrated circuit 1200 includes one or more application processors 1205 (e.g., CPUs) and at least one graphics processor 1210, and may further include an image processor 1215 and / or a video processor 1220, any of which may be modular IP cores from the same or multiple different design facilities. The integrated circuit 1200 includes a USB controller 1225, a UART controller 1230, an SPI / SDIO controller 1235, and an I / O controller 1236. 2 S / I 2 The integrated circuit may further include peripheral or bus logic including a C controller 1240. Additionally, the integrated circuit may include a display device 1245 coupled to one or more of a High Definition Multimedia Interface (HDMI®) controller 1250 and a Mobile Industrial Processor Interface (MIPI) display interface 1255. Storage may be provided by a flash memory subsystem 1260 including a flash memory and a flash memory controller. Memory interfacing may be provided through a memory controller 1265 for access to SDRAM or SRAM memory devices. Some integrated circuits further include an embedded security engine 1270.

[0186] 13A-13B are block diagrams illustrating an example graphics processor for use in an SoC according to embodiments described herein. FIG. 13A illustrates an example graphics processor 1310 of a system on a chip integrated circuit that may be manufactured using one or more IP cores according to an embodiment. FIG. 13B illustrates an additional example graphics processor 1340 of a system on a chip integrated circuit that may be manufactured using one or more IP cores according to an embodiment. The graphics processor 1310 of FIG. 13A is an example of a low power graphics processor core. The graphics processor 1340 of FIG. 13B is an example of a high performance graphics processor core. Each of the graphics processors 1310, 1340 may be a variation of the graphics processor 1210 of FIG. 12.

[0187] As shown in FIG. 13A, the graphics processor 1310 includes a vertex processor 1305 and one or more fragment processors (e.g., 1315A, 1315B, 1315C, 1315D, 1315N-1, and 1315N). The graphics processor 1310 is capable of executing different shader programs with separate logic such that the vertex processor 1305 is optimized to perform operations on vertex shader programs, while one or more fragment processor(s) 1315A-1315N perform fragment (e.g., pixel) shader operations on fragment or pixel shader programs. The vertex processor 1305 executes the vertex processing stage of the 3D graphics pipeline and generates primitive and vertex data. The fragment processor(s) 1315A-1315N use the primitive and vertex data generated by the vertex processor 1305 to generate a frame buffer that is displayed on a display device. In one embodiment, the fragment processor(s) 1315A-1315N are optimized to execute fragment shader programs, as provided in the OpenGL API, which can be used to perform operations similar to pixel shader programs, as provided in the Direct3D API.

[0188] The graphics processor 1310 further includes one or more memory management units (MMUs) 1320A-1320B, caches 1325A-1325B, and circuit interconnects 1330A-1330B. The one or more MMU(s) 1320A-1320B may provide virtual memory for the graphics processor 1310, including the vertex processor 1305 and / or fragment processor(s) 1315A-1315N. 対It provides a physical address mapping that can reference vertices or image / texture data stored in memory in addition to vertices or image / texture data stored in one or more caches 1325A-1325B. In one embodiment, one or more MMU(s) 1320A-1320B can be synchronized with other MMUs in the system, including one or more MMUs associated with one or more application processors 1205, image processor 1215, and / or video processor 1220 of FIG. 12, such that each processor 1205-1220 can participate in a shared or unified virtual memory system. One or more circuit interconnect(s) 1330A-1330B enable an embodiment of the graphics processor 1310 to interface with other IP cores in the SoC, either via the SoC's internal bus or via a direct connection.

[0189] As shown in Figure 13B, graphics processor 1340 includes one or more MMUs 1320A-1320B, caches 1325A-1325B, and circuit interconnects 1330A-1330B of graphics processor 1310 of Figure 13A. Graphics processor 1340 includes one or more shader cores 1355A-1355N (e.g., 1355A, 1355B, 1355C, 1355D, 1355E, 1355F, through 1355N-1, and 1355N) to provide 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 presented may vary depending on the embodiment and implementation. Additionally, the graphics processor 1340 includes an inter-core task manager 1345 that functions as a thread dispatcher for dispatching execution threads to one or more shader cores 1355A-1355N, and a tile unit 1358 that accelerates tile processing for tile-based rendering, where rendering operations for a scene are subdivided in image space, e.g., to exploit local spatial coherence within the scene or to optimize internal cache usage.

[0190] In some embodiments, a processing resource may represent a processing element (e.g., a GPGPU core, a ray tracing core, a tensor core, an execution resource, an execution unit (EU), a stream processor, a streaming multiprocessor (SM), a graphics multiprocessor) associated with a graphics processor or a graphics processor structure (e.g., a parallel processing unit, a graphics processing engine, a multi-core group, a compute unit, a compute unit of a next graphics core) within a GPU as described herein. For example, a processing resource may be one of a GPGPU core or a tensor / ray tracing core of a graphics multiprocessor; a ray tracing core, a tensor core or a GPGPU core of a graphics multiprocessor; an execution resource of a graphics multiprocessor; one of a GFX core, a tensor core or a ray tracing core of a multi-core group; one of a vector logic unit or a scalar logic unit of a compute unit; an EU array or an execution unit having an EU array; an execution unit of execution logic; and / or an execution unit. A processing resource may also be, for example, a graphics processing engine, a processing cluster, a GPGPU, a graphics processing engine, a graphics processing engine cluster, and / or execution resources within a graphics processing engine. A processing resource may also be a processing resource within a graphics processor, a graphics processor, and / or a graphics processor.

[0191] Machine Learning Overview Machine learning algorithms are algorithms that are capable of learning based on a data set. Embodiments of machine learning algorithms can be designed to model high-level abstractions within a data set. For example, image recognition algorithms can be used to determine which of several categories a given input belongs to; regression algorithms can output a numerical value given an input; pattern recognition algorithms can be used to generate translated text or perform text-to-speech and / or speech recognition.

[0192] One example of a machine learning algorithm is a neural network. There are many kinds of neural networks; a simple type of neural network is a feedforward network. A feedforward network can 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 input received by the input layer into a representation useful for generating an output at the output layer. The network nodes are fully connected to the nodes of adjacent layers via edges, but there are no edges between the nodes within each layer. Data received at the nodes in the input layer of a feedforward network are propagated (i.e., "forward propagated") to the nodes in the output layer via an activation function that calculates the state of the nodes in each successive layer in the network based on the coefficients ("weights") associated with each edge connecting the layers. Depending on the particular model represented by the algorithm being executed, the output from a neural network algorithm can take a variety of forms.

[0193] 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 that represents the problem to be modeled by the network, and adjusting the weights until the network model operates with minimal error for all instances in the training dataset. For example, during the supervised learning training process of a neural network, outputs generated by the network in response to inputs representing instances in the training dataset are compared to outputs labeled with a "correct" answer for that instance, an error signal representing the difference between the output and the labeled output is calculated, and the weights associated with the connections are adjusted to minimize that error when the error signal is backpropagated through the layers of the network. The network is considered "trained" if the error for each output generated from an instance in the training dataset is minimized.

[0194] The accuracy of machine learning algorithms can be greatly affected by the quality of the data sets used to train the algorithm. The training process can be computationally intensive and can take a significant amount of time on traditional general-purpose processors. Thus, parallel processing hardware is used to train many types of machine learning algorithms. This is particularly useful for optimizing the training of neural networks, because the calculations performed in adjusting the coefficients of a neural network are inherently suited to parallel implementation. In particular, many machine learning algorithms and software applications have been adapted to use parallel processing hardware within general-purpose graphics processing units.

[0195] FIG. 14 is a generalized diagram of a machine learning software stack 1400. The machine learning application 1402 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 1402 can include training and inference capabilities for the neural network and / or specialized software that can be used to train the neural network before it is deployed. The machine learning application 1402 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.

[0196] Hardware acceleration of the machine learning application 1402 may be enabled by the machine learning framework 1404. The machine learning framework 1404 may provide a library of machine learning primitives. Machine learning primitives are basic operations typically performed by machine learning algorithms. Without the machine learning framework 1404, developers of machine learning algorithms would have to create and optimize the main computational logic associated with the machine learning algorithm and then re-optimize the computational logic when new parallel processors are deployed. Instead, machine learning applications may be configured to perform computations using primitives provided by the machine learning framework 1404. Examples of primitives include tensor convolutions, activation functions, and pooling, which are computational operations performed during training of convolutional neural networks (CNNs). The machine learning framework 1404 may also provide primitives for implementing basic linear algebra subprograms performed by many machine learning algorithms, such as matrix and vector operations.

[0197] The machine learning framework 1404 can process input data received from the machine learning application 1402 and generate appropriate inputs to the computation framework 1406. The computation framework 1406 can abstract basic instructions provided to the GPGPU driver 1408 to enable the machine learning framework 1404 to take advantage of hardware acceleration by the GPGPU hardware 1410 without requiring the machine learning framework 1404 to have detailed knowledge of the architecture of the GPGPU hardware 1410. Furthermore, the computation framework 1406 can enable hardware acceleration for the machine learning framework 1404 across different types and generations of GPGPU hardware 1410.

[0198] Machine Learning Neural Network Implementation 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 is known in the art, there are various types of neural network implementations used in machine learning. One example of a neural network is a feedforward network as described above.

[0199] An example of the second type of neural network is the Convolutional Neural Network (CNN). CNNs are specialized feed-forward neural networks for processing data with a known grid-like topology, such as image data. Thus, CNNs are typically used in computations for visual and image recognition applications, but may also be used for other types of pattern recognition, such as speech and language processing. The nodes in 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 set of filters is propagated to the nodes in successive layers of the network. A CNN computation involves applying a convolution mathematical operation to each filter to generate the output of that filter. A convolution is a special kind of mathematical operation performed by two functions to generate a third function that is a modified version of one of the two original functions. In convolutional network terminology, the first function for a convolution can be called the input, and the second function can be called the convolution kernel. The output is sometimes called a feature map. For example, the input to a convolutional layer may be a multidimensional array of data defining the various color components of the input image, and the convolution kernel may be a multidimensional array of parameters, where the parameters are adapted by a training process for the neural network.

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

[0201] The diagrams described below show example feedforward, CNN, and RNN networks, as well as the general process for training and deploying each of these types of networks. It will be understood that these descriptions are exemplary and not limiting with respect to any particular embodiment described herein, and that the concepts described may be applied to deep neural networks and machine learning techniques in general.

[0202] The neural network examples mentioned above 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 consist of multiple hidden layers, as opposed to shallow neural networks that contain a single hidden layer. Deeper neural networks are generally more computationally intensive to train. However, the additional hidden layers of the network allow for multi-step pattern recognition, which results in reduced output error compared to shallow machine learning techniques.

[0203] Deep neural networks used in deep learning typically include a front-end network performing feature recognition coupled to a back-end network that represents a mathematical model capable of performing operations (e.g., object classification, speech recognition, etc.) based on the feature representations provided to the model. Deep learning allows machine learning to be performed without requiring manual feature engineering to be performed on the model. Rather, 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 is capable of mapping the detected features to an output. The mathematical model used in the network is generally specialized for the particular task being performed, with different models being used to perform different tasks.

[0204] Once a neural network is constructed, learning models can be applied to the network to train the network to perform a particular task. The learning model describes how to adjust the weights in the model to reduce the network's output error. Backpropagation of error 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 algorithms such as the stochastic gradient descent algorithm to update the neural network weights.

[0205] 15A-15B show an example convolutional neural network. FIG. 15A shows various layers within a CNN. As shown in FIG. 15A, an example CNN used to model image processing can receive an input 1502 describing the red, green, and blue (RGB) components of an input image. The input 1502 can be processed by multiple convolutional layers (e.g., a first convolutional layer 1504, a second convolutional layer 1506). The output from the multiple convolutional layers may optionally be processed by a set of fully connected layers 1508. As already described with respect to feedforward networks, the neurons in the fully connected layer have full connections to all activations of the previous layer. The output from the fully connected layer 1508 can be used to generate an output result from the network. The activations in the fully connected layer 1508 can be calculated using matrix multiplication instead of convolutions. Not all CNN implementations use the fully connected layer 1508. For example, in some implementations, the second convolutional layer 1506 can generate the output for the CNN.

[0206] Convolutional layers are sparsely connected, which differs from traditional neural network configurations found in the fully connected layer 1508. Traditional neural network layers are fully connected, such that every output unit interacts with every input unit. However, as shown, convolutional layers are sparsely connected because the output of the convolution of the field (rather than 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 to process large images.

[0207] FIG. 15B illustrates exemplary computational stages within a convolutional layer of a CNN. An input to the convolutional layer 1512 of a CNN can be processed in three stages of the convolutional layer 1514. The three stages can include a convolution stage 1516, a detection stage 1518, and a pooling stage 1520. The convolutional layer 1514 can then output data to a successive convolutional layer. The final convolutional layer of the network can generate output feature map data or provide input to a fully connected layer to generate, for example, a classification value for the input to the CNN.

[0208] The convolution stage 1516 performs several convolutions in parallel to generate a sequence of linear activations. The convolution stage 1516 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 (such as a neuron) that is connected to a particular region in the input, which can be determined as a local region associated with the neuron. The neuron calculates a dot product between the weight of the neuron and the region in the local input to which the neuron is connected. The output from the convolution stage 1516 defines a sequence of linear activations that are processed by successive stages of the convolution layer 1514.

[0209] The linear activations can be processed by a detector stage 1518. In the detector stage 1518, each linear activation is processed by a nonlinear activation function. The nonlinear activation function increases the nonlinear character 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), such that the activation is thresholded at zero.

[0210] The pooling stage 1520 uses a pooling function that replaces the output of the second convolutional layer 1516 with a summary statistic of nearby outputs. The pooling function can be used to introduce translation invariance into the neural network so that small translations on 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 1520, including max pooling, average pooling, and l2-norm pooling. Furthermore, some CNN implementations do not include a pooling stage. Instead, such implementations replace it with an additional convolutional stage with an increased stride compared to the previous convolutional stage.

[0211] The output from the convolutional layer 1514 may be processed by a next layer 1522, which may be an additional convolutional layer or one of the fully connected layers 1508. For example, the first convolutional layer 1504 in FIG. 15A may output to a second convolutional layer 1506, which may in turn output to the first of the fully connected layers 1508.

[0212] FIG. 16 shows an example of a recurrent neural network. 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 prior set of inputs. For example, RNNs can be used to perform statistical language modeling to predict upcoming words given a previous set of words. The illustrated RNN 1600 can be described as having an input layer 1602 that receives input vectors, a hidden layer 1604 that implements a recursive function, a feedback mechanism 1605 that allows for "memory" of previous states, and an output layer 1606 that outputs the results. The RNN 1600 operates on a time step basis. The state of the RNN at a given time step is influenced based on the previous time step by the feedback mechanism 1605. For a given time step, the state of the hidden layer 1604 is defined by the previous state and the input at the current time step. An initial input (x1) at a first time step may be processed by the hidden layer 1604. A second input (x2) may be processed by the hidden layer 1604 using state information determined during the processing of the initial input (x1). A given state is s t =f(Ux t +Ws t-1 ), where U and W are parameter matrices. This function f is typically nonlinear, such as a variant of the hyperbolic tangent function (Tanh) or the normalization function f(x)=max(0,x). However, the particular mathematical function used in the hidden layer 1604 may vary depending on the details of the particular implementation of the RNN 1600.

[0213] In addition to the basic CNN and RNN networks described, variations of those networks may be run. One example of an RNN variant is the Long Short Term Memory (LSTM) RNN. LSTM RNNs can learn long-term dependencies that may be used to process longer language sequences. 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 probabilistic (random) variables. DBNs can be trained layer-by-layer using unsupervised greedy learning. The learned weights of the DBN can then be used to provide a pre-trained neural network by determining an optimal initial weight set for the neural network.

[0214] FIG. 17 illustrates the training and deployment of a deep neural network. Once a given network is structured for a task, the neural network is trained using a training dataset 1702. Various training frameworks have been developed to allow hardware acceleration of the training process. For example, the machine learning framework 1404 of FIG. 14 may be configured as a training framework 1704. The training framework 1704 engages an untrained neural network 1706 and allows the untrained neural net to be trained using parallel processing resources as described herein to generate a trained neural network 1708. To start the training process, initial weights can be selected randomly or by pre-training with a deep belief network. The training cycle can then be performed in either a supervised or unsupervised manner.

[0215] Supervised learning is a learning method in which training is performed as an intermediary operation, such as when the training data set 1702 includes inputs (paired with desired outputs for the inputs) or when the training data set includes inputs with known outputs and the neural network's output is manually graded. The network processes the inputs and compares the resulting outputs to a set of expected or desired outputs. The errors are then back-propagated through the system. The training framework 1704 can be adjusted to adjust the weights that control the untrained neural network 1706. The training framework 1704 can provide tools to monitor how well the untrained neural network 1706 is converging toward a model suitable for generating the correct answer based on known input data. The training process occurs iteratively as the network weights are adjusted to refine the output generated by the neural network. The training process can continue until the neural network reaches a statistically desired accuracy associated with the trained neural network 1708. The trained neural network 1708 can then be deployed to perform any number of machine learning operations to generate inference results 1714 based on the input of new data 1712.

[0216] Unsupervised learning is a learning method in which a network attempts to train itself using unlabeled data. Thus, for unsupervised learning, the training data set 1702 will include input data without any associated output data. The untrained neural network 1706 can learn groupings among the unlabeled inputs and determine how each input relates to the entire data set. Unsupervised learning can be used to generate self-organizing maps, which are a type of trained neural network 1708 that can perform operations useful for reducing the dimensionality of data. Unsupervised learning can also be used to perform anomaly detection, which allows for the identification of data points in an input data set that deviate from normal patterns of data.

[0217] Variations of supervised and unsupervised training may be used. Semi-supervised learning is a technique in which a mixture of labeled and unlabeled data of the same distribution is included in the training data set 1702. 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 1708 to adapt to new data 1712 without forgetting the knowledge injected into the network during initial training.

[0218] The training process, especially of deep neural networks, whether supervised or unsupervised, can be computationally too heavy for a single computing node. Instead of using a single computing node, it is possible to use a distributed network of computing nodes to accelerate the training process.

[0219] FIG. 18 is a block diagram illustrating distributed learning. Distributed learning is a training model that uses multiple distributed computing nodes to perform supervised or unsupervised training of a neural network. The distributed computing nodes may each include one or more host processors and one or more general-purpose processing nodes. As shown, distributed learning may be performed with model parallelism 1802, data parallelism 1804, or a combination of model and data parallelism 1804.

[0220] In model parallelism 1802, different computational nodes in a distributed system can perform training computations on different portions 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, especially for large models. Splitting up the computations associated with different layers of a neural network allows for the training of very large neural networks where the weights of an entire layer do not fit into the memory of a single computational node. In some instances, model parallelism can be particularly useful in performing unsupervised training of large neural networks.

[0221] In data parallelism 1804, 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. Although different approaches to data parallelism are possible, all data parallelism training approaches use techniques to combine results and synchronize model parameters between each node. Exemplary approaches to combining data include parameter averaging and update-based data parallelism. Parameter averaging trains each node on a subset of the training data and sets global parameters (e.g., weights, biases) to the average of the parameters from each node. Parameter averaging uses a central parameter server that maintains the parameter data. Update-based data parallelism is similar to parameter averaging, except that instead of transferring parameters from nodes to the parameter server, updates to the model are transferred. Additionally, update-based data parallelism can be performed in a distributed manner, with updates packed and transferred between nodes.

[0222] Complex model and data parallelism 1806 can be implemented, for example, in a distributed system where each compute node contains multiple GPUs. Each node can have a complete instance of the model with individual GPUs in each node that are used to train different parts of the model.

[0223] Distributed training has significant overhead compared 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 that enable high-bandwidth GPU-to-GPU data transfers and accelerated remote data synchronization.

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

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

[0226] Parallel processor accelerated deep neural networks have enabled a machine learning approach to automatic speech recognition (ASR). ASR involves the generation of a function that computes the most likely language sequence given an input speech sequence. Accelerated machine learning using deep neural networks has enabled the replacement of hidden Markov models (HMMs) and Gaussian mixture models (GMMs) previously used for ASR.

[0227] 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 input. Applications of natural language processors include automatic machine translation between human languages.

[0228] Parallel processing platforms used for machine learning can be divided into training platforms and deployment platforms: training platforms are generally highly parallel and include multi-GPU single-node training and optimizations to accelerate multi-node, multi-GPU training, while deployed machine learning (e.g., inference) platforms generally include lower power parallel processors suitable for use in products such as cameras, autonomous robots, and autonomous vehicles.

[0229] Deep Learning Based Sample Selection for Adaptive Supersampling Rendering is the process of generating an image using a computing program from a two-dimensional (2D) or three-dimensional (3D) model (such as a scene or scene file). The result of displaying such a model can be referred to as a render. A scene file can contain objects in a precisely defined language or data structure. It can also contain geometry, perspective, texture, lighting, and shading information as a description of the virtual scene. The data contained in the scene file is then passed to a rendering program to be processed and output as a digital image or raster graphics image file.

[0230] A common problem in rendering is aliasing. During rendering, a scene (e.g., a 3D scene) is sampled at discrete pixels. As a result, the visual representation of an object may appear to have discontinuities between pixels. There can be multiple sources of aliasing in rendering. For example, there may be transparency aliasing, geometric aliasing, sub-pixel aliasing, geometric aliasing, texture aliasing, and shared aliasing, to name a few. Solutions that address aliasing are known as anti-aliasing techniques.

[0231] One anti-aliasing technique is supersampling. Supersampling refers to increasing the number of samples per pixel, both for geometric sampling and shader execution, and then blending the colors. Brute-force (or pure) supersampling sets a fixed number of samples to be applied to every pixel in an image. Brute-force sampling suffers from the drawback of increasing the workload of a processor, such as a GPU, proportional to the number of samples taken.

[0232] The adaptive supersampling approach addresses the problem of linear increase in workload due to brute force supersampling. Adaptive supersampling is a technique in which pixels at the edge of an object are supersampled, but interior pixels of the object are not supersampled. Various techniques of adaptive supersampling have been introduced. For example, one technique of adaptive supersampling proposes to continue to further supersample a pixel if the four samples at the corners of the pixel show significant color difference.

[0233] A problem encountered with adaptive supersampling is that it is difficult to know in advance how many samples of a pixel or tile should be used during rendering to obtain sufficient visual quality, and therefore it is difficult for adaptive supersampling to avoid costly oversampling of areas that may not benefit much from such supersampling.

[0234] Another deep learning anti-aliasing technique is Deep Learning Supersampling (DLSS). DLSS upsamples parts of an image from a lower resolution to a higher resolution by an AI trained network. Upsampling is related to the process of resampling in multirate digital signal processing systems and can describe the process of expansion and filtering (interpolation). When upsampling is performed on a sequence of samples of a signal or other continuous function, it produces an approximation of the sequence that would have been obtained by sampling the signal at a higher rate. The problem with DLSS is that the DLSS technique can produce blurry images. Furthermore, DLSS upsamples pixels rather than adjusting the actual amount of samples per pixel or tile. Thus, in DLSS, all post-processing steps are "faking" a richer detail in an image rendered at a lower resolution or quality. Such approaches cannot reproduce the grant truth in certain areas and therefore suffer from artifacts (e.g. parts of the image appear blurry).

[0235] The implementations of the present disclosure address the above technical problems with existing supersampling anti-aliasing techniques by using an AI trained network to determine, for a rendering tile, how many samples should be taken in the supersampling of the tile to provide a high quality image. The implementations of the present disclosure use an AI trained network to adaptively select the supersampling size for tiles that will benefit from supersampling, while avoiding selecting supersampling for tiles that would not benefit from supersampling. The implementations of the present disclosure first utilize a tile-based renderer that generates tiles without supersampling (SPP=1). A tile is provided as an input to the trained AI network, which returns the number of supersampling levels for this tile. Based on the returned supersampling level, further supersampling may be applied or the tile may be left at its current level. The implementations of the disclosure speed up adaptive supersampling by identifying the correct supersampling level where high quality is required (e.g., would exhibit aliasing) and additional computation is justified, while at the same time avoiding wasting performance in oversampling areas that would not exhibit aliasing. As a result, implementations of the present disclosure improve rendered image quality at a lower cost, in terms of hardware requirements and processor power consumption, than previous solutions.

[0236] 19 is a block diagram of an example computing system capable of facilitating deep learning based sample selection for adaptive supersampling in accordance with implementations of the present disclosure. The example computing system 1900 may be implemented as a component of another system, such as, for example, a mobile device, a wearable device, a laptop computer, a tablet, a desktop computer, a server, etc. As shown, in one embodiment, the computing device 1900 may include any number and type of hardware and / or software components, including, for example and without limitation, a graphics processing unit ("GPU" or simply "graphics processor") 1912, a central processing unit ("CPU" or simply "application processor") 1915, memory 1930, network devices, drivers, etc., as well as input / output (I / O) sources 1960, such as a touch screen, touch panel, touch pad, virtual or conventional keyboard, virtual or conventional mouse, ports, connectors, etc. Computing device 1900 may include an operating system (OS) 1910 that serves as an interface between the hardware and / or physical resources of computing device 1900 and a user.

[0237] The GPU 1912 (or graphics processor 1912) and / or CPU 1915 (or application processor 1915) of the exemplary computing system 1900 may include a model executor 1905 and a model trainer 1925. The GPU 1912 may be the same as the GPU and / or GPGPU described herein with respect to FIGS. 1-13B. Although the model executor 1905 and the model trainer 1925 are shown as part of the GPU 1912, in some implementations the CPU 1912 may also include the model executor 1905 and / or the model trainer 1925. Although shown as being in the same machine, in implementations of the present disclosure, the model executor 1905 and / or the model trainer 1925 may be on separate machines that are different from each other.

[0238] The model executor 1905 accesses input values ​​(e.g., via an input interface (not shown)), processes these input values ​​based on machine learning models stored in a model parameter memory 1935 of the memory 1930, and generates output values ​​(e.g., via an output interface (not shown)). The input data may be received from one or more data sources (e.g., via one or more sensors, via a network interface, etc.). However, the input data may be received in any manner, for example, from an external device (e.g., via a wired and / or wireless communication channel). In some examples, multiple different types of inputs may be received.

[0239] In the illustrative example of FIG. 19 , the exemplary neural network parameters stored in the model parameter memory 1935 are trained by the model trainer 1925 such that input data (e.g., received via a training value interface (not shown)) results in output data (also referred to as output values) that are based on the training values. In the illustrative example of FIG. 19 , the model executor 1905 and / or the model trainer 1925 utilize a supersampling component 1940 and a renderer 1950 when processing the model during training and / or provide deep learning based sample selection for adaptive supersampling. Although the supersampling component 1940 and the renderer 1950 are shown as part of the GPU 1912, in some implementations the CPU 1912 may include the supersampling component 1940 and / or the renderer 1950. Although depicted as being on the same machine, in implementations of this disclosure, the supersampling component 1940 and / or the renderer 1950 may be on separate machines.

[0240] In some examples, the input data and / or output data may be received via an input and / or output of a system of which computing system 1900 is a component.

[0241] The example model execution executor 1905, the example model trainer 1925, the example supersampling component 1940, and the example renderer 1950 are implemented by one or more logic circuits, such as, for example, a hardware processor. In some examples, one or more of the example model executor 1905, the example model trainer 1925, the example supersampling component 1940, or the example renderer 1950 may be implemented by the same hardware component (e.g., the same logic circuit) or by different hardware components (e.g., different logic circuits, different computing systems, etc.). However, any other type of circuitry may additionally or alternatively be used, such as, for example, one or more analog or digital circuits, logic circuits, programmable processors, application specific integrated circuits (ASICs), programmable logic devices (PLDs), field programmable logic devices (FPLDs), digital signal processors (DSPs), etc.

[0242] In the embodiments disclosed herein, the example model executor 1905 executes a machine learning model. The example machine learning model may be implemented using a neural network (e.g., a feedforward neural network). However, any other past, present, and / or future machine learning topology and / or architecture, such as a CNN, may additionally or alternatively be used.

[0243] To execute the model, the example model executor 1905 accesses the input data. In some examples, the model executor 1905 provides the input data to the supersampling component 1940 to facilitate deep learning-based sample selection for adaptive supersampling. The example model executor 1905 (using the example supersampling component 1940 and the renderer 1950) applies the model (defined by the model parameters stored in the model parameter memory 1935) to the input data. For example, the model executor 1905 can use the renderer 1950 to render the input data (e.g., an input tile of pixels of an image) at a supersampling level of 1 (1xSPP) (e.g., no supersampling is applied to the input data). The rendered tiles of the input data (1xSPP) are then applied to the model to obtain a supersampling value for each rendered tile of the input data. The supersampling component 1940 can then determine whether the supersampling values ​​obtained from the model exceed the supersampling level of the input rendering tile (i.e., 1xSPP). If the supersampling level provided by the model for the input tile exceeds the supersampling level of the rendered input tile (e.g., 1xSPP), the supersampling component 1940 causes the renderer 1950 to re-render the input tile at the new supersampling level provided by the model. The model executor 1905 provides the results as output data, e.g., via an output interface (not shown), for further use.

[0244] The exemplary model parameter memory 1935 of the embodiment of FIG. 19 may be implemented by any memory, storage device, and / or storage disk for storing data, such as, for example, flash memory, magnetic media, optical media, etc. Additionally, the data stored in the exemplary model parameter memory 1935 may be in any data format, such as, for example, binary data, comma-separated data, tab-separated data, Structured Query Language (SQL) structures, etc. In the illustrated example, the model parameter memory 1935 is shown as a single element, however, the model parameter memory 1935 and / or any other data storage elements described herein may be implemented by any number and / or type of memory. In the illustrative example of FIG. 19, the exemplary model parameter memory 1935 stores model weighting parameters used by the model executor 1905 to process inputs to generate one or more outputs as output data.

[0245] In the examples disclosed herein, the output data may be information classifying the received input data received (e.g., as determined by the model executor 1905). However, any other type of output that may be used for any other purpose may additionally or alternatively be used. In the examples disclosed herein, the output data may be output by an input / output (I / O) source 1960 that displays an output value. However, in some examples, the output data may be provided as an output value to another system (e.g., to another circuit, an external system, a program executed by the computing system 1900, etc.). In some examples, the output data may be stored in memory.

[0246] In the disclosed embodiment, the exemplary model trainer 1925 is trained to select samples for adaptive supersampling of the rendering tiles of the image. The model trainer 1925 of the illustrated embodiment of FIG. 19 compares the expected output (e.g., received as training values ​​in the computing system 1900) with the output generated by the exemplary model executor 1905 to determine the amount of training error and updates the model based on the amount of error. After a training iteration, the amount of error is evaluated by the model trainer 1925 to determine whether to continue training. In the disclosed embodiment, an error is identified when the input data does not result in the expected output. That is, the error is expressed as the number of incorrect outputs given an input with the expected output. However, any other approach to expressing the error may additionally or alternatively be used, for example, the percentage of input data points that result in an error.

[0247] The exemplary model trainer 1925 determines whether the training error is less than a training error threshold. If the training error is less than the training error threshold, the model has been trained such that it results in a sufficiently small amount of error, and no further training is performed. In the embodiment disclosed herein, the training error threshold is 10 errors. However, any other threshold may additionally or alternatively be used. Additionally, other types of factors may be considered when determining whether model training is complete. For example, the amount of training iterations performed and / or the amount of time elapsed during the training process may be considered.

[0248] The training values ​​(also referred to herein as training data) utilized by the model trainer 1925 include example input and expected output data. In the examples disclosed herein, the example training values ​​are provided to the model trainer 1925 to enable the model trainer 1925 to determine an amount of training error. In some examples, the training values ​​may include a number of pixels (e.g., tiles of 8×8 pixels, 16×16 pixels, 32×32 pixels, 13×25 pixels, etc.) and a supersampling value (e.g., 1, 2, 4, 8, 16, 32, etc.) corresponding to each input tile. The supersampling values ​​of the training values, when applied to corresponding input tiles for sampling during rendering, may cause the input tiles to be rendered with a quality that meets a determined (using the renderer 1950) quality measure metric threshold (e.g., SSIM or PSNR value; SSIM value of 0.98 or greater). The model trainer 1925 uses the training values ​​to generate a trained machine learning model that provides supersampling values ​​for the input tiles, where the provided supersampling values ​​cause the input tiles to be rendered with a resulting quality measure metric value that satisfies the determined quality measure metric threshold.

[0249] In embodiments disclosed herein, the example model executor 1905 receives input tiles rendered without supersampling and provides supersampling values ​​to use for rendering the input tiles. To execute a model, such as a machine learning model utilizing a neural network, as described above, the example model executor 1905 applies a machine learning model trained using a combination of the supersampling component 1940 and the renderer 1950. The machine learning model can be trained using the model trainer 1925, as described above. Further discussion of model training and inference using the model executor 1905, model trainer 1925, supersampling component 1940, and renderer 1950 is provided below with respect to FIGS. 20-24.

[0250] The I / O sources 1960 of the illustrative embodiment of FIG. 19 enable the models stored in the model parameter memory 1935 to communicate with other computing systems. In some implementations, the I / O sources 1960 can include, but are not limited to, network devices, microprocessors, cameras, robotic eyes, speakers, sensors, display screens, media players, mice, touch-sensitive devices, and the like. In such a manner, a central computing system (e.g., a server computer system) can perform training of models and distribute the models to edge devices for utilization (e.g., to perform inference operations using the models). In the embodiments disclosed herein, the I / O sources 1960 are implemented using Ethernet network communication devices. However, any other past, present, and / or future types of communication technologies can additionally or alternatively be used to communicate the models to the individual computing systems.

[0251] Although an example manner of implementing a computer system 1900 is illustrated in Figure 19, one or more of the elements, processes and / or devices illustrated in Figure 19 may be combined, divided, rearranged, omitted, removed, and / or implemented in any other manner. Additionally, the example model executor 1905, the example model trainer 1925, the example supersampling component 1940, the example renderer 1950, the I / O sources 1960, and / or more generally, the example computing system 1900 of Figure 19 may be implemented by hardware, software, firmware, and / or any combination of hardware, software, and / or firmware. Thus, for example, any of the example model executor 1905, the example model trainer 1925, the example supersampling component 1940, the example renderer 1950, the example I / O source 1960, and / or more generally the example computing system 1900 of FIG. 19 may be implemented by one or more analog or digital circuits, logic circuits, programmable processors, programmable controllers, graphics processing units (GPUs), digital signal processors (DSPs), application specific integrated circuits (ASICs), programmable logic devices (PLDs), and / or field programmable logic devices (FPLDs).

[0252] If any apparatus or system claims of this patent are read to cover purely software and / or firmware implementations, then the exemplary model executor 1905, the exemplary model trainer 1925, the exemplary supersampling component 1940, the exemplary renderer 1950, the exemplary I / O source 1960, and / or more generally the exemplary computing system 1900 of FIG. 19 are expressly defined herein to include non-transitory computer-readable storage devices or storage disks, such as memory, digital versatile disks (DVDs), compact disks (CDs), Blu-ray disks, etc., that contain software and / or firmware. Furthermore, the exemplary computing system 1900 of FIG. 19 may include one or more elements, processes, and / or devices in addition to or instead of those shown in FIG. 19 and / or may include one or more of any or all of the illustrated elements, processes, and devices. As used herein, the phrase "in communication," including variations thereof, encompasses direct communication and / or indirect communication via one or more intermediate components, and additionally encompasses selective communication at periodic intervals, scheduled intervals, non-periodic intervals, and / or one-time events that do not utilize direct physical (e.g., wired) communication and / or constant communication, but rather.

[0253] As described above, implementations of the present disclosure facilitate deep learning-based sample selection for adaptive supersampling when rendering an image. The deep learning-based selection of implementations of the present disclosure includes utilizing an AI-based network for selection of adaptive supersampling settings to apply to tiles of an image. Implementations of the present disclosure facilitate model training and inference of the AI-based network to select samples for adaptive supersampling.

[0254] For model training of the AI-based network to select samples for adaptive supersampling, training data for adaptive supersampling is provided to a machine learning system. In one embodiment, the machine learning system may be the same as the computing system 1900 described with respect to FIG. 19. In one embodiment, the model trainer 1925 described with respect to FIG. 19 may be used for model training, and the model executor 1905 described with respect to FIG. 19 may be used for model inference.

[0255] The training data may include a large number of rendered images. For example, thousands, millions, billions, etc. of random images may be rendered. In some implementations, the size of the training data may be measured in Terabytes (TB). Each image in the training data may be rendered with various settings for supersampling. In one embodiment, the supersampling settings for rendering the images may include, but are not limited to, non-supersampling (1xSPP), 2xSPP, 4xSPP, 8xSPP, 16xSPP, 32xSPP, etc.

[0256] Each image may be divided into tiles. The tile size may vary based on the particular implementation. In one embodiment, the tile size may be 8×8. In one embodiment, the tile size may be 16×16. Other tile sizes may be utilized in implementations of the present disclosure. In one embodiment, to increase the amount of training data, an input image may be divided into tiles, where each tile in the input image is shifted by one pixel.

[0257] 20A-20B show example tiles of pixels that are part of an example rendered scene. In one embodiment, the example tiles of FIGS. 20A-20B may be used as training data for training a machine learning model for adaptive supersampling selection. In implementations of the present disclosure, the example tiles may be referred to as input tiles. FIG. 20A shows an example input tile 2010 that is a 16×16 rendering tile depicting a street light that is part of a larger rendered image (not shown). As mentioned above, implementations of the present disclosure can operate with a variety of different sizes of input tiles and are not limited to the 16×16 input tiles shown in FIGS. 20A and 20B.

[0258] An example of the exemplary input tile 2010 may have been rendered without supersampling applied (i.e., a supersampling value of 1; 1xSPP). As shown in FIG. 20A, rendering with a supersampling value of 1 may cause aliasing of the tile. In particular, visible gaps in the street lights are discernible in the input tile 2010. Supersampling the input tile 2010 may help improve the visual quality of the input tile 2010.

[0259] The disclosed implementation trains an AI network (e.g., a machine learning model) to determine supersampling values ​​for input tiles that result in a quality measure metric value that satisfies a determined threshold. The quality measure metric value may be a quality measure metric including, but not limited to, a structural similarity index (SSIM) measure, a peak signal-to-noise ratio (PSNR) measure, or any other method used in video codec image quality optimization. The quality measure metric threshold (also referred to as a quality measure threshold or quality measure threshold, etc.) may be determined by an end user, such as an administrator of the system, or may be set in the machine learning model. In one embodiment, the quality measure metric threshold may be an SSIM value of 0.98 or greater.

[0260] During training of an AI network in an implementation of the present disclosure (e.g., during training of a machine learning model as performed by the model trainer 1925 described with respect to FIG. 19), a version of the input tile 2010 can be generated that is considered a "ground truth" version of the input tile for machine learning model training purposes. FIG. 20B illustrates a supersampled input tile 2050. In one embodiment, the supersampled input tile 2050 is a version of the input tile 2010 that has been sampled using a supersampling value of 32. Implementations of the present disclosure may use other supersampling values ​​as the SSP value to generate a ground truth version of the input tile.

[0261] During training of the AI ​​network in implementations of the present disclosure, a "ground truth" version of the tile is compared to other supersampled versions of the tile at other SPP settings. In one embodiment, the ground truth version of the tile may be a version with an image quality measure set to 1. To obtain a value for which a supersampling level is "good enough" for a particular input tile, the rendered tile may be compared to the most detailed tile (e.g., supersampled input tile 2050) at each supersampling level. In one embodiment, the most detailed tile is the tile rendered at supersampling level 32 (32xSPP). The SSIM metric may be used for quality comparison in implementations of the present disclosure. However, other metrics may be used.

[0262] FIG. 21 illustrates a table 2100 showing supersampling of multiple tiles for purposes of training an AI network (e.g., training a machine learning model) according to an implementation of the present disclosure. In one embodiment, the table 2100 illustrates three rows: a first row 2110, a second row 2120, and a third row 2130. Each row 2110, 2120, 2130 corresponds to an example input tile 2114, 2124, 2134 that is supersampled with various supersampling settings 2112, 2122, 2132. The supersampled tiles 2114, 2124, 2134 are provided in the table 2100 along with the resulting quality measure values ​​(also referred to as quality measure metric values) 2116, 2126, 2136 of the supersampled tiles 2114, 2124, 2134. As illustrated in FIG. 21, the quality measure values ​​use the SSIM measure. However, other metrics (eg, DSSIM, PSNR, etc.) may be used in implementations of this disclosure.

[0263] In one implementation, a quality measure threshold (also referred to as a quality measure metric threshold) is defined for the input tile for purposes of training the machine learning model. The quality measure threshold may be a global user-defined threshold that is deemed to provide sufficient quality for the rendered tile. In one example, with respect to table 2100 of FIG. 21, the quality measure threshold is defined as an SSIM value of 0.98 or greater. However, other quality measure thresholds may be defined in implementations of the present disclosure. In the first row 2110, a supersampling value of "4" is associated with satisfaction of the quality measure threshold of 0.98. Thus, supersampling the 1xSPP input tile shown in the first column of the first row 2110 at a supersampling level of "4" will result in a rendered image tile of satisfactory quality. In the second row 2120, a supersampling value of "8" (i.e., 8xSPP) is associated with satisfaction of the quality measure threshold for the particular tile in the second row 2120. In the third row 2130, a supersampling value of "1" (ie, 1xSPP) is associated with meeting the quality measure threshold for the particular tile in the third row 2130.

[0264] In one embodiment, the amount of supersampling for a given tile may be expressed using powers of 2. For example, 2 0 =1 is the supersampling level of 1, which satisfies the quality measure threshold, and 2 1 =2 is the supersampling level of 2, which satisfies the quality measure threshold, and 2 =4 is the supersampling level of 4, which satisfies the quality measure threshold, and 3 =8 is the supersampling level of 8, which satisfies the quality measure threshold, and 4 =16 is the supersampling level of 16, which satisfies the quality measure threshold, and 5 =32 is a supersampling level of 32, which satisfies the quality measure threshold. Placing the input tiles into subfolders named 0, 1, 2, 3, 4, 5 in powers of 2 values ​​allows for ease of categorical data loading in some implementations.

[0265] Using the training data set of input tiles and corresponding supersampling levels that satisfy a threshold quality measure for each input tile, a machine learning model can be trained. In one embodiment, the machine learning model may be a CNN. However, other machine learning models may be used in implementations of the present disclosure.

[0266] 22 illustrates an example model 2200 for training to select samples for adaptive supersampling of tiles of an image according to an implementation of this disclosure. In one embodiment, model 2200 receives input tiles of 8×8 pixels that are generated with one sample per pixel. Model 2200 outputs values ​​that can be used for supersampling the input tiles. In one embodiment, model 2200 outputs supersampling values ​​in a power of two format.

[0267] As shown in FIG. 22, model 2200 includes multiple layers and is optimized for a training batch size of 32. Variations in model layers and training batch sizes are also possible in the practice of the present disclosure and are not limited to those shown in model 2200 of FIG. 22. Model 2200 includes an input layer 2210. The first two convolutional layers 2220, 2230 of model 2200 have a filter size of 50. The kernel size of the first two convolutional layers 2220, 2230 is set to (3,3). In one embodiment, the convolutional layers 2220, 2230 include a hidden layer of size 15.

[0268] A flattening layer 2240 and multiple dense layers (or fully connected layers) 2250, 2260, 2270 are included in the model 2200. The flattening layer 2240 can flatten a single 2D image into a 1D pixel array. The dense layers 2250, 2260, 2270 can implement dense functions. An activation function, the normalized linear unit (relu), may be used in the model 2200. The final dense layer 2270 uses a linear activation function and outputs a power of two. During compilation of the model 2200, the optimizer may be set to adaptive moment estimation (ADAM). The loss function used may be mean squared error (MSE).

[0269] The model 2200 can receive inputs (i.e., inputs for either training and / or inference) in RGB color space. However, in some implementations, the model may operate in HSV color space, YUV color space, or grayscale color space. In some implementations, additional data may be provided as inputs for training and inference of the model. For example, depth values ​​of the input tiles may be provided. In cases where some images (e.g., in a source video game, etc.) may have widely varying depth ranges, the depth values ​​may be normalized (e.g., normalized to the total amount of depth variance in the image, using values ​​between 0.0 and 1.0). The use of additional depth data can implicitly train the model in conjunction with depth-based variance and how such depth variance is applied to supersampling. Other additional data that the model may receive may include, but is not limited to, normals, object IDS, texture colors, primitive IDs, or temporal components (e.g., data from previously rendered frames).

[0270] As a result, the model 2200 can provide supersampling values ​​to use for each tile in the rendered image to improve aliasing in the image. The AI-based trained model can provide supersampling values ​​to improve aliasing regardless of the source of aliasing (e.g., geometry, normal, texture, shading, etc.). During training, when rendered tiles are compared at different supersampling levels, the source of aliasing can come from any of a variety of sources. The supersampled tiles perform a complete rendering including shading and any kind of secondary effects. Thus, the implementation of the present disclosure is agnostic to the source of aliasing. The trained model that has learned the supersampling levels is used to compensate for aliasing no matter where it originates.

[0271] In the implementation of the present disclosure, training of an AI network (machine learning model) may be performed separately from model inference performed by the AI ​​network. For example, training of a machine learning model may be performed during the inference stage of the AI ​​network (e.g., by model executor 1905 of FIG. 19) using an offline process that is separate from real-time use of the machine learning model being trained (e.g., by model trainer 1925 described with respect to FIG. 19).

[0272] In some implementations, there may be cases where adjacent tiles of a pixel may have significantly different supersampling values ​​returned by the trained AI network (machine learning model). For example, there may be a situation where the trained AI network provides a supersampling level of 32xSPP to one tile for rendering and a supersampling level of 1xSPP to an adjacent tile for rendering. In such an example, a human observer may discern a noticeable difference between the rendered adjacent tiles.

[0273] The disclosed implementations can provide a smoothing function to avoid noticeable rendering differences between adjacent tiles. In one example, assume that a processor is processing an image consisting of 5000 tiles. The image can be rendered once at 1xSPP to provide input to the disclosed implementation's AI network (trained machine learning model) for these 5000 tiles. The disclosed implementation's AI network can then provide supersampling values ​​for the 5000 tiles. This information can be presented as an image with X and Y dimensions in a 2D array. The disclosed implementations can apply a smoothing function to this image to avoid overly obtrusive differences in supersampling quality between tiles. The smoothing function can change a tile with 1xSPP and adjacent tiles with 32xSPP to a tile with 2xSPP and adjacent tiles with 16xSPP (or 4xSPP and 16xSPP, etc.). This smoothing function may create a trade-off between image quality at best rendering performance, but may help to avoid significant quality differences between tiles that have significant supersampling value differences. In one embodiment, the smoothing function may be applied when the difference in supersampling values ​​between two adjacent tiles exceeds a difference threshold (which may be set by an end user or an administrator of the system, or may be determined by machine learning, etc.).

[0274] FIG. 23 is a flow diagram illustrating an embodiment of a model training method 2300 for deep learning based sample selection for adaptive supersampling. Method 2300 may be performed by processing logic, which may include hardware (e.g., circuitry, dedicated logic, programmable logic, etc.), software (e.g., instructions executed on a processing unit), or a combination thereof. The processes of method 2300 are shown in a linear sequence for brevity and clarity in presentation; however, it is contemplated that any of them may be executed in parallel, asynchronously, or in a different order. Furthermore, for brevity, clarity, and ease of understanding, many components and processes described with respect to FIGS. 1-22 will not be repeated or discussed below. In one embodiment, a model trainer, such as model trainer 1925 of FIG. 19 implemented by a processor, such as a GPU or GPGPU, may perform method 2300.

[0275] Method 2300 begins at processing block 2310 where a processor renders an input image of a plurality of training images. The processor may render the input image at a plurality of different supersampling levels. At processing block 2320, the processor may divide the rendered image into tiles. In one embodiment, the tile size may be 8x8 pixels, 16x16 pixels, 32x32 pixels, or any other pixel size format.

[0276] At processing block 2330, the processor may determine a quality measure value for each supersampling level for each tile. In one embodiment, the quality measure may be a SSIM measure. In one embodiment, the quality measure may be a PSNR measure. Other metrics for the quality measure may be used in implementations of the present disclosure.

[0277] At processing block 2340, the processor may compare, for each tile, the tile at the highest supersampling level with the tiles at each of the other supersampling levels. In one embodiment, the comparison is made in terms of the quality measure value of the tile at each supersampling level. Then, at processing block 2350, the processor may identify the supersampling level of the tile associated with satisfying a quality measure threshold. In one embodiment, the tile associated with satisfying a quality measure threshold is the tile having a quality measure that exceeds the quality measure threshold while being closest to the threshold.

[0278] The processor associates the identified supersampling level with the non-supersampled input tile at process block 2360. Finally, the processor trains a machine learning model on the input tile and the associated supersampling level at process block 2370. In one embodiment, method 2300 is performed offline from the inference stage of the trained model.

[0279] FIG. 24 is a flow diagram illustrating an embodiment of a model inference method 2400 of deep learning based sample selection for adaptive supersampling. The method 2400 may be performed by processing logic, which may include hardware (e.g., circuitry, dedicated logic, programmable logic, etc.), software (e.g., instructions executed on a processing unit), or a combination thereof. The processes of the method 2400 are shown in a linear sequence for brevity and clarity in presentation; however, it is contemplated that any of them may be executed in parallel, asynchronously, or in a different order. Furthermore, for brevity, clarity, and ease of understanding, many of the components and processes described with respect to FIGS. 1-22 will not be repeated or discussed below. In one embodiment, a model executor, such as the model executor 1905 of FIG. 19 implemented by a processor, such as a GPU or GPGPU, may execute the method 2400.

[0280] The method 2400 begins at process block 2410 where a processor renders individual input tiles of an image. In one embodiment, the tiles are rendered without applying supersampling. In one embodiment, the tile size may be 8x8 pixels, 16x16 pixels, 32x32 pixels, or any other pixel size format.

[0281] At processing block 2420, the processor provides the rendered tiles as input to a trained machine learning model. In one embodiment, the machine learning model is trained using the method 2300 described with respect to FIG. 23. At processing block 2430, the process receives an output of the trained machine learning model. In one embodiment, the output is a supersampling level to apply to the input tiles.

[0282] At decision block 2440, the processor determines whether the supersampling level received from the trained machine learning model for the input tile is greater than 1. If so, the method 2400 proceeds to process block 2450, where the processor re-renders the tile at the higher supersampling level indicated by the trained machine learning model, and the method 2400 ends at block 2460. On the other hand, if the processor determines that the supersampling level is equal to 1 (e.g., no supersampling is indicated by the trained machine learning model), the method 2400 proceeds to end block 2460 and utilizes the original rendered tile without applying supersampling.

[0283] Implementations of the present disclosure can train a machine learning model and apply the trained machine learning model to various applications, such as, but not limited to, a trained machine learning model that receives a rendered input tile and provides a supersampling level for the rendered input tile in applications such as ray tracing, rasterization, variable rate shading (VRS), coarse pixel shading (CPS), hybrid rendering, virtual reality (VR), or augmented reality (AR).

[0284] In ray tracing, it is relatively easy to vary the number of rays for sampling on a per pixel or per tile basis, but this has been somewhat difficult in the past with rasterization. However, newer methods such as Coarse Pixel Shading (CPS) and Variable Rate Shading (VRS) provide support for modifying the quality of the rendered image at a finer granularity. The implementation of AI networks provided by trained machine learning models can be used to fine-tune quality parameters when using CPS and / or VRS.

[0285] The optics in a virtual reality (VR) headset introduces pincushion distortion. Pincushion distortion can be solved by correcting the rendered image with barrel distortion. In ray tracing, this can be done directly during rendering by an in-camera barrel distortion renderer. This leads to straight lines that are often shown as curves. In the implementation of the present disclosure, various AI networks (i.e., various trained machine learning models) can be trained according to a coarse distance from the lens center. The further the parts of the image are from the lens center, the more distorted they are. There is no distortion directly at the lens center. In the implementation of the present disclosure, for example in a virtual reality (VR) application, the image is divided into five zones ranging from a first zone with little distortion to a final zone with heavy distortion, and a separately trained AI network (machine learning model) can be associated with each zone.

[0286] In augmented reality (AR), aliasing may behave differently depending on what type of surface is used to show the virtual object. For example, rendering a green apple hovering over grass makes aliasing less perceptible. In comparison, if a green apple is shown on a white or red background, aliasing would be very visible. Implementations of the present disclosure can train an AI network (machine learning model) using different cases in which an object can be rendered and using backgrounds defined separately for the object, which can then be traced through the actual camera in the augmented reality (AR) glasses or smartphone.

[0287] The following examples relate to further embodiments. Example 1 is an apparatus for facilitating deep learning-based sample selection for adaptive supersampling. The apparatus of Example 1 includes one or more processing elements, which perform the steps of receiving training data including input tiles and corresponding supersampling values ​​for the input tiles, each input tile including a plurality of pixels; and training a machine learning model based on the training data to identify a level of supersampling for a rendered tile of pixels.

[0288] In example 2, the subject matter of example 1 can optionally include: the input tile includes at least one of 8x8 pixels, 16x16 pixels, or 32x32 pixels of the image to be rendered. In example 3, the subject matter of any of examples 1-2 can optionally include: the one or more processing elements reside in a graphics processing unit (GPU). In example 4, the subject matter of any of examples 1-3 can optionally include: the input tile is rendered with a supersampling setting of 1.

[0289] In example 5, the subject matter of any of examples 1-4 can optionally include: a supersampling value for the input tile is determined based on a quality metric that includes a structural similarity index measure (SSIM). In example 6, the subject matter of any of examples 1-5 can optionally include: a supersampling value for the input tile is determined based on a quality metric that includes a peak signal-to-noise ratio (PSNR) measure. In example 7, the subject matter of any of examples 1-6 can optionally include: one or more processing elements train the machine learning model using an offline process separate from real-time use of the machine learning model during the inference phase.

[0290] In example 8, the subject matter of any of examples 1-7 can optionally include: the training data further includes depth values ​​corresponding to the input tiles. In example 9, the subject matter of any of examples 1-8 can optionally include: the training data further includes at least one of a normal, an object ID, a texture color, a primitive ID, or temporal data corresponding to a previous rendered image. In example 10, the subject matter of any of examples 1-9 can optionally include: the machine learning model is trained using a convolutional neural network (CNN).

[0291] In example 11, the subject matter of any of examples 1-10 can optionally include: the CNN includes at least one of an input layer, one or more convolutional layers, at least one flattening layer, and one or more dense functions, the CNN utilizing an adaptive moment estimation (ADAM) optimizer and a mean squared error (MSE) loss function. In example 12, the subject matter of any of examples 1-11 can optionally include: the machine learning model trained by the one or more processing elements is applied to the rendered tiles of pixels for at least one of rasterization, ray tracing, variable rate shading (VRS), coarse pixel shading (CPS), hybrid rendering, virtual reality (VR), or augmented reality (AR). In example 13, the subject matter of any of examples 1-12 can optionally include: a smoothing function is applied to the rendered tiles of pixels having a difference between supersampling levels exceeding a predetermined threshold, the supersampling levels being provided by the trained machine learning model.

[0292] Example 14 is a method for facilitating deep learning-based sample selection for adaptive supersampling. The method of example 14 can optionally include the steps of: rendering a tile without applying supersampling, the tile including a plurality of pixels; providing the rendered tile as an input to a trained machine learning model; receiving a supersampling value for the rendered tile from the trained machine learning model; and re-rendering the tile with supersampling using the supersampling value received from the trained machine learning model.

[0293] In example 15, the subject matter of example 14 can optionally include: the supersampling values ​​are provided in a power of 2 format. In example 16, the subject matter of any of examples 14-15 can optionally include: the trained machine learning model is trained based on training data including training input tiles and corresponding supersampling values ​​for the training input tiles, and the corresponding supersampling values ​​are determined for each of the training input tiles based on quality measure metrics of the training input tiles that exceed a quality measure metric threshold at a corresponding supersampling level.

[0294] In example 17, the subject matter of any of examples 14-16 can optionally include: the rendering step is performed by a graphics processing unit (GPU). In example 18, the subject matter of any of examples 14-17 can optionally include: the machine learning model is trained using a convolutional neural network (CNN). In example 19, the subject matter of any of examples 14-18 can optionally include: the CNN includes at least one of an input layer, one or more convolutional layers, at least one flattening layer, and one or more dense functions, the CNN utilizing an adaptive moment estimation (ADAM) optimizer and a mean squared error (MSE) loss function. In example 20, the subject matter of any of examples 14-19 can optionally include: a machine learning model is applied to the rendered tiles of pixels for at least one of rasterization, ray tracing, variable rate shading (VRS), coarse pixel shading (CPS), hybrid rendering, virtual reality (VR), or augmented reality (AR).

[0295] Example 21 is at least one non-transitory machine-readable storage medium for facilitating deep learning based sample selection for adaptive supersampling. The at least one non-transitory machine-readable storage medium of example 21, when executed by one or more processors, causes the one or more processors to: receive training data including input tiles and corresponding supersampling values ​​for the input tiles, each input tile including a plurality of pixels; and train a machine learning model based on the training data to identify a level of supersampling for a rendered tile of pixels.

[0296] In example 22, the subject matter of example 21 can optionally include: the input tile is rendered with a supersampling setting of 1. In example 23, the subject matter of any of examples 21-22 can optionally include: a supersampling value for the input tile is determined based on at least one of a quality measure metric including a structural similarity index measure (SSIM) or a peak signal-to-noise ratio (PSNR) measure. In example 24, the subject matter of any of examples 21-23 can optionally include: the input tile includes at least one of 8x8 pixels, 16x16 pixels, or 32x32 pixels of the image to be rendered. In example 25, the subject matter of any of examples 21-24 can optionally include: one or more processing elements train the machine learning model using an offline process separate from real-time use of the machine learning model in the inference stage.

[0297] In example 26, the subject matter of any of examples 21-25 can optionally include: the training data further includes depth values ​​corresponding to the input tiles. In example 27, the subject matter of any of examples 21-26 can optionally include: the training data further includes at least one of normals, object IDs, texture colors, primitive IDs, or temporal data corresponding to a previous rendered image. In example 28, the subject matter of any of examples 21-27 can optionally include: the machine learning model is trained using a convolutional neural network (CNN). In example 21, the subject matter of any of examples 21-28 can optionally include: the CNN includes at least one of an input layer, one or more convolutional layers, at least one flattening layer, and one or more dense functions, and the CNN uses an adaptive moment estimation (ADAM) optimizer and a mean squared error (MSE) loss function.

[0298] In example 30, the subject matter of any of examples 21-29 can optionally include: a trained machine learning model is applied to the rendered tiles of pixels for at least one of rasterization, ray tracing, variable rate shading (VRS), coarse pixel shading (CPS), hybrid rendering, virtual reality (VR), or augmented reality (AR). In example 31, the subject matter of any of examples 21-30 can optionally include: a smoothing function is applied to the rendered tiles of pixels having a difference between supersampling levels that exceeds a predetermined threshold, the supersampling levels being provided by the trained machine learning model.

[0299] Example 32 is a system for facilitating deep learning-based sample selection for adaptive supersampling. The system of example 32 can optionally include a memory and a processing element communicatively coupled to the memory. In example 32, the one or more processing elements perform the steps of receiving training data including input tiles and corresponding supersampling values ​​for the input tiles, each input tile including a plurality of pixels; and training a machine learning model based on the training data to identify a level of supersampling for a rendered tile of pixels, the machine learning model being stored in the memory.

[0300] In example 32, the subject matter of example 32 can optionally include: the input tiles include at least one of 8x8 pixels, 16x16 pixels, or 32x32 pixels of the image to be rendered. In example 34, the subject matter of any of examples 32-33 can optionally include: the one or more processing elements reside in a graphics processing unit (GPU). In example 35, the subject matter of any of examples 32-34 can optionally include: the input tiles are rendered with a supersampling setting of 1.

[0301] In example 36, the subject matter of any of examples 32-35 can optionally include: a supersampling value for the input tile is determined based on a quality metric that includes a structural similarity index measure (SSIM). In example 37, the subject matter of any of examples 32-36 can optionally include: a supersampling value for the input tile is determined based on a quality metric that includes a peak signal-to-noise ratio (PSNR) measure. In example 38, the subject matter of any of examples 32-37 can optionally include: one or more processing elements train the machine learning model using an offline process separate from real-time use of the machine learning model during the inference phase.

[0302] In example 8, the subject matter of any of examples 32-38 can optionally include: the training data further includes depth values ​​corresponding to the input tiles. In example 40, the subject matter of any of examples 32-39 can optionally include: the training data further includes at least one of a normal, an object ID, a texture color, a primitive ID, or temporal data corresponding to a previous rendered image. In example 41, the subject matter of any of examples 32-40 can optionally include: the machine learning model is trained using a convolutional neural network (CNN).

[0303] In example 42, the subject matter of any of examples 32-41 can optionally include: the CNN includes at least one of an input layer, one or more convolutional layers, at least one flattening layer, and one or more dense functions, the CNN utilizing an adaptive moment estimation (ADAM) optimizer and a mean squared error (MSE) loss function. In example 43, the subject matter of any of examples 32-42 can optionally include: the machine learning model trained by the one or more processing elements is applied to the rendered tiles of pixels for at least one of rasterization, ray tracing, variable rate shading (VRS), coarse pixel shading (CPS), hybrid rendering, virtual reality (VR), or augmented reality (AR). In example 44, the subject matter of any of examples 32-43 can optionally include: a smoothing function is applied to the rendered tiles of pixels having a difference between supersampling levels exceeding a predetermined threshold, the supersampling levels being provided by the trained machine learning model.

[0304] Example 45 is an apparatus for facilitating deep learning-based sample selection for adaptive supersampling according to an implementation of the disclosure. The apparatus of example 45 may include means for rendering a tile without applying supersampling, the tile including a plurality of pixels; means for providing the rendered tile as an input to a trained machine learning model; means for receiving a supersampling value for the rendered tile from the trained machine learning model; and means for re-rendering the tile with supersampling using the supersampling value received from the trained machine learning model.

[0305] In Example 46, the subject matter of Example 45 may optionally include an apparatus further configured to perform any of the methods of Examples 15-20.

[0306] Example 47 is at least one machine-readable medium including a plurality of instructions that, in response to being executed on a computing device, cause the computing device to perform the method according to any of Examples 14-20. Example 48 is an apparatus for facilitating deep learning-based sample selection for adaptive supersampling, configured to perform the method according to any of Examples 14-20. Example 49 is an apparatus for facilitating deep learning-based sample selection for adaptive supersampling, having means for performing the method according to any of Examples 14-20. Particulars in the examples may be used anywhere in one or more embodiments.

[0307] The foregoing description and drawings should be interpreted in an illustrative and not 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 features set forth in the appended claims.

Claims

1. An apparatus comprising one or more processing elements, the one or more processing elements comprising: receiving training data including input tiles and corresponding supersampling levels for the input tiles, each input tile including a plurality of pixels, the supersampling level indicating how many samples are taken to improve the quality of a rendered tile; and training a machine learning model based on the training data to identify a supersampling level for a rendered tile of pixels; An apparatus for performing the above.

2. The apparatus of claim 1 , wherein the input tiles comprise at least one of 8x8 pixels, 16x16 pixels, or 32x32 pixels of an image to be rendered.

3. The apparatus of claim 1 , wherein the one or more processing elements reside in a graphics processing unit (GPU).

4. The apparatus of claim 1 , wherein the input tiles are rendered with a supersampling level of one.

5. The apparatus of claim 1 , wherein the supersampling level for the input tile is determined based on a quality measure metric that includes a structural similarity index measure (SSIM).

6. The apparatus of claim 1 , wherein the supersampling level for the input tile is determined based on a quality measure metric that includes a peak signal-to-noise ratio (PSNR) measure.

7. 2. The apparatus of claim 1, wherein the one or more processing elements train the machine learning model using an offline process that is separate from real-time use of the machine learning model during an inference stage.

8. The apparatus of claim 1 , wherein the training data further comprises depth values ​​corresponding to the input tiles.

9. The apparatus of claim 1 , wherein the training data further comprises at least one of normals, object IDs, texture colors, primitive IDs, or temporal data corresponding to a previous rendered image.

10. The apparatus of claim 1 , wherein the machine learning model is trained using a convolutional neural network (CNN).

11. 11. The apparatus of claim 10, wherein the CNN includes at least one of an input layer, one or more convolutional layers, at least one flattening layer, and one or more dense functions, and the CNN utilizes an adaptive moment estimation (ADAM) optimizer and a mean squared error (MSE) loss function.

12. 2. The apparatus of claim 1, wherein the machine learning model trained by the one or more processing elements is applied to rendered tiles of pixels for at least one of rasterization, ray tracing, variable rate shading (VRS), coarse pixel shading (CPS), hybrid rendering, virtual reality (VR), or augmented reality (AR).

13. 2. The apparatus of claim 1, wherein a smoothing function is applied to rendered tiles of pixels having differences between supersampling levels exceeding a predetermined threshold, the supersampling levels being provided by the trained machine learning model.

14. rendering a tile without applying supersampling, the tile comprising a plurality of pixels; providing the rendered tiles as input to a trained machine learning model; receiving a supersampling level for the rendered tile from the trained machine learning model, the supersampling level indicating how many samples are taken to improve the quality of the rendered tile; and re-rendering the tiles by supersampling using the supersampling level received from the trained machine learning model; The method includes:

15. The method of claim 14 , wherein the supersampling levels are provided in a power-of-two format.

16. 15. The method of claim 14, wherein the trained machine learning model is trained based on training data including training input tiles and corresponding supersampling levels of the training input tiles, the corresponding supersampling levels being determined for each of the training input tiles based on a quality measure metric of the training input tile that exceeds a quality measure metric threshold at the corresponding supersampling level.

17. The method of claim 14 , wherein the rendering step is performed by a graphics processing unit (GPU).

18. To one or more processors: receiving training data including input tiles and corresponding supersampling levels for the input tiles, each input tile including a plurality of pixels, the supersampling level indicating how many samples are taken to improve the quality of a rendered tile; and training a machine learning model based on the training data to identify a supersampling level for a rendered tile of pixels; A computer program that performs the following:

19. 20. The computer program product of claim 18, wherein the input tiles are rendered with a supersampling level of one.

20. 20. The computer program product of claim 18, wherein the supersampling level for the input tile is determined based on at least one of a quality measure metric including a structural similarity index measure (SSIM) or a peak signal-to-noise ratio (PSNR) measure.

Citation Information

Patent Citations

  • Adaptive sampling along edges for surface rendering

    JP2007528769A

  • Method and apparatus for image processing

    US20100183217A1

  • Using a pixel offset for evaluating a plane equation

    US20110081100A1

  • Method and apparatus for rendering object and recording medium for rendering

    US20150103071A1

  • Sequential image sampling and storage of fine-tuned features

    US20160283864A1