Using a Single Instruction Set Architecture (ISA) Instruction for Vector Normalization

JP7651285B2Active Publication Date: 2025-03-26INTEL CORP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2020159659
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-11-15
Filing Date
2020-09-24
Publication Date
2025-03-26
Estimated Expiration
2040-09-24

Smart Images

  • Figure 0007651285000006
    Figure 0007651285000006
  • Figure 0007651285000007
    Figure 0007651285000007
  • Figure 0007651285000008
    Figure 0007651285000008
Patent Text Reader

Abstract

To provide, generally, an improved vector normalization instruction.SOLUTION: In one embodiment, a method includes a GPU receiving a single instruction specifying vector normalization processing to be performed on V vectors and, in response thereto, a first processing unit generating V squared length values, N squared length values at a time for each N sets of inputs representing multiple component vectors for N of the vectors, respectively, by performing N parallel dot product operations on the N sets of inputs. The method also includes a second processing unit generating V sets of outputs representing multiple normalized component vectors of the V vectors, respectively, N sets of outputs at a time for each N squared length values of the V squared length values by performing N parallel operations on the N squared length values, where each of the N parallel operations implements a combination of a reciprocal square root function and a vector scaling function.SELECTED DRAWING: Figure 19
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] FIELD OF THE DISCLOSURE The embodiments described herein relate generally to the field of graphics processing units (GPUs) and graphics instruction set architectures (ISAs), and more specifically to an improved vector normalization instruction that reduces the number of clock cycles for performing vector normalization. [Background technology]

[0002] Graphics processing units (GPUs) use multiple types of instructions to process shader code. The need for vector normalization arises frequently in the context of three-dimensional (3D) games and other 3D graphic applications to handle scenarios including directional vector calculation, surface normal calculation, physics / collision, shadow depth and ambient depth calculation, geometric transformation, lighting, reflection, normal mapping, bump mapping, etc. Depending on the graphics application programming interface (API), vector normalization can be represented by three operations (i.e., dot product, inverse square root, and vector scaling in Microsoft DirectX API) or a single operation (i.e., normalization operation in OpenGL API). At the ISA level, vector normalization can be represented by seven instructions. · Dot product (SIMD8): MUL, MAD, MAD; · Inverse Square Root(SIMD8):Math; Vector scaling (SIMD8): MUL, MUL, MUL.

[0003] Static analysis of the top three pixel shaders (in terms of graphics hardware time consumption) in industry standard and prominent benchmarks such as Manhattan in Kishonti Informatics' GFXBench and UL's 3DMark11 show that 21% of OpenGL API instructions in Manhattan and 8%, 8%, 11%, and 6% of Microsoft DirectX API instructions in four subtests of 3DMark11 are related to vector normalization operations. Therefore, reducing the number of clock cycles to perform vector normalization operations will have a significant positive impact not only on pixel shader performance, but also on vertex shaders, compute shaders, and potentially geometry, hull, and domain shaders. [Brief description of the drawings]

[0004] The embodiments described herein are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings in which like reference symbols refer to similar elements and in which: [Figure 1] FIG. 1 is a block diagram of a processing system, according to one embodiment. [Figure 2A] FIG. 1 illustrates a computer system and a graphics processor according to some embodiments. [Figure 2B] FIG. 1 illustrates a computer system and a graphics processor according to some embodiments. [Figure 2C] FIG. 1 illustrates a computer system and a graphics processor according to some embodiments. [Figure 2D] FIG. 1 illustrates a computer system and a graphics processor according to some embodiments. [Figure 3A] FIG. 2 is a block diagram of an additional graphics processor and computational accelerator architecture according to some embodiments. [Figure 3B] FIG. 2 is a block diagram of an additional graphics processor and computational accelerator architecture according to some embodiments. [Figure 3C] FIG. 2 is a block diagram of an additional graphics processor and computational accelerator architecture according to some embodiments. [Figure 4] FIG. 2 is a block diagram of a graphics processing engine of a graphics processor, according to some embodiments. [Figure 5A] FIG. 2 illustrates thread execution logic including an array of processing elements used in a graphics processor core, according to some embodiments. [Figure 5B] FIG. 2 illustrates thread execution logic including an array of processing elements used in a graphics processor core, according to some embodiments. [Figure 6] FIG. 2 illustrates an additional execution unit according to one embodiment. [Figure 7] FIG. 2 is a block diagram illustrating an instruction format for a graphics processor according to some embodiments. [Figure 8] FIG. 2 is a block diagram of another embodiment of a graphics processor. [Figure 9A] FIG. 2 is a block diagram illustrating a command format for a graphics processor according to some embodiments. [Figure 9B] FIG. 2 is a block diagram illustrating a command sequence for a graphics processor according to one embodiment. [Figure 10] FIG. 1 illustrates an exemplary graphics software architecture for a data processing system, according to some embodiments. [Figure 11A] FIG. 1 is a block diagram illustrating an IP core development system that may be used to manufacture integrated circuits for performing operations, according to one embodiment. [Figure 11B] 1 is a cross-sectional side view of an integrated circuit package assembly according to some embodiments. [Figure 11C] FIG. 2 illustrates a package assembly including multiple units of hardware logic chiplets connected to a substrate, according to one embodiment. [Figure 11D]FIG. 2 illustrates a package assembly including replaceable chiplets, according to one embodiment. [Figure 12] FIG. 1 is a block diagram illustrating an exemplary system on a chip integrated circuit that may be manufactured using one or more IP cores, according to one embodiment. [Figure 13A] FIG. 1 is a block diagram illustrating an exemplary graphics processor for use within a SoC in accordance with some embodiments. [Figure 13B] FIG. 1 is a block diagram illustrating an exemplary graphics processor for use within a SoC in accordance with some embodiments. [Figure 14] FIG. 2 conceptually illustrates three steps involved in performing a vector normalization process. [Figure 15] 1 is a block diagram illustrating a high-level, simplified view of a shader unit of a GPU, according to one embodiment. [Figure 16] FIG. 13 is a diagram illustrating the throughput of vector normalization processing using the MUL, MAD, and RSQ instructions. [Figure 17] FIG. 1 illustrates a register layout for storing two sets of inputs and two outputs for a SIMD2 DP3 operation in four registers to perform a SIMD8 DP3 operation, according to one embodiment. [Figure 18] FIG. 1 illustrates a register layout for storing two sets of outputs for a SIMD2 RSQVS operation into four registers to perform a SIMD8 RSQVS operation, according to one embodiment. [Figure 19] FIG. 1 is a flow diagram illustrating a vector normalization process according to one embodiment. [Figure 20] FIG. 1 illustrates the throughput of vector normalization processing using DP3 and RSQVS instructions according to one embodiment. [Figure 21A] FIG. 1 is a block diagram illustrating an additional exemplary graphics processor in a system on a chip integrated circuit, according to one embodiment. [Figure 21B]FIG. 1 is a block diagram illustrating an additional exemplary graphics processor in a system on a chip integrated circuit, according to one embodiment. [Figure 22] FIG. 1 illustrates an embodiment of a computing device. [Figure 23] FIG. 2 illustrates one embodiment of a single-precision floating-point format. [Figure 24] FIG. 2 is a flow diagram of one embodiment of a process for performing floating-point extended math operations. [Diagram 25] FIG. 2 is a flow diagram of one embodiment of a process for performing floating-point extended mathematical operations on a mantissa. [Figure 26] 1 is a graph of an initial estimate of the square root. [Figure 27] 13 is a graph of the difference between the most significant bit square root and the initial estimate. [Figure 28] FIG. 28 shows an expanded linear segment from the graph of FIG. 27. [Figure 29] 1 is a graph of indexes into lookup table entries. [Diagram 30] 1 is a graph of a piecewise linear approximation. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0005] The embodiments described herein are generally directed to improved vector normalization instructions that reduce the number of clock cycles for performing vector normalization.

[0006] According to one embodiment, described in further detail below with reference to Figures 14-30, an instruction (e.g., VNM) may be exposed via the ISA that specifies a vector normalization operation to be performed on V vectors. In response to receipt of the VNM instruction by a graphics processing unit (GPU), a first processing unit of the GPU generates V squared length values ​​each representing a squared length of a vector of the set of V vectors, the N squared length values ​​being generated at a time by performing N parallel dot product operations on the N set of inputs for each of the N sets of inputs representing a plurality of component vectors for N vectors of the set of V vectors and stored in respective registers of a first set of V / N registers. A second processing unit of the GPU generates V set of outputs each representing a plurality of normalized component vectors of a vector of the set of V vectors, the N set of outputs being generated at a time by performing N parallel operations on the N squared length values ​​for each of the N squared length values ​​of the V squared length values, each of the N parallel operations performing a combination of an inverse square root function and a vector scaling function.

[0007] System Overview

[0008] 1 is a block diagram of a processing system 100, according to one 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 connections to local or wide area networks.

[0009] In one embodiment, the system 100 may include, be coupled to, or be integrated within a server-based gaming platform, a game console and media console including games, a mobile game console, a handheld game console, or an online game 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 low internal storage capacity. The processing system 100 may also include, be coupled to, or be integrated within a wearable device, such as a smart watch wearable device; smart eyewear or clothing enhanced with augmented reality (AR) or virtual reality (VR) capabilities that provide visual, audio, or haptic output to complement a real-world visual, audio, or haptic experience, or that otherwise provides text, audio, graphics, video, holographic images or videos, or haptic feedback; other augmented reality (AR) devices; or other virtual reality (VR) devices. In some embodiments, the processing system 100 may include, be part of, a television or a set-top box device. In one embodiment, system 100 may include, be coupled to, or be integrated within an autonomous vehicle, such as a bus, a tractor trailer, an automobile, a motorcycle or power cycle, an airplane or glider (or any combination thereof), etc. The autonomous vehicle may use system 100 to process the sensed environment around the vehicle.

[0010] 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 of system or 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 computation via complex instruction set computing (CISC), reduced instruction set computing (RISC), or very long instruction words (VLIW). The one or more processor cores 107 may process different instruction sets 109, which 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).

[0011] 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 among the processor cores 107 using known cache coherency techniques. A register file 106 may also 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, while other registers may be specific to the design of the processor 102.

[0012] In some embodiments, the one or more processors 102 are coupled to one or more interface buses 110 to transmit communication signals, such as address, data, or control signals, between the processors 102 and other components in the system 100. In one embodiment, the interface bus 110 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, while the platform controller hub (PCH) 130 provides connectivity to I / O devices via a local I / O bus.

[0013] The 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 with suitable performance to function as a process memory. In one embodiment, the memory device 120 may operate as a system memory of the system 100 to store data 122 and instructions 121 used by the one or more processors 102 when executing applications or processes. The memory controller 116 also couples to an optional external graphics processor 118 that may communicate with one or more graphics processors 108 in the processor 102 to perform graphics and media processing. In some embodiments, graphics, media, or computational processing may be assisted by an accelerator 112, which is a co-processor that may be configured to perform a specialized set of graphics, media, or computational processing. For example, in one embodiment, the accelerator 112 is a matrix multiplication accelerator used to optimize machine learning or computational processing. In one embodiment, accelerator 112 is a ray-tracing accelerator that can be used to perform ray-tracing operations in conjunction with graphics processor 108. In one embodiment, external accelerator 119 can be used instead of or in conjunction with accelerator 112.

[0014] 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 or 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.

[0015] In some embodiments, the platform controller hub 130 allows peripherals to be connected 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 can 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. Firmware interface 128 allows for communication with system firmware and may be, for example, a unified extensible firmware interface (UEFI). Network controller 134 may allow for network connectivity to a wired network. In some embodiments, a high performance network controller (not shown) couples to interface bus 110. In one embodiment, audio controller 146 is a multi-channel high definition audio controller. In one embodiment, system 100 includes an optional legacy I / O controller 140 for coupling legacy (e.g., Personal System 2 (PS / 2)) devices to the system. Platform controller hub 130 may also connect to one or more universal serial bus (USB) controllers 142 for connecting input devices such as a keyboard and mouse 143 combination, a camera 144, or other USB input devices.

[0016] It should 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 memory controller 116 and platform controller hub 130 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.

[0017] For example, a circuit board (sled) may be used on which components such as CPUs, memory, and other components are placed and designed to enhance thermal performance. In some examples, processing components such as processors are placed on the top surface of the sled, while near memory such as DIMMs are placed on the bottom surface of the sled. As a result of the enhanced airflow from this design, the components can operate at higher frequencies and power levels than typical systems, thereby improving performance. Additionally, the sled is configured to blindly mate with power and data communication cables in the rack, thereby enhancing the ability to be quickly removed, upgraded, reinstalled, and / or replaced. Similarly, the individual components, such as processors, accelerators, memory, data storage drives, etc., placed on the sled 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 attest to their authenticity.

[0018] Data centers can utilize a single network architecture (fabric) that supports multiple other network architectures, including Ethernet and Omnipath. The threads can be connected to the switches via optical fiber, which provides higher bandwidth and lower latency than typical twisted pair cabling (e.g., Cat5, Cat5E, Cat6, etc.). The high bandwidth, low latency interconnect and network architecture allows the data center to pool resources such as memory, accelerators (e.g., GPUs, graphic accelerators, FPGAs, ASICs, neural network and / or artificial intelligence accelerators, etc.), and physically disaggregated data storage drives, when in use, and provide them to computer resources (e.g., processors) as needed, allowing the computer resources to access the pooled resources as if they were local.

[0019] A power source 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 to DC (alternating current to direct current) adapter for plugging into a wall outlet. Such AC power can be a renewable energy (e.g., solar power) source. In one example, the power source includes a DC power source, such as an external AC-DC converter. In one example, the power source or power source includes wireless charging hardware that charges by proximity to 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.

[0020] Figures 2A-2D illustrate a computer system and a graphics processor provided by embodiments described herein. Elements of Figures 2A-2D having the same reference numbers (or names) as elements of other figures herein may operate or function in a similar manner as described elsewhere herein, but are not limited to such.

[0021] 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. The processor 200 may include additional cores up to additional core 202N, represented by a dashed box. Each of the 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 the processor 200. The cache memory hierarchy may include at least one level of instruction and data cache within each processor core, and one or more levels of shared mid-level cache, such as level 2 (L2), level 3 (L3), level 4 (L4), or other levels of cache, with the highest level of cache before external memory classified as an LLC. In some embodiments, cache coherency logic maintains coherency between the various cache units 206 and 204A-204N.

[0022] In some embodiments, processor 200 may also 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 for managing access to various external memory devices (not shown).

[0023] In some embodiments, one or more of the processor cores 202A-202N include support for simultaneous multithreading. In such embodiments, the system agent core 210 includes components for coordinating and operating the cores 202A-202N during multithreaded 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.

[0024] 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 system agent core 210 that includes a set of shared cache units 206 and one or more integrated memory controllers 214. In some embodiments, system agent core 210 also includes a display controller 211 that drives the output of the graphics processor 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.

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

[0026] The exemplary I / O link 213 represents at least one of several types of I / O interconnects, including on-package I / O interconnects that facilitate 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.

[0027] 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 with respect to instruction set architecture (ISA), where one or more of the processor cores 202A-202N execute a first instruction set while at least one of the other cores executes a subset of the first instruction set or another instruction set. In one embodiment, the processor cores 202A-202N are heterogeneous with respect to microarchitecture, where one or more cores with relatively high power consumption are combined with one or more cores with low power consumption. In one embodiment, the processor cores 202A-202N are heterogeneous with respect to computational capabilities. Additionally, the processor 200 can be implemented on one or more chips or as a SoC integrated circuit having the illustrated components in addition to other components.

[0028] 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 numbers (or names) as elements of other figures herein may operate or function in a similar manner as described elsewhere herein, but are not limited to such. The graphics processor core 219, sometimes referred to as a core slice, may be one or more graphics cores in a modular graphics processor. The graphics processor core 219 is an example of one graphics core slice, and the graphics processors described herein may include multiple graphics core slices based on target power and performance envelopes. Each graphics processor core 219 may include a fixed function block 230 coupled with multiple sub-cores 221A-221F, also referred to as sub-slices, that include modular blocks of general purpose and fixed function logic.

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

[0030] 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-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 pre-emption. The media pipeline 234 (e.g., media pipeline 316 of FIGS. 3 and 4) includes logic that facilitates decoding, encoding, pre-processing, and / or post-processing of multimedia data, including image and video data. The media pipeline 234 performs media processing via requests to computation or sampling logic in the sub-cores 221-212F.

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

[0032] Graphics microcontroller 233 can be configured to perform various scheduling and management tasks for graphics processor core 219. In one embodiment, graphics microcontroller 233 can perform graphics and / or compute workload scheduling to various graphics parallel engines in execution unit (EU) arrays 222A-222F, 224A-224F within sub-cores 221A-221F. In this scheduling model, host software executing on a CPU core of a SoC including graphics processor core 219 can send a workload to one of multiple graphics processor doorbells, which invokes scheduling operations on the appropriate graphics engine. Scheduling operations include determining which workload to run next, sending the workload to a command streamer, pre-empting existing workloads running on the engines, monitoring the progress of the workload, and notifying 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, providing graphics processor core 219 with the ability to save and restore registers within graphics processor core 219 on low power state transitions independent of the operating system and / or graphics driver software on the system.

[0033] Graphics processor core 219 may have up to N modular sub-cores, more or less than the illustrated sub-cores 221A-221F. For each set of N sub-cores, graphics processor core 219 may include shared function logic 235, shared and / or cache memory 236, geometry / fixed function pipeline 237, as well as additional fixed function logic 238 that accelerates various graphics and computation operations. Shared function logic 235 may include logic units that can be shared by each of the N sub-cores in graphics processor core 219, associated with shared function logic 420 of FIG. 4 (e.g., sampler, math, and / or inter-thread communication logic). 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.

[0034] In one embodiment, graphics processor core 219 includes additional fixed function logic 238 that can 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 with position-only shading. In position-only shading, there are two geometry pipelines: a full geometry pipeline in geometry / fixed function pipeline 238, 231, and an additional geometry pipeline, the cull pipeline, that can be included in additional fixed function logic 238. In one embodiment, the cull pipeline is a fragmented version of the full geometry pipeline. The full pipeline and the cull pipeline can run different instances of the same application, with each instance having a separate context. Position-only shading can hide long cull runs of discarded triangles, allowing shading to complete faster in some cases. For example, in one embodiment, the cull pipeline logic in additional fixed function logic 238 can execute position shaders in parallel with the main application and can generally generate significant results faster than the full pipeline because the cull pipeline only fetches and shades position attributes of vertices without performing rasterization and rendering of pixels to the frame buffer. The cull pipeline can use the significant results generated to calculate visibility information for all triangles, regardless of whether they are culled or not. The full pipeline (which may be called a reconstructed pipeline in this example) can consume the visibility information, skip over culled triangles, and shade only the visible triangles that are ultimately passed to the rasterization phase.

[0035] 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.

[0036] Within each graphics sub-core 221A-221F is a set of execution resources that can be used to perform graphics, media, and computational processing in response to requests by the graphics pipeline, media pipeline, or shader programs. The graphics sub-cores 221A-221F include multiple 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 memory (SLM) 228A-228F. Each EU array 222A-222F, 224A-224F includes multiple execution units, which are general-purpose graphics processing units capable of performing floating point and integer / fixed point logical operations in service of graphics, media, or computational processing, including graphics, media, or computational shader programs. 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 read textures or other 3D graphics related data into memory. The 3D samplers can read texture data differently based on the configured sample state and texture format associated with a given texture. The media samplers 206A-206F can perform similar read operations based on the type and format associated with the media data. In one embodiment, each graphics sub-core 221A-221F can alternatively include an integrated 3D and media sampler. The threads executing on the execution units in each sub-core 221A-221F utilize a shared local memory 228A-228F in each sub-core to allow threads executing in a thread group to execute using a common pool of on-chip memory.

[0037] 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 presented, it will be understood that the other multi-core groups 240B-240N may be equipped with the same or similar sets of graphics processing resources.

[0038] 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 to the various cores 243, 244, 245. A set of register files 242 store operand values ​​used by cores 243, 244, 245 when executing graphics threads. These 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.

[0039] 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 multicore 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 multicore 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 multicore 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).

[0040] Input / output (I / O) circuitry 250 couples GPU 239 to one or more I / O 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 device 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 device 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 device 252, CPU 246, and GPU(s) 239 may share the same virtual address space.

[0041] In one embodiment, IOMMU 251 supports virtualization. In this case, IOMMU 251 manages 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 are stored in control registers and swapped out on context switches (e.g., to provide a new context with access to the associated set of page tables). Although not shown in FIG. 2C, each of cores 243, 244, 245 and / or multicore groups 240A-240N may include a translation lookaside buffer (TLB) for caching virtual guest to physical guest translations, physical guest to physical host translations, and virtual guest to physical host translations.

[0042] 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 as other physical system-level memory, although the underlying principles of the invention are not limited to this particular implementation.

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

[0044] In a deep learning implementation, parallel matrix multiplication operations may be scheduled for execution on tensor cores 244. In particular, training a neural network 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. In each cycle, N dot products are processed.

[0045] Matrix elements may be stored in different precisions depending on the particular implementation, including 16-bit words, 8-bit bytes (e.g., INT8), and 4-bit half-bytes (e.g., INT4). Different precision modes can 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, etc.).

[0046] In one embodiment, ray tracing core 245 accelerates ray tracing processing for both real-time ray tracing and non-real-time ray tracing implementations. In particular, ray tracing core 245 includes ray traversal / intersection circuitry for performing ray traversals using a bounding volume hierarchy (BVH) and identifying intersections between rays and primitives enclosed within 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 construct). In one implementation, ray tracing core 245 performs traversal and intersection processing in coordination with image denoising techniques described herein, at least a portion of which may be executed on tensor core 244. For example, in one embodiment, tensor core 244 implements a deep learning neural network to denoise frames generated by ray tracing core 245. However, the CPU 246, graphics core 243, and / or ray tracing core 245 may also implement all or part of the denoising and / or deep learning algorithms.

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

[0048] 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 dedicated circuitry for performing bounding box tests (e.g., traversal operations) and a second set of dedicated circuitry for performing ray triangle intersection tests (e.g., intersecting rays are traversed). Thus, in one embodiment, the multi-core group 240A only needs to launch ray probes, and the ray tracing core 245 independently performs ray traversals and intersections and returns hit data (e.g., hit, no hit, multiple hits, etc.) to the thread context. The other cores 243, 244 are freed to perform other graphics or computational work while the ray tracing core 245 performs traversal and intersection processing.

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

[0050] 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.

[0051] In one embodiment, the ray tracing core 245 (and / or other cores 243, 244) includes hardware support for a ray tracing instruction set, such as Microsoft's DirectX Ray Tracing (DXR), which includes dispatch ray commands as well as ray generation, nearest hit, any hit, and miss shaders (each object can be assigned its own set of shaders and textures). 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, it should be noted that the underlying principles of the present invention are not limited to any particular ray tracing ISA.

[0052] 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, per-primitive and hierarchical bounding box construction, misses, visits, and exceptions. More specifically, one embodiment includes ray tracing instructions for performing the following functions:

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

[0054] Nearest Hits A nearest hit instruction may be executed to find the nearest intersection point between a ray and a primitive in a scene.

[0055] any hit Any hit command identifies multiple intersections between the ray and primitives in the scene, and potentially identifies a new closest intersection point.

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

[0057] Per-primitive bounding box constructionThis instruction builds a bounding box around a given primitive or group of primitives (eg, when building a new BVH or other acceleration data structure).

[0058] Miss Indicates that the ray does not hit any geometry in the scene, or a specified region of the scene.

[0059] visit Shows the children volumes that the ray traverses.

[0060] exception Contains different types of exception handlers (e.g., called for different error conditions).

[0061] 2D is a block diagram of a general purpose graphics processing unit (GPGPU) 270 that may be configured as a graphics processor and / or computational accelerator, according to embodiments described herein. GPGPU 270 may 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, memory 271 is a system memory that may be shared with one or more CPUs 246, and memory 272 is a device memory dedicated to GPGPU 270. In one embodiment, components within GPGPU 270 and device memory 272 may be mapped to memory addresses accessible by one or more CPUs 246. Access to memories 271 and 272 may be facilitated via memory controller 268. In one embodiment, memory controller 268 may include an internal direct memory access (DMA) controller 269, or may include logic for performing operations otherwise performed by a DMA controller.

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

[0063] During operation, one or more CPUs 246 may write commands to registers or memory within GPGPU 270 that are mapped into an accessible address space. Command processor 257 may read commands from registers or memory and determine how those commands are to be processed within GPGPU 270. Thread dispatcher 258 may then be used to dispatch threads to computation units 260A-260N for execution of those commands. Each computation unit 260A-260N may execute threads independently of the other computation units. Additionally, each computation unit 260A-260N may be independently configured for conditional computation and may conditionally output the results of the computation to memory. Command processor 257 may interrupt one or more CPUs 246 upon completion of a submitted command.

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

[0065] 3A is a block diagram of a graphics processor 300, which may be a separate graphics processing unit or may be a graphics processor integrated with multiple processing cores or other semiconductor devices such as, but not limited to, memory devices or network interfaces. In some embodiments, the graphics processor communicates with registers on the graphics processor and commands placed in the processor memory via a memory-mapped I / O interface. In some embodiments, the graphics processor 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.

[0066] In some embodiments, the graphics processor 300 also includes a display controller 302 that drives display output data to a display device 318. The 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. The display device 318 can be an internal or external display device. In one embodiment, the 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 Motion 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, ​​as well as Society of Motion Picture & Television Engineers (SMPTE) 421 M / VC-1, and Joint Photographic Experts Group (JPEG) formats such as JPEG, and Motion JPEG (MJPEG) formats.

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

[0068] 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 fixed-function elements that perform various tasks within the elements and / or spawn execution threads into 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.

[0069] In some embodiments, the media pipeline 316 includes fixed function or programmable logic units that perform one or more specialized media processing, such as video decode acceleration, video deinterlacing, and video encode acceleration, in place of or on behalf of the video codec engine 306. In some embodiments, the media pipeline 316 further includes a thread spawning unit that spawns threads for execution in the 3D / media subsystem 315. The spawned threads perform media processing calculations on one or more graphics execution units included in the 3D / media subsystem 315.

[0070] 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 and dispatching the various requests to available thread execution resources. The execution resources include an array of graphics execution units that process the 3D and media threads. In some embodiments, the 3D / Media subsystem 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.

[0071] 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 the graphics engine tiles 310A-310D. Each of the graphics engine tiles 310A-310D can be interconnected via a set of tile interconnects 323A-323F. Each of the graphics engine tiles 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. In one embodiment, the memory devices 326A-326D are high bandwidth memory (HBM) modules that can be on-die with the respective graphics engine tiles 310A-310D. In one embodiment, memory devices 326A-326D are stacked memory devices that can be stacked on top of each of the graphics engine tiles 310A-310D. In one embodiment, each graphics engine tile 310A-310D and associated memory 326A-326D resides on a separate chiplet that is coupled to a base die or base substrate, as described in further detail in Figures 11B-11D.

[0072] The graphics processing engine cluster 322 may be connected to an on-chip or on-package fabric interconnect 324. The fabric interconnect 324 allows 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 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 optionally includes a display controller 302 that allows 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.

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

[0074] FIG. 3C illustrates a computation accelerator 330 according to an embodiment described herein. The computation accelerator 330 may include architectural similarities 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 parallel or vector-based general-purpose computation processing. 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 to perform 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 computation engine tiles 340A-340D may also be interconnected via a set of tile interconnects 323A-323F, which may connect to and / or be interconnected by the fabric interconnect 324. In one embodiment, the computation accelerator 330 includes a large L3 cache 336, which may be configured as a device-wide cache. The computation 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.

[0075] Graphics Processing Engine

[0076] 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 other figures 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, a separate media and / or image processor is coupled to the GPE 410.

[0077] 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 a system memory or one or more of 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 instructions 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 further include a batch command buffer that stores a batch of multiple commands. Commands for the 3D pipeline 312 may also include references to data stored in memory, such as, but not limited to, vertex and geometry data for the 3D pipeline 312 and / or image data and memory objects for the media pipeline 316. The 3D pipeline 312 and the media pipeline 316 process commands and data by performing operations through logic within the respective pipelines or by dispatching one or more execution threads to the graphics core array 414. In one embodiment, the graphics core array 414 includes one or more blocks of graphics cores (e.g., graphics core(s) 415A, graphics core(s) 415B), each block including one or more graphics cores. Each graphics core includes a set of graphics execution resources, such as 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.

[0078] 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. General purpose 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 can execute multiple concurrent threads of execution associated with multiple shaders.

[0079] In some embodiments, graphics core array 414 includes execution logic to perform 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 can perform processing operations in parallel or in cooperation with general purpose logic in processor core 107 of FIG. 1 or cores 202A-202N of FIG. 2A.

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

[0081] In some embodiments, 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 levels of GPE 410. In one embodiment, execution resources are dynamically scalable, allowing execution resources to be enabled or disabled as needed.

[0082] The graphics core array 414 couples to shared function logic 420, which 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 auxiliary 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.

[0083] 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 instantiation of that specialized function is implemented as a standalone entity within the shared function 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 by embodiment. In some embodiments, certain shared functions within the shared function logic 420 that are used extensively by the graphics core array 414 may be included within the shared function logic 416 within the graphics core array 414. In various embodiments, the shared function logic 416 within the graphics core array 414 may include some or all of the logic within the shared function logic 420. In one embodiment, all of the logical elements within the shared function logic 420 may be duplicated within the shared function 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 within the graphics core array 414.

[0084] Execution Unit

[0085] 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 of FIG. 5A-5B having the same reference numbers (or names) as elements of other figures herein may operate or function in a similar manner as described elsewhere herein, 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 illustrates an execution unit in a general-purpose graphics processor, and FIG. 5B illustrates an execution unit that may be used in a computational accelerator.

[0086] 5A, in some embodiments, thread execution logic 500 includes a shader processor 502, a thread dispatcher 504, an instruction cache 506, a scalable execution unit array 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 can be dynamically scalable 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 fabric that links each component. 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 an instruction cache 506, a data port 514, a sampler 510, and execution units 508A-508N. In some embodiments, each execution unit (e.g., 508A) is a standalone programmable general-purpose computational unit capable of executing multiple simultaneous hardware threads, 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.

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

[0088] In some embodiments, the execution units 508A-508N support an instruction set that includes native support for many standard 3D graphics shader instructions, allowing shader programs from graphics libraries (e.g., Direct3D and OpenGL) to be executed with minimal translation. The execution units support vertex and geometry processing (e.g., vertex programs, geometry programs, vertex shaders), pixel operations (e.g., pixel shaders, fragment shaders), and general-purpose operations (e.g., compute shaders and media shaders). Each of the execution units 508A-508N is capable of multi-issue single instruction multiple data (SIMD) execution, allowing for multi-threaded operation to enable an efficient execution environment in the face of longer latency memory accesses. Each hardware thread within each execution unit has a dedicated high-bandwidth register file and associated independent thread state. Execution is multi-issue per clock into a pipeline capable of integer, single and double precision floating point operations, SIMD branch functions, logical operations, transcendental operations, and a variety of other operations. While waiting for data from memory or one of the shared functions, dependency logic within the execution units 508A-508N puts the waiting thread to sleep until the requested data is returned. While the waiting thread is asleep, hardware resources may be devoted to processing other threads. For example, during a delay associated with vertex shader processing, the execution unit may process another type of shader program, including a pixel shader, a fragment shader, or a different vertex shader. Various embodiments may apply to execution use with the use of single instruction multithreading (SIMT) as an alternative to or in addition to the use of SIMD. Reference to a SIMD core or processing may also apply to SIMT or to SIMD in combination with SIMT.

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

[0090] 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 manipulating a 256-bit wide vector, the 256 bits of the vector are stored in a register, and the execution unit manipulates the vector as four individual 54-bit packed data elements (quadword (QW) sized data elements), eight individual 32-bit packed data elements (doubleword (DW) sized data elements), sixteen individual 16-bit packed data elements (word (W) sized data elements), or thirty-two individual 8-bit data elements (byte (B) sized data elements). However, different vector widths and register sizes are possible.

[0091] In one embodiment, one or more execution units can be combined into fused execution units 509A-509N with thread control logic (507A-507N) common to the fused EUs. Multiple EUs can be fused into an EU group. Each EU in a fused EU group can be configured to execute a separate SIMD hardware thread. The number of EUs in a fused EU group can vary depending on the embodiment. Furthermore, various SIMD widths can be executed 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. The thread control logic 507A controls the threads executed in the fused graphic execution unit 509A, and enables each EU in the fused execution units 509A-509N to execute using a common instruction pointer register.

[0092] 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 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 functionality for processing texture or media data during the sampling process before providing the sampled data to the execution units.

[0093] During execution, the graphics and media pipelines send 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 (such as pixel shader logic, fragment shader logic, etc.) in the shader processor 502 is invoked to further compute output information and write the results to an output surface (such as a color buffer, depth buffer, stencil buffer, etc.). In some embodiments, a pixel shader or fragment shader computes values ​​for various vertex attributes that are interpolated across the rasterized objects. In some embodiments, the pixel processor logic in the shader processor 502 then executes pixel or fragment shader programs provided by an application programming interface (API). 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 from texture maps stored in memory. Arithmetic operations on the texture data and the input geometry data compute pixel color data for each geometry fragment or discard one or more pixels from further processing.

[0094] In some embodiments, the data port 514 provides a memory access mechanism for the thread execution logic 500 to output 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.

[0095] In one embodiment, the execution logic 500 may also include a ray tracer 505 that may provide 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.

[0096] 5B illustrates exemplary internal details of execution unit 508, according to an embodiment. 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. GRF 524 and ARF 526 include a general purpose register file and a set of architectural register files associated with each concurrent hardware thread that may be active in graphics execution unit 508. In one embodiment, per-thread architectural state is maintained in ARF 526, while data used during thread execution is stored in GRF 524. The execution state of each thread, including each thread's instruction pointer, may be held in thread-specific registers in ARF 526.

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

[0098] In one embodiment, the graphics execution unit 508 can issue multiple instructions simultaneously, each of which can 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 534 for execution. Each execution thread can access 128 general purpose registers in the GRF 524, each of which can store 32 bytes and can be accessed 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 the embodiment is not so limited and more or less register resources can be provided in other embodiments. In one embodiment, the graphics execution unit 508 is divided into seven hardware threads that can independently perform computational operations, although the number of threads per execution unit can also vary depending on the embodiment. For example, in one embodiment, a maximum of 16 hardware threads are supported. In an embodiment where the seven threads can access 4K bytes, the GRF 524 can store a total of 28K bytes. With 16 threads each having access to 4K bytes, the GRF524 can store a total of 64K bytes. In flexible addressing mode, registers can be addressed together to effectively build wider registers, or to represent strided rectangular block data structures.

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

[0100] 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 FPUs 534 also support integer calculations. In one embodiment, the FPUs 534 can SIMD execute up to M 32-bit floating point (or integer) operations, or SIMD execute up to 2M 16-bit integer or 16-bit floating point operations. In one embodiment, at least one of the FPUs provides extended math capabilities supporting high throughput transcendental math functions and double precision 54-bit floating point. In some embodiments, there is also a set of 8-bit integer SIMD ALUs 535, which can be specifically optimized to perform operations related to machine learning calculations.

[0101] In one embodiment, an array of multiple instances of the graphics execution unit 508 can be instantiated into a graphics sub-core group (e.g., a sub-slices). For scalability, the multiplication 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.

[0102] FIG. 6 illustrates an additional execution unit 600 according to one embodiment. The execution unit 600 may be, for example but not limited to, a compute-optimized execution unit for use in the compute engine tiles 340A-340D as in FIG. 3C. A variation of the execution unit 600 may be used in the graphics engine tiles 310A-310D as 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 further 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.

[0103] The execution unit 600 also includes a computation unit 610 that includes multiple different types of functional units. In one embodiment, the computation unit 610 includes an ALU unit 611 that includes an array of arithmetic logic units. The 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 can be performed simultaneously. The computation unit 610 can also include a systolic array 612 and a math unit 613. The 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 processing in a systolic manner. In one embodiment, the systolic array 612 can be configured to perform matrix operations such as matrix dot product operations. In one embodiment, the systolic array 612 supports 8-bit and 4-bit integer operations as well as 16-bit floating point operations. In one embodiment, the 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 math operations in a more efficient and lower power manner than ALU unit 611. Math unit 613 may include a variation of math logic that may be found in the shared function logic of a graphics processing engine 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.

[0104] 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 pre-empt (pre-empt) 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 in the execution units 600. Storing thread states in the execution units 600 allows for quick pre-emption (pre-emption) of threads when they become blocked or idle. The instruction fetch / pre-fetch unit 603 may fetch instructions from an instruction cache of a higher level of execution logic (e.g., instruction cache 506 as in FIG. 5A). The instruction fetch / pre-fetch unit 603 may also issue pre-fetch requests for instructions to be loaded into the instruction cache based on analysis of currently executing threads. The instruction decode unit 604 may be used to decode instructions to be executed by the computation units. In one embodiment, the instruction decode unit 604 may be used as a secondary decoder to decode complex instructions into constituent micro-operations.

[0105] The execution unit 600 further includes a register file 606 that can be used by 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 in the compute units 610 of the execution unit 600. The number of logical threads that can 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 between embodiments based on the number of hardware threads supported. In one embodiment, register renaming can be used to dynamically assign registers to hardware threads.

[0106] 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. Solid lined boxes indicate components that are typically included in the execution unit's instructions, while dashed lines indicate optional components or components that are only included in a subset of the instructions. In some embodiments, the instruction format 700 described and illustrated is a macro-instruction, in that it is an instruction that is provided to the execution unit as opposed to a micro-operation that results from instruction decode once the instruction is processed.

[0107] In some embodiments, the graphics processor execution units natively support instructions in a 128-bit instruction format 710. A 64-bit compacted 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, but some options and operations are restricted to 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 partially compressed using a set of index values ​​in an index field 713. The execution unit hardware looks up a set of compression tables based on the index values, and uses the output of the compression tables to reconstruct the native instruction into the 128-bit instruction format 710. Other sizes and formats of instructions can be used.

[0108] For each format, the instruction opcode 712 specifies the operation that the execution unit will perform. 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 an add operation simultaneously across each color channel representing a texture or image 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 over 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 execution size field 716 limits the number of data channels that are executed in parallel. In some embodiments, the execution size field 716 is not available for use with the 64-bit compressed instruction format 730.

[0109] 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 implicit. 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 an immediate value (e.g., hard-coded) passed with the instruction.

[0110] 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 using the direct register addressing mode, the register addresses of one or more operands are provided directly by bits of the instruction.

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

[0112] In one embodiment, the address mode portion of the access / address mode field 726 determines whether the instruction uses direct or indirect addressing. When using the direct register addressing mode, bits of the instruction directly provide the register address of one or more operands. When using the indirect register addressing mode, the register address of one or more operands can be calculated based on the address register value and the address immediate field of the instruction.

[0113] In some embodiments, instructions are grouped based on a bit field of the opcode 712 to simplify opcode decode 740. In the case of an 8-bit opcode, bits 4, 5, and 6 allow the execution unit to determine the type of opcode. The exact opcode groupings shown are merely examples. 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 the five most significant bits (MSBs), with move (mov) instructions being of the form 0000xxxb and logical instructions being of the form 0001xxxb. The flow control instruction group 744 (e.g., call, jump (jmp)) includes instructions of the form 0010xxxb (e.g., 0x20). Other instruction group 746 includes a mix of instructions, including synchronization instructions (e.g., wait, send) of the form 0011xxxb (e.g., 0x30). The parallel math instruction group 748 includes component-related arithmetic instructions (e.g., add, multiply (mul)) in the format of 0100xxxb (e.g., 0x40). The parallel math group 748 performs arithmetic operations in parallel across data channels. The vector math group 750 includes arithmetic instructions (e.g., dp4) in the format of 0101xxxxb (e.g., 0x50). The vector math group performs arithmetic such as dot product calculations on vector operands. The illustrated opcode decode 740, in one embodiment, can be used to determine which portion of the execution units to use 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), can be routed to a ray tracing core or ray tracing logic within a slice or partition of the execution logic.

[0114] Graphics Pipeline

[0115] 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 other figures herein may operate or function similarly to, but are not limited to, those described elsewhere herein.

[0116] 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 via commands issued to graphics processor 800 via 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 command streamer 803, which provides instructions to individual components of geometry pipeline 820 or media pipeline 830.

[0117] 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 the vertex data to vertex shader 807, which performs coordinate space transformations and lighting operations on each vertex. In some embodiments, vertex fetcher 805 and vertex shader 807 execute the vertex processing instructions by dispatching execution threads to execution units 852A-852B via thread dispatcher 831.

[0118] In some embodiments, the execution units 852A-852B are an array of vector processors with an instruction set for performing graphics and media processing. In some embodiments, the execution units 852A-852B have an associated L1 cache 851 that is local 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.

[0119] In some embodiments, the geometry pipeline 820 includes a tessellation component that performs hardware accelerated tessellation of 3D objects. In some embodiments, a programmable hull shader 811 configures the tessellation operations. A programmable domain shader 817 provides back-end evaluation of the tessellation output. A tessellator 813 operates at the direction of the hull shader 811 and includes special purpose logic that generates 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., hull shader 811, tessellator 813, domain shader 817) can be bypassed when tessellation is not used.

[0120] In some embodiments, a complete geometric object can be processed by the geometry shader 819 via 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 like 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 the geometry shader program to perform geometry tessellation when the tessellation unit is disabled.

[0121] Prior to rasterization, a clipper 829 processes the vertex data. The clipper 829 can be a fixed-function clipper or a programmable clipper with clipping and geometry shader functions. In some embodiments, a rasterizer and depth test component 873 of the rendering output pipeline 870 dispatches pixel shaders to convert geometric objects into per-pixel representations. In some embodiments, 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 non-rasterized vertex data via the stream-out unit 823.

[0122] Graphics processor 800 has an interconnect bus, interconnect fabric, or some other interconnect mechanism that allows data and message passing between 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 processor's rendering output pipeline components. 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 may also be configured as a sampler cache.

[0123] In some embodiments, the rendering output pipeline 870 includes a rasterizer and depth test component 873 that converts vertex-based objects into an associated pixel-based representation. In some embodiments, the rasterizer logic includes a windower / masker unit to perform fixed function triangle and line rasterization. In some embodiments, associated rendering caches 878 and depth caches 879 are also available. A pixel manipulation component 877 performs pixel-based manipulations on the data, although in some cases pixel operations associated with 2D processing (e.g., bit-block image transfers including blending) are performed by the 2D engine 841 or replaced at display time by the controller 843 using an overlay display surface. In some embodiments, a shared L3 cache 875 is available to all graphics components, allowing data to be shared without using main system memory.

[0124] 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 a separate command streamer. 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 to the thread execution logic 850 via the thread dispatcher 831.

[0125] 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 that can operate 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 a laptop computer, or an external display device attached via a display connector.

[0126] In some embodiments, the geometry pipeline 820 and the media pipeline 830 are configurable to operate based on multiple graphics and media programming interfaces and are not specific to any one application programming interface (API). In some embodiments, the graphics processor's driver software translates API calls specific to a particular graphics or media library into commands that the graphics processor can process. In some embodiments, support is provided for the Open Graphics Library (OpenGL), Open Computer Language (OpenCL), and / or Vulkan graphics and computation APIs, all from the Khronos Group. In some embodiments, support may also be provided for Microsoft's Direct3D library. In some embodiments, a combination of these libraries may be supported. Support is also provided for the open source computer vision library (OpenCV). Future APIs, including compatible 3D pipelines, are also supported if a mapping can be made from the future API's pipeline to the graphics processor's pipeline.

[0127] Graphics Pipeline Programming

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

[0129] In some embodiments, the client 902 specifies which client units of the graphics device will process the command data. In some embodiments, a command parser in the graphics processor examines 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 client unit receives a command, the client unit reads the opcode 904 and, if present, 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 of the commands based on the command opcode. In some embodiments, the commands are aligned via multiples of doublewords. Other command formats can be used.

[0130] The flow diagram of FIG. 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 illustrated command sequences to set up, execute, and terminate a set of graphics operations. The sample command sequence is shown and described for illustrative purposes only, as embodiments are not limited to these particular commands or this command sequence. Furthermore, commands may be issued as a batch of commands in the command sequence, whereby the graphics processor processes the sequence of commands at least partially concurrently.

[0131] In some embodiments, the graphics processor command sequence 910 begins with a pipeline flush command 912, which causes the active graphics pipeline to complete any commands currently pending in the pipeline. In some embodiments, the 3D pipeline 922 and the media pipeline 924 do not operate simultaneously. A pipeline flush is executed, causing the active graphics pipeline to complete any pending commands. In response to the pipeline flush, the graphics processor's command parser pauses command processing until the active drawing engine completes pending operations and the associated read cache is invalidated. Optionally, 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.

[0132] In some embodiments, the pipeline select command 913 is used when a command sequence requests the graphics processor to explicitly switch pipelines. In some embodiments, the pipeline select command 913 is only required once in an execution context before issuing any pipeline commands, unless the execution context issues commands for both pipelines. In some embodiments, a pipeline flush command 912 is required immediately before switching pipelines via the pipeline select command 913.

[0133] 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 configure the pipeline state of the active pipeline. In one embodiment, pipeline control commands 914 are used for pipeline synchronization and to clear data from one or more cache memories in the active pipeline before processing a batch of commands.

[0134] 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 in which the operation writes intermediate data during processing. In some embodiments, the graphics processor also uses one or more return buffers to store output data and for inter-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.

[0135] The remaining commands in the command sequence differ based on the active pipeline for the operation. Based on a pipeline decision 920, the command sequence is tailored for either the 3D pipeline 922, starting at a 3D pipeline state 930, or the media pipeline 924, starting at a media pipeline state 940.

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

[0137] 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 of 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 primitive via a vertex shader. To process the vertex shader, the 3D pipeline 922 dispatches shader execution threads to the graphics processor execution units.

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

[0139] In some embodiments, the graphics processor command sequence 910 follows the path of the media pipeline 924 when performing media processing. In general, the specific use and manner of programming the media pipeline 924 depends on the media or computational processing 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.

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

[0141] In some embodiments, the media object command 942 provides a pointer to a media object for processing by the media pipeline. The media object includes 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 configured and the media object command 942 is queued, the media pipeline 924 is triggered via an execute command 944 or equivalent execute 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 processing.

[0142] Graphics Software Architecture

[0143] 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 in the system memory 1050 of the data processing system.

[0144] 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 that are defined by vertex data.

[0145] 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 that uses a variation of the Linux kernel. The operating system 1020 can 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 compiles any shader instructions 1012 in HLSL into a lower level shader language using a front-end shader compiler 1024. The compilation can be a just-in-time (JIT) compilation, or the application can perform shader pre-compilation. In some embodiments, the high-level shaders are compiled into low-level shaders during compilation of the 3D graphics application 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.

[0146] 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. When 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 a 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 to dispatch commands and instructions.

[0147] IP Core Implementation

[0148] 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 can cause the machine to create logic to perform the techniques described herein. Such representations, known as "IP cores," are reusable logical units of an integrated circuit that may be stored on a tangible machine-readable medium as a hardware model that describes the structure of the integrated circuit. The hardware model is provided to various customers or manufacturing facilities, which load the hardware model into manufacturing machines that produce the integrated circuit. The integrated circuit may be manufactured such that the circuit performs the processing described in connection with any of the embodiments described herein.

[0149] FIG. 11A is a block diagram illustrating an IP core development system 1100 that may be used to fabricate an integrated circuit for processing, according to one embodiment. The IP core development system 1100 may be used to generate modular, reusable designs that may be incorporated into a larger design or used to build an entire integrated circuit (e.g., a SOC integrated circuit). The design facility 1130 may generate a software simulation 1110 of the IP core design in a high-level programming language (e.g., C / C++). The software simulation 1110 may be used to design, test, and verify the operation 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 may then be created or synthesized from the simulation model 1112. The RTL design 1115 is an abstraction of the operation of the integrated circuit that models the flow of digital signals between hardware registers, including associated logic that is implemented using the modeled digital signals. In addition to the RTL design 1115, lower level designs at the logic level or transistor level may also be created, designed, or synthesized. Thus, the specific details of the initial design and simulation may vary.

[0150] The RTL design 1115 or equivalent may be further synthesized by a design facility into a hardware model 1120, which may be a hardware description language (HDL) or some other representation of physical design data. The HDL may be further simulated or tested to verify the design of the IP core. 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 process according to at least one embodiment described herein.

[0151] 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 as 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 at least partially implemented with configurable logic or fixed function logic hardware and may include one or more portions of any of the processor cores, graphic processors, or other accelerator devices described herein. Each unit of logic 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 interconnects such as, but not limited to, bumps or pillars. In some embodiments, the interconnect structure 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 processing of the logic 1172, 1174. In some embodiments, the substrate 1180 is an epoxy-based laminate substrate. In other embodiments, the substrate 1180 may include other suitable types of substrates. 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.

[0152] 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 may be formed on the bridge substrate to provide chip-to-chip connections between the logic 1172, 1174.

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

[0154] 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 units of logic that can be assembled into a larger package with other chiplets. A multiple set of chiplets including different IP core logic can be assembled into a single device. Additionally, active interposer technology can be used to integrate chiplets into a base die or base chiplet. The concepts described herein enable interconnection and communication between various forms of IP within a GPU. IP cores can be manufactured using various process technologies and configured during manufacturing, thus avoiding the complexity of aggregating multiple IPs into the same manufacturing process, especially in large SoCs that include multiple flavors of IP. Enabling the use of multiple process technologies can reduce time to market and provide a cost-effective way to create multiple product SKUs. Additionally, disaggregated IP can be more easily power gated independently, allowing components not being used for a given workload to be powered off, reducing overall power consumption.

[0155] The hardware logic chiplets may include dedicated 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 one or more portions of any 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.

[0156] Each chiplet may be fabricated as a separate semiconductor 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 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 processing of logic, I / O, and memory chiplets.

[0157] In some embodiments, the substrate 1180 is an epoxy-based laminate substrate. In other embodiments, the substrate 1180 may include other suitable types of substrates. The package assembly 1190 may be connected to other electrical devices via the package interconnect 1183. The package interconnect 1183 may be bonded 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.

[0158] In some embodiments, the logic or I / O chiplets 1174 and the memory chiplets 1175 may 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 may be a high density interconnect structure that provides a path for the electrical signals. The bridge 1187 may include a bridge substrate comprised of glass or a suitable semiconductor material. Electrical routing functions may 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 may also be referred to as a silicon bridge or an interconnect bridge. For example, in some embodiments, the bridge 1187 is an embedded multi-die interconnect bridge (EMIB). In some embodiments, the bridge 1187 may simply be a direct connection from one chiplet to another.

[0159] Substrate 1180 can include hardware components for I / O 1191, cache memory 1192, and other hardware logic 1193. Fabric 1185 is embedded in substrate 1180 to enable communication between various logic chiplets and logic 1191, 1193 within substrate 1180. In one embodiment, I / O 1191, fabric 1185, cache, bridges, and other hardware logic 1193 can be integrated into a base die that is stacked on top of substrate 1180.

[0160] In various embodiments, the package assembly 1190 can include fewer or more components and chiplets interconnected by the fabric 1185 or one or more bridges 1187. The chiplets in the package assembly 1190 can be arranged in a 3D or 2.5D configuration. In general, the bridge structure 1187 can be used to facilitate point-to-point interconnections between, for example, logic or I / O chiplets and memory chiplets. The 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, the cache memory 1192 in the substrate can function as a global cache for the package assembly 1190, part of a distributed global cache, or a dedicated cache for the fabric 1185.

[0161] 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 of 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 or can be, for example, an EMIB. Memory chiplets can also be connected to logic or I / O chiplets via a bridge interconnect. I / O and logic chiplets can communicate via an interconnect fabric. Each base chiplet can support one or more slots in a standardized format for either logic or I / O or memory / cache.

[0162] In one embodiment, the SRAM and power delivery circuitry can be fabricated in one or more base chiplets 1196, 1198, which can be fabricated using a different process technology than the replaceable chiplets 1195 stacked on top of the base chiplets. For example, the base chiplets 1196, 1198 can be fabricated using a larger process technology, while the replaceable chiplets can be fabricated using a smaller process technology. One or more of the replaceable chiplets 1195 can be memory (e.g., DRAM) chiplets. Different memory densities can be selected for the package assembly 1194 based on the power and / or performance targeted for the product using the package assembly 1194. Furthermore, logic chiplets containing different types and numbers of functional units can be selected at assembly time based on the power and / or capabilities targeted for the product. Furthermore, chiplets containing different types of IP logic cores can be inserted into the slots of the replaceable chiplets, allowing hybrid processor designs that can use a mix and match of IP blocks of different technologies.

[0163] Exemplary System of Chip Integrated Circuits

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

[0165] 12 is a block diagram illustrating an exemplary system on a chip integrated circuit 1200 that may 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., CPU), 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 Industry 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. A memory interface may be provided for accessing an SDRAM or SRAM memory device via a memory controller 1265. Some integrated circuits further include an embedded security engine 1270.

[0166] 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-chip integrated circuit that may be fabricated using one or more IP cores, according to one embodiment. FIG. 13B illustrates an additional example graphics processor 1340 of a system-on-chip integrated circuit that may be fabricated using one or more IP cores, according to one 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.

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

[0168] 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 MMUs 1320A-1320B provide virtual to physical address mapping for graphics processor 1310, including vertex processors 1305 and / or fragment processors 1315A-1315N, which can reference vertex or image / texture data stored in memory in addition to vertex or image / texture data stored in one or more caches 1325A-1325B. In one embodiment, one or more MMUs 1320A-1320B may 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 Figure 12, allowing each processor 1205-1220 to participate in a shared or unified virtual memory system. According to an embodiment, one or more circuit interconnects 1330A-1330B may enable graphics processor 1310 to interface with other IP cores in the SoC via an internal bus of the SoC or via a direct connection.

[0169] As shown in Figure 13B, the graphics processor 1340 includes one or more MMUs 1320A-1320B, caches 1325A-1325B, and circuit interconnects 1330A-1330B of the graphics processor 1310 of Figure 13A. The graphics processor 1340 includes one or more shader cores 1355A-1355N (e.g., 1355A, 1355B, 1355C, 1355D, 1355E, 1355F through 1355N-1, 1355N) that 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 present may vary depending on the embodiment and implementation. Additionally, graphics processor 1340 includes an inter-core task manager 1345 that acts as a thread dispatcher to dispatch execution threads to one or more shader cores 1355A-1355N and tiling unit 1358 to accelerate the tiling process for tile-based rendering, where the rendering process of a scene is subdivided in image space, for example to exploit local spatial coherence within the scene or to optimize the use of internal caches.

[0170] Instructions for vector normalization

[0171] In the embodiments described herein, rather than requiring multiple types of ISA instructions to perform the vector normalization process, new vector normalization instructions are implemented using a new ISA instruction (e.g., VNM<First Input Register><First Output Register> ) In this way, the various operations that the VNM instructions are decomposed or otherwise represented internally by the graphics hardware and their execution can be optimized as described further below.

[0172] FIG. 14 conceptually illustrates the three steps involved in performing a vector normalization process 1400. → Normalized vector of N → are vectors with the same direction, but with norm (length) 1. → is the component vector A → , B → and C → Assume that A is a three-component vector with → , B → , and C → are orthogonal component vectors in the x, y, and z directions, and V → =A → +B → +C → and N → can be expressed as follows:

[0173]

number

[0174] As shown in FIG. 14, the three steps for performing the vector normalization process include: (i) performing a dot product of the component vectors (1410); (ii) performing the reciprocal square root of the sum of the component vector dot products (1420); and (iii) vector scaling (1430)—multiplying the component vectors with the reciprocal square root calculated in step (ii).

[0175] As will be further described below with reference to FIG. 16, one current hardware implementation for computing S (i.e., the square of the vector length) uses an 8-wide single instruction multiple data (SIMD) multiply instruction (e.g., SIMD8 MUL) to compute D=A 2 Then, use two SIMD8 multiply add instructions (i.e., SIMD8 MAD) to calculate E=D+B. 2 Calculate S=E+C 2 Calculate.

[0176] Shader Unit

[0177] 15 is a block diagram illustrating a high-level simplified view of a shader unit 1510 of a GPU 1500, according to one embodiment. In the context of various examples described herein, shader units (also referred to herein as execution units or EUs), such as shader unit 1510 in GPU 1500, are implemented as multi-threaded SIMD processor units. Typically, each shader unit includes at least two processing units (e.g., a floating-point unit (FPU) 1511, an arithmetic logic unit (ALU), and a coprocessor 1512) that perform extended mathematical operations (e.g., sine, cosine, square root, inverse square root, inverse / reciprocal, logarithm to base 2, base 2 exponentiation, transcendental operations such as powers, etc.), a thread arbiter unit (not shown), and a per-thread general-purpose register file (GRF) 1513, among other shader unit functions. According to one embodiment, FPU 1511 is a SIMD8 FPU and coprocessor 1512 is a SIMD2 execution unit.

[0178] Figure 16 shows the throughput of vector normalization processing using MUL, MAD, and RSQ instructions. Existing GPUs process shader code using multiple instructions. For example, as mentioned above, vector normalization, which is frequently used in many 3D games and graphic applications in various scenarios, is represented in the graphic API by one or more operations, but is translated by the compiler into a set of instructions supported by the ISA, which represents an abstract model of the underlying computer architecture. In this paper, to evaluate the performance improvement of the newly proposed single ISA vector normalization instructions, we compare the throughput in terms of instructions per clock (IPC) with the ISA (where vector normalization is represented by the following seven instructions): Dot product (SIMD8): MUL, MAD, MAD ·Inverse square root (SIMD8): Mathematics (MATH), Vector scaling (SIMD8): MUL, MUL, MUL.

[0179] In the context of this example, the SIMD8 FPU 1610 and SIMD2 coprocessor 1620 are shown executing the seven instructions listed above in parallel to perform a vector normalization operation on eight vectors (each block representing one clock cycle). In this example, the grey blocks are associated with one thread and the unfilled blocks are associated with another thread. The first thread's three-component SIMD8 dot product operation 1611 is represented by a SIMD8 MUL, a SIMD8 MAD, and a SIMD8 MAD executed on the FPU 1610. Once the result of the dot product operation 1611 (a vector length of the eighth power) is available, a three-component SIMD8 inverse square root MATH / RSQRT (or RSQ) operation 1621, represented by four back-to-back SIMD2 RSQ operations, is executed on the coprocessor 1620 to obtain SIMD8 throughput. As the results of the MATH / RSQRT operation 1621 become available, they are used by a vector scaling operation 1613, which is performed on the FPU 1610 by performing three SIMD8 MUL operations. While the MATH / RSQRT operation 1621 is being performed by the coprocessor 1620, a three-component SIMD8 dot product operation 1612 for computing the squared vector lengths of the next eight vectors to be normalized by another thread can be launched in parallel on the FPU 1610. Similarly, while the vector scaling operation 1613 is being executed on the FPU 1610, another set of RSQ instructions (from another thread) can be launched in parallel on the coprocessor 1620 to perform MATH / RSQRT operations 1622 on the results from the corresponding dot product operations 1612.

[0180] Based on the above, to compute the SIMD8 vector normalization operation, the FPU 1610 uses 6 clocks and the coprocessor 1620 uses 4 clocks. So, from a throughput perspective, the FPU 1610 becomes the limiter since it requires more clocks. Therefore, the throughput (i.e., IPC) of performing the above vector normalization operation is one SIMD8 vector normalization instruction in 6 clocks, or 0.167 IPC.

[0181] S=A 2 +B 2 +C 2 Optimization calculation of

[0182] According to one embodiment, the calculation of S (vector length squared) is improved by performing a three-component dot product S as part of a new vector normalization instruction. In this context, since vector normalization is considered as a single instruction, three multipliers can be used in parallel and a three-input adder can be used to sum the results of the three multiplications. As will be further described below with reference to Figures 19 and 20, taking into account area and power considerations, in one embodiment, this three-component dot product operation (DP3) is performed as a SIMD2 operation in the execution pipeline of the GPU hardware, repeating four times to obtain a SIMD8 result, as opposed to the implementation above with one SIMD8 MUL and two SIMD8 MAD operations. In one embodiment, the SIMD2 DP3 operation is performed using a specific register layout from which two sets of input component vectors of two vectors to be processed in parallel are read and two outputs (respective squared vector lengths) are output as will be further described below with reference to Figure 17.

[0183] Depending on the particular implementation, further optimizations of the multiplier can be achieved since multiplications can be restricted to squaring operations (see, for example, the special square units described in section 2.2 of "High-Speed ​​Inverse Square Roots" by Michael J. Schulte et al. (in ARITH '99 Proceedings of the 14th IEEE Symposium on Computer Arithmetic)).

[0184] Register Layout

[0185] 17 illustrates a register layout 1700 for storing two sets of inputs 1755 and 1765 and two outputs 1750 and 1760 of a SIMD2 DP3 operation in four registers 1710, 1720, 1730, and 1740 to perform a SIMD8 DP3 operation, according to one embodiment. In the context of this example, at least one novel feature is the use of registers 1710, 1720, 1730, and 1740 to store inputs for each SIMD2 DP3 operation as well as to store output results for each SIMD2 DP3 operation.

[0186] According to one embodiment, S (the squared vector length) can be calculated as a 3-component dot product SIMD2 instruction for a SIMD8 FPU unit by repeating the operation four times using register layout 1700, as further described below with reference to Figure 20. In the context of this example, each register 1710, 1720, 1730, and 1740 contains two sets of inputs (i.e., a first set of inputs 1755 and a second set of inputs 1765) representing component vectors 1770a-c and 1780a-c, respectively, of two different vectors, and a 3-component dot product (DP3), S=A 2 +B 2 +C 2For example, two sets of 256-bit registers can contain 32-bit floating-point A, B, C component vector values ​​(SIMD2), which occupy 192 bits of the 256-bit registers. The remaining 64 bits are not initially utilized while obtaining the inputs for computing S using the DP3 operation, but can be used to store the outputs of the DP3 operation (i.e., the first output 1750 and the second output 1760).

[0187] In the context of this example, four such 256-bit registers (e.g., registers 1710, 1720, 1730, and 1740) can be used as inputs to four SIMD2 DP3 instructions. The results of the operation S can be written to a 64-bit portion of the same 256-bit register as a SIMD2 value (e.g., two sets of 32-bit floating-point values ​​representing the first output 1750 and the second output 1760), which were not used while receiving the inputs to the DP3 operation. The 64-bit portions of the four 256-bit registers (e.g., the first output 1750 and the second output 1760) can then be used to store the outputs of the four SIMD2 DP3 operations (used to compute SIMD8 S).

[0188] In the context of this example, specific register sizes and input and output sizes are specified to provide an illustration of a particular implementation supporting vector normalization of eight vectors at a time, however, one skilled in the art will appreciate that the sizes can be increased or decreased to accommodate additional more or fewer vectors and / or less precision requirements. Similarly, more or fewer sets of inputs, outputs, and register sets may be used, and the ordering and positioning of data within the registers may be other than that shown. For example, a SIMD16 vector normalization operation can be supported by executing eight consecutive SIMD2 DP3 instructions using eight registers, by executing four consecutive SIMD4 DP3 instructions using four registers (containing four sets of component vector inputs), or by executing two consecutive SIMD8 DP3 instructions using two registers (containing eight sets of component vector inputs).

[0189] Figure 18 illustrates a register layout 1800 for storing two sets of outputs 1850 and 1860 of a SIMD2 RSQVS operation into four registers 1810, 1820, 1830 and 1840 to perform a SIMD8 RSQVS operation, according to one embodiment. As described further below, in one embodiment, the inverse square root and vector scaling functions may be combined into a single SIMD2 inverse square root and vector scaling (RSQVS) instruction. Furthermore, a traditional inverse square root implementation may be used, or an optimized inverse square root calculation may be used, as described with reference to Figures 21A-30.

[0190] As will be described in more detail below, in one embodiment, the RSQVS operation (herein referred to as RN A → N B → N C → (also referred to as ) can be computed as an optimized combination SIMD2 instruction representing a combination of an inverse square root function and a vector scaling function in a SIMD2 processing unit (e.g., a SIMD2 coprocessor) by repeating the operation four times with a specific data organization rule for the input component vectors A, B, and C and the output squared vector length S. For example, the input component vectors A, B, and C and the output squared vector length S may be organized according to the register layout 1700 described above with reference to FIG.

[0191] In the context of this example, the input component vectors A, B, and C and the output squared vector length S are represented as four SIMD2 RN A → N B → N C → (RSQVS) operation, each of the eight vectors is available as input to the SIMD8 RN A → N B → N C →(RSQVS) calculations are assumed to be formed. The data compilation may be as described with respect to FIG. 17 or another data compilation.

[0192] In the context of this example, a first output set 1850 and a second output set 1860 obtained from four SIMD2 RSQVS calculations (each including a set of 32-bit floating-point values of the normalization component vectors N A → , N B → , N C → can be written to four respective output registers 1810, 1820, 1830, and 1840 as SIMD2 N A → N B → N C → Thus, register 1810 includes, for two of the eight vectors, a first component vector set of the component vectors (e.g., the first input set 1755 of FIG. 17) and a second normalization component vector set (e.g., the second input set 1765 of FIG. 17), and registers 1820, 1830, and 1840 include the normalization component vectors of the other six vectors. In one embodiment, registers 1810, 1820, 1830, and 1840 are 256-bit registers, of which 96 bits are used to store the first output set 1850, 96 bits are used to store the second output set 1860, and the remaining 64 bits are unused.

[0193] FIG. 19 is a flow diagram illustrating a vector normalization process according to one embodiment. In the context of this example, it is assumed that a vector normalization instruction is available in the ISA in question. At block 1910, a single vector normalization instruction is received by the GPU that specifies the vector normalization process. According to one embodiment, an execution unit in the GPU (e.g., execution unit (EU) 600 of FIG. 6) maintains the context of multiple threads. Each thread requests and receives instructions from an instruction fetch unit. A thread controller in the EU (e.g., thread control 601) schedules among the threads based on a selected priority policy. Once a thread is selected by the scheduler, instructions from that thread are sent to the FPU and coprocessors for execution.

[0194] In one embodiment, the vector normalization process is a SIMD8 vector normalization process that performs vector normalization on eight vectors, whose component vectors may be stored in one or more registers of a general purpose register file (e.g., general purpose register file 153). For example, assuming the vectors each have three components, two sets of component vectors A, B, C for two of the eight vectors respectively may be stored in four registers each as described above with reference to FIG. 17 before the vector normalization process begins.

[0195] In the context of this example, in response to receiving a single vector normalization instruction, the GPU hardware issues four ternary SIMD2 dot product (DP3) instructions to a first processing unit of the GPU (e.g., a SIMD8 FPU) and four RSQVS instructions (representing a combination of a reciprocal square root function and a vector scaling function) to a second processing unit of the GPU (e.g., a SIMD2 coprocessor).

[0196] At block 1915, the squared lengths (S1 and S2) of the first and second of the eight vectors are generated by executing a SIMD2 DP3 instruction on each of the component vectors stored in the first input register. In one embodiment, a single vector normalization instruction may specify a first register (e.g., R1) of a plurality (e.g., four) input registers (e.g., R1, R2, R3, and R4) and a first register (e.g., R5) of a plurality (e.g., four) output registers (R5, R6, R7, and R8) to be used by the vector normalization instruction. The hardware automatically increments the input register upon completion of each DP3 instruction and automatically increments the output register upon completion of each RSQVS instruction.

[0197] According to one embodiment, execution of the first SIMD2 DP3 instruction in block 1915 includes (i) reading a component vector (e.g., component vectors 1770a-c) of a first vector of the eight vectors from a first input register (e.g., register 1710) and multiplying the length of the first vector by the square of its length (S1=A1 2 +B1 2 +C1 2 ) and store the result (S1) in the same register (e.g., register 1710) (from which the component vector was read) as the first output (e.g., first output 1750); and (ii) read a component vector (e.g., component vectors 1780a-c) of a second vector of the eight vectors from the first input register (e.g., register 1710) and calculate the square of the length of the second vector (S2=A2 2 +B2 2 +C2 2 ) and storing the result (S2) as a second output (e.g., second output 1760) in the same register (e.g., register 1710) (from which the component vector was read).

[0198] In block 1920, a normalized component vector N is calculated based on the squared lengths (S1 and S2) generated in block 1915 and the two sets of component vectors in the first input register. A_1 → , N B_1 → , N C_1 → and N A_2 → , N B_2 → , N C_2 → Two sets of outputs of the form (e.g., first output set 1850 and second output set 1860) are generated by executing a SIMD2 Combined Reciprocal Square Root and Scale (RSQVS) instruction, which performs a combination of an inverse square root function and a vector vector scaling function, and stored in a first output register (e.g., register 1810). According to one embodiment, the inverse square root function is optimized as described below with reference to Figures 21A-30. Alternatively, a conventional mutual square root implementation can be used.

[0199] At block 1925, the squared lengths (S3 and S4) of the third and fourth of the eight vectors are generated by executing a SIMD2 DP3 instruction on each of the component vectors stored in the second input register. According to one embodiment, the execution of this second SIMD2 DP3 instruction at block 1925 includes: (i) reading a component vector (e.g., component vectors 1770a-c) of the third of the eight vectors from the second input register (e.g., register 1720) and generating the squared length of the third vector (S3=A3 2 +B3 2 +C3 2 ) and storing the result (S3) in the same register (e.g., register 1720) (from which the component vector was read) as the first output (e.g., first output 1750); and (ii) reading a component vector (e.g., component vectors 1780a-c) of a fourth vector of the eight vectors from the second input register (e.g., register 1720) and calculating the square of the length of the fourth vector (S4=A42 +B4 2 +C4 2 ) and storing the result (S4) as a second output (e.g., second output 1760) in the same register (e.g., register 1720) (from which the component vector was read).

[0200] In block 1930, a normalized component vector N is calculated based on the squared lengths (S3 and S4) generated in block 1925 and the two sets of component vectors in the second input register. A_3 → , N B_3 → , N C_3 → and N A_4 → , N B_4 → , N C_4 → Two sets of outputs of the form (e.g., first output set 1850 and second output set 1860) are generated by executing the second SIMD2 RSQVS instruction and stored in a second output register (e.g., register 1820).

[0201] At block 1935, the squared lengths (S5 and S6) of the fifth and sixth of the eight vectors are generated by executing a SIMD2 DP3 instruction on each of the component vectors stored in the third input register. According to one embodiment, execution of this third SIMD2 DP3 instruction at block 1935 includes (i) reading a component vector (e.g., component vectors 1770a-c) of the fifth of the eight vectors from the third input register (e.g., register 1730) and (ii) generating the squared length of the fifth vector (S5=A5 2 +B5 2 +C5 2) and storing the result (S5) in the same register (e.g., register 1730) (from which the component vector was read) as the first output (e.g., first output 1750); and (ii) reading a component vector (e.g., component vectors 1780a-c) of a sixth vector of the eight vectors from the third input register (e.g., register 1730) and calculating the square of the length of the sixth vector (S6=A6 2 +B6 2 +C6 2 ) and storing the result (S6) as a second output (e.g., second output 1760) in the same register (e.g., register 1730) (from which the component vector was read).

[0202] In block 1940, a normalized component vector N is calculated based on the squared lengths (S5 and S6) generated in block 1935 and the two sets of component vectors in the third input register. A_5 → , N B_5 → , N C_5 → and N A_6 → , N B_6 → , N C_6 → Two sets of outputs of the form (e.g., first output set 1850 and second output set 1860) are generated by executing the third SIMD2 RSQVS instruction and stored in a third output register (e.g., register 1830).

[0203] At block 1945, a SIMD2 DP3 instruction is executed on the fourth input register to generate the squared lengths (S7 and S8) of the seventh and eighth of the eight vectors. According to one embodiment, execution of this fourth SIMD2 DP3 instruction at block 1935 includes (i) reading a component vector (e.g., component vectors 1770a-c) of the seventh of the eight vectors from the fourth input register (e.g., register 1740) and (ii) generating the squared length of the seventh vector (S7=A7 2 +B72 +C7 2 ) and storing the result (S7) in the same register (e.g., register 1740) (from which the component vector was read) as the first output (e.g., first output 1750); and (ii) reading a component vector (e.g., component vectors 1780a-c) of an eighth of the eight vectors from the fourth input register (e.g., register 1740) and calculating the square of the length of the eighth vector (S8=A8 2 +B8 2 +C8 2 ) and storing the result (S8) as a second output (e.g., second output 1760) in the same register (e.g., register 1740) (from which the component vector was read).

[0204] In block 1950, a normalized component vector N is calculated based on the squared lengths (S7 and S8) generated in block 1945 and the two sets of component vectors in the fourth input register. A_7 → , N B_7 → , N C_7 → and N A_8 → , N B_8 → , N C_8 → are generated by executing the fourth SIMD2 RSQVS instruction and stored in a fourth output register (e.g., register 1840). At this point, processing is complete and all 24 normalized component vectors are available in the four output registers.

[0205] In the context of this example, it is assumed that the vector normalization instruction operates on 8 vectors, two selected vectors at a time, and uses four input and four output registers, but in alternative embodiments, the number of vectors V on which the vector normalization operation operates, the number N of V vectors processed in parallel, and the number of input and output registers V / N can be other numbers. For example, 16 vectors can be processed two at a time by executing eight SIMD2 DP3 instructions and eight SIMD2 RSQVS instructions, using eight input and eight output registers, while keeping the register size and component vector size constant. Similarly, in the context of various examples described herein, it is assumed that the register size is 256 bits and the component vector size is 32 bits, but in alternative embodiments, one or both of these sizes can be larger or smaller. For example, assuming a register size of 512 bits, eight 3-component vectors, each represented by 32 bits, can be processed four at a time by executing two SIMD4 DP3 instructions and two SIMD4 RSQVS instructions using two input and two output registers.

[0206] 20 illustrates the throughput of vector normalization using DP3 and RSQVS instructions according to one embodiment. In the context of this example, the SIMD2 FPU 2010 and SIMD2 coprocessor 2020 are shown executing two instructions in parallel to perform vector normalization on eight vectors (each block representing one clock cycle).

[0207] Four 3-component SIMD2 dot product operations (DP3) are executed on the FPU 2010 to generate the squared lengths of each of the eight vectors. These operations can be executed on the coprocessor 2020 because the dependent squared lengths of each of the four SIMD2 RSQVS instructions are available.

[0208] Based on the above, the FPU 2010 effectively uses 4 clocks to compute a SIMD8 DP3 operation, and the coprocessor 2020 uses 4 clocks to compute a SIMD8 RSQVS operation. Therefore, from a throughput perspective, both the FPU 2020 and the coprocessor are equal limiters since they both use an equal number of clocks. Therefore, the throughput (i.e., IPC) of the proposed new Vector Normalization (VNM) instruction implementation is one SIMD8 VNM instruction / 4 clocks, or 0.25 IPC. Therefore, the IPC improvement of the new single VNM instruction over the existing vector normalization implementation above is 50%. In terms of execution clock reduction, the new VNM instruction reduces the number of clocks by two, from 6 clocks to 4 clocks, which represents a reduction in execution clocks of 33.33% (2 / 6*100=33.33%) compared to the seven instruction implementation of vector normalization described above.

[0209] The register file bandwidth of the new VNM instruction involves 8 read operations of registers from the register file, compared to 3 read operations and 2 register reuses in the context of the 7 instruction executions mentioned above, so overall there is no change in the register file bandwidth between the two executions.

[0210] Optimized calculation of the inverse square root

[0211] Figures 21A-B illustrate additional exemplary graphics processor logic according to embodiments described herein. Figure 21A illustrates a graphics core 2100 that may be included within the graphics processor 1210 of Figure 12, or may be an integrated shader core 1355A-N, as in Figure 13B. Figure 21B illustrates a highly parallel general-purpose graphics processing unit 2130 suitable for placement in a multi-chip module.

[0212] 21A, graphics core 2100 includes a shared instruction cache 2102, a texture unit 2118, and a cache / shared memory 2120 that are common to execution resources within graphics core 2100. Graphics core 2100 may include multiple slices 2101A-1401N or partitions of each core, and a graphics processor may include multiple instances of graphics core 2100. Slices 2101A-1401N may include supporting logic including local instruction caches 2104A-2104N, thread schedulers 2106A-2106N, thread dispatchers 2108A-2108N, and a set of registers 2110A. To perform logical operations, slices 2101A-2101N may include a set of additional functional units (AFUs 2112A-2112N), floating point units (FPUs 2114A-2114N), integer arithmetic logic units (ALUs 2116A-2116N), address calculation units (ACUs 2113A-2113N), double precision floating point units (DPFPUs 2115A-2115N), and matrix processing units (MPUs 2117A-2117N).

[0213] Some of the computational units operate at a particular precision. For example, the FPUs 2114A-2114N can perform single-precision (32-bit) and half-precision (16-bit) floating-point operations, and the DPFPUs 2115A-2115N can perform double-precision (64-bit) floating-point operations. The ALUs 2116A-2116N can perform variable-precision integer operations with 8-bit, 16-bit, and 32-bit precision and can be configured for mixed-precision operations. The MPUs 2117A-2117N can also be configured for mixed-precision matrix operations, including half-precision floating-point operations and 8-bit integer operations. The MPUs 2117A-2117N can perform various matrix operations to accelerate machine learning application frameworks, including enabling support for accelerated generalized matrix multiplication (GEMM). The AFUs 2112A-2112N can perform additional logical operations not supported by the floating-point or integer units, including trigonometric operations (e.g., sine, cosine, etc.).

[0214] As shown in FIG. 21B, a general purpose processing unit (GPGPU) 2130 may be configured to enable highly parallel computation operations performed by an array of graphics processing units. Additionally, the GPGPU 2130 may be directly linked to other instances of GPGPUs to create multi-GPU clusters, particularly to improve the training speed of deep neural networks. The GPGPU 2130 includes a host interface 2132 to enable connection with a host processor. In one embodiment, the host interface 2132 is a PCI Express interface. However, the host interface may also be a vendor-specific communication interface or fabric. The GPGPU 2130 receives commands from the host processor and distributes execution threads associated with those commands to a set of compute clusters 2136A-2136H using a global scheduler 2134. The compute clusters 2136A-2136H share a cache memory 2138. The cache memory 2138 may act as a higher level cache for the cache memories in the compute clusters 2136A-2136H.

[0215] The GPGPU 2130 includes memories 2134A-2134B that are coupled to the compute clusters 2136A-2136H via a set of memory controllers 2142A-2142B. In various embodiments, the memories 2134A-2134B may include various types of memory devices, including dynamic random access memory (DRAM) or graphics random access memory, such as synchronous graphics random access memory (SGRAM), including graphics double data rate (GDDR) memory.

[0216] In one embodiment, each of the compute clusters 2136A-2136H includes a set of graphics cores, such as graphics core 2100 of Figure 21, which may include multiple types of integer and floating point logic units capable of performing computational operations in a precision range suitable for machine learning computations. For example, in one embodiment, at least a subset of the floating point units in each of the compute clusters 2136A-2136H may be configured to perform 16-bit or 32-bit floating point operations, while a different subset of the floating point units may be configured to perform 64-bit floating point operations.

[0217] Multiple instances of GPGPU 2130 can be configured to operate as a compute cluster. The communication mechanism used by the compute cluster for synchronization and data exchange varies by embodiment. In one embodiment, multiple instances of GPGPU 2130 communicate through host interface 2132. In one embodiment, GPGPU 2130 includes an I / O hub 2139 that couples GPGPU 2130 with GPU link 2140, which allows direct connection to other instances of GPGPU. In one embodiment, GPU link 2140 is coupled to a dedicated GPU-to-GPU bridge that allows communication and synchronization between multiple instances of GPGPU 2130. In one embodiment, GPU link 2140 couples to a high-speed interconnect to send and receive data to other GPGPUs or parallel processors. In one embodiment, multiple instances of GPGPU 2130 communicate through a network device located in separate data processing systems and accessible through host interface 2132. In one embodiment, GPU link 2140 may be configured to allow connection to a host processor in addition to, or as an alternative to, host interface 2132.

[0218] While the illustrated configuration of GPGPU 2130 may be configured to train a neural network, one embodiment provides alternative configurations of GPGPU 2130 that may be configured for deployment within a high performance or low power inference platform. In the inference configuration, GPGPU 2130 includes fewer compute clusters 2136A-2136H compared to the training configuration. Additionally, the memory technology associated with memories 2134A-2134B may differ between the inference and training configurations, with higher bandwidth memory technology being dedicated to the training configuration. In one embodiment, the inference configuration of GPGPU 2130 may support specific instructions for inference. For example, the inference configuration may provide support for one or more 8-bit integer dot product instructions that are commonly used during inference operations of deployed neural networks.

[0219] 22 illustrates a computing device 2200 that uses an execution unit 2210 to perform floating-point extended mathematical operations. The computing device 2200 (e.g., a smart wearable device, a virtual reality (VR) device, a head-mounted display (HMD), a mobile computer, an Internet of Things (IoT) device, a laptop computer, a desktop computer, a server computer, etc.) may be the same as the processing system 100 of FIG. 1, and therefore, for the sake of brevity, clarity, and ease of understanding, many of the details discussed above with reference to FIGS. 1-13B will not be further discussed or repeated below. As illustrated, in one embodiment, the computing device 2200 is illustrated as a hosting execution unit 2210.

[0220] As shown, in one embodiment, the execution unit 2210 is hosted by a graphics processing unit ("GPU" or "graphics processor") 2214. In yet other embodiments, the execution unit 2210 may be hosted by, or part of, firmware of a central processing unit ("CPU" or "application processor") 2212. For purposes of brevity, clarity, and ease of understanding, throughout the remainder of this document the execution unit 2210 may be discussed as part of the GPU 2214, although embodiments are not so limited.

[0221] Computing device 2200 may include any number and type of communication device, such as a larger computer system, such as a server computer, a desktop computer, and may further include a set-top box (e.g., an Internet-based cable television set-top box, etc.), a global positioning system (GPS)-based device, etc. Computing device 2200 may include mobile computing devices that function as communication devices, such as smartphones, personal digital assistants (PDAs), tablet computers, laptop computers, e-readers, smart televisions, television platforms, wearable devices (e.g., glasses, watches, bracelets, smart cards, jewelry, clothing, etc.), mobile phones including media players, etc. For example, in one embodiment, computing device 2200 may include a mobile computing device that uses a computing platform that hosts an integrated circuit ("IC"), such as a system-on-chip ("SoC" or "SOC"), integrating various hardware and / or software components of computing device 2200 into a single chip.

[0222] As shown, in one embodiment, computing device 2200 may include any number and types of hardware and / or software components, such as (without limitation) a GPU 2214, a graphics driver (also referred to as a “GPU driver,” “graphics driver logic,” “driver logic,” user-mode driver (UMD), UMD, user-mode driver framework (UMDF), UMDF, or simply “driver”) 2216, a CPU 2212, memory 2208, network devices, drivers, etc., as well as input / output (I / O) sources 2204, such as a touch screen, touch panel, touch pad, virtual or conventional keyboard, virtual or conventional mouse, ports, connectors, etc.

[0223] Computing device 2200 may include an operating system (OS) 2206 that serves as an interface between a user and the hardware and / or physical resources of computing device 2200. It is contemplated that CPU 2212 may include one or more processors and GPU 2214 may include one or more graphics processors.

[0224] It should be noted that terms such as "node," "computing node," "server," "server device," "cloud computer," "cloud server," "cloud server computer," "machine," "host machine," "device," "computing device," "computer," "computer system," etc. may be used interchangeably throughout this document. Additionally, it should be noted that terms such as "application," "software application," "program," "software program," "package," "software package," etc. may be used interchangeably throughout this document. Additionally, terms such as "job," "input," "request," "message," etc. may be used interchangeably throughout this document.

[0225] The graphics pipeline may be implemented in a graphics co-processor design, where CPU2212 is designed to cooperate with GPU2214, which may be included in CPU2212 or co-located with CPU2212. In one embodiment, GPU2214 may use any number and types of conventional software and hardware logic for performing conventional functions related to graphics rendering, as well as new software and hardware logic for executing any number and types of instructions.

[0226] As previously mentioned, memory 2208 may include random access memory (RAM) including an application database with object information. The memory controller hub may access data in the RAM and transfer the data to GPU 2214 for graphics pipeline processing. The RAM may include double data rate RAM (DDR RAM), enhanced data output RAM (EDO RAM), etc. CPU 2212 interacts with a hardware graphics pipeline to share the graphics pipeline functions.

[0227] The processed data is stored in a hardware graphics pipeline buffer and state information is stored in memory 2208. The resulting image is transferred to an I / O source 2204, such as a display component for displaying the image. It is contemplated that the display device can be of various types, such as a cathode ray tube (CRT), thin film transistor (TFT), liquid crystal display (LCD), organic light emitting diode (OLED) array, etc., for displaying information to a user.

[0228] The memory 2208 may include a pre-allocated region of a buffer (e.g., a frame buffer), although one skilled in the art would understand that embodiments are not so limited and may use any memory accessible to the lower graphics pipeline. The computing device 2200 may further include a platform controller hub (PCH) 130, such as one or more I / O sources 2204, as referenced in FIG.

[0229] The CPU 2212 may include one or more processors for executing instructions to perform whatever software routines the computer system implements. Instructions often include some operation (calculation) performed on data. Both data and instructions may be stored in the system memory 2208 and associated cache. The cache is typically designed to have lower latency than the system memory 2208. For example, the system memory 2208 may be constructed of slower dynamic RAM (DRAM) cells, whereas the cache may be integrated on the same silicon chip as the processor and / or constructed of faster static RAM (SRAM) cells. The tendency to store more frequently used instructions and data in the cache rather than in the system memory 2208 increases the overall performance efficiency of the computer device 2200. In some embodiments, it is contemplated that the GPU 2214 may be part of the CPU 2212 (such as part of the physical CPU package), in which case the memory 2208 may be shared by the CPU 2212 and the GPU 2214 or may remain separate.

[0230] The system memory 2208 may be made available to other components within the computing device 2200. For example, any data (e.g., input graphics data) received by the computing device 2200 from various interfaces (e.g., keyboard and mouse, printer port, local area network (LAN) port, modem port, etc.) or retrieved from the internal storage elements of the computing device 2200 (e.g., hard disk drive) is often temporarily queued in the system memory 2208 before being manipulated by one or more processors in the implementation of a software program. Similarly, data that a software program determines needs to be transmitted from the computing device 2200 to an external entity through one of the computer system interfaces or stored in an internal storage element is often temporarily queued in the system memory 2208 before being transmitted or stored.

[0231] Further, for example, the PCH may be used to ensure that such data is properly passed between system memory 2208 and its appropriate corresponding computer system interfaces (and internal storage, if the computer system is so designed), and may have bidirectional point-to-point links between itself and identified I / O sources / devices 2204. Similarly, the MCH may be used to manage various competing requests for system memory 2208 access between the CPU 2212 and GPU 2214, interfaces, and internal storage elements (which may occur in close time proximity to one another).

[0232] I / O sources 2204 may include one or more I / O devices implemented to transfer data to and from computing device 2200 (e.g., networking adapters) or for large-scale non-volatile storage within computing device 2200 (e.g., hard disk drives). User input devices, including alphanumeric and other keys, may be used to communicate information and command selections to GPU 2214. Another type of user input device is a cursor control, such as a mouse, trackball, touch screen, touch pad, or cursor direction keys, which communicates directional information and command selections to GPU 2214 and controls cursor movement on a display device. Camera and microphone arrays in computing device 2200 may be used to observe gestures, record audio and video, and send and receive visual and voice commands.

[0233] The computing device 2200 may further include network interfaces that provide access to a network, such as a LAN, a wide area network (WAN), a metropolitan area network (MAN), a personal area network (PAN), Bluetooth, a cloud network, a mobile network (e.g., third generation (3G), fourth generation (4G), etc.), an intranet, the Internet, etc. The network interfaces may include, for example, a wireless network interface having an antenna, which may represent one or more antennas. The network interfaces also include wired network interfaces that communicate with remote devices via a network cable, which may be, for example, an Ethernet cable, a coaxial cable, a fiber optic cable, a serial cable, a parallel cable, etc.

[0234] The network interface may provide access to a LAN, for example, by conforming to the IEEE 802.11b and / or IEEE 802.11g standards, and / or the wireless network interface may provide access to a personal area network, for example, by conforming to the Bluetooth standard. Other wireless network interfaces and / or protocols, including earlier and later versions of the standards, may also be supported. In addition to or instead of communicating via a wireless LAN standard, the network interface may provide wireless communication using, for example, a time division, multiple access (TDMA) protocol, a Global Systems for Mobile Communications (GSM) protocol, a code division, multiple access (CDMA) protocol, and / or other types of wireless communication protocols.

[0235] The network interface may include one or more communications interfaces, such as a modem, network interface card, or other well-known interface devices, such as those used to couple to an Ethernet, token ring, or other type of physical wired or wireless attachment intended to provide a communications link, for example, to support a LAN or WAN. In this manner, the computer system may also be coupled to a number of peripheral devices, clients, control surfaces, consoles, or servers, via a conventional network infrastructure, including, for example, an intranet or the Internet.

[0236] It should be understood that systems with fewer or more facilities than the above examples may be preferred for certain implementations. Thus, the configuration of the computing device 2200 may vary from implementation to implementation depending on a number of factors, such as price constraints, performance requirements, technological improvements, or other circumstances. Examples of electronic devices or computing systems 2200 may include (without limitation) a mobile device, a personal digital assistant, a mobile computing device, a smart phone, a mobile phone, a handset, a one-way pager, a two-way pager, a messaging device, a computer, a personal computer (PC), a desktop computer, a laptop computer, a notebook computer, a handheld computer, a tablet computer, a server, a server array or server farm, a web server, a network server, an Internet server, a workstation, a minicomputer, a mainframe computer, a supercomputer, a network appliance, a web appliance, a distributed computing system, a multiprocessor system, a processor-based system, a consumer electronics product, a programmable consumer electronics product, a television, a digital television, a set-top box, a wireless access point, a base station, a subscriber station, a mobile subscriber center, a radio network controller, a router, a hub, a gateway, a bridge, a switch, a machine, or a combination thereof.

[0237] The embodiments may be implemented as any one or combination of a parent-board, hardwired logic, software stored by a memory device and executed by a microprocessor, firmware, one or more microchips or integrated circuits interconnected using an application specific integrated circuit (ASIC), and / or a field programmable gate array (FPGA). The term "logic" may include, by way of example, software or hardware, and / or a combination of software and hardware.

[0238] The embodiments may be provided, for example, as a computer program product that may include one or more machine-readable media having machine-executable instructions stored thereon, which when executed by one or more machines, such as a computer, a network of computers, or other electronic devices, may result in one or more machines performing operations according to the embodiments described herein. Machine-readable media may include, but are not limited to, floppy disks, optical disks, CD-ROMs (compact disk read-only memory), and magneto-optical disks, ROMs, RAMs, EPROMs (erasable programmable read-only memory), EEPROMs (electrically erasable, programmable read-only memory), magnetic or optical cards, flash memories, or other types of non-transitory machine-readable media suitable for storing machine-executable instructions.

[0239] Additionally, embodiments may be downloaded as a computer program product, and the program may be transferred from a remote computer (e.g., a server) to a requesting computer (e.g., a client) via a communications link (e.g., a modem and / or network connection) by one or more data signals embodied and / or modulated by a carrier wave or other propagation medium.

[0240] According to one embodiment, the execution unit 2210 includes one or more FPUs for performing single-point floating-point extended mathematical operations. For most single-point floating-point mathematical operations, it is relatively easy to perform operations on the exponent. However, it is relatively difficult to perform operations on the mantissa.

[0241] Figure 23 illustrates one embodiment of a single precision floating point format. As shown in Figure 23, a single precision (SP) floating point (FP) number includes 32 bits, where bit 31 represents a sign component 2305, bits 30-23 represent an exponent component 2310, and bits 22-0 represent a mantissa component 2320. In one embodiment, a real value represented by this format can be given as follows:

number

[0242] For example, the real value of the SP FP number shown in FIG. 23 is

number

[0243] FIG. 24 is a flow diagram illustrating one embodiment of a process 2400 for performing floating-point extended mathematical operations. The process 2400 may be performed by processing logic, which may include hardware (e.g., circuits, dedicated logic, programmable logic, etc.), software (e.g., instructions executed on a processing unit, etc.), or a combination thereof. In one embodiment, the process 2400 may be performed by one or more instructions executed on the FPU 2211. Although the process 2400 is shown in a linear sequence for simplicity and clarity of presentation, it is contemplated that any number of them may be executed in parallel, asynchronously, or in a different order. For simplicity, clarity, and ease of understanding, many of the details discussed with reference to FIGS. 1-23 will not be discussed or repeated here.

[0244] For ease of explanation, the process 2400 is described with reference to performing a square root operation, although the remaining operations (inverse square root, division, reciprocal, sine / cosine, exponential, logarithm, etc.) are described below based on the square root implementation. The process 2400 begins at processing block 2410 with receiving one or more instructions to perform an FP operation on an operand. In processing block 2420, the FP operation is performed on the exponent component 2310 of the operand. For example, the square root of an exponent can be expressed as: e sq=(e-127) / 2 Here, e is the 8-bit exponent (bits 30 to 23) of the input SP FP number (hereinafter referred to as X).

[0245] If we determine that (e-127) is even, then e sq The calculation is e sq = (e-127) / 2. However, if we determine that (e-127) is odd, then e sq =(e-128) / 2, and the input mantissa is doubled. The input SP FP number (X) representation is X=(-1). s ×2 (e-127) When provided as x1.m, the result of the square root operation (hereafter referred to as Y) is given as (e.g., assuming X is a positive SP FP number): Y = √X = (-1) S ×2 (e-127) / 2 ×√(1.m) =(-1) S ×2 (e-128) / 2 ×√(2×1.m), when (e-127) is odd.

[0246] Thus, the square root of the mantissa can be expressed as: 1.m sq =√(1.m) where m sq is the 23-bit mantissa (bits 22 to 0) of the resulting square root SP FP number (Y), and m is the 23-bit mantissa (bits 22 to 0) of the input SP FP number (X). As a result, m sq To calculate, if (e-127) is even, 1.m sq =√(1.m), and if (e-127) is odd, then 1.m sq =√(2×1.m) (e.g., multiplying the mantissa of the input by 2 and taking the exponent of the result (e sq ) into a non-fractional binary number.

[0247] In processing block 2430, an FP operation is performed on the mantissa component 2320 of the operand. To obtain the SP FP square root of the mantissa of the input SP FP number, the input mantissa is represented as a decimal number in the range [2 23 ,2 24 The x-axis is treated as a 24-bit (X) unsigned integer with a resolution of 0x1, 0x2, or 1x3.

[0248] FIG. 25 is a flow diagram illustrating one embodiment of a process 2500 for performing floating-point extended mathematical operations on a mantissa component. The process 2500 may be performed by processing logic, which may include hardware (e.g., circuits, dedicated logic, programmable logic, etc.), software (e.g., instructions executed on a processing unit, etc.), or a combination thereof. In one embodiment, the process 2500 may be performed by one or more instructions executed on the FPU 2211. Although the process 2500 is shown in a linear sequence for simplicity and clarity of presentation, it is contemplated that any number of them may be performed in parallel, asynchronously, or in a different order. For the sake of brevity, clarity, and ease of understanding, many of the details discussed with reference to FIGS. 1-17 will not be discussed or repeated here.

[0249] Process 2500 begins at processing block 2510 where the mantissa component 2320 is split into two sub-components. In one embodiment, the 24 bits of the SP FP mantissa of the expected output result of the FP math operation is divided into two components: a first component (e.g., the 12 most significant bits (MSBs)) that includes N bits (Y h ), and a second component containing M bits (e.g., the 12 least significant bits (LSBs)) (Y l , where N+M=24. At process block 2520, the result of the square root operation is h According to one embodiment, Y h is calculated by splitting the calculation into two parts, which include Y h (or Y hi ) and the actual Y hIt was estimated that Y hi The difference between (i.e., Y he =Y h -Y hi )

[0250] According to one embodiment, as shown by line 2610 in FIG. hi is a linear interpolation (LERP) (e.g., between (X0, Y0) and (X1, Y l ) where X0=2 23 , X1=2 24 , Y0 = √X0, Y1 = √X1). For values ​​of X in the interval (X0, X1), the values ​​Y along the line are hi is given by the slope equation: (Y hi -Y0) / (X-X0)=(Y1-Y0) / (X1-X0), It becomes: Y hi =Y0+(X-X0)×(Y1-Y0) / (X1-X0)=√2 24 +(X-2 24 )×(√2 24 -√2 23 ) / (2 24 -2 23 ) =2 12 +(X-2 24 )×(2 12 -2 11 ×√2) / 2 23 =(2 35 +(X-2 24 )×(2 12 -2 11 ×√2)) / 2 23

[0251] In one embodiment, the result can be calculated via one subtraction operation, one multiplication operation, one shift operation, and one addition operation. In another embodiment, the result can also be calculated via one subtraction operation, one multiplication and accumulate (MAD) operation, and one shift operation. In some embodiments, the intermediate FP multiply / subtract / add / shift operation is used to calculate the resulting 12-bit MSB square root Yh To ensure zero unit minimum precision (ULP) error in , one may need more precision in the mantissa than in SP.

[0252] Actual Y h It was estimated that Y hi The difference between the two is shown in FIG. 27. As shown in FIG. 27, this difference Y he The plot of can be expressed as the difference in values ​​between line 2620 and line 2610 in FIG. 26 (also shown in FIG. 27 for further illustration). According to one embodiment, the difference value Y he Y can be estimated using a piecewise linear approximation (PLA) of the curve 2710 shown in FIG. he To provide more detail of the linear segments that are components of the PLA of curve 2710, an enlarged version of one of the linear segments shown in FIG. 27 is shown.

[0253] According to one embodiment, Y he The PLA is the result of the square root (Y h 28 implements 61 line segments to calculate the 0-bit ULP relative error in the 12-bit MSB component of m. In such an embodiment, the slope and y-intercept of each of the line segments are stored in a look-up table (LUT) (e.g., LUT 2213 in FIG. 22) that is indexed using the MSB bits of the input. i ) and y-intercept (c i ) is stored in the LUT with index i. i ) is shown. i ), and the y-intercept (c i ) to get Y he can be calculated using the MAD operation as follows: Y he =m i X+c i

[0254] Slope (m i) is a very small decimal number, so if we determine that the slope used in the multiplication in the MAD operation is an SP FP value, the resulting result may implement a shift. In one embodiment, the intermediate FP MAD / shift operation is h A higher precision in the mantissa than in the SP may be implemented to ensure zero ULP error in . In further embodiments, some line segments used in the PLA may be longer (e.g., to cover a larger input mantissa range) and others may be shorter (e.g., to cover a shorter input mantissa range).

[0255] In such an embodiment, the indexing logic is simplified by taking 128 equidistant input mantissa ranges (e.g., with corresponding positions of slope and y-intercept in the LUT) due to the complexity of indexing variable-sized line segments. Furthermore, to ensure that each linear segment of the PLA represents an equal input mantissa range, adjacent LUT positions can be set with overlapping values ​​of slope and y-intercept to represent long input segments, thereby simplifying the LUT indexing logic using 7 MSB bits of input mantissa (X).

[0256] The 12-bit MSB portion of the resulting square root Y (Y h ) can be calculated as follows: Y h =Y hi +Y he In one embodiment, the intermediate result Y hi and Y he can have a mantissa of up to 25 bits, so the resulting Y h is rounded to 12 bits, and the square root of the result (Y h ) to calculate

[0257] Returning to FIG. 25, the result of the square root operation is then multiplied in process block 2530 into a second component (e.g., the resulting square root SP FP number Y(Y l) of Y h and Y l The operations on can be performed in parallel.

[0258] For the square root embodiment, Y, X, Y h , and Y l The equation that connects the two is expanded as follows: Y=Y h +Y l =√X By squaring both sides, Y 2 =(Y h +Y l ) 2 =X Y h 2 +Y l 2 +2Y h Y l =X Z=XY h 2 =Y l 2 +2Y h Y l Let us assume that. Here, Y l < <Y h , that is, 2Y h Y l >>Y l 2 If Y l 2 can be ignored. Therefore, Z ≒ 2Y h Y l It becomes.

[0259] Y l are the 12 LSB bits of the resulting square root Y, and Y h is the 12 MSB bit of Y, so Y h The MSB (12th MSB bit) of is always 1 (according to the SP FP mantissa format): Y l <Y h / 2 12 Y h >212 Y l 2Y h Y l >2 13 Y l 2 Y l 2 <2Y h Y l / 2 13 As a result, Y h Since the MSB (12th MSB bit) of is always 1 (according to the SP FP mantissa format), Y l 2 The MSB bit position of is 2Y h Y l The MSB bit position of the digits 0 to 13 bits lower than the MSB bit position of the digits 1 to 13 bits lower than the MSB bit position of the digits 2 to 13 bits lower than the MSB bit position of the digits 3 to 13 bits lower than the MSB bit position of the digits 2 to 13 bits lower than the MSB bit position of the digits 1 to 13 bits lower than the MSB bit position of the digits 2 to So, 2Y h Y l >>Y l 2 Therefore, Y l < <Y h Therefore, Z ≒ 2Y h Y l It becomes.

[0260] Approximate Z≒2Y h Y l Based on Y l =Z / (2Y h )=(XY h 2 ) / (2Y h ) Therefore, Y l The calculation of Y h 2 Find the input mantissa X to Y h 2 Subtraction of XY h 2 Divide by 2 × 4096, then 4096 / Y h In one embodiment, the multiplication is 4096 / Y h is 4096 / Y h This embodiment is calculated through the PLA of 2Y hIt avoids division by 4096 and converts the division into a shift operation by dividing by 2x4096, a power of 2.

[0261] In one embodiment, 2 23 From 2 24 There are 1200 perfect squares between [2 23 , 2 24 ] is Y 2 = the range represented by X, Y h 2 There are 1200 possible values ​​of Y h 2 To compute, the range of 1200 perfect squares is divided into 10 intervals, with 128 perfect squares in each interval, except that to the first range, 80 perfect squares are added, such that 128 x 10 = 1280. As a result, the range of the input mantissa is also divided into 10 intervals.

[0262] In a further embodiment, the input mantissa interval in which X lies may be identified using a first level LUT that is sorted to contain the largest perfect square in each interval of 128 perfect squares. In such an embodiment, X is compared to each entry of this 10 entry LUT table to determine if X≦an entry in the LUT. The comparison finds that X is greater than a perfect square and less than or equal to the immediately next entry in the LUT, and the index of the next entry in the LUT (Entry i ) represents the interval in which X is inserted. i Entry i-1 <X<Entry i The 128 perfect square entries can be used as an index to identify the next level LUTs of 128 perfect square entries that lie between the perfect square entries of the first level LUTs, where Entry i-1 and Entry i Table 1 shows one embodiment of the LUT. [Table 1]

[0263] Table 1 shows the LUT index and LUT entries (e.g., Y h 2 1280 perfect squares (the largest perfect square in any interval of 128 perfect squares within the full range of 1280 perfect squares representing 1280 perfect squares). With a sample value of input mantissa X=12345678, as shown in Table 1, the comparison check X≦11943936 (the fourth index entry of the LUT) fails, but the comparison check X≦12845056 (the fifth index entry of the LUT) passes, as shown. As shown, the comparison is i ), which points to the fifth second-level LUT, which contains 129 perfect squares in the range 11943936 to 12845056.

[0264] The closest perfect square of the input mantissa X, Y h 2 To identify the smallest perfect square (Y ha 2 ) are stored in each interval of 129 perfect squares. XY ha 2 The difference (Z ha ) is the Y of the second-level LUT identified corresponding to X. ha 2 Then, Z ha is divided by 2 x 2048 and 2 x 4096 using shift operations, and idx hal and idx hah This means that the adjacent perfect squares n 2 and (n+1) 2 The reason is that there are 2n integers between Y and Y. h The range of idx is from 2896 to 4095, with the nearest power of 2 close to 2896 being 2048 and the nearest power of 2 close to 4095 being 4096. hae =(idx hal +idx hah) / 2 is then calculated, which is the Y h 2 The estimated index of the entry in idx. hae vs. (Y in the second level LUT h 2 4 shows one embodiment of a graph of idx, which is the actual index for the entries of

[0265] Both lines are scaled versions of each other, as shown in Figure 29. idx as y2=m2x+c2 hae Based on the linear equation of idx as y1=m1x+c1, y2=y1+(m2-m1)x+(c2-c1). Both the equations y2=m2x+c2 and y1=m1x+c1 are shown in FIG. 29 along with their respective slopes and y-intercept values. y2 is the Y h 2 represents the actual index (idx) for the entry in hae It is obtained based on the scaling of the formula (represented by y1). Therefore, Y h 2 was calculated. In one embodiment, this calculation is performed using one MAD operation and one addition operation.

[0266] Y h 2 Once calculated, XY h 2 can be calculated via one subtraction operation and divided by 2×4096 with one shift operation to produce an intermediate result. Then, 4096 / Y h In one embodiment, as shown in FIG. h is calculated via a piecewise linear approximation involving 16 linear segments. FIG. 30 further shows the x-axis represented by the input mantissa X. h The PLA of can be calculated using one MAD operation. As shown above, the intermediate results (XY h 2 ) / (2×4096) to 4096 / Y hto obtain the 12-bit LSB portion of the resulting square root, Y, as follows: Y l =(XY h 2 ) / (2Y h )

[0267] Returning to Figure 24, Y h and Y l The result of the floating-point operation performed on x is combined with the result of the exponent component as the result (or output) of the floating-point operation in process block 2440. The execution latency of the above process depends on the computation of the mantissa of the square root (Y). sq The calculation of Y (the square root mantissa) involves checking whether the LSB bit of the input exponent (e) is even or odd, subtracting 128 or 127 accordingly (to shift the exponent by the bias), dividing by 2 with a 1-bit shift operation, adding 127 again (to shift the exponent by the bias), and converting the result back to the SP FP exponent format. The multiplication, addition, subtraction, and shift operations involved in the calculation of Y (the square root mantissa) involve the square root exponent e sq More execution cycles are required than

[0268] In one embodiment, the computation of the mantissa of the square root Y involves four calculations, which can be performed in parallel because each operation is based on the input mantissa X (e.g., they are not dependent on each other). In such an embodiment, an initial estimate of the 12-bit MSB portion of the resulting square root Y (Y hi ) and calculate the actual Y h It was estimated that Y hi The difference is Y he =Y h -Y hi Calculate as Y h 2 Calculate Y l Calculate as a part of 4096 / Y h Calculate Y l Calculate as part of.

[0269] In one embodiment, Y hiThe calculation of Y includes one subtraction operation, one MAD operation, and one shift operation. h It was estimated that Y hi The difference is Y he =Y h -Y hi To calculate ,one LUT lookup is implemented to get the slope and y-intercept, one MAD operation and one rounding operation are performed as part of the PLA, which includes checking the LSB bit and adding 1 to the remaining bits if it is 1.

[0270] Y l (the 12-bit LSB portion of the resulting square root Y) h 2 Computing XY involves two LUT lookups, 10 parallel compare operations, and three parallel shift operations (e.g., ha 2 Divide by 2 x 2048 to get idx hal Get XY ha 2 Divide by 2 x 4096 to get idx hah Get the index idx hal and idx hah When averaging, divide by 2 to get idx hae ), one addition operation (e.g., idx hal and idx hah Averaging of idx hae ), 1 subtraction (XY ha 2 ), one MAD operation and one addition operation (e.g., idx hae By rescaling the expression for idx hae from the actual index idx of the entry into the second level LUT).

[0271] XY h 2 can be calculated by one subtraction and one shift operation to divide by 2 x 4096. h 2) / (2×4096) to 4096 / Y h Multiply by Y l One multiplication operation is required to obtain 4096 / Y h Calculating the intermediate result (XY h 2 ) / (2×4096) to 4096 / Y h Multiply by Y l To obtain , one multiplication operation is required.

[0272] Reciprocal Square Root (RSQ)

[0273] The index RSQ can be expressed as: e rsq =-(e-127) / 2 Here, e is the 8-bit exponent (bits 30 to 23) of the input SP FP number X.

[0274] If we determine that (e-127) is even, then e rsq The calculation is e rsq =-(e-127) / 2, if the test (e-127) is odd, the result is e rsq =-(e-128) / 2, and the input mantissa is doubled. X becomes X=(-1) s ×2 (e-127) × 1.m, then the result of RSQ(Y) is given by (assuming X is a positive SP FP number): Y=1 / √X=(-1) s ×2 -(e-127) / 2 ×(1 / √(1.m)) =(-1) s ×2 -(e-128) / 2 ×(1 / √(2×1.m)), when (e-127) is odd.

[0275] The calculation of the mantissa RSQ is done by subtracting the 12 MSB bits of the resulting RSQ Y (Y h ) and 12 LSB bits (Y l) Thus, for input X, RSQ(X)=Y. Y=1 / √X=Y h +Y l 1 / X=(Y h +Y l ) 2 =Y h 2 +Y l 2 +2Y h Y l As mentioned above, Y l < <Y h So, Y. l 2 can be ignored, so we get: X=1 / (Y h +Y l ) 2 =1 / (Y h 2 *(1+Y l / Y h ) 2 ) ≒1 / Y h 2 *(1-2Y l / Y h ) Y l / Y h <<1, and (1+Y l / Y h ) 2 By applying the binomial series approximation to X*Y h 2 =1-2Y l / Y h 2Y l / Y h =1-X*Y h 2 Y l =(Y h -X*Y h 3 ) / 2

[0276] As discussed above with reference to SP FP square root, Y h and Y h 3can be obtained by the LERP and PLA, as well as the explanation given in the proposal. h 3 Multiply by X and get Y from the above formula. h Subtracting from and dividing by 2 with a shift gives Y l Get the.

[0277] Inverse / Reciprocal (INV)

[0278] The index INV can be expressed as follows: e inv =-(e-127) Here, e is the 8-bit exponent (bits 30 to 23) of the input SP FP number X.

[0279] The INV calculation is done by dividing the mantissa by the 12 MSB bits of the resulting INV Y (Y h ) and 12 LSB bits (Y l ), so for any input X, we have INV(X)=Y. Y=1 / X=Y h +Y l Y l =1 / XY h =1 / X*(1-X*Y h ) =Y h *(1-X*Y h ), approximation 1 / X≒Y h By =Y h -X*Y h 2

[0280] Y h and Y h 2 can be obtained by LERP and PLA, similar to the explanation of the proposal for the square root of SP FP above. From the above formula, Y h 2 is multiplied by X and Y l is Y h It is calculated by subtraction from

[0281] Sine / Cosine (SIN / COS)

[0282] The SIN of the SP FP input is calculated by the range reduction method since SIN is a periodic function. Thus, the SIN of the input is calculated in the range -π / 2 to π / 2 (e.g., for input range [-π / 2:π / 2], the result obtained is in the range -1 to 1) and goes out of range and the function remains periodic. Since the SIN output with reduced input range can vary from -1 to 1, the exponential component of SIN can be calculated after renormalization of the output. SIN(2 (e-127) ×1.m)=SIN(RR(2 (e-127) ×1.m) Here, RR(X) applies range reduction to the input value X, reducing the result to within 0 to π / 2.

[0283] The output is given as RR(X)=intRR+frcRR, where intRR and frcRR are the integer and fractional components of the result upon range reduction. intRR = int((2 (e-127) ×1.m) / (π / 2)) =int(2 (e-127) ×1.m×2 / π) frcRR=(2 (e-127) ×1.m)-(intRR×π / 2) SIN(2 (e-127) ×1.m) = SIN(frcRR)

[0284] In one embodiment, multiplication by 2 / π and π / 2 can be achieved by approximating and rounding π. Based on different values ​​of intRR, the frcRR of the result of the SIN calculation is i can be obtained from Table 2 below. [Table 2]

[0285] After range reduction of the input, SIN(frcRR i) can be calculated using a one-level PLA. In one embodiment, the PLA implements 16 linear segments or 26 equally sized linear segments of the variable size input range, with the slope and y-intercept of the corresponding values ​​stored in the LUT. The calculation of COS is done using the signs and frcRR in Table 2. i It is similar to the SIN calculation, except that the order of the row entries differs from column to column.

[0286] Logarithm base 2 (LOG)

[0287] The base 2 LOG(Y) of an SP FP number X can be expressed as follows (LOG is only applicable to positive SP FP numbers): Y=LOG(X)=LOG(2 e-127 ×1.m)=e-127+LOG(1.m) where e is the 8-bit exponent (bits 30 through 23) of the input SP FP number, and m is the mantissa bits 22 through 0. e-127 is added to the result of LOG(1.m) (e-127 is added as an integer, LOG(1.m) is a decimal). The resulting value is renormalized (shifted to fit into SP FP format) and the exponent of the LOG of the result (e log ) to get the

[0288] According to one embodiment, three operations are performed in calculating the SP FP mantissa of LOG(X)=Y, where X=1.m. In such an embodiment, an initial estimate is calculated via LERP and a two-level PLA to estimate the difference between the initial estimate and Y. First, the LERP is performed for the entire range of the input mantissa X and the output mantissa range Y (operation 1), and Y ini Get the LERP error Y err =YY ini Then, Y err A two-level PLA is implemented to calculate

[0289] The level 1 PLA is the Y generated from the LERP in operation 1 above. errIn one embodiment, the entire input / output mantissa range is divided into 64 linear segments as part of the level 1 PLA. Thus, the linear equations for the linear segments are implemented with 64×2 entry LUTs for the slope and y-intercept. The result of the level 1 PLA is Y err_l1 Level 2 PLA can be referred to as Y arising from the Level 1 PLA above. err_l1err Each of the 64 Level 1 PLA ranges is divided into 32 linear segments in the Level 2 PLA. Each of the 64 ranges in the Level 1 PLA is assigned a Y err_l1err Because of this similarity, the level 2 PLA can apply the same 32 linear equations to each of the 64 ranges of the level 1 PLA. This reduces the LUT size from 32x64x2 to 32x2.

[0290] Exponent-base 2 (EXP)

[0291] The base 2 EXP(Y) of an SP FP number X can be expressed as follows: Y = EXP(X) = 2 ((-1)^s×2^(e-127)×1.m) =2 int((-1)^s×2^(e-127)×1.m)+frc((-1)^s×2^(e-127)×1.m) where e is the 8-bit exponent (bits 30 to 23) of the input SP FP number, and m is the mantissa bits 22 to 0. int(X) represents the integer part of x, and frc(X) represents the fractional part of x.

[0292] If the input SP FP number is determined to be positive, Y=2 int(2^(e-127)×1.m)+frc(2^(e-127)×1.m) Here, int(2 (e-127) ×1.m) is the exponent of the resulting EXP Y, and 2 frc(2^(e-127)×1.m) is the mantissa of the resulting EXP Y.

[0293] If the input SP FP number is determined to be negative, Y=2 -int(2^(e-127)×1.m)-frc(2^(e-127)×1.m) =2 -int(2^(e-127)×1.m) ×2 -frc(2^(e-127)×1.m) =2 -int(2^(e-127)×1.m)-1 ×21-frc(2^(e-127)×1.m) where -int(2 (e-127) ×1.m)-1 is the exponent of the resulting EXP Y, and 2 frc(2^(e-127)×1.m) is the mantissa of the resulting EXP Y.

[0294] In one embodiment, EXP can easily overflow or underflow, and the valid range of the input is [-128, +127]. Thus, the input X=1.m*2 e-127 Here, since 1.m is in the range [1, 2), e-127 can only vary from 0 to 6. If e-127>0, the frc calculation will double the e-127 MSB bit of 1.m. int(2^(e-127)×1.m) (shift left). In effect, we need to calculate 2 assuming e-127=0. .m In other cases of e-127 (e-127 varies in the range of 1 to 6), .m The number of m bits in is less than 23, and thus the resulting calculation requires less precision.

[0295] In one embodiment, the mantissa of the input X is 2 .m To calculate the 8 MSB bits (X h ) and 15 LSB bits (X l In such an embodiment, the final EXP is divided into 2 Xh and 2 Xl It can be calculated by multiplying 2 Xl To compute, we perform a LERP over the full range of the mantissa of the input X, with a relative error < 2 -21 Thus, one level of LERP meets the accuracy requirement and the result of LERP is Y lerp It becomes. 2 Xh To compute,X,, the PLA is implemented by dividing the full range of the mantissa of the input,X,into eight linear segments.

[0296] PLA result is Y ini_Xh If so, the actual 2 Xh and Y ini_Xh The difference betweenini_Xh to the nearest binary point, and the result of the rounding is Y ini_Xh_rnd As above, the resulting EXP can be calculated as follows: 2 .m =2 Xh ×2 Xl =Y ini_Xh_rnd ×Y lerp

[0297] Floating-point division (FPDIV)

[0298] The result of FPDIV can be expressed as follows: Z=Y / X Here, Y is the dividend and X is the divisor.

[0299] In one embodiment, the result obtained can be calculated by an INV operation (1 / X) and a MUL operation (Y x 1 / X). In such an embodiment, the execution latency is the same as the INV operation since the FPDIV operation is integrated into the INV operation and optimized to complete in the same number of cycles as the INV. According to one embodiment, the FPDIV operation is integrated into the INV operation and optimized to complete in the same number of cycles as the INV. For example, it is easy to see that the exponent portion of the FPDIV operation is a simple subtraction operation. If the exponent of the dividend Y is e y and the exponent of the divisor X is e x If , the resulting exponent e fpdiv =e y -e x and the result is renormalized after computing the FPDIV mantissa of the result. The INV result is: W=1 / X=W h +W l , and W l =W h -X×W h 2 (eg, according to the equation resulting from the INV operation above); this means: Z=Y / X=Y×(W h -X×Wh 2 )=Y×W h -Y×X×W h 2

[0300] W h While estimating, V=Y×X can be calculated in parallel. V×X h 2 =Y×X×W h 2 While calculating Y×W h can be computed in parallel. Thus, FPDIV can be computed in the same number of cycles as INV. As a result, the disclosed FPDIV computation does not require multiple passes (at least two) through the pipeline as required by current solutions, significantly reducing the execution latency of the disclosed FPDIV compared to existing solutions.

[0301] Combining inverse square root and vector scaling

[0302] In addition to the calculation of the inverse square root R above, A → , N B → , N C → The calculation is R Y h , Y l During the calculation of A → , B → , C → This can be further optimized by combining the computation of R with the multiplication of R, so that the whole bunched operation requires no additional cycles compared to the computation of the inverse square root R.

[0303] According to one embodiment, the first step in the calculation of R is to calculate Y using linear interpolation (LERP) and piecewise linear approximation (PLA). h and Y h 3 Including the calculation of N A → =A → The second step in the calculation of ×R is N A → =A→ ×(Y h +Y l ). N A → =A → ×(Y h +Y l ) =A → ×Y h +A → ×Y l =A → ×Y h +A → ×((Y h -X×Y h 3 )) / 2 =A → ×Y h +((A → ×Y h -A → xXxY h 3 )) / 2

[0304] P A =A → ×Y h can be calculated in the second step.

[0305] Q A =A → ×X is Y h and Y h 3 can be calculated in the first stage in parallel with the calculation of

[0306] T A =Q A ×Y h 3 , P A can be calculated in a second step in parallel with the calculation of

[0307] Finally, N A → =A → ×Y h +((A → ×Y h -A → xXxY h 3 )) / 2=P A+((P A -T A )) / 2 can be obtained in the third step with one subtraction, one right shift operation, and one addition. P A , Q A , T A , and N A → During the calculation of P B , Q B , T B , N B → , P C , Q C , T C , N C → can be calculated in parallel. A → , N B → , N C → The optimized combination calculation with RN A → N B → N C → , or RSQVS.

[0308] Various embodiments described herein contemplate exposing an instruction (e.g., VNM) that specifies a vector normalization operation to be performed on V vectors. Additionally or alternatively, individual ISA instructions may be exposed for one or more of: (i) a ternary dot product operation (e.g., SIMD8 DP3); (ii) a ternary inverse square root operation (e.g., SIMD8 RSQ); and a ternary operation that combines both the inverse square root and vector scaling functions (e.g., SIMD8 RSQVS).

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

[0310] When an element "A" is said to be coupled to or with element "B," element A may be directly coupled to element B or indirectly coupled, for example, via element C. When the specification and claims state that a component, function, structure, process, or property A "causes" component, function, structure, process, or property B, this means that "A" is at least partially responsible for "B," but there may also be at least one other component, function, structure, process, or property that helps to cause "B." When the specification states that a component, function, structure, process, or property "may include," "can include," or "can include," it is not necessary to include that particular component, function, structure, process, or property. When the specification or claims refer to "a" or "an" element, this does not mean that there is only one of the described element.

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

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

[0313] Some embodiments relate to Example 1, which includes a method, in response to receiving by a graphics processing unit (GPU) a single instruction specifying a vector normalization operation to be performed on each vector of a set of V vectors, the method including: generating, by a first processing unit of the GPU, V squared length values ​​each representing a squared length of one of the set of V vectors, where for each of N sets of inputs each representing a plurality of component vectors of N vectors of the set of V vectors and stored in a respective register of the first set of V / N registers, the N squared length values ​​are generated at a time by performing N parallel dot product operations on the N set of inputs; generating, by a second processing unit of the GPU, V set of outputs each representing a plurality of normalized component vectors of one of the set of V vectors, where for each of the N squared length values ​​of the V squared length values, the N set of outputs are generated at a time by performing N parallel operations on the N squared length values, where each of the N parallel operations performs a combination of an inverse square root function and a vector scaling function.

[0314] Example 2 includes the subject matter of example 1, wherein generating, by a second processing unit of the GPU, the V sets of outputs includes storing the V sets of outputs in respective registers of a second set of V / N registers, N sets of outputs at a time.

[0315] Example 3 includes the subject matter of Examples 1-2, wherein V is 8 and N is 2.

[0316] Example 4 includes the subject matter of examples 1-3, wherein the first set of V / N registers includes four 256-bit registers and the plurality of component vectors includes three 32-bit component vectors.

[0317] Example 5 includes the subject matter of examples 1-4, wherein the second set of V / N registers includes four 256-bit registers and the plurality of normalized component vectors includes three 32-bit normalized component vectors.

[0318] Example 6 includes the subject matter of examples 1-5, wherein the first processing unit includes a floating point unit (FPU) and the second processing unit includes a co-processor.

[0319] Example 7 includes the subject matter of Examples 1-6, where the N parallel dot product operations occur via a 2-wide single instruction multiple data (SIMD) dot product instruction.

[0320] Example 8 includes the subject matter of Examples 1-7, where the N parallelism occurs via 2-wide single instruction multiple data (SIMD) instructions.

[0321] Example 9 includes the subject matter of examples 1-8, wherein the inverse square root function includes performing a single precision inverse square root operation on the operands, the operation including: performing an inverse square root operation on the exponent component of the operand; performing an inverse square root operation on a mantissa component of an operand, the operation including: dividing the mantissa component into a first sub-component and a second sub-component; determining a result of an inverse square root operation of the first subcomponent; and performing an inverse square root operation, the inverse square root operation including determining a result of the inverse square root operation of the second subcomponent; and This involves returning the result of an inverse square root operation.

[0322] Some embodiments relate to Example 10, which includes a graphics processing unit (GPU) including: a first set of V / N registers; a first processing unit coupled to the first set of V / N registers; a second processing unit coupled to the first set of V / N registers; and an execution unit operable, in response to receiving a single instruction specifying a vector normalization operation to be performed on each vector of a set of V vectors, to: (i) issue V / N N-wide single instruction, multiple data (SIMD) dot products to be performed by the first processing unit, and (ii) issue V / N N-wide single instruction, multiple data (SIMD) operations performing a combination of an inverse square root function and a vector scaling function to be performed by the second processing unit; the first processing unit is operable to generate V squared length values ​​each representing a squared length of one vector of the set of V vectors, and is operable to generate the N squared length values ​​at a time by performing one of the V / N N-wide SIMD dot product operations for each of N sets of inputs each representing a plurality of component vectors of N vectors of the set of V vectors and stored in a respective register of the first set of V / N registers; The second processing unit is operable to generate V sets of outputs each representing a plurality of normalized component vectors of one vector of the set of V vectors, and is operable to generate the N sets of outputs at a time by performing one of V / N N-wide SIMD operations for every N squared length values ​​of the V squared length values.

[0323] Example 11 includes the subject matter of Example 10, wherein the GPU further includes a first set of V / N registers, and wherein outputs of the V sets are stored in respective registers of a second set of V / N registers, N sets of outputs at a time.

[0324] Example 12 includes the subject matter of Examples 10-11, where V is 8 and N is 2.

[0325] Example 13 includes the subject matter of examples 10-12, wherein the first set of V / N registers includes four 256-bit registers and the plurality of component vectors includes three 32-bit component vectors.

[0326] Example 14 includes the subject matter of examples 10-13, wherein the second set of V / N registers includes four 256-bit registers and the plurality of normalized component vectors includes three 32-bit normalized component vectors.

[0327] Example 15 includes the subject matter of examples 10-14, wherein the first processing unit includes a floating point unit (FPU) and the second processing unit includes a coprocessor.

[0328] Example 16 includes the subject matter of Examples 10-15, where the inverse square root function includes performing a single precision inverse square root operation on the operands, the operation including: performing an inverse square root operation on the exponent component of the operand; performing an inverse square root operation on a mantissa component of an operand, the operation including: dividing the mantissa component into a first sub-component and a second sub-component; determining a result of an inverse square root operation of the first subcomponent; and performing an inverse square root operation, the inverse square root operation including determining a result of the inverse square root operation of the second subcomponent; and This involves returning the result of an inverse square root operation.

[0329] Example 17 includes the subject matter of Examples 10-16, wherein determining the value of the first subcomponent includes determining an initial estimate of the first subcomponent, and determining a difference between an actual value of the first subcomponent and the initial estimate of the first subcomponent.

[0330] Example 18 includes the subject matter of Examples 10-17, wherein determining the initial estimate includes performing linear interpolation.

[0331] Example 19 includes the subject matter of Examples 10-18, wherein the difference between the actual value of the first subcomponent and the initial estimate of the first subcomponent is determined by piecewise linear approximation.

[0332] Example 20 includes the subject matter of Examples 10-19, wherein determining the results of the inverse square root operations for the first and second subcomponents is performed in parallel.

[0333] Some embodiments relate to Example 21, which includes a system for generating V squared length values, each representing a squared length value of one vector in the set of V vectors, in response to receiving a single instruction specifying a vector normalization operation to be performed on each vector in the set of V vectors, where for each N set of inputs representing a plurality of component vectors of N vectors in the set of V vectors and stored in respective registers in a first set of V / N registers, means for generating the N squared length values ​​at a time by performing N parallel dot product operations on the N sets of inputs; generating V sets of outputs each representing a plurality of normalized component vectors of one vector of the set of V vectors, wherein for each of N squared length values ​​of the V squared length values, means are provided for performing N parallel operations on the N squared length values ​​to generate the N sets of outputs at a time; Each of the N parallel operations performs a combination of an inverse square root function and a vector scaling function.

[0334] Some embodiments relate to Example 22, which includes an apparatus for carrying out or implementing the method of any of Examples 1-10.

[0335] Example 23 includes at least one machine-readable medium that includes a plurality of instructions that, when executed on a computing device, performs or executes the method or implements an apparatus described in the previous examples.

[0336] The drawings and the foregoing description provide examples of embodiments. Those skilled in the art will appreciate that one or more of the described elements may be combined into a single functional element. Alternatively, certain elements may be divided into multiple functional elements. Elements of one embodiment may be added to another embodiment. For example, the order of the processes described herein may be changed and is not limited to the manner described herein. Furthermore, the operations in the flow diagrams need not be performed in the order shown, and not all operations need to be performed. Also, those operations that are not dependent on other operations may be performed in parallel with other operations. The scope of the embodiments is in no way limited by these specific examples. Various variations are possible, such as in structure, dimensions, use of materials, etc., whether or not expressly specified in the specification. The scope of the embodiments is at least as broad as provided by the following claims.

Claims

1. 1. A method, comprising: In response to receipt by a graphics processing unit (GPU) of a single instruction specifying a vector normalization operation to be performed on each vector of a set of V vectors, a first processing unit of the GPU generating V squared length values ​​each representing a squared length of one vector of the set of V vectors, where for each N set of inputs each representing a plurality of component vectors of N vectors of the set of V vectors and stored in a respective register of a first set of V / N registers, generating N squared length values ​​at a time by performing N parallel dot product operations on the N sets of inputs; a second processing unit of the GPU generating V sets of outputs each representing a plurality of normalized component vectors of one vector of the set of V vectors, and for each N squared length values ​​of the V squared length values, performing N parallel operations on the N squared length values ​​to generate N sets of outputs at a time; each of the N parallel operations performing a combination of an inverse square root function and a vector scaling function; the first processing unit includes a floating point unit (FPU) and the second processing unit includes a coprocessor; method.

2. 2. The method of claim 1, wherein the second processing unit of the GPU generating the V set of outputs stores the V set of outputs in respective registers of a second set of V / N registers, N sets of outputs at a time.

3. 3. The method of claim 1 or 2, wherein V is 8 and N is 2.

4. 4. The method of claim 1, wherein the first set of V / N registers comprises four 256-bit registers and the plurality of component vectors comprises three 32-bit component vectors.

5. 5. The method of claim 1, wherein the second set of V / N registers comprises four 256-bit registers and the plurality of normalized component vectors comprises three 32-bit normalized component vectors.

6. 4. The method of claim 1, wherein the N parallel dot-product operations occur through a 2-wide single instruction multiple data (SIMD) dot-product instruction.

7. The method of claim 1 , wherein the N parallel operations occur through 2-wide single instruction multiple data (SIMD) instructions.

8. The inverse square root function includes performing a single precision inverse square root operation on an operand, the operation including: performing an inverse square root operation on an exponent component of said operand; performing an inverse square root operation on a mantissa component of said operand, said operation including: dividing the mantissa component into a first sub-component and a second sub-component; determining a result of the inverse square root operation of the first subcomponent; and performing an inverse square root operation on a mantissa component of the operand, the inverse square root operation including determining a result of the inverse square root operation on the second sub-component; and The method of claim 1 , further comprising returning a result of the inverse square root operation.

9. A graphics processing unit (GPU), comprising: a first set of V / N registers; a first processing unit coupled to a first set of the V / N registers; a second processing unit coupled to the first set of V / N registers; an execution unit operable, in response to receiving a single instruction specifying a vector normalization operation to be performed on each vector of a set of V vectors, to: (i) issue V / N N-wide single instruction, multiple data (SIMD) dot product operations to be performed by the first processing unit, and (ii) issue V / N N-wide single instruction, multiple data (SIMD) operations performing a combination of an inverse square root function and a vector scaling function to be performed by the second processing unit; the first processing unit is operable to generate V squared length values, each representing a squared length of one of the set of V vectors, and to generate the N squared length values ​​at a time by performing one of the V / N N-wide SIMD dot product operations for each of N sets of inputs, each representing a plurality of component vectors of N vectors of the set of V vectors and stored in a respective register of the first set of V / N registers; the second processing unit is operable to generate V sets of outputs each representing a plurality of normalized component vectors of a vector of the set of V vectors, and is operable to generate the N sets of outputs at a time by performing one of the V / N N-wide SIMD operations for each of N squared length values ​​of the V squared length values; the first processing unit includes a floating point unit (FPU) and the second processing unit includes a coprocessor; GPU.

10. 10. The GPU of claim 9, further comprising a first set of V / N registers, wherein outputs of the V set are stored in respective registers of a second set of V / N registers, N sets of outputs at a time.

11. 11. The GPU of claim 9 or 10, wherein V is 8 and N is 2.

12. 12. The GPU of claim 9, wherein the first set of V / N registers comprises four 256-bit registers and the plurality of component vectors comprises three 32-bit component vectors.

13. 13. The GPU of claim 9, wherein the second set of V / N registers comprises four 256-bit registers and the plurality of normalized component vectors comprises three 32-bit normalized component vectors.

14. The inverse square root function includes performing a single precision inverse square root operation on an operand, the operation including: performing an inverse square root operation on an exponent component of said operand; performing an inverse square root operation on a mantissa component of said operand, said operation including: dividing the mantissa component into a first sub-component and a second sub-component; determining a result of the inverse square root operation of the first subcomponent; and performing an inverse square root operation on a mantissa component of the operand, the inverse square root operation including determining a result of the inverse square root operation on the second sub-component; and The GPU of claim 9 , further comprising returning a result of the inverse square root operation.

15. 15. The GPU of claim 14, wherein determining the value of the first subcomponent comprises determining an initial estimate of the first subcomponent and determining a difference between an actual value of the first subcomponent and the initial estimate of the first subcomponent.

16. The GPU of claim 15 , wherein determining the initial estimate comprises performing linear interpolation.

17. 17. The GPU of claim 15 or 16, wherein the difference between the actual value of the first sub-component and the initial estimate of the first sub-component is determined via piecewise linear approximation.

18. 18. The GPU of claim 14, wherein determining the results of the inverse square root operation for the first and second sub-components is performed in parallel.

Citation Information

Patent Citations

  • Instruction and logic for performing dot-product operation

    JP2008077663A

  • Data processing

    JP2011227908A

  • Vector floating-point argument reduction

    JP2012069116A