Method and apparatus for discriminative semantic transfer and physical heuristic optimization of features in deep learning
By coupling the graphics processing unit with the host processor core, using SIMT architecture and physically inspired optimization technology, feature distinctive semantic transfer in deep learning network is realized, solving the problem of limited efficiency of parallel graphics processors in deep learning. , improves training and reasoning efficiency.
Patent Information
- Application Number
- CN202411105369.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2017-05-23
- Filing Date
- 2018-05-22
- Publication Date
- 2024-12-03
AI Technical Summary
The prior art is difficult to effectively utilize the potential of parallel graphics processors in deep learning, especially to efficient data synchronization and processing between different parts of the graphics processing pipeline, resulting in limited training and inference efficiency of deep neural networks.
By coupling the graphics processing unit (GPU) with the host processor core, using SIMT architecture and physically inspired optimization technology, feature distinctive semantic transfer and parallel processing in deep learning networks are realized, and the parallel processing efficiency of the graphics processing pipeline is improved.
It significantly improves the training and inference efficiency of deep neural networks, can process larger data sets, and improves the performance of graphics processors in machine learning tasks.
Smart Images

Figure CN119068189A_ABST
Abstract
Description
[0001] priority This application claims priority to and the benefit of U.S. Provisional Patent Application No. 62 / 509,960, filed on May 23, 2017, entitled “METHODS AND APPARATUS FOR DISCRIMIATIVE SEMANTIC TRANSFER FEATURES IN DEEP LEARNING,” and U.S. Provisional Patent Application No. 62 / 509,990, filed on May 23, 2017, entitled “METHODS AND APPARATUS FOR PHYSICS-INSPIRED OPTIMIZATION OF FEATURES IN DEEP LEARNING,” both of which are incorporated herein by reference and are commonly assigned. Technical Field
[0002] Embodiments generally relate to data processing and more particularly to data processing via general purpose graphics processing units. In particular, embodiments relate to systems and methods for executing deep learning networks utilizing discriminative semantic transfer and physics-inspired optimization of features in deep learning. Background Art
[0003] Current parallel graphics data processing includes systems and methods developed to perform specific operations on graphics data, such as, for example, linear interpolation, tessellation, rasterization, texture mapping, depth testing, etc. Traditionally, graphics processors have used fixed-function compute units to process graphics data; however, recently, some graphics processors have been made programmable, enabling such processors to support a wider variety of operations for processing vertex and fragment data.
[0004] To further improve performance, graphics processors typically implement processing techniques such as pipelining, which attempt to process as much graphics data as possible in parallel throughout different parts of the graphics pipeline. Parallel graphics processors with a single instruction multiple thread (SIMT) architecture are designed to maximize the amount of parallel processing in the graphics pipeline. In a SIMT architecture, groups of parallel threads attempt to synchronize program instructions together as often as possible to improve processing efficiency. A general overview of software and hardware for a SIMT architecture can be found in Chapter 3, pages 37-51 of CUDA Programming by Shane Cook (2013).
[0005] Machine learning has successfully solved a variety of tasks. The calculations that occur when training and using machine learning algorithms (e.g., neural networks) are naturally suitable for efficient parallel implementation. Therefore, parallel processors such as general-purpose graphics processing units (GPGPUs) have played an important role in the actual implementation of deep neural networks. Parallel graphics processors with single instruction multiple threads (SIMT) architectures are designed to maximize the amount of parallel processing in the graphics pipeline. In the SIMT architecture, groups of parallel threads try to synchronize program instructions together as often as possible to improve processing efficiency. The efficiency provided by parallel machine learning algorithm implementations allows the use of high-capacity networks and enables those networks to be trained on larger data sets.
[0006] Deep learning neural networks (DNNs) are usually constructed as convolutional neural network types and are used to perform complex association tasks. After a training phase using known inputs, DNNs are able to recognize new inputs that are similar to the original training inputs. This helps in object detection techniques, automatic speech recognition, user verification, image understanding, and machine vision uses, among others. Video sequences can be used for object tracking as well as recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] The drawings illustrate examples, and are therefore exemplary embodiments and are not to be considered limiting in scope.
[0008] Figure 1 is a block diagram illustrating a computer system configured to implement one or more aspects of the exemplary embodiments described herein.
[0009] Figures 2A-2D A parallel processor assembly according to an exemplary embodiment is shown.
[0010] Figure 3A-3B is a block diagram of a graphics multiprocessor according to an exemplary embodiment.
[0011] Figures 4A-4F An exemplary architecture is shown in which multiple graphics processing units (GPUs) are communicatively coupled to multiple multi-core processors.
[0012] Figure 5 A graphics processing pipeline according to an exemplary embodiment is shown.
[0013] Figure 6 A machine learning software stack is shown according to an exemplary embodiment.
[0014] Figure 7 A highly parallel general purpose graphics processing unit is shown in accordance with an exemplary embodiment.
[0015] Figure 8 A multi-GPU computing system is shown in accordance with an exemplary embodiment.
[0016] Figures 9A-9B The layers of an exemplary deep neural network are shown.
[0017] Fig.10 An exemplary recurrent neural network is shown.
[0018] Fig.11 An exemplary embodiment of the training and deployment of a deep neural network is shown.
[0019] Fig.12 is an exemplary block diagram illustrating distributed learning.
[0020] Fig.13 An exemplary inference system-on-chip (SOC) suitable for performing inference using a trained model is shown.
[0021] Fig.14 is an exemplary block diagram of an image capture system that stores RGB and CNN channel data as part of a depth channel image, and is an exemplary block diagram of an image capture system that stores a depth channel image using a convolutional neural network (CNN).
[0022] Fig.15 is an overview diagram of sequential operations on semantic transfer features in a deep learning network according to an exemplary embodiment.
[0023] Fig.16 is a graph of probabilistic node connectivity for semantic transition features according to an exemplary embodiment.
[0024] Fig.17 is a diagram of a network design for semantic segmentation, semantic transfer, semantic feature space, and transfer weight visualization according to an exemplary embodiment.
[0025] Fig.18A On the left is a graph visualizing feature quality. From top to bottom: input, bg activation, wf activation, ww activation, wc activation, softmax result. On the right is a comparison of feature quality.
[0026] Fig.18B is a diagram of the topology of an indoor layout from a test set according to an exemplary embodiment.
[0027] Fig. 18C is a diagram of the influence of a room shown in an input image, a feature map, and force synthesis, according to an exemplary embodiment, wherein the feature map is constructed by considering edges as springs and the feature map as a potential field, and correlating the force applied at each point of the spring.
[0028] Fig.18DThe left side shows an example of qualitative results on the LSUN validation set when visualizing feature maps by merging wf, ww and wc through a pixel-wise maximum operation according to an exemplary embodiment. The right side shows typical failure cases according to an exemplary embodiment, in which the wrong topology produces the lowest energy.
[0029] Fig.18E The left side shows an example of qualitative results on the Hedau validation set when the visualization feature map is merged by a pixel-wise maximum operation according to an exemplary embodiment.
[0030] Fig.18F is a graph of error vs. window size on the LSUN validation set according to an exemplary embodiment.
[0031] Figure 18G is a diagram comparing two techniques for physics-inspired optimization according to an exemplary embodiment.
[0032] Fig.19 A block diagram of a processing system is shown in accordance with an exemplary embodiment.
[0033] Fig. 20 An exemplary block diagram of an embodiment of a processor with one or more processor cores, an integrated memory controller, and an integrated graphics processor is shown.
[0034] Fig.21 An exemplary block diagram of a graphics processor is shown.
[0035] Fig. 22 A block diagram illustrating a graphics processing engine of a graphics processor according to an exemplary embodiment.
[0036] Fig.23 A block diagram illustrating another exemplary embodiment of a graphics processor.
[0037] Fig.24 Thread execution logic is shown including an array of processing elements employed in an exemplary embodiment of a graphics processing engine (GPE).
[0038] Fig.25 A block diagram illustrating a graphics processor instruction format according to an exemplary embodiment.
[0039] Fig.26 A block diagram illustrating an exemplary embodiment of a graphics processor is shown.
[0040] Fig.27A A block diagram illustrates a graphics processor command format according to an exemplary embodiment.
[0041] Fig.27B A block diagram illustrating a graphics processor command sequence according to an exemplary embodiment.
[0042] Fig.28 An exemplary graphical software architecture of a data processing system according to an exemplary embodiment is shown.
[0043] Fig.29 A block diagram of an IP core development system that may be used to fabricate an integrated circuit (IC) to perform operations according to an exemplary embodiment is shown.
[0044] Fig.30 A block diagram is shown of an exemplary system-on-chip IC that may be fabricated using one or more IP cores according to an exemplary embodiment.
[0045] Fig.31 A block diagram illustrates an exemplary graphics processor for a system-on-chip IC that may be fabricated using one or more IP cores in accordance with an exemplary embodiment.
[0046] Fig.32 A block diagram illustrates an exemplary add-on graphics processor for a system-on-chip IC that may be fabricated using one or more IP cores in accordance with an exemplary embodiment. DETAILED DESCRIPTION
[0047] In some embodiments, a graphics processing unit (GPU) is communicatively coupled to a host / processor core to accelerate graphics operations, machine learning operations, pattern analysis operations, and various general purpose GPU (GPGPU) functions. The GPU can be communicatively coupled to the host processor / core via a bus or another interconnect (e.g., a high-speed interconnect such as PCIe or NVLink). In other embodiments, the GPU can be integrated with the core on the same package or chip and communicatively coupled to the core via an internal processor bus / interconnect (i.e., inside the package or chip). Regardless of the method used to connect the GPU, the processor core can assign work to the GPU in the form of a sequence of commands / instructions contained in a work descriptor. The GPU then uses dedicated circuits / logic to efficiently process these commands / instructions.
[0048] In some embodiments, the image capture device is a standalone device. However, the image capture device may be a subcomponent or part of another computing device that requires image capture capabilities, such as a portable or handheld computing device with a digital camera that captures images.
[0049] In the following description, many specific details are set forth to provide a more comprehensive understanding. However, it will be appreciated that the embodiments described herein can be practiced without one or more of these specific details. In other instances, well-known features have not been described to avoid confusing the details of the exemplary embodiments.
[0050] Computing System Overview Figure 1 1 is a block diagram illustrating a computing system 100 configured to implement one or more aspects of the embodiments described herein. The computing system 100 includes a processing subsystem 101 having one or more processors 102 and a system memory 104, the one or more processors 102 communicating with the system memory 104 via an interconnect path that may include a memory hub 105. The memory hub 105 may be a separate component within a chipset component, or may be integrated within the one or more processors 102. The memory hub 105 is coupled to an I / O subsystem 111 via a communication link 106. The I / O subsystem 111 includes an I / O hub 107, which may enable the computing system 100 to receive input from one or more input devices 108. Additionally, the I / O hub 107 may enable a display controller, which may be included in the one or more processors 102, to provide output to one or more display devices 110A. In one embodiment, the one or more display devices 110A coupled to the I / O hub 107 may include local, internal, or embedded display devices.
[0051] In one embodiment, the processing subsystem 101 includes one or more parallel processors 112, which are coupled to the memory hub 105 via a bus or other communication link 113. The communication link 113 can be one of any number of standard-based communication link technologies or protocols (such as, but not limited to, PCI Express), or can be a vendor-specific communication interface or communication structure. In one embodiment, the one or more parallel processors 112 form a computationally focused parallel or vector processing system that includes a large number of processing cores and / or processing clusters (such as, integrated many-core (MIC) processors). In one embodiment, the one or more parallel processors 112 form a graphics processing subsystem that can output pixels to one of one or more display devices 110A coupled via the I / O hub 107. The one or more parallel processors 112 can also include a display controller and display interface (not shown) to enable direct connection with one or more display devices 110B.
[0052] Within the I / O subsystem 111, a system storage unit 114 may be connected to the I / O hub 107 to provide a storage mechanism for the computing system 100. An I / O switch 116 may be used to provide an interface mechanism to enable connection between the I / O hub 107 and other components such as a network adapter 118 and / or a wireless network adapter 119 that may be integrated into the platform, and various other devices that may be added via one or more add-in devices 120. The network adapter 118 may be an Ethernet adapter or another wired network adapter. The wireless network adapter 119 may include one or more of the following: Wi-Fi, Bluetooth, near field communication (NFC), or other network devices including one or more wireless radios.
[0053] Computing system 100 may include other components not explicitly shown, including USB or other port connections, optical storage drives, video capture devices, and the like, which may also be connected to I / O hub 107. Figure 1 The communication paths interconnecting the various components in the system may be implemented using any suitable protocol, such as a PCI (Peripheral Component Interconnect) based protocol (e.g., PCI Express) or any other bus or point-to-point communication interface and / or protocol, such as the NV-Link high-speed interconnect, or an interconnect protocol known in the art.
[0054] In one embodiment, the one or more parallel processors 112 incorporate circuits optimized for graphics and video processing (including, for example, video output circuits) and constitute a graphics processing unit (GPU). In another embodiment, the one or more parallel processors 112 incorporate circuits optimized for general processing while maintaining the underlying computing architecture described in more detail herein. In yet another embodiment, the components of the computing system 100 may be integrated on a single integrated circuit with one or more other system elements. For example, the one or more parallel processors 112, the memory hub 105, (one or more) processors 102, and the I / O hub 107 may be integrated into a system on chip (SoC) integrated circuit. Alternatively, the components of the computing system 100 may be integrated into a single package to form a system in package (SIP) configuration. In one embodiment, at least a portion of the components of the computing system 100 may be integrated into a multi-chip module (MCM), which may be interconnected with other multi-chip modules into a modular computing system.
[0055] It will be appreciated that the computing system 100 shown herein is illustrative, and variations and modifications are possible. The connection topology, including the number and arrangement of bridges, the number of processors 102, and the number of parallel processors 112, may be modified as desired. For example, in some embodiments, the system memory 104 is connected to the processors 102 directly rather than through a bridge, while other devices communicate with the system memory 104 and the processors 102 via the memory hub 105. In other alternative topologies, the parallel processors 112 are connected to the I / O hub 107 or directly to one of the processors 102 rather than to the memory hub 105. In other embodiments, the I / O hub 107 and the memory hub 105 may be integrated into a single chip. Some embodiments may include two or more groups of processors 102 attached via multiple sockets, which may be coupled to two or more instances of the parallel processors 112.
[0056] Some of the specific components shown herein are optional and may not be included in all implementations of computing system 100. For example, any number of plug-in cards or peripherals may be supported, or some components may be eliminated. Figure 1 Some architectures may use different terminology for components similar to those shown in FIG. 1. For example, in some architectures, memory hub 105 may be referred to as a north bridge, while I / O hub 107 may be referred to as a south bridge.
[0057] Figure 2A 2 is a diagram showing a parallel processor 200 according to an exemplary embodiment. The various components of the parallel processor 200 may be implemented using one or more integrated circuit devices, such as a programmable processor, an application specific integrated circuit (ASIC), or a field programmable gate array (FPGA). Figure 1 A variation of one or more parallel processors 112 is shown in FIG.
[0058] In one embodiment, parallel processor 200 includes parallel processing unit 202. The parallel processing unit includes I / O unit 204, which can enable communication with other devices (including other instances of parallel processing unit 202). I / O unit 204 can be directly connected to other devices. In one embodiment, I / O unit 204 is connected to other devices via the use of a hub or switch interface (such as memory hub 105). The connection between memory hub 105 and I / O unit 204 forms communication link 113. Within parallel processing unit 202, I / O unit 204 is connected to host interface 206 and memory crossbar 216, wherein host interface 206 receives commands for performing processing operations and memory crossbar 216 receives commands for performing memory operations.
[0059] When the host interface 206 receives the command buffer via the I / O unit 204, the host interface 206 can direct the work operations for executing those commands to the front end 208. In one embodiment, the front end 208 is coupled with a scheduler 210, which is configured to distribute commands or other work items to the processing cluster array 212. In one embodiment, the scheduler 210 ensures that the processing cluster array 212 is properly configured and in a valid state before tasks are distributed to the processing clusters of the processing cluster array 212. In one embodiment, the scheduler 210 is implemented via firmware logic executed on a microcontroller. The microcontroller-implemented scheduler 210 can be configured to perform complex scheduling and work distribution operations at coarse and fine granularity, thereby achieving context switching and rapid preemption of threads executed on the processing array 212. In one embodiment, the host software can verify that the workload is scheduled on the processing array 212 via one of a plurality of graphics processing doorbells. The workload can then be automatically distributed across the processing array 212 by the scheduler 210 logic within the scheduler microcontroller.
[0060] The processing cluster array 212 may include up to "N" processing clusters (e.g., cluster 214A, cluster 214B, up to cluster 214N). Each cluster 214A-214N of the processing cluster array 212 may execute a large number of concurrent threads. The scheduler 210 may allocate work to the clusters 214A-214N of the processing cluster array 212 using various scheduling and / or work distribution algorithms, which may vary depending on the workload generated for each type of program or calculation. Scheduling may be handled dynamically by the scheduler 210, or may be assisted in part by compiler logic during the compilation of program logic configured for execution by the processing cluster array 212. In one embodiment, different clusters 214A-214N of the processing cluster array 212 may be allocated to process different types of programs, or to perform different types of calculations.
[0061] Processing cluster array 212 may be configured to perform various types of parallel processing operations. In one embodiment, processing cluster array 212 is configured to perform general-purpose parallel computing operations. For example, processing cluster array 212 may include logic for performing processing tasks including filtering video and / or audio data, performing modeling operations (including physics operations), and performing data transformations.
[0062] In one embodiment, processing cluster array 212 is configured to perform parallel graphics processing operations. In embodiments where parallel processor 200 is configured to perform graphics processing operations, processing cluster array 212 may include additional logic for supporting the execution of such graphics processing operations, including but not limited to texture sampling logic for performing texture operations, and tessellation logic and other vertex processing logic. In addition, processing cluster array 212 may be configured to execute graphics processing related shader programs, such as but not limited to vertex shaders, tessellation shaders, geometry shaders, and pixel shaders. Parallel processing unit 202 may transfer data from system memory via I / O unit 204 for processing. During processing, the transferred data may be stored in on-chip memory (e.g., parallel processor memory 222) during processing and then written back to system memory.
[0063] In one embodiment, when parallel processing unit 202 is used to perform graphics processing, scheduler 210 can be configured to divide the processing workload into tasks of approximately equal size to better achieve the distribution of graphics processing operations to multiple clusters 214A-214N of processing cluster array 212. In some embodiments, portions of processing cluster array 212 can be configured to perform different types of processing. For example, a first portion can be configured to perform vertex shading and topology generation, a second portion can be configured to perform tessellation and geometry shading, and a third portion can be configured to perform pixel shading or other screen space operations to produce a rendered image for display. Intermediate data generated by one or more of clusters 214A-214N can be stored in a buffer to allow the intermediate data to be transferred between clusters 214A-214N for further processing.
[0064] During operation, the processing cluster array 212 may receive processing tasks to be performed via the scheduler 210, which receives commands defining the processing tasks from the front end 208. For graphics processing operations, the processing tasks may include commands and state parameters defining how data is to be processed (e.g., what program is to be executed) and indices of data to be processed, such as surface (patch) data, primitive data, vertex data, and / or pixel data. The scheduler 210 may be configured to extract the index corresponding to the task, or may receive the index from the front end 208. The front end 208 may be configured to ensure that the processing cluster array 212 is configured to a valid state before initiating a workload specified by an incoming command buffer (e.g., a batch buffer, a push buffer, etc.).
[0065] Each of the one or more instances of the parallel processing unit 202 may be coupled to a parallel processor memory 222. The parallel processor memory 222 may be accessed via a memory crossbar 216, which may receive memory requests from the processing cluster array 212 and the I / O unit 204. The memory crossbar 216 may access the parallel processor memory 222 via a memory interface 218. The memory interface 218 may include a plurality of partition units (e.g., partition unit 220A, partition unit 220B, up to partition unit 220N), which may each be coupled to a portion (e.g., memory unit) of the parallel processor memory 222. In one implementation, the number of partition units 220A-220N is configured to be equal to the number of memory units, such that the first partition unit 220A has a corresponding first memory unit 224A, the second partition unit 220B has a corresponding memory unit 224B, and the Nth partition unit 220N has a corresponding Nth memory unit 224N. In other embodiments, the number of partition units 220A-220N may not be equal to the number of memory devices.
[0066] In various embodiments, the memory units 224A-224N may include various types of memory devices, including dynamic random access memory (DRAM) or graphics random access memory, such as synchronous graphics random access memory (SGRAM), including graphics double data rate (GDDR) memory. In one embodiment, the memory units 224A-224N may also include 3D stacked memory, including but not limited to high bandwidth memory (HBM). Those skilled in the art will recognize that the specific implementation of the memory units 224A-224N may vary and may be selected from one of various conventional designs. Rendering targets, such as frame buffers or texture maps, may be stored across the memory units 224A-224N, allowing the partition units 220A-220N to write portions of each rendering target in parallel to efficiently use the available bandwidth of the parallel processor memory 222. In some embodiments, local instances of the parallel processor memory 222 may be excluded to facilitate a unified memory design that utilizes system memory along with local cache memory.
[0067] In one embodiment, any of the clusters 214A-214N of the processing cluster array 212 can process data to be written to any of the memory units 224A-224N within the parallel processor memory 222. The memory crossbar 216 can be configured to transfer the output of each cluster 214A-214N to any partition unit 220A-220N or another cluster 214A-214N, which can perform additional processing operations on the output. Each cluster 214A-214N can communicate with the memory interface 218 through the memory crossbar 216 to read from or write to various external memory devices. In one embodiment, the memory crossbar 216 has a connection to the memory interface 218 to communicate with the I / O unit 204, as well as a connection to a local instance of the parallel processor memory 222, thereby enabling the processing units within different processing clusters 214A-214N to communicate with the system memory or other memory that is not local to the parallel processing unit 202. In one embodiment, the memory crossbar switch 216 may use virtual channels to separate traffic flows between the clusters 214A-214N and the partition units 220A-220N.
[0068] Although a single instance of parallel processing unit 202 is shown within parallel processor 200, any number of instances of parallel processing unit 202 may be included. For example, multiple instances of parallel processing unit 202 may be provided on a single plug-in card, or multiple plug-in cards may be interconnected. Different instances of parallel processing unit 202 may be configured to interoperate even if the different instances have different numbers of processing cores, different amounts of local parallel processor memory, and / or other configuration differences. For example and in one embodiment, some instances of parallel processing unit 202 may include higher precision floating point units relative to other instances. Systems incorporating one or more instances of parallel processing unit 202 or parallel processor 200 may be implemented in a variety of configurations and form factors, including but not limited to desktop computers, laptop computers, or handheld personal computers, servers, workstations, game consoles, and / or embedded systems.
[0069] Figure 2B is a block diagram of partition unit 220 according to an exemplary embodiment. In one embodiment, partition unit 220 is Figure 2A an instance of one of partition units 220A - 220N. As shown, partition unit 220 includes L2 cache 221, frame buffer interface 225, and ROP 226 (raster operation unit). L2 cache 221 is a read / write cache configured to perform load and store operations received from memory crossbar 216 and ROP 226. Read misses and urgent writeback requests are output from L2 cache 221 to frame buffer interface 225 for processing. Updates may also be sent to the frame buffer via frame buffer interface 225 for processing. In one embodiment, frame buffer interface 225 interfaces with one of the memory units in the parallel processor memory, such as memory units 224A - 224N of FIG. 2 (e.g., within parallel processor memory 222).
[0070] In a graphics application, ROP 226 is a processing unit that performs raster operations such as stencil, z-test, and blending. Subsequently, ROP 226 outputs the processed graphics data stored in the graphics memory. In some embodiments, ROP 226 includes compression logic for compressing depth or color data written to memory and decompressing depth or color data read from memory. The compression logic may be lossless compression logic utilizing one or more of a variety of compression algorithms. The type of compression performed by ROP 226 may vary based on the statistical characteristics of the data to be compressed. For example, in one embodiment, delta color compression is performed on depth and color data on a per-tile basis.
[0071] In some embodiments, ROP 226 is included within each processing cluster (e.g., clusters 214A-214N of FIG. 2 ) rather than within partition unit 220. In such embodiments, read and write requests for pixel data rather than pixel fragment data are routed through memory crossbar 216. The processed graphics data may be displayed on a display device (e.g., Figure 1 10), is routed for further processing by (one or more) processors 102, or is routed for Figure 2A for further processing by one of the processing entities within the parallel processor 200.
[0072] Figure 2C It is a block diagram of a processing cluster 214 in a parallel processing unit according to an exemplary embodiment. In one embodiment, the processing cluster is an instance of one of the processing clusters 214A-214N of Figure 2. The processing cluster 214 can be configured to execute many threads in parallel, wherein the term "thread" refers to an instance of a specific program executed on a specific set of input data. In some embodiments, without providing multiple independent instruction units, a single instruction multiple data (SIMD) instruction issuance technology is used to support the parallel execution of a large number of threads. In other embodiments, a public instruction unit configured to issue instructions to a group of processing engines in each of the processing clusters is used, and a single instruction multiple thread (SIMT) technology is used to support the parallel execution of a large number of generally synchronized threads. Different from the SIMD execution regime (wherein all processing engines usually execute the same instruction), SIMT execution allows different threads to more easily follow divergent execution paths through a given thread program. It will be appreciated by those skilled in the art that the SIMD processing regime represents a functional subset of the SIMT processing regime.
[0073] The operation of the processing cluster 214 can be controlled via a pipeline manager 232, which distributes processing tasks to SIMT parallel processors. The pipeline manager 232 receives instructions from the scheduler 210 of Figure 2, and manages the execution of those instructions via a graphics multiprocessor 234 and / or a texture unit 236. The illustrated graphics multiprocessor 234 is an exemplary instance of a SIMT parallel processor. However, various types of SIMT parallel processors of different architectures may be included in the processing cluster 214. One or more instances of the graphics multiprocessor 234 may be included in the processing cluster 214. The graphics multiprocessor 234 may process data, and the data crossbar 240 may be used to distribute the processed data to one of a plurality of possible destinations (including other shader units). The pipeline manager 232 may facilitate the distribution of processed data by specifying the destination for the processed data to be distributed via the data crossbar 240.
[0074] Each graphics multiprocessor 234 within a processing cluster 214 may include the same set of function execution logic (e.g., arithmetic logic units, load-store units, etc.). The function execution logic may be configured in a pipelined manner, with which a new instruction may be issued before a previous instruction is completed. The function execution logic supports a variety of operations, including integer and floating point arithmetic, comparison operations, Boolean operations, bit shifts, and calculation of various algebraic functions. In one embodiment, the same functional unit hardware may be utilized to perform different operations, and any combination of functional units may be present.
[0075] The instructions transmitted to the processing cluster 214 constitute threads. A group of threads executed across a group of parallel processing engines is a thread group. A thread group executes the same program on different input data. Each thread in a thread group can be assigned to a different processing engine in the graphics multiprocessor 234. A thread group can include fewer threads than the number of processing engines in the graphics multiprocessor 234. When a thread group includes fewer threads than the number of processing engines, one or more of the processing engines can be idle during the cycle in which the thread group is being processed. A thread group can also include more threads than the number of processing engines in the graphics multiprocessor 234. When a thread group includes more threads than the number of processing engines in the graphics multiprocessor 234, processing can be performed through continuous clock cycles. In one embodiment, multiple thread groups can be executed concurrently on the graphics multiprocessor 234.
[0076] In one embodiment, the graphics multiprocessor 234 includes an internal cache memory for performing load and store operations. In one embodiment, the graphics multiprocessor 234 can abandon the internal cache and use the cache memory (e.g., L1 cache 248) within the processing cluster 214. Each graphics multiprocessor 234 also has access to the L2 cache within the partition unit (e.g., partition unit 220A-220N of Figure 2) that can be used to transfer data between threads and shared among all processing clusters 214. The graphics multiprocessor 234 can also access off-chip global memory, which can include one or more of the local parallel processor memory and / or system memory. Any memory outside the parallel processing unit 202 can be used as global memory. Embodiments (wherein the processing cluster 214 includes multiple instances of the graphics multiprocessor 234) can share common instructions and data, which can be stored in the L1 cache 248.
[0077] Each processing cluster 214 may include an MMU 245 (memory management unit) configured to map virtual addresses into physical addresses. In other embodiments, one or more instances of the MMU 245 may reside within the memory interface 218 of FIG. 2 . The MMU 245 includes: a set of page table entries (PTEs) for mapping virtual addresses of tiles (more on tiling) to physical addresses; and optionally a cache line index. The MMU 245 may include an address translation lookaside buffer (TLB) or cache that may reside within the graphics multiprocessor 234 or L1 cache or processing cluster 214. Physical addresses are processed to distribute surface data access locality, thereby allowing efficient request interleaving among partition units. The cache line index can be used to determine whether a request for a cache line is a hit or a miss.
[0078] In graphics and computing applications, the processing clusters 214 may be configured such that each graphics multiprocessor 234 is coupled to a texture unit 236 for performing texture mapping operations, such as determining texture sample locations, reading texture data, and filtering texture data. Texture data is read from an internal texture L1 cache (not shown) or in some embodiments from an L1 cache within the graphics multiprocessor 234, and the texture data is fetched from an L2 cache, local parallel processor memory, or system memory, as needed. Each graphics multiprocessor 234 outputs processed tasks to a data crossbar 240 to provide the processed tasks to another processing cluster 214 for further processing or to store the processed tasks in an L2 cache, local parallel processor memory, or system memory via a memory crossbar 216. A preROP 242 (e.g., a pre-raster operation unit) is configured to receive data from the graphics multiprocessor 234, direct the data to a ROP unit, which may be located with a partition unit (e.g., partition units 220A-220N of FIG. 2 ) as described herein. The preROP 242 unit may perform optimizations for color blending, organize pixel color data, and perform address translations.
[0079] It will be appreciated that the core architecture described herein is illustrative and that variations and modifications are possible. Any number of processing units (e.g., graphics multiprocessor 234, texture unit 236, preROP 242, etc.) may be included within processing cluster 214. Furthermore, while only one processing cluster 214 is shown, a parallel processing unit as described herein may include any number of instances of processing cluster 214. In one embodiment, each processing cluster 214 may be configured to operate independently of other processing clusters 214 using separate and distinct processing units, L1 caches, etc.
[0080] Figure 2DA graphics multiprocessor 234 is shown according to an exemplary embodiment. In such an embodiment, the graphics multiprocessor 234 is coupled to the pipeline manager 232 of the processing cluster 214. The graphics multiprocessor 234 has an execution pipeline that includes, but is not limited to, an instruction cache 252, an instruction unit 254, an address mapping unit 256, a register file 258, one or more general purpose graphics processing unit (GPGPU) cores 262, and one or more load / store units 266. The GPGPU cores 262 and the load / store units 266 are coupled to a cache memory 272 and a shared memory 270 via a memory and cache interconnect 268.
[0081] In one embodiment, the instruction cache 252 receives a stream of instructions to be executed from the pipeline manager 232. The instructions are cached in the instruction cache 252 and dispatched by the instruction unit 254 for execution. The instruction unit 254 can dispatch instructions into thread groups (e.g., warps), where each thread of the thread group is assigned to a different execution unit within the GPGPU core 262. Instructions can access any of the local, shared, or global address spaces by specifying an address within the unified address space. The address mapping unit 256 can be used to convert addresses in the unified address space into different memory addresses that can be accessed by the load / store unit 266.
[0082] The register file 258 provides a set of registers for the functional units of the graphics multiprocessor 234. The register file 258 provides temporary storage for operands for the data paths of the functional units (e.g., GPGPU core 262, load / store unit 266) connected to the graphics multiprocessor 234. In one embodiment, the register file 258 is divided between each of the functional units so that each functional unit is allocated a dedicated portion of the register file 258. In one embodiment, the register file 258 is divided between different warps executed by the graphics multiprocessor 234.
[0083] The GPGPU cores 262 may each include a floating point unit (FPU) and / or an integer arithmetic logic unit (ALU), the FPU and integer ALU being used to execute instructions of the graphics multiprocessor 234. Depending on the embodiment, the GPGPU cores 262 may be similar in architecture, or may be different in architecture. For example and in one embodiment, the first portion of the GPGPU core 262 includes a single-precision FPU and an integer ALU, while the second portion of the GPGPU core includes a double-precision FPU. In one embodiment, the FPU may implement the IEEE 754-2008 standard for floating-point arithmetic, or may be capable of implementing variable-precision floating-point arithmetic. The graphics multiprocessor 234 may additionally include one or more fixed-function or special-function units to perform specific functions (such as copying rectangles or pixel blending operations). In one embodiment, one or more of the GPGPU cores may also include fixed or special-function logic.
[0084] In one embodiment, GPGPU core 262 includes SIMD logic capable of executing a single instruction to multiple groups of data. In one embodiment, GPGPU core 262 can physically execute SIMD4, SIMD8 and SIMD16 instructions, and logically execute SIMD1, SIMD2 and SIMD32 instructions. SIMD instructions for GPGPU core can be generated by shader compiler at compile time, or can be automatically generated when executing a program written and compiled for single program multiple data (SPMD) or SIMT architecture. Multiple threads of a program configured for SIMT execution model can be executed via a single SIMD instruction. For example and in one embodiment, eight SIMT threads performing the same or similar operation can be executed in parallel via a single SIMD8 logic unit.
[0085] The memory and cache interconnect 268 is an interconnect network that connects each of the functional units of the graphics multiprocessor 234 to the register file 258 and to the shared memory 270. In one embodiment, the memory and cache interconnect 268 is a crossbar interconnect that allows the load / store unit 266 to implement load and store operations between the shared memory 270 and the register file 258. The register file 258 can operate at the same frequency as the GPGPU core 262, so that data transfer between the GPGPU core 262 and the register file 258 is very low latency. The shared memory 270 can be used to implement communication between threads executing on the functional units within the graphics multiprocessor 234. The cache memory 272 can be used, for example, as a data cache to cache texture data transferred between the functional units and the texture unit 236. The shared memory 270 can also be used as a program-managed cache (cached). Threads executing on the GPGPU core 262 can programmatically store data in the shared memory in addition to the automatically cached data stored in the cache memory 272.
[0086] Figure 3A-3B Additional graphics multiprocessors are shown according to an exemplary embodiment. The graphics multiprocessors 325, 350 shown are Figure 2C The illustrated graphics multiprocessors 325, 350 may be configured as streaming multiprocessors (SMs) capable of executing a large number of execution threads simultaneously.
[0087] Figure 3A A graphics multiprocessor 325 is shown according to an additional exemplary embodiment. The graphics multiprocessor 325 includes Figure 2D The graphics multiprocessor 325 may include multiple additional instances of execution resource units of the graphics multiprocessor 234. For example, the graphics multiprocessor 325 may include multiple instances of instruction units 332A-332B, register files 334A-334B, and (one or more) texture units 344A-344B. The graphics multiprocessor 325 also includes multiple groups of graphics or compute execution units (e.g., GPGPU cores 336A-336B, GPGPU cores 337A-337B, GPGPU cores 338A-338B) and multiple groups of load / store units 340A-340B. In one embodiment, the execution resource units have a common instruction cache 330, texture and / or data cache memory 342, and shared memory 346.
[0088] Various components may communicate via interconnect structure 327. In one embodiment, interconnect structure 327 includes one or more crossbar switches to enable communication between various components of graphics multiprocessor 325. In one embodiment, interconnect structure 327 is a separate high-speed network fabric layer on which each component of graphics multiprocessor 325 is stacked. Components of graphics multiprocessor 325 communicate with remote components via interconnect structure 327. For example, GPGPU cores 336A-336B, 337A-337B, and 338A-338B may each communicate with shared memory 346 via interconnect structure 327. Interconnect structure 327 may arbitrate communications within graphics multiprocessor 325 to ensure fair bandwidth allocation between components.
[0089] Figure 3B 350 according to an additional exemplary embodiment. The graphics processor includes multiple sets of execution resources 356A-356D, wherein each set of execution resources includes multiple instruction units, register files, GPGPU cores, and load storage units, such as Figure 2D and Figure 3A . Execution resources 356A-356D may work in concert with texture unit(s) 360A-360D for texture operations while sharing instruction cache 354 and shared memory 362. In one embodiment, execution resources 356A-356D may share instruction cache 354 and shared memory 362, as well as multiple instances of texture and / or data cache memory 358A-358B. The various components may be communicated via a communication protocol similar to Figure 3A The interconnect structure 327 and the interconnect structure 352 communicate with each other.
[0090] Those skilled in the art will understand that Figure 1 , 2A The architectures described in Figures 2-2D and 3A-3B are illustrative and non-restrictive with respect to the scope of the exemplary present embodiment. Thus, without departing from the scope of the embodiments described herein, the techniques described herein may be implemented on any properly configured processing unit, including but not limited to one or more mobile application processors, one or more desktop or server central processing units (CPUs) (including multi-core CPUs), one or more parallel processing units (such as parallel processing unit 202 of Figure 2), and one or more graphics processors or special processing units.
[0091] In some embodiments, a parallel processor or GPGPU as described herein is communicatively coupled to a host / processor core to accelerate graphics operations, machine learning operations, pattern analysis operations, and various general-purpose GPU (GPGPU) functions. The GPU may be communicatively coupled to a host processor / core via a bus or other interconnect (e.g., a high-speed interconnect such as PCIe or NVLink). In other embodiments, the GPU may be integrated with the core on the same package or chip and communicatively coupled to the core via an internal processor bus / interconnect (i.e., inside the package or chip). Regardless of the method used to connect the GPU, the processor core may take the form of a sequence of commands / instructions contained in a work descriptor to assign work to the GPU. The GPU then uses dedicated circuits / logic to efficiently process these commands / instructions.
[0092] Technologies for interconnecting GPUs with host processors Figure 4A An exemplary architecture is shown in which multiple GPUs 410-413 are communicatively coupled to multiple multi-core processors 405-406 via high-speed links 440-443 (e.g., buses, point-to-point interconnects, etc.). In one embodiment, the high-speed links 440-443 support 4GB / s, 30GB / s, 80GB / s, or higher communication throughputs, depending on the implementation. Various interconnect protocols may be used, including but not limited to PCIe 4.0 or 5.0 and NVLink 2.0. However, the underlying principles of the invention are not limited to any particular communication protocol or throughput.
[0093] Additionally, in one embodiment, two or more of the GPUs 410-413 are interconnected via high-speed links 444-445, which may be implemented using the same or different protocols / links as used for high-speed links 440-443. Similarly, two or more of the multi-core processors 405-406 may be connected via high-speed link 433, which may be a symmetric multiprocessor (SMP) bus operating at 20 GB / s, 30 GB / s, 120 GB / s, or higher. Alternatively, Figure 4A All communications between the various system components shown in can be accomplished using the same protocol / links (eg, through a common interconnect structure). However, as mentioned, the underlying principles of the invention are not limited to any particular type of interconnect technology.
[0094] In one embodiment, each multi-core processor 405-406 is communicatively coupled to processor memory 401-402 via memory interconnects 430-431, respectively, and each GPU 410-413 is communicatively coupled to GPU memory 420-423 via GPU memory interconnects 450-453, respectively. Memory interconnects 430-431 and 450-453 may utilize the same or different memory access technologies. By way of example and not limitation, processor memory 401-402 and GPU memory 420-423 may be volatile memory, such as dynamic random access memory (DRAM) (including stacked DRAM), graphics DDR SDRAM (GDDR) (e.g., GDDR5, GDDR6), or high bandwidth memory (HBM), and / or may be non-volatile memory, such as 3DXPoint or Nano-Ram. In one embodiment, a portion of the memory may be volatile memory, and another portion may be non-volatile memory (e.g., using a two-level memory (2LM) hierarchy).
[0095] As described below, although the various processors 405-406 and GPUs 410-413 may be physically coupled to specific memories 401-402, 420-423, respectively, a unified memory architecture may be implemented in which the same virtual system address space (also referred to as an "effective address" space) is distributed among all of the various physical memories. For example, the processor memories 401-402 may each include 64GB of system memory address space, and the GPU memories 420-423 may each include 32GB of system memory address space (yielding a total of 256GB of addressable memory in this example).
[0096] Figure 4B Additional details of the interconnection between the multi-core processor 407 and the graphics acceleration module 446 according to one exemplary embodiment are shown. The graphics acceleration module 446 may include one or more GPU chips integrated on a line card that is coupled to the processor 407 via a high-speed link 440. Alternatively, the graphics acceleration module 446 may be integrated with the processor 407 on the same package or chip.
[0097] The processor 407 shown includes multiple cores 460A-460D, each of which has a conversion lookaside buffer 461A-461D and one or more caches 462A-462D. The core may include various other components (e.g., instruction fetch unit, branch prediction unit, decoder, execution unit, reorder buffer, etc.) for executing instructions and processing data, which are not shown to avoid confusing the underlying principles of the present invention. Caches 462A-462D may include level 1 (L1) and level 2 (L2) caches. In addition, one or more shared caches 426 may be included in the cache hierarchy and shared by multiple groups of cores 460A-460D. For example, one embodiment of the processor 407 includes 24 cores, each of which has its own L1 cache, twelve shared L2 caches, and twelve shared L3 caches. In this embodiment, one of the L2 and L3 caches is shared by two adjacent cores. The processor 407 and the graphics accelerator integrated module 446 are connected to the system memory 441, which may include the processor memories 401-402.
[0098] Coherence is maintained for data and instructions stored in the various caches 462A-462D, 456, and the system memory 441 via inter-core communications over the coherence bus 464. For example, each cache may have cache coherence logic / circuitry associated therewith to communicate over the coherence bus 464 in response to a detected read or write to a particular cache line. In one implementation, a cache snooping protocol is implemented over the coherence bus 464 to snoop cache accesses. Cache snooping / coherence techniques are well understood by those skilled in the art and will not be described in detail herein to avoid obscuring the underlying principles of the present invention.
[0099] In one embodiment, the proxy circuit 425 communicatively couples the graphics acceleration module 446 to the coherence bus 464, thereby allowing the graphics acceleration module 446 to participate in the cache coherence protocol as a peer of the core. Specifically, the interface 435 provides connectivity to the proxy circuit 425 through a high-speed link 440 (e.g., a PCIe bus, NVLink, etc.), and the interface 437 connects the graphics acceleration module 446 to the link 440.
[0100] In one implementation, the accelerator integrated circuit 436 provides cache management, memory access, context management, and interrupt management services on behalf of the multiple graphics processing engines 431, 432, N of the graphics acceleration module 446. The graphics processing engines 431, 432, N may each include a separate graphics processing unit (GPU). Alternatively, the graphics processing engines 431, 432, N may include different types of graphics processing engines within the GPU, such as a graphics execution unit, a media processing engine (e.g., a video encoder / decoder), a sampler, and a bit engine. In other words, the graphics acceleration module may be a GPU with multiple graphics processing engines 431-432, N, or the graphics processing engines 431-432, N may be individual GPUs integrated on a common package, line card, or chip.
[0101] In one embodiment, the accelerator integrated circuit 436 includes a memory management unit (MMU) 439 for performing various memory management functions, such as virtual to physical memory translation (also known as effective to real memory translation) and memory access protocols for accessing the system memory 441. The MMU 439 may also include a translation lookaside buffer (TLB) (not shown) for caching virtual / effective to physical / real address translations. In one implementation, the cache 438 stores commands and data for efficient access by the graphics processing engines 431-432, N. In one embodiment, the data stored in the cache 438 and the graphics memory 433-434, N is kept consistent with the core caches 462A-462D, 456 and the system memory 411. As mentioned, this may be accomplished via proxy circuitry 425, which participates in cache coherence mechanisms on behalf of cache 438 and memories 433-434, N (e.g., sending updates to cache 438 (related to modifications / accesses of cache lines on processor caches 462A-462D, 456) and receiving updates from cache 438).
[0102] A set of registers 445 stores context data for threads executed by the graphics processing engines 431-432, N, and context management circuitry 448 manages thread contexts. For example, context management circuitry 448 may perform save and restore operations during context switches to save and restore contexts for various threads (e.g., where a first thread is saved and a second thread is stored so that the second thread can be executed by the graphics processing engine). For example, upon context switching, context management circuitry 448 may store current register values to a designated (e.g., identified by a context pointer) area in memory. It may then restore the register values upon returning to the context. In one embodiment, interrupt management circuitry 447 receives and processes interrupts received from system devices.
[0103] In one implementation, the virtual / effective addresses from the graphics processing engine 431 are translated into real / physical addresses in the system memory 411 by the MMU 439. One embodiment of the accelerator integrated circuit 436 supports multiple (e.g., 4, 8, 16) graphics accelerator modules 446 and / or other accelerator devices. The graphics accelerator module 446 may be dedicated to a single application executed on the processor 407, or may be shared between multiple applications. In one embodiment, a virtualized graphics execution environment is presented in which the resources of the graphics processing engines 431-432, N are shared with multiple applications or virtual machines (VMs). The resources may be subdivided into "slices" that are allocated to different VMs and / or applications based on the processing requirements and priorities associated with the VMs and / or applications.
[0104] Thus, the accelerator integrated circuit acts as a bridge to the system for the graphics acceleration module 446 and provides address translation and system memory cache services. In addition, the accelerator integrated circuit 436 can provide virtualization facilities for the host processor to manage interrupts, memory management, and virtualization of the graphics processing engine.
[0105] Because the hardware resources of the graphics processing engines 431-432, N are explicitly mapped to the real address space seen by the host processor 407, any host processor can directly address these resources using effective address values. In one embodiment, one function of the accelerator integrated circuit 436 is the physical separation of the graphics processing engines 431-432, N so that they appear to the system as independent units.
[0106] As mentioned, in the illustrated embodiment, one or more graphics memories 433-434, M are respectively coupled to each of the graphics processing engines 431-432, N. The graphics memories 433-434, M store instructions and data being processed by each of the graphics processing engines 431-432, N. The graphics memories 433-434, M may be volatile memory, such as DRAM (including stacked DRAM), GDDR memory (e.g., GDDR5, GDDR6), or HBM, and / or may be non-volatile memory, such as 3D XPoint or Nano-Ram.
[0107] In one embodiment, to reduce data traffic on link 440, biasing techniques are used to ensure that the data stored in graphics memory 433-434, M is data that will be used most frequently by graphics processing engines 431-432, N and preferably not used (at least not frequently) by cores 460A-460D. Similarly, the biasing mechanism attempts to keep data needed by a core (and preferably not graphics processing engines 431-432, N) within system memory 411 and the core's cache 462A-462D, 456.
[0108] Figure 4C Another exemplary embodiment is shown in which an accelerator integrated circuit 436 is integrated within the processor 407. In this embodiment, the graphics processing engines 431-432, N communicate directly with the accelerator integrated circuit 436 via the interface 437 and the interface 435 (which again can utilize any form of bus or interface protocol) through the high-speed link 440. The accelerator integrated circuit 436 can perform operations with respect to the Figure 4B The same operations as those described, but at potentially higher throughput given their close proximity to the coherency bus 462 and caches 462A-462D, 426.
[0109] One embodiment supports different programming models, including a dedicated process programming model (without graphics acceleration module virtualization) and a shared programming model (with virtualization). The latter may include a programming model controlled by accelerator integrated circuit 436 and a programming model controlled by graphics acceleration module 446.
[0110] In one embodiment of a dedicated process model, the graphics processing engines 431-432, N are dedicated to a single application or process under a single operating system. A single application can funnel other application requests to the graphics engines 431-432, N, thereby providing virtualization within a VM / partition.
[0111] In a dedicated process programming model, graphics processing engines 431-432, N can be shared by multiple VM / application partitions. The shared model requires a hypervisor to virtualize graphics processing engines 431-432, N to allow access by each operating system. For a single partition system without a hypervisor, graphics processing engines 431-432, N are owned by the operating system. In both cases, the operating system can virtualize graphics processing engines 431-432, N to provide access to each process or application.
[0112] For the shared programming model, the graphics acceleration module 446 or the individual graphics processing engines 431-432, N use a process handle to select a process element. In one embodiment, the process element is stored in the system memory 441 and is addressable using the effective address to real address conversion techniques described herein. The process handle can be an implementation-specific value provided to the host process when registering its context with the graphics processing engine 431-432, N (that is, calling the system software to add the process element to the process element linked list). The lower 16 bits of the process handle can be the offset of the process element within the process element linked list.
[0113] Figure 4D An exemplary accelerator integrated slice 490 is shown. As used herein, a "slice" includes a specified portion of the processing resources of the accelerator integrated circuit 436. The application effective address space 482 within the system memory 441 stores process elements 483. In one embodiment, the process element 483 is stored in response to a GPU call (invocation) 481 from an application 480 executed on the processor 407. The process element 483 contains the process state of the corresponding application 480. The work descriptor (WD) 484 contained in the process element 483 can be a single job requested by the application, or can contain a pointer to a job queue. In the latter case, WD 484 is a pointer to a job request queue in the address space 482 of the application.
[0114] Graphics acceleration module 446 and / or individual graphics processing engines 431-432, N may be shared by all or a subset of processes in the system. Embodiments of the present invention include infrastructure for setting process state and sending WD 484 to graphics acceleration module 446 to start a job in a virtualized environment.
[0115] In one implementation, the dedicated process programming model is implementation specific. In this model, a single process owns the graphics acceleration module 446 or individual graphics processing engine 431. Since the graphics acceleration module 446 is owned by a single process, when the graphics acceleration module 446 is assigned, the hypervisor initializes the accelerator integrated circuit 436 for the owning partition, and the operating system initializes the accelerator integrated circuit 436 for the owning process.
[0116] In operation, the WD fetch unit 491 in the accelerator integrated slice 490 fetches the next WD 484, which includes an indication of work to be completed by one of the graphics processing engines of the graphics acceleration module 446. Data from the WD 484 may be stored in registers 445 and used by the MMU 439, interrupt management circuitry 447, and / or context management circuitry 446 as shown. For example, one embodiment of the MMU 439 includes a segment / page walk circuitry for accessing a segment / page table 486 within the OS virtual address space 485. The interrupt management circuitry 447 may process an interrupt event 492 received from the graphics acceleration module 446. When performing graphics operations, the effective address 493 generated by the graphics processing engines 431-432, N is converted to a real address by the MMU 439.
[0117] In one embodiment, the same set of registers 445 is replicated for each graphics processing engine 431-432, N and / or graphics acceleration module 446, and this set of registers 445 can be initialized by a hypervisor or operating system. Each of these replicated registers can be included in an accelerator integrated slice 490. Table 1 shows exemplary registers that can be initialized by a hypervisor.
[0118] Table 1 - Registers initialized by the hypervisor 1 Slice Control Register 2 Real address (RA) dispatched process area pointer 3 Permission Mask Override Register 4 Interrupt vector table entry offset 5 Interrupt Vector Table Entry Limits 6 Status Register 7 Logical Partition ID 8 Real Address (RA) Hypervisor Accelerator Utilizing Record Pointers 9 Storage Description Register Example registers that may be initialized by the operating system are shown in Table 2.
[0119] Table 2 - Registers initialized by the operating system 1 Process and thread identities 2 Effective Address (EA) context save / restore pointer 3 Virtual Address (VA) Accelerator Utilizes Record Pointers 4 Virtual Address (VA) Segment Table Pointer 5 Permission masking 6 Job Descriptor In one embodiment, each WD 484 is specific to a particular graphics acceleration module 446 and / or graphics processing engine 431-432, N. It contains all the information required by the graphics processing engine 431-432, N to complete its work, or it may be a pointer to a memory location of a command queue where the application has set up work to be done.
[0120] Figure 4E Additional details for an exemplary embodiment of a sharing model are shown. This embodiment includes a hypervisor real address space 498 in which a process element list 499 is stored. The hypervisor real address space 498 is accessible via a hypervisor 496 that virtualizes a graphics acceleration module engine for an operating system 495.
[0121] The shared programming model allows all processes or subsets of processes from all partitions or subsets of partitions in the system to use the graphics acceleration module 446. There are two programming models where the graphics acceleration module 446 is shared by multiple processes and partitions: time-slice shared and graphics directed shared.
[0122] In this model, the hypervisor 496 owns the graphics acceleration module 446 and makes its functionality available to all operating systems 495. In order for the graphics acceleration module 446 to support virtualization by the hypervisor 496, the graphics acceleration module 446 may comply with the following requirements: 1) The application's job requests must be autonomous (that is, there is no need to maintain state between jobs), or the graphics acceleration module 446 must provide a context save and restore mechanism. 2) The application's job requests are guaranteed to be completed within a specified amount of time by the graphics acceleration module 446 (including any translation failures), or the graphics acceleration module 446 provides the ability to preempt the processing of a job. 3) When operating in a directed sharing programming model, the graphics acceleration module 446 must be guaranteed fairness between processes.
[0123] In one embodiment, for the shared model, the application 480 is required to make an operating system 495 system call with a graphics acceleration module 446 type, a work descriptor (WD), an authority mask register (AMR) value, and a context save / restore region pointer (CSRP). The graphics acceleration module 446 type describes the targeted acceleration function for the system call. The graphics acceleration module 446 type can be a system-specific value. The WD is formatted specifically for the graphics acceleration module 446 and can take the form of a graphics acceleration module 446 command, an effective address pointer to a user-defined structure, an effective address pointer to a command queue, or any other data structure for describing the work to be completed by the graphics acceleration module 446. In one embodiment, the AMR value is the AMR state to be used for the current process. The value passed to the operating system is similar to the application of setting the AMR. If the accelerator integrated circuit 436 and the graphics acceleration module 446 implementation do not support the user authority mask override register (UAMOR), the operating system can apply the current UAMOR value to the AMR value before passing the AMR in the hypervisor call. Optionally, the hypervisor 496 may apply the current privilege mask override register (AMOR) value before placing the AMR into the process element 483. In one embodiment, the CSRP is one of the registers 445 that contains the effective address of an area in the application's address space 482 for the graphics acceleration module 446 to save and restore context state. This pointer is optional if state is not required to be saved between jobs or when a job is preempted. The context save / restore area may be pinned system memory.
[0124] Upon receiving the system call, the operating system 495 may verify that the application 480 has been registered and has been given permission to use the graphics acceleration module 446. The operating system 495 then calls the hypervisor 496 with the information shown in Table 3.
[0125] Table 3 – OS to Hypervisor call parameters 1 Work Descriptor (WD) 2 Authority Mask Register (AMR) value (potentially masked) 3 Effective Address (EA) Context Save / Restore Region Pointer (CSRP) 4 Process ID (PID) and optional thread ID (TID) 5 Virtual Address (VA) Accelerator Utilization Record Pointer (AURP) 6 Virtual address of the storage segment table pointer (SSTP) 7 Logical Interrupt Service Number (LISN) Upon receiving the hypervisor call, the hypervisor 496 verifies that the operating system 495 has registered and has been given permission to use the graphics acceleration module 446. The hypervisor 496 then places the process element 483 into a linked list of process elements for the corresponding type of graphics acceleration module 446. The process element may include the information shown in Table 4.
[0126] Table 4 - Process element information 1 Work Descriptor (WD) 2 Authority Mask Register (AMR) value (potentially masked) 3 Effective Address (EA) Context Save / Restore Region Pointer (CSRP) 4 Process ID (PID) and optional thread ID (TID) 5 Virtual Address (VA) Accelerator Utilization Record Pointer (AURP) 6 Virtual address of the storage segment table pointer (SSTP) 7 Logical Interrupt Service Number (LISN) 8 Interrupt vector table derived from hypervisor call parameters 9 Status Register (SR) Value 10 Logical Partition ID (LPID) 11 Real Address (RA) Hypervisor Accelerator Utilizing Record Pointers 12 Storage Device Descriptor Register (SDR) In one embodiment, the hypervisor initializes the plurality of accelerator integrated slice 490 registers 445 .
[0127] like Figure 4F As shown in , an exemplary embodiment of the present invention employs a unified memory addressable via a common virtual memory address space, which is used to access physical processor memory 401-402 and GPU memory 420-423. In this implementation, operations executed on GPU 410-413 utilize the same virtual / effective memory address space to access processor memory 401-402 and vice versa, thereby simplifying programmability. In one embodiment, a first portion of the virtual / effective address space is allocated to processor memory 401, a second portion is allocated to second processor memory 402, a third portion is allocated to GPU memory 420, and so on. The entire virtual / effective memory space (sometimes referred to as the effective address space) is thereby distributed across each of processor memory 401-402 and GPU memory 420-423, thereby allowing any processor or GPU to access any physical memory (using a virtual address mapped to that memory).
[0128] In one embodiment, bias / coherency management circuits 494A-494E within one or more of MMUs 439A-439E ensure cache coherency between caches of a host processor (e.g., 405) and GPUs 410-413 and implement biasing techniques that indicate physical memory where certain types of data should be stored. Figure 4FMultiple instances of bias / consistency management circuits 494A- 494E are shown in , but bias / consistency circuits may be implemented within an MMU of one or more host processors 405 and / or within an accelerator integrated circuit 436 .
[0129] One embodiment allows the use of shared virtual memory (SVM) technology to access GPU-attached memory 420-423 and map it as part of system memory without experiencing the typical performance drawbacks associated with full system cache coherence. The ability of GPU-attached memory 420-423 to be accessed as system memory without heavy cache coherence overhead provides a beneficial operating environment for GPU offloading. This arrangement allows the host processor 405 software to set operands and access calculation results without the overhead of traditional I / O DMA data copying. Such traditional copies involve driver calls, interrupts, and memory-mapped I / O (MMIO) accesses, which are all inefficient relative to simple memory accesses. At the same time, the ability to access GPU-attached memory 420-423 without cache coherence overhead can be critical to the execution time of the offloaded calculation. In the case of a substantial streaming write memory business, for example, the cache coherence overhead can significantly reduce the effective write bandwidth seen by the GPU 410-413. The efficiency of operand setting, the efficiency of result access, and the efficiency of GPU calculation all play a role in determining the effectiveness of GPU offloading.
[0130] In one implementation, the selection between GPU bias and host processor bias is driven by a bias tracker data structure. For example, a bias table may be used, which may be a page granular structure comprising 1 or 2 bits per GPU attached memory page (i.e., controlled at the granularity of a memory page). The bias table may be implemented in a stolen memory range of one or more GPU attached memories 420-423, with or without a bias cache in the GPUs 410-413 (e.g., to cache frequently / recently used entries of the bias table). Alternatively, the entire bias table may be maintained within the GPU.
[0131] In one implementation, the bias table entry associated with each access to GPU-attached memory 420-423 is accessed before actually accessing the GPU memory, prompting the following operations. First, local requests from GPUs 410-413 to find their pages in the GPU bias are forwarded directly to the corresponding GPU memory 420-423. Local requests from the GPU to find their pages in the host bias are forwarded to the processor 405 (e.g., via a high-speed link as discussed above). In one embodiment, the request from the processor 405 to find the requested page in the host processor bias is completed like a normal memory read request. Alternatively, the request for the GPU biased page can be forwarded to the GPU 410-413. Then, if the GPU is not currently using the page, the GPU can transfer the page to the host processor bias.
[0132] The bias state of a page may be changed by a software-based mechanism, a hardware-assisted software-based mechanism, or, for a limited set of circumstances, a purely hardware-based mechanism.
[0133] One mechanism for changing the bias state employs an API call (e.g., OpenCL) which in turn calls the GPU's device driver which in turn sends a message (or enqueues a command descriptor) to the GPU instructing it to change the bias state and perform a cache flushing operation in the host for some transitions. The cache flushing operation is required for transitions from host processor 405 bias to GPU bias, but not for the reverse transition.
[0134] In one embodiment, cache coherency is maintained by temporarily rendering GPU biased pages uncacheable by host processor 405. To access these pages, processor 405 may request access from GPU 410, which may or may not immediately grant access (depending on the implementation). Therefore, to reduce communication between processor 405 and GPU 410, it is advantageous to ensure that GPU biased pages are those pages that are required by the GPU but not by host processor 405 (and vice versa).
[0135] Graphics processing pipeline Figure 5 2. A graphics processing pipeline 500 is shown in accordance with an exemplary embodiment. In one embodiment, a graphics processor may implement the illustrated graphics processing pipeline 500. The graphics processor may be included in a parallel processing subsystem as described herein (such as parallel processor 200 of FIG. 2), which in one embodiment is Figure 12 . Various parallel processing systems may implement the graphics processing pipeline 500 via one or more instances of a parallel processing unit (e.g., parallel processing unit 202 of FIG. 2 ) as described herein. For example, a shader unit (e.g., graphics multiprocessor 234 of FIG. 3 ) may be configured to perform the functions of one or more of a vertex processing unit 504, a tessellation control processing unit 508, a tessellation evaluation processing unit 512, a geometry processing unit 516, and a fragment / pixel processing unit 524. The functions of the data assembler 502, the primitive assembler (506, 514, 518), the tessellation unit 510, the rasterizer 522, and the raster operation unit 526 may also be performed by other processing engines within a processing cluster (e.g., processing cluster 214 of FIG. 3 ) and corresponding partition units (e.g., partition units 220A-220N of FIG. 2 ). The graphics processing pipeline 500 may also be implemented using dedicated processing units for one or more functions. In one embodiment, one or more portions of the graphics processing pipeline 500 may be executed by parallel processing logic within a general purpose processor (e.g., a CPU). In one embodiment, one or more portions of the graphics processing pipeline 500 may access on-chip memory (e.g., such as parallel processor memory 222 in FIG. 2 ) via a memory interface 528, which may be an example of the memory interface 218 of FIG. 2 .
[0136] In one embodiment, data assembler 502 is a processing unit that collects vertex data for surfaces and primitives. Data assembler 502 then outputs the vertex data, including vertex attributes, to vertex processing unit 504. Vertex processing unit 504 is a programmable execution unit that executes vertex shader programs, lighting and transforming vertex data as specified by the vertex shader programs. Vertex processing unit 504 reads data stored in cache, local or system memory for use in processing vertex data, and vertex processing unit 504 can be programmed to transform vertex data from an object-based coordinate representation to a world space coordinate space or a normalized device coordinate space.
[0137] A first instance of primitive assembler 506 receives vertex attributes from vertex processing unit 504. Primitive assembler 506 reads the stored vertex attributes as needed and builds graphics primitives for processing by tessellation control processing unit 508. Graphics primitives include triangles, line segments, points, patches, etc. as supported by various graphics processing application programming interfaces (APIs).
[0138] The tessellation control processing unit 508 treats the input vertices as control points for the geometric patch. The control points are transformed from the input representation from the patch (e.g., the basis of the patch) to a representation suitable for use by the tessellation evaluation processing unit 512 in surface evaluation. The tessellation control processing unit 508 can also calculate tessellation factors for the edges of the geometric patch. The tessellation factors are applied to a single edge and quantize the detail level of the dependent view associated with the edge. The tessellation unit 510 is configured to receive the tessellation factors for the edges of the patch and tessellate the patch into a plurality of geometric primitives such as lines, triangles or quadrilateral primitives, which are transmitted to the tessellation evaluation processing unit 512. The tessellation evaluation processing unit 512 operates on the parameterized coordinates of the finely divided patch to generate a surface representation and vertex attributes for each vertex associated with the geometric primitive.
[0139] A second instance of primitive assembler 514 receives vertex attributes from tessellation evaluation processing unit 512 (which reads stored vertex attributes as needed) and builds graphics primitives for processing by geometry processing unit 516. Geometry processing unit 516 is a programmable execution unit that executes geometry shader programs to transform graphics primitives received from primitive assembler 514 as specified by the geometry shader programs. In one embodiment, geometry processing unit 516 is programmed to subdivide the graphics primitive into one or more new graphics primitives and to compute parameters for rasterizing the new graphics primitives.
[0140] In some embodiments, the geometry processing unit 516 may add or delete elements in the geometry stream. The geometry processing unit 516 outputs parameters and vertices specifying new graphics primitives to the primitive assembler 518. The primitive assembler 518 receives the parameters and vertices from the geometry processing unit 516 and constructs the graphics primitives for processing by the viewport scaling, picking, and clipping unit 520. The geometry processing unit 516 reads data stored in the parallel processor memory or the system memory for use in processing the geometry data. The viewport scaling, picking, and clipping unit 520 performs clipping, picking, and viewport scaling, and outputs the processed graphics primitives to the rasterizer 522.
[0141] The rasterizer 522 can perform depth sorting and other depth-based optimizations. The rasterizer 522 also performs scan conversion on new graphics primitives to generate fragments, and outputs those fragments and associated coverage data to the fragment / pixel processing unit 524. The fragment / pixel processing unit 524 is a programmable execution unit configured to execute a fragment shader program or a pixel shader program. The fragment / pixel processing unit 524 transforms the fragments or pixels received from the rasterizer 522 as specified by the fragment or pixel shader program. For example, the fragment / pixel processing unit 524 can be programmed to perform the following operations to generate fragments or pixels of shading output to the raster operation unit 526, including but not limited to texture mapping, shading, blending, texture correction and perspective correction. The fragment / pixel processing unit 524 can read data stored in a parallel processor memory or system memory for use in processing fragment data. The fragment or pixel shader program can be configured to be shaded in samples, pixels, tiles or other granularities, depending on the sampling rate configured for the processing unit.
[0142] Raster operations unit 526 is a processing unit that performs raster operations including, but not limited to, stenciling, z-testing, blending, and outputs pixel data as processed graphics data for storage in graphics memory (e.g., parallel processor memory 222 in FIG. 2 and / or as Figure 1 The raster operations unit 526 may be configured to compress the z or color data written to the memory and to decompress the z or color data read from the memory.
[0143] Machine Learning Overview A machine learning algorithm is an algorithm that can learn based on a data set. Embodiments of a machine learning algorithm can be designed to model high-level abstractions within a data set. For example, an image recognition algorithm can be used to determine which of several categories a given input belongs to; a regression algorithm can output a numerical value given an input; and a pattern recognition algorithm can be used to generate converted text or perform text-to-speech and / or speech recognition.
[0144] An exemplary type of machine learning algorithm is a neural network. There are many types of neural networks; a simple type of neural network is a feedforward network. A feedforward network can be implemented as an acyclic graph in which nodes are arranged in layers. Typically, a feedforward network topology includes an input layer and an output layer separated by at least one hidden layer. The hidden layer transforms the input received by the input layer into a representation useful for generating output in the output layer. The network nodes are fully connected via edges to nodes in adjacent layers, but there are no edges between nodes within each layer. Data received at the nodes of the input layer of the feedforward network is propagated (i.e., "fed forward") to the nodes of the output layer via an activation function, which calculates the state of the nodes of each successive layer in the network based on coefficients ("weights") associated with each of the edges of the connecting layers, respectively. Depending on the specific model represented by the algorithm being executed, the output from the neural network algorithm can take a variety of forms.
[0145] Before a machine learning algorithm can be used to model a particular problem, the algorithm is trained using a training data set. Training a neural network involves selecting a network topology, using a set of training data representing the problem being modeled by the network, and adjusting weights until the network model performs with minimal error for all instances of the training data set. For example, during a supervised learning training process for a neural network, the network compares the output generated in response to representing an instance in the training data set with the "correct" labeled output for that instance, computes an error signal representing the difference between the output and the labeled output, and adjusts the weights associated with the connections to minimize the error as the error signal propagates back through the layers of the network. The network is considered "trained" when the error for each of the outputs generated from the instances of the training data set is minimized.
[0146] The accuracy of a machine learning algorithm can be significantly affected by the quality of the data set used to train the algorithm. The training process can be computationally intensive and can take a significant amount of time on a conventional general purpose processor. Therefore, parallel processing hardware is used to train many types of machine learning algorithms. This is particularly useful for optimizing the training of neural networks, because the calculations performed in adjusting the coefficients in a neural network make them naturally conducive to parallel implementation. In particular, many machine learning algorithms and software applications have been adapted to exploit the parallel processing hardware within general purpose graphics processing devices.
[0147] Figure 6is a general diagram of a machine learning software stack 600. Machine learning applications 602 can be configured to train a neural network using a training data set or to implement machine intelligence using a trained deep neural network. Machine learning applications 602 can include training and reasoning functionality for a neural network and / or specialized software that can be used to train a neural network prior to deployment. Machine learning applications 602 can implement any type of machine intelligence, including but not limited to image recognition, mapping and localization, autonomous navigation, speech synthesis, medical imaging, or language translation.
[0148] Hardware acceleration for machine learning applications 602 can be enabled via a machine learning framework 604. The machine learning framework 604 can provide a library of machine learning primitives. Machine learning primitives are basic operations commonly performed by machine learning algorithms. Without the machine learning framework 604, developers of machine learning algorithms will be required to create and optimize the main computing logic associated with the machine learning algorithm, and then re-optimize the computing logic when developing new parallel processors. Instead, the machine learning application can be configured to use the primitives provided by the machine learning framework 604 to perform the necessary calculations. Exemplary primitives include tensor convolutions, activation functions, and pooling, which are computational operations performed when training a convolutional neural network (CNN). The machine learning framework 604 can also provide primitives to implement basic linear algebra subroutines performed by many machine learning algorithms, such as matrix and vector operations.
[0149] The machine learning framework 604 can process input data received from the machine learning application 602 and generate appropriate inputs to the computation framework 606. The computation framework 606 can abstract the underlying instructions provided to the GPGPU driver 608 to enable the machine learning framework 604 to utilize hardware acceleration via the GPGPU hardware 610 without requiring the machine learning framework 604 to have in-depth knowledge of the architecture of the GPGPU hardware 610. In addition, the computation framework 606 can enable hardware acceleration for the machine learning framework 604 across various types and generations of GPGPU hardware 610.
[0150] GPGPU machine learning acceleration Figure 7 A highly parallel general purpose graphics processing unit 700 is shown in accordance with an exemplary embodiment. In one embodiment, a general purpose processing unit (GPGPU) 700 can be configured to be particularly efficient at processing the type of computational workload associated with training a deep neural network. Additionally, a GPGPU 700 can be directly linked to other instances of a GPGPU to create a multi-GPU cluster to increase the speed of training for a particular deep neural network.
[0151] GPGPU 700 includes a host interface 702 for enabling connection to a host processor. In one embodiment, host interface 702 is a fast PCI interface. However, the host interface may also be a vendor specific communication interface or communication structure. GPGPU 700 receives commands from the host processor and distributes the execution threads associated with those commands to a set of computing clusters 706A-H using a global scheduler 704. Computing clusters 706A-H share a cache memory 708. Cache memory 708 may act as a higher level cache for cache memory within computing clusters 706A-H.
[0152] GPGPU 700 includes memory 714A-B coupled to computing clusters 706A-H via a set of memory controllers 712A-B. In various embodiments, memory 714A-B may include various types of memory devices including dynamic random access memory (DRAM) or graphics random access memory, such as synchronous graphics random access memory (SGRAM), including graphics double data rate (GDDR) memory. In one embodiment, memory units 224A-N may also include 3D stacked memory, including but not limited to high bandwidth memory (HBM).
[0153] In one embodiment, each computing cluster 706A-H includes a set of graphics multiprocessors, such as Figure 4A The graphics multiprocessor 400 of the computing cluster includes multiple types of integer and floating point logic units that can perform computational operations at a range of precisions including those suitable for machine learning computations. For example, and in one embodiment, at least a subset of the floating point units in each of the computing clusters 706A-H can be configured to perform 16-bit or 32-bit floating point operations, while a different subset of the floating point units can be configured to perform 64-bit floating point operations.
[0154] Multiple instances of GPGPU 700 can be configured to operate as a computing cluster. The communication mechanism used by the computing cluster for synchronization and data exchange varies depending on the embodiment. In one embodiment, multiple instances of GPGPU 700 communicate through a host interface 702. In one embodiment, GPGPU 700 includes an I / O hub 707, which couples GPGPU 700 with a GPU link 710, which implements direct connection to other instances of GPGPU. In one embodiment, GPU link 710 is coupled to a dedicated GPU to GPU bridge, which implements communication and synchronization between multiple instances of GPGPU 700. In one embodiment, GPU link 710 is coupled to a high-speed interconnect to transmit and receive data to other GPGPUs or parallel processors. In one embodiment, multiple instances of GPGPU 700 are located in an independent data processing system and communicate via a network device, which is accessible via a host interface 702. In one embodiment, in addition to or as an alternative to the host interface 702, GPU link 710 can be configured to enable connection to a host processor.
[0155] Although the configuration of the GPGPU 700 shown can be configured to train a neural network, one embodiment provides an alternative configuration of the GPGPU 700 that can be configured for deployment within a high-performance or low-power inference platform. In the inference configuration, the GPGPU 700 includes fewer compute clusters 706A-H relative to the training configuration. In addition, the memory technology associated with the memory 714A-B can be different between the inference and training configurations. In one embodiment, the inference configuration of the GPGPU 700 can support inference-specific instructions. For example, the inference configuration can provide support for one or more 8-bit integer dot product instructions that are typically used during inference operations on a deployed neural network.
[0156] Figure 8 A multi-GPU computing system 800 is shown in accordance with an exemplary embodiment. The multi-GPU computing system 800 may include a processor 802 coupled to a plurality of GPGPUs 806A-D via a host interface switch 804. In one embodiment, the host interface switch 804 is a PCI Express switch device that couples the processor 802 to a PCI Express bus, through which the processor 802 may communicate with a set of GPGPUs 806A-D. Each of the plurality of GPGPUs 806A-D may be Figure 7 GPGPU 806A-D may be interconnected via a set of high-speed point-to-point GPU-to-GPU links 816. The high-speed GPU-to-GPU links may be connected via dedicated GPU links (such as Figure 7806A-D). The P2P GPU link 816 enables direct communication between each of the GPGPUs 806A-D without the need to communicate over the host interface bus to which the processor 802 is connected. With GPU-to-GPU traffic directed to the P2P GPU link, the host interface bus can still be used for system memory access or communication with other instances of the multi-GPU computing system 800, for example, via one or more network devices. Although in the illustrated embodiment, the GPGPUs 806A-D are connected to the processor 802 via the host interface switch 804, in one embodiment, the processor 802 includes direct support for the P2P GPU link 816 and can be directly connected to the GPGPUs 806A-D.
[0157] Machine Learning Neural Network Implementation The computing architecture provided by the embodiments described herein can be configured to perform the type of parallel processing that is particularly suitable for training and deploying neural networks for machine learning. Neural networks can be summarized as networks of functions with graph relationships. As is well known in the art, there are many types of neural network implementations used in machine learning. One exemplary type of neural network is a feedforward network, as described previously.
[0158] The second exemplary type of neural network is the convolutional neural network (CNN). CNN is a specialized feed-forward neural network for processing data with a known grid-like topology (such as image data). Therefore, CNNs are commonly used in computer vision and image recognition applications, but they can also be used for other types of pattern recognition, such as speech and language processing. The nodes in the input layer of a CNN are organized into a set of "filters" (feature detectors inspired by the receptive fields found in the retina), and the output of each set of filters is propagated to the nodes in the successive layers of the network. The calculations for a CNN include applying a convolution mathematical operation to each filter to produce the output of the filter. Convolution is a specialized mathematical operation performed by two functions to produce a third function, which is a modified version of one of the two original functions. In convolutional network terminology, the first function to the convolution can be called the input, and the second function can be called the convolution kernel. The output can be called a feature map. For example, the input to the convolution layer can be data of a multidimensional array defining the various color components of the input image. The convolution kernel can be parameters of a multidimensional array, where these parameters are adapted for the neural network by the training process.
[0159] Recurrent neural networks (RNNs) are a family of feedforward neural networks that include feedback connections between layers. RNNs enable modeling of sequential data by sharing parameter data across different parts of the neural network. The architecture of RNNs includes loops. A loop represents the effect of the current value of a variable on its own value at a future time, because at least a portion of the output data from the RNN is used as feedback for processing subsequent inputs in the sequence. This feature makes RNNs particularly useful for language processing due to the variable nature of the language data that can be composed therein.
[0160] The figures described below present exemplary feedforward, CNN, and RNN networks, and describe the general process for training and deploying each of those types of networks, respectively. It will be understood that these descriptions are exemplary and non-limiting with respect to any specific embodiment described herein and that the concepts shown can be generally applied to deep neural networks and general machine learning techniques.
[0161] The exemplary neural network described above can be used to perform deep learning. Deep learning is machine learning using deep neural networks. The deep neural network used in deep learning is an artificial neural network composed of multiple hidden layers, as opposed to shallow neural networks that include only a single hidden layer. Deeper neural networks are generally more computationally intensive to train. However, the additional hidden layers of the network enable multi-step pattern recognition, which results in a reduction in output error relative to shallow machine learning techniques.
[0162] The deep neural networks used in deep learning typically include a front-end network coupled to a back-end network for performing feature recognition, which represents a mathematical model that can perform operations (e.g., object classification, speech recognition, etc.) based on the feature representation provided to the model. Deep learning enables machine learning to be performed without the need to perform manual feature engineering on the model. Instead, deep neural networks can learn features based on statistical structures or correlations within the input data. The learned features can be provided to a mathematical model, which can map the detected features to outputs. The mathematical model used by the network is generally specialized for a specific task to be performed, and different models will be used to perform different tasks.
[0163] Once a neural network is constructed, a learning model can be applied to the network to train the network to perform a specific task. The learning model describes how to adjust the weights within the model to reduce the output error of the network. Error backpropagation is a common method for training neural networks. An input vector is presented to the network for processing. The output of the network is compared to the desired output using a loss function and an error value is calculated for each of the neurons in the output layer. The error values are then propagated back until each neuron has an associated error value that roughly represents its contribution to the original output. The network can then learn from those errors using an algorithm (such as a stochastic gradient descent algorithm) to update the weights of the neural network.
[0164] Figures 9A-9B An exemplary convolutional neural network is shown. Fig.9A The various layers within a CNN are shown. Fig.9A , an exemplary CNN for modeling image processing can receive an input 908, which describes the red, green and blue (RGB) components of the input image. Input 902 can be processed by multiple convolutional layers (e.g., convolutional layer 904, convolutional layer 906). The output from multiple convolutional layers can be optionally processed by a set of fully connected layers 908. The neurons in the fully connected layers have full connections to all activations in the previous layers, as described above for the feedforward network. The output from the fully connected layers 908 can be used to generate output results from the network. The activations within the fully connected layers 908 can be calculated using matrix multiplication instead of convolution. Not all CNN implementations utilize fully connected layers 906. For example, in some implementations, convolutional layers 906 can generate outputs for CNN.
[0165] The convolutional layers are sparsely connected, which is different from the traditional neural network configuration found in the fully connected layer 908. Traditional neural network layers are fully connected so that each output unit interacts with each input unit. However, as shown, because the output of the convolution of the field is the input to the nodes of the subsequent layer (rather than the corresponding state value of each of the nodes in the field), the convolutional layers are sparsely connected. The kernel associated with the convolutional layer performs the convolution operation, and its output is sent to the next layer. The dimensionality reduction performed within the convolutional layer is one aspect that enables CNNs to scale to process large images.
[0166] Fig. 9B An exemplary computational stage within a convolutional layer of a CNN is shown. The input to the convolutional layer 912 of the CNN may be processed in three stages of the convolutional layer 914. The three stages may include a convolutional stage 916, a detector stage 918, and a pooling stage 920. The convolutional layer 914 may then output data to a successive convolutional layer. The last convolutional layer of the network may generate output feature map data or provide input to a fully connected layer, such as to generate a classification value for the input to the CNN.
[0167] In convolution stage 916, convolution layer 914 can perform several convolutions in parallel to produce a set of linear activations. Convolution stage 916 can include an affine transformation, which is any transformation that can be specified as a linear transformation plus a translation. Affine transformations include rotations, translations, scaling, and combinations of these transformations. The convolution stage calculates the output of a function (e.g., a neuron) connected to a specific area in the input, which can be determined as a local area associated with the neuron. The neuron calculates the dot product between the weight of the neuron and the area in the local input to which the neuron is connected. The output from convolution stage 916 defines a set of linear activations processed by successive stages of convolution layer 914.
[0168] The linear activations may be processed by the detector stage 918. In the detector stage 918, each linear activation is processed by a nonlinear activation function. The nonlinear activation function increases the nonlinear nature of the overall network without affecting the corresponding fields of the convolutional layers. Several types of nonlinear activation functions may be used. One particular type is the rectified linear unit (ReLU), which uses an activation function defined as f(x) = max(0, x) such that the activation threshold is zero.
[0169] The pooling stage 920 uses a pooling function that replaces the output of the convolution layer 906 with summary statistics of nearby outputs. The pooling function can be used to introduce translation invariance into the neural network so that a small translation of the input does not change the pooled output. The invariance of local translation can be useful in scenarios where the presence of features in the input data is more important than the exact location of the features. Various types of pooling functions can be used during the pooling stage 920, including maximum pooling, average pooling, and l2 norm pooling. In addition, some CNN implementations do not include a pooling stage. Instead, such an implementation replaces an additional convolution stage with an increased stride relative to the previous convolution stage.
[0170] The output from the convolutional layer 914 may then be processed by the next layer 922. The next layer 922 may be an additional convolutional layer or one of the fully connected layers 908. For example, Fig.9A The first convolutional layer 904 can output to the second convolutional layer 906, and the second convolutional layer can output to the first layer of the fully connected layer 908.
[0171] Fig.10An exemplary recurrent neural network 1000 is shown. In a recurrent neural network (RNN), the previous state of the network affects the output of the current state of the network. RNNs can be constructed in various ways using various functions. The use of RNNs generally revolves around using mathematical models to predict the future based on a prior sequence of inputs. For example, given a previous sequence of words, RNNs can be used to perform statistical language modeling to predict upcoming words. The RNN 1000 shown can be described as having an input layer 1002 that receives an input vector, a hidden layer 1004 that implements a recursive function, a feedback mechanism 1005 that enables 'memory' of previous states, and an output layer 1006 that outputs the results. RNN 1000 operates based on time steps. The state of the RNN at a given time step is affected based on the previous time step via the feedback mechanism 1005. For a given time step, the state of the hidden layer 1004 is defined by the previous state and the input of the current time step. The initial input (x1) at the first time step can be processed by the hidden layer 1004. The second input (x2) can be processed by the hidden layer 1004 using the state information determined during the processing of the initial input (x1). The given state can be calculated as s t =f(Ux t +Ws t-1 ), where U and W are parameter matrices. Function f is generally nonlinear, such as a variation of the hyperbolic tangent function (Tanh) or the rectifier function f(x)=max(0,x). However, the specific mathematical function used in hidden layer 1004 may vary depending on the specific implementation details of RNN 1000.
[0172] In addition to the basic CNN and RNN networks described, variations on these networks can be enabled. An example RNN variant is the Long Short-Term Memory (LSTM) RNN. LSTM RNN is able to learn long-term dependencies, which are necessary for processing longer language sequences. A variation on CNN is the Convolutional Deep Belief Network, which has a similar structure to CNN and is trained in a similar manner to the Deep Belief Network. A Deep Belief Network (DBN) is a generative neural network that consists of multiple layers of probabilistic (random) variables. DBNs can be trained layer by layer using greedy unsupervised learning. The learned weights of the DBN can then be used to provide a pre-trained neural network by determining the optimal initial set of weights for the neural network.
[0173] Fig.11 An exemplary training and deployment of a deep neural network is shown. Once a given network has been constructed for a task, the neural network is trained using a training data set 1102. Various training frameworks 1104 have been developed to enable hardware acceleration of the training process. For example, Figure 6The machine learning framework 604 can be configured as a training framework 604. The training framework 604 can hook into the untrained neural network 1106 and enable the untrained neural network to be trained using the parallel processing resources described herein to generate a trained neural network 1108.
[0174] To start the training process, initial weights can be chosen randomly or by using a pre-trained deep belief network. The training cycle is then performed in a supervised or unsupervised manner.
[0175] Supervised learning is a learning method in which training is performed as a mediated operation, such as when the training data set 1102 includes inputs paired with the expected outputs of the inputs, or when the training data set includes inputs with known outputs and the outputs of the neural network are manually graded. The network processes the inputs and compares the resulting outputs with a set of expected or desired outputs. Then, the error is propagated backward through the system. The training framework 1104 can be adjusted to adjust the weights that control the untrained neural network 1106. The training framework 1104 can provide tools to monitor the extent to which the untrained neural network 1106 converges to a model suitable for generating correct responses based on known input data. The training process recurs as the weights of the network are adjusted to improve the output generated by the neural network. The training process can continue until the neural network reaches a statistically expected accuracy associated with the trained neural network 1108. Then, the trained neural network 1108 can be deployed to implement any number of machine learning operations.
[0176] Unsupervised learning is a learning method in which a network attempts to train itself using unlabeled data. Thus, for unsupervised learning, the training data set 1102 will include input data without any associated output data. The untrained neural network 1106 can learn groupings within the unlabeled inputs and can determine how individual inputs relate to the overall data set. Unsupervised training can be used to generate self-organizing maps, which are a class of trained neural networks 1108 that can perform operations useful in dimensionality reduction of data. Unsupervised training can also be used to perform anomaly detection, which allows identification of data points in the input data set that deviate from the normal pattern of the data.
[0177] Variations on supervised and unsupervised training may also be employed. Semi-supervised learning is a technique in which the training data set 1102 includes a mixture of labeled and unlabeled data of the same distribution. Incremental learning is a variation of supervised learning in which input data is continually used to further train the model. Incremental learning enables a trained neural network 1108 to adapt to new data 1112 without forgetting the knowledge instilled within the network during initial training.
[0178] Whether supervised or unsupervised, the training process, especially for deep neural networks, may be too computationally intensive for a single computing node. Instead of using a single computing node, a distributed network of computing nodes can be used to speed up the training process.
[0179] Fig.12 is an exemplary block diagram illustrating distributed learning. Distributed learning is a training model that uses multiple distributed computing nodes to perform supervised or unsupervised training of a neural network. The distributed computing nodes may each include one or more host processors and one or more general processing nodes, such as Figure 7 700 in a highly parallel general purpose graphics processing unit. As shown, distributed learning can be a model parallel structure 1202, a data parallel structure 1204, or a combination of model and data parallel structures 1206 executed.
[0180] In a model parallel structure 1202, different computing nodes in a distributed system can perform training computations on different parts of a single network. For example, each layer of a neural network can be trained by a different processing node of the distributed system. Benefits of the model parallel structure include the ability to scale to particularly large models. Splitting the computations associated with different layers of a neural network enables the training of very large neural networks where the weights of all layers would not fit into the memory of a single computing node. In some instances, model parallelism can be particularly useful in performing unsupervised training of large neural networks.
[0181] In the data parallel structure 1204, different nodes of the distributed network have complete instances of the model and each node receives different parts of the data. Then, the results from different nodes are combined. Although different methods are possible for the data parallel structure, all data parallel training methods require techniques for combining the results and synchronizing the model parameters between each node. Exemplary methods for combining data include parameter averaging and data parallel structures based on updates. Parameter averaging trains each node on a subset of the training data and sets global parameters (e.g., weights, biases) to the average value of the parameters from each node. Parameter averaging uses a central parameter server that maintains parameter data. The data parallel structure based on updates is similar to parameter averaging, except that updates to the model are transmitted instead of transmitting parameters from the node to the parameter server. In addition, the data parallel structure based on updates can be executed in a decentralized manner, where the updates are compressed and transmitted between nodes.
[0182] The combined model and data parallel structure 1206 can be implemented, for example, in a distributed system where each computing node includes multiple GPUs. Each node can have a complete instance of the model, where independent GPUs within each node are used to train different parts of the model.
[0183] Distributed training has increased overhead relative to training on a single machine. However, the parallel processors and GPGPUs described herein can each implement various techniques to reduce the overhead of distributed training, including techniques to enable high-bandwidth GPU-to-GPU data transfers and to accelerate remote data synchronization.
[0184] Demonstration Machine Learning Applications Machine learning can be applied to solve a variety of technical problems, including but not limited to computer vision, autonomous driving and navigation, speech recognition, and language processing. Traditionally, computer vision has been one of the most active research areas for machine learning applications. The application range of computer vision varies from reproducing human visual capabilities (e.g., recognizing faces) to creating new categories of visual capabilities. For example, a computer vision application can be configured to identify sound waves from vibrations induced in objects visible in a video. Parallel processors accelerate machine learning, enabling computer vision applications to be trained using significantly larger training data sets than were previously feasible and enabling reasoning systems to be deployed using low-power parallel processors.
[0185] Parallel processors accelerate machine learning with autonomous driving applications, including lane and road sign recognition, obstacle avoidance, navigation, and driving control. Accelerated machine learning techniques can be used to train driving models based on data sets that define appropriate responses to specific training inputs. The parallel processors described herein can enable rapid training of increasingly complex neural networks for autonomous driving technology solutions and enable the deployment of low-power inference processors in mobile platforms suitable for integration into autonomous vehicles.
[0186] Parallel processors accelerating deep neural networks have enabled machine learning approaches to automatic speech recognition (ASR). ASR involves creating functions that, given a sequence of input sounds, compute the most likely speech sequence. Accelerated machine learning using deep neural networks has enabled replacements for the hidden Markov models (HMMs) and Gaussian mixture models (GMMs) previously used for ASR.
[0187] Parallel processors accelerate machine learning and can also be used to accelerate natural language processing. Automatic learning procedures can use statistical inference algorithms to produce models that are robust to erroneous or unfamiliar inputs. Exemplary natural language processor applications include automatic machine translation between human languages.
[0188] Parallel processing platforms for machine learning can be divided into training platforms and deployment platforms. Training platforms are generally highly parallel and include optimizations to accelerate multi-GPU single-node training and multi-node multi-GPU training. Exemplary parallel processors suitable for training include Figure 7 Highly parallel general purpose graphics processing unit 700 and Figure 8The multi-GPU computing system 800 of FIG. In contrast, the deployed machine learning platform generally includes lower-power parallel processors suitable for use in products such as cameras, autonomous robots, and autonomous vehicles.
[0189] Fig.13 An exemplary reasoning system-on-chip (SOC) 1300 suitable for performing reasoning using a trained model is shown. The SOC 1300 can integrate processing components including a media processor 1302, a visual processor 1304, a GPGPU 1306, and a multi-core processor 1308. The SOC 1300 can additionally include an on-chip memory 1305 that can implement a shared on-chip data pool accessible to each of the processing components. The processing components can be optimized for low-power operation to enable deployment to various machine learning platforms, including autonomous vehicles and autonomous robots. For example, an implementation of the SOC 1300 can be used as part of the main control system of an autonomous vehicle. In the case where the SOC 1300 is configured for use in an autonomous vehicle, the SOC is designed and configured to comply with the relevant functional safety standards of the deployment jurisdiction.
[0190] During operation, the media processor 1302 and the vision processor 1304 can work in concert to accelerate computer vision operations. The media processor 1302 can implement low-latency decoding of multiple high-resolution (e.g., 4K, 8K) video streams. The decoded video streams can be written to a buffer in the on-chip memory 1305. The vision processor 1304 can then parse the decoded video and perform preliminary processing operations on the frames of the decoded video in preparation for processing the frames using a trained image recognition model. For example, the vision processor 1304 can accelerate convolution operations for a CNN used to perform image recognition on high-resolution video data, while the back-end model calculations are performed by the GPGPU 1306.
[0191] The multi-core processor 1308 may include control logic to facilitate sequencing and synchronization of data transfers and shared memory operations performed by the media processor 1302 and the vision processor 1304. The multi-core processor 1308 may also act as an application processor to execute software applications that may utilize the inference computing capabilities of the GPGPU 1306. For example, at least a portion of navigation and steering logic may be implemented in software executing on the multi-core processor 1308. Such software may issue computational workloads directly to the GPGPU 1306 or may issue computational workloads to the multi-core processor 1308, which may offload at least a portion of those operations to the GPGPU 1306.
[0192] GPGPU 1306 may include a computing cluster, such as a low-power configuration of computing clusters 706A-706H within a highly parallel general purpose graphics processing unit 700. The computing cluster within GPGPU 1306 may support instructions that are specifically optimized to perform inference calculations on trained neural networks. For example, GPGPU 1306 may support instructions that perform low-precision calculations such as 8-bit and 4-bit integer vector operations.
[0193] Fig.14 An exemplary image capture system for an image capture device is shown. In some embodiments, the image capture device is a stand-alone device, such as a digital camera. In other embodiments, the image capture device is part of or a subcomponent of another computing device that requires image capture capabilities, such as a portable or handheld computing device with a digital camera to capture images. In an exemplary embodiment, the image capture device is integrated with a convolutional neural network (CNN) computational process, such as a deep learning neural network (DNN), which can provide DNN data in real time or simultaneously with or at the time of image capture and storage by the image capture device. Thus, the image capture device disclosed herein can provide both image and color information as well as deep machine learning information such as feature detection using a CNN.
[0194] Fig.14 An exemplary diagram for storing RGB and CNN channel data as part of a depth channel image is also shown. An exemplary system is shown with a depth channel camera 1400 and a depth channel memory 1420. The depth channel camera 1400 includes a color sensor 1402 and an FPGA unit 1404. The color sensor 1402 includes a plurality of sensors arranged in an array to capture color data of an image 1403A. The image 1403A can be an RGB image or a YUV image. The color sensor 1402 outputs image values or data to the depth channel memory 1420 and the FPGA unit 1404.
[0195] The color sensor can be any type of light sensor, light detector, CMOS sensor, or pixel array having a light sensor array to detect light energy that forms a color image captured by the color sensor array. Alternatively, the color sensor can be configured to detect non-color images. Data or values for each color component form separate output channels, such as RGB color channels 1414.
[0196] In one embodiment, the output of the color sensor array 1402 is the input to the neural network 1406 programmed in the FPGA 1404. The network can be any type of network with any number of convolutional layers and nodes at each layer, which can perform as described in relation to Fig.9A and 9BIn other examples, a hardwired circuit or programmable logic array (PLA) may be used in place of FPGA 1404 where the neural network is programmed or hardwired in the same manner in a corresponding circuit or array. In other embodiments, FPGA 1404 may be used as in Figure 6 The hardware acceleration described in the program regarding the machine learning application 602, machine learning framework 604 and computing framework 606 is programmed.
[0197] In one embodiment, the FPGA unit 1404 is programmed with a standard very deep CNN, such as the Visual Geometry Group (VGG) CNN, which is labeled as a standard VGG network 1406. In other embodiments, other types of CNNs (such as DNNs) can be programmed in the FPGA unit 1404 as disclosed herein. In this example, the VGG network 1406 is programmed with five (5) convolutional layers, which are labeled "Conv1" to "Conv5". Each convolutional layer Conv2 to Conv5 includes a data "pool" that provides summary statistics of nearby outputs. In other embodiments, any number of convolutional layers can be used, including a single convolutional layer. Each Conv1 to Conv5 layer performs a convolution operation, which provides feature map data or filtered images labeled "Conv1 data" to "Conv5 data". In this feed-forward CNN network, the output of each convolutional layer is passed to the next layer to the final prediction layer 1425. At the prediction layer 1425, classification 1430 may be performed, such as determining the type of image based on the CNN processing and the CNN data.
[0198] The depth channel memory 1420 stores an image 1403B for the RGB channels 1414 derived from the image 1403A. Data of Conv1 (1410A) to Conv5 (1410E) is stored for the CNN channel 1418. In this embodiment, each convolution channel Conv1 to Conv5 represents a CNN channel with five channels for the CNN channel 1418. The data of Conv1 (1410A) to Conv5 (1410E) can be different filtered images or feature maps of the image 1403A, depending on the convolution process performed at each layer. In the depth channel memory 1420, the images for the RGB color channels 1414 and the CNN channels are stored in adjacent memories or cascaded together.
[0199] Deep learning with discriminative semantic transfer and physics-inspired optimization As in Fig.12 and 14In the context of , a deep learning network has multiple nodes across several different domains. Given an input image, a deep learning based classification model is described that can handle domain-specific pixel-by-pixel scene parsing. Specifically, this domain-specific pixel-by-pixel scene parsing (e.g., predicting pixel-by-pixel wall-to-floor, wall-to-wall, and wall-to-ceiling edges, especially in cluttered indoor scenes) is very different from convolutional domain scene parsing (e.g., pixel-by-pixel object classification or segmentation). In addition, the data used to train such a specific task is very limited (only thousands of levels) and severely unbalanced.
[0200] refer to Figures 15 to 18G The following examples and embodiments disclose techniques that provide good transfer across multiple domains and address severely imbalanced training data with only a very limited number of samples (only thousands of samples). The disclosed techniques can be thought of in terms of three aspects: (1) a formulation that incorporates the relationship between scene clutter in one domain and room layout in another domain into a convolutional neural network (CNN) (room layout is an example, the techniques can be applied to other types of domains); (2) a lightweight CNN architecture that can be trained end-to-end using a 3-stage incremental training method; and (3) a practical strategy for initializing weights for very deep CNNs under limited and imbalanced training data distributions.
[0201] These disclosed techniques are optimized using an inference scheme referred to herein as physics-inspired optimization, where room layout estimates are formulated to naturally integrate phenomenal observation characteristics into mechanics concepts. For example, two theoretically elegant and practically easy-to-optimize techniques are presented to strike a clever balance between efficiency and accuracy, thereby demonstrating leading accuracy and real-time processing speed. Using these techniques, room layout estimates can be flexibly cast and solved from a pure optimization task perspective, in contrast to mainstream methods that rely primarily on computationally intensive proposal and reordering strategies.
[0202] The disclosed technique can be used as part of a room layout estimation system that operates with an overwhelming margin in speed and accuracy compared to other estimation systems that have been designed for machine / deep learning and computer vision for artificial intelligence. The described discriminative semantic transfer technique can have a wide range of applications including, but not limited to, image classification, pixel-by-pixel scene parsing, semantic image segmentation, object detection, room layout estimation, and robotic localization and tracking. It can also be applied to any kind of semantic transfer task in the context of or outside of deep learning or convolutional learning methods.
[0203] (introduce) Semantic Transfer (ST) has three features that provide three different perspectives: (1) As a discriminative model, it integrates the relationship between room layout and scene clutter into FCN. (2) As an architecture, it enjoys the benefits of end-to-end training. (3) As a training strategy, it provides better network initialization and allows training very deep networks under imbalanced training data distribution. Therefore, Semantic Transfer provides highly robust features in all kinds of different situations.
[0204] Semantic transfer and physical-inspired optimization techniques are described below about Figure 15-18G Numbers in parentheses refer to named references identified in the References section below.
[0205] Given an input RGB image, a room layout estimation algorithm should output all wall-floor, wall-wall, and wall-ceiling edges (e.g., Fig.15 This is a fundamental indoor scene understanding task as it can provide strong prior knowledge for other tasks like depth recovery from a single RGB image as shown in [6] and [7] or pose estimation of indoor objects as shown in [9],
[22] and
[23] . Moreover, the room layout itself provides a high-level representation of the indoor scene for emerging applications like smart robots and augmented reality. This problem has attracted sustained attention since the publication of the seminal work described in
[11] and has two lines of followers: like Fig.15 As shown in the upper part of , conventional methods follow a proposing-ranking scheme. Typically, the proposal part consists of three submodules, as edge detection, vanishing point voting, and ray sampling. Using hand-crafted features and structured reasoning techniques, the ranking part outputs the best layout proposal together with sometimes noisy representations.
[0206] Recent methods disclosed in references [3],
[17] and
[27] achieve dramatic performance improvements via features generated by fully convolutional networks (FCNs). References
[17] and
[27] also still follow the traditional proposal-ranking scheme. Reference [3] is a proposal-free solution, in which all those steps regarding proposal generation are eliminated. And instead of proposal-ranking, in reference [3], reasoning is achieved through an optimization module.
[0207] refer to Fig.15 , above the dashed line, the diagram depicts an overview of the conventional approach, and below the dashed line, the diagram depicts an overview of the disclosed technique using semantic transfer and physics-inspired optimization.
[0208] Conventional methods. Conventional methods provide many useful insights into indoor scene understanding. For example, reference
[11] and other references [4], [5],
[20] ,
[21] ,
[25] , and
[29] explore different ways to model the relationship between room layout and scene clutter. This effort is reasonable because the main challenge of room layout estimation lies in this. For example, back to reference Fig.15 , more than 50% of the wall-floor edge pixels are occluded by the bed. If the bed does not exist, the task can be simplified. However, these insights have not been addressed by recent FCN-based room layout estimation work. For example, recent work treats FCN as a black box without considering scene clutter information when designing the network. Because it is always difficult to model meaningful concepts using neural networks, the disclosed techniques explore the possibility of describing scene clutter within FCN.
[0209] FCN-based methods. Unlike references
[17] and
[27] which still follow the proposal-ranking scheme, reference [3] shows a framework with attractive compactness. However, its optimization is primitive, where the sampled solution space is exhaustively searched and the gradient is not modeled. Thus, the disclosed techniques provide principled, gradient-based and efficient optimization algorithms and procedures for deep networks.
[0210] The disclosed examples and embodiments provide a semantic transfer (ST) technique, which includes three features from three different perspectives: (1) As a discriminative model, the disclosed ST technique integrates the relationship between room layout and scene clutter into FCN. (2) As an architecture, the disclosed ST technique enjoys the benefit of end-to-end training. (3) As a training strategy, the disclosed ST technique provides better network initialization and allows training very deep networks under imbalanced training data distribution. The disclosed ST technique provides highly robust features in all kinds of situations.
[0211] In addition, in order to solve the computational redundancy hidden in these features, the disclosed examples and embodiments also propose physical inspired optimization (PIO) technology. The disclosed ST and PIO technologies play different but closely interdependent roles, because the core idea of PIO is to use mechanical concepts to formulate a phenomenon observed in the ST feature map.
[0212] (Related Work) Conventional methods. These methods follow the standard definition of room layout estimation, which was introduced by reference
[11] . According to the famous Manhattan hypothesis described in reference [2], such an estimation clusters edges into lines connected at three vanishing points. Many proposals have been published based on ray sampling. Hand-crafted features are used to learn a regressor for proposal ranking. Other works attempt to improve this framework. For example, reference
[19] detects connections instead of edges and modifies proposal generation and ranking accordingly. While ranking room layouts, reference
[25] simultaneously estimates clutter masks. Reference
[21] aims to improve the inference efficiency of methods like reference
[25] . In addition to estimating clutter masks, reference
[20] also estimates 3D bounding boxes of objects and room layouts during reasoning. In addition to the learned clutter representation, reference [4] includes prior knowledge of furniture shapes. In reference [5], furniture is modeled with parts instead of boxes. Reference
[29] goes further by modeling furniture relationships using scene grammar. These references form a good tradition of exploiting the relationship between room layout and scene clutter. However, these conventional approaches are lacking in recent FCN-based methods.
[0213] FCN-based methods. Recently, reference
[17] describes training an FCN for pixel-wise edge labeling, where each pixel is assigned a label from the set S of 4 classes {background (bg), wall-floor edge (wf), wall-wall edge (ww), wall-ceiling edge (wc)}.
[0214] S = {bg,wf,ww,wc} (1) The activations of the last layer are incorporated into the conventional reasoning framework as features. Reference [3] uses another formulation in which each pixel can be assigned a label from a set of 5 categories {floor, left wall, middle wall, right wall, ceiling}. This 5-category formulation has an ambiguity problem because the patterns of the three types of walls are essentially indistinguishable. FCN is coordinate invariant because the convolutional layer actually implements a sliding window search, so it is not suitable for telling the difference between the left wall and the right wall. Thus, reference [3] uses an additional ambiguity clarification step. Reference
[27] uses two formulations for FCN training. These FCN-based works show dramatic performance improvements, but their reasoning schemes are still conventional or primitive. It is possible to design more principled and efficient reasoning schemes using robust FCN features.
[0215] Broader literature. This literature describes other scene understanding tasks that are roughly the same or similar to room layout estimation. For example, reference
[18] attempts to understand the layout of natural scenes with horizons, urban scenes, corridors, and others, for which room layout estimation is only a special case. Another special case of reference
[18] is outdoor urban layout estimation, such as described in references [1] and
[13] . Such estimation is often viewed as a graphical application under the name of photo pop-up and is evaluated with subjective user studies. Reference
[14] attempts to recover room layouts in more detail than a box and is evaluated in terms of wall-floor edge errors. Because these works leverage the techniques built on top of reference
[11] , these references can therefore potentially benefit from the examples and embodiments disclosed herein.
[0216] Concepts similar to ST and PIO. Looking at the even broader literature, concepts somewhat similar to ST and PIO have been discussed. Under the name of label transfer, references
[16] and
[28] address semantic segmentation in a non-parametric way. ST differs from this literature primarily as a unified deep architecture (and certainly in terms of its parametric nature). Reference [8] and its descendants are known for their representation of human limbs as springs. PIO differs from this literature primarily as an efficient approximation inspired by concepts from mechanics.
[0217] (Semantic Transfer) Examples and implementations of the disclosed semantic transfer (ST) technology include Fig.16 For one embodiment, the ST technique is proposed in level 3. For ease of understanding, level 4 (which is the inference stage) can be regarded as the inference stage, which is the ultimate goal of FCN - that is, pixel-by-pixel edge labeling. Fig.16 As shown in the fourth panel of Figure 1, four pixel-wise activation maps are extracted from the input image, each corresponding to a label from S (set 1). For example, in the wf activation map, a higher color temperature indicates a higher probability that wf exists.
[0218] refer to Fig.16 , the top part depicts the probabilistic node connectivity in our formulation, while the bottom part depicts the semantic transfer (ST) in three levels. Level 1 refers to semantic segmentation pre-training. Level 2 refers to edge classification using pixel-wise semantic features. Level 3 refers to end-to-end edge labeling fine-tuning. In level 3, the pre-trained network refers to the one outlined by the dashed box in level 1. In level 4, the pixel-wise edge labeling network refers to the one outlined by the dashed box in level 3.
[0219] Fig.17 is a diagram of a network design for semantic segmentation, semantic transfer, semantic feature space, and transfer weight visualization according to an exemplary embodiment. Fig.17It is divided into four parts (a) to (d). In part (a), the network design for ST in level one is shown. In part (b), the qualitative results of semantic segmentation on the dataset LSUN are shown. In part (c), the unsupervised structure visualization of the semantic feature space is shown. In part (d), the semantic weight visualization is shown. For one embodiment, LSUN does not provide semantic segmentation ground truth for quantitative evaluation. About Fig.17 The different parts of the top left, top right, bottom left and bottom right can be called background (bg), wall-floor edge (wf), wall-wall edge (ww) and wall-ceiling edge (wc).
[0220] Fig.18A is the figure on the left of the feature quality visualization. From top to bottom: input, bg activation, wf activation, ww activation, wc activation, softmax result. On the right is the feature quality comparison. In this example, each feature map is numerically normalized independently. For one embodiment, the feature maps generated by these disclosed techniques can be processed into the style described in reference
[17] .
[0221] For one embodiment, in level 1, an FCN can be trained on 37 categories of semantic segmentation on the dataset SUNRGBD to maximize the description of cluttered scenes. These 37 categories can cover most of the objects and furniture that usually appear in indoor scenes, like walls, ceilings, chairs or windows. The FCN can be built on the recently introduced architecture ResNet-101, as described in reference
[10] .
[0222] refer to Fig.17 In part (a), we can perform net surgery on the last two groups of the bottleneck in the original ResNet-101 using the hole mechanism described in
[15] (in the name of dilated convolutions in
[26] ). The input to this network (RGB image) is actually a random variable X with values from [0,255]. X is determined by a hidden random variable Y with values from the semantic tag [1,37]. Thus, the network describes the posterior distribution P(Y|X).
[0223] In stage 2, the room layout dataset LSUN is fed through a semantic segmentation network, resulting in pixel-wise 37-channel semantic features. As an indoor scene understanding dataset, the model trained on SUNRGBD generalizes well on LSUN. Fig.17Part (b) shows qualitative results on LSUN, which is entirely produced by softmax operations without post-processing techniques like conditional random fields. Each pixel is then treated as a sample, and a fully connected layer can be learned to bridge the gap between the 37-channel semantic features and the 4-class edge markers. To show that the semantic features are discriminative for this task, a standard unsupervised analysis can be implemented with t-sne, as described in
[24] . Fig.17 Part (c) of , shows that samples of wall-ceiling edges (wc) and wall-floor edges (wf) form a clear cluster in the embedded space. Some samples of wall-wall edges (ww) and background (bg) are also scattered among each other. In this level, Y is determined by a hidden random variable Z that takes values from edge labels as described in references [1] and [4] (set 1). Therefore, this fc layer describes the posterior distribution P(Z|Y).
[0224] P(Z|Y) is a parameterized representation of the relationship between room layout and scene clutter. Unlike the pioneering work, the disclosed technique models this relationship directly in a neural network. This is inspired by understanding room layout. Fig.16 As shown in the panel of level two in Figure 1, the network in level one extracts 37 channels of semantic features from the scene. Only the channel at the top of the stack is fully shown, and that channel corresponds to the window. This channel can roughly tell the location and extension of the three windows in the scene. How does the human brain parse the room layout from semantic features like these? The disclosed examples and embodiments assume decisions based on rules like the following: wall-floor edges cannot pass through windows, so they are unlikely to appear in areas with high window scores.
[0225] To verify this hypothesis, for one embodiment, the transfer weights can be visualized in the fc layer. These weights can be learned 100 times independently and organized as in Fig.17 The box diagram is shown in part (d) of . Not surprisingly, the semantic features of wall, floor, and ceiling channels contribute the most to ww, wf, and wc, respectively. In general, smaller boxes with higher scores mean stronger correlations. Taking wc as an example, in addition to the ceiling, the top four transfer weights are equipped with cabinets, pictures, sofas, and whiteboards.
[0226] According to common scenes, cabinets, pictures, and whiteboards tend to appear in the corresponding field of wc pixels because they are vertically tall in physical space. The sofa is usually low, so its variation (depicted by the box size) is twice that of the picture. The whiteboard is rare, which explains why its variation is also large.
[0227] In stage three, for one embodiment, the learned 37×4fc layer is reshaped into a 1×1×37×4 convolutional layer and added on top of the network trained in stage one. For one embodiment, the weights from stage one act as a feature extractor and the weights from stage two act as a classifier. The weights can form a pixel-wise edge labeling network that describes P(Z|Y)P(Y|X)=P(Z|X). On the one hand, this network can be end-to-end fine-tuned on LSUN for edge labeling, which is the ultimate goal we mentioned at the beginning of this section. On the other hand, it elegantly incorporates the relationship between scene clutter and room layout, which is a factor for the disclosed technology.
[0228] In addition to end-to-end training and scene clutter modeling, the advantage of semantic transfer is better initialization for extremely unbalanced training data. Fig.17 Direct training of the pixel-wise edge labeling network can be performed without ST. However, the output of the first batch normalization (BN) layer easily overflows, causing training failure. The training problem is also reported in Section 3.2 of
[17] , which describes that the network must be pre-trained on NYUd2 and pre-trained on PASCAL, which leads to poor results. This problem can be caused by a very unbalanced distribution of edge labels. As in Fig.16 As shown in the second panel of the level, more than 99% of the labels are background. As in the classical method of initializing autoencoders using multiple restricted Boltzmann machines (see, for example, reference
[12] ), the disclosed pixel-by-pixel edge labeling network is initialized by the first two levels so that the overflow phenomenon of ST is no longer observed. For one embodiment, the connectivity of the probabilistic nodes is given by Fig.16 The upper part is shown.
[0229] (optimization) For one embodiment, the disclosed pixel-by-pixel edge labeling network produces highly robust features in all types of scenes, as shown by Fig.18A The samples can be collected from the LSUN test set to cover different types of scene clutter, layout configurations, and lighting conditions. For one embodiment, feature quality comparisons can be provided for failure cases cited in
[17] , as shown by Fig.18A As shown in the right panel of . Fig.18A The three scenes in are challenging because almost all edge pixels are occluded by clutter like sofas, tables or beds. The reference
[17] network that does not consider the relationship between room layout and scene clutter fails to extract reliable edge features compared to the published networks and techniques that handle them properly.
[0230] If Fig.18AAs shown, for one embodiment, it is possible to estimate the room layout directly using image processing techniques on these features. Using the possibility of applying a Hough transform on the weakened softmax result, qualitative results can be good. However, using a series of image processing modules for inference is not a good choice, because many threshold parameters related to weakening or Hough transform must be tuned. Instead, an optimized parameterized layout can be used.
[0231] Fig.18B is a diagram of a topology of a room layout from a test set according to an exemplary embodiment. The figure may show a sixth topology cut from the LSUN canonical representation having those characteristics. The disclosed technology proposes two different implementations: Naive Optimization (NO) and Physically Inspired Optimization (PIO).
[0232] (Symbols and formulas) Topology. For one embodiment, there can be 11 different possible room layout topologies in a 2D image, as demonstrated in the supplementary material. We denote them as T i (i∈[1,11]).
[0233] For one embodiment, each topology can be connected by an edge set P i = {P ij , j∈[1,nC]} and parameterized, where each P ij as the 2D coordinates and nC as the number of connections.
[0234] For one embodiment, the link connectivity can be represented by the edge set E i ={E ik =(Q ka , Q kb ,c},Q ka ∈P i , Q kb ∈P i , c∈S, k∈[1,nE]}, where nE is the edge number. S is set 1.
[0235] Take the sixth topology as an example ( Fig.18B ), the parameterized representation is P6={P 6j , j∈[1,6]} and E6={E 6k =(Q ka , Q kt ,c),Q ka ∈P6,Q kb ∈P6, C∈S, k∈[1,5]}, because nC=6 and nE=5.
[0236] Edge labeling diagram. For one embodiment, P iand E i can be converted into a pixel-by-pixel edge labeling map, which is Fig.15 The output in is similar. The conversion is expressed as M = C (P i , E i ) and we will omit E later i , because it does not change for a certain topology Ti. ij When considering the reference from the join set P i and M[P ij ], you can also use M[P i ] C is implemented by assigning corresponding labels from S (set 1) to the pixels between the two connections.
[0237] For one embodiment, the features generated by the pixel-by-pixel edge labeling network are denoted as F l (l∈[1,4]). For one embodiment, both M and F1 have the same size as the input image, indicated by (w,h). For one embodiment, the consistency target (CO) and its corresponding energy format (e) can be defined with respect to (w,h): e=exp(-CO) (3) Among them, M l (l∈[1,4]) is a binary mask generated from M by setting a pixel to one if M(m,n)=l and to zero otherwise. i In one embodiment, the optimal parameterization is expressed as P i It can be found by minimizing e: In most cases, starting with the right topology leads to the lowest energy value and the wrong topology leads to higher energy values. Failure cases do exist and we will visualize them later. For one embodiment, the optimization detailed below implements i The average state of the set is initialized (e.g. Fig.18B The one shown on the left in the figure).
[0238] (Simple optimization) For one embodiment, when solving Equation 4, a possible solution is to calculate P near the initialization state. i Sampling and comprehensive search produces the lowest e P i to simulate the solution presented in [3]. The method in [3] does not model any gradients and the solution space is limited. In contrast, a gradient-based optimization module can be built that iteratively approaches the right layout from an average initialization. For one embodiment, NO can be calculated and implemented as follows: Algorithm 1 Naive Optimization Initialization: Average P i while e decreases do for all j do Update P according to equations 5, 6, and 7 ij end for After the update P i Calculate e end while where α is the scaling factor and Δx(=Δy) is the window size. For joins at image boundaries (e.g., Fig.18B P in the left figure 62 ), can be obtained by changing ΔP ij The corresponding components of are set to zero to impose additional constraints. For one embodiment, if the connection is moved to the image corner, ΔP ij is treated as a special case to allow the join to move to another boundary or just remain at the corner. The convergence performance of NO can be very good, but it is very slow, so we introduce PIO as an effective alternative.
[0239] (Analysis and Motivation) For one embodiment, the efficiency bottleneck of NO can be analyzed. When calculating Equation 5 (and similarly Equation 6), Fig. 18C is a diagram of the room shown in the input image, a feature map constructed by considering the edges as springs and the feature map as a potential field and correlating the force applied at each point of the spring, and the influence of the force synthesis according to an exemplary embodiment. Fig. 18C , (ag)M2[P ij (x-Δx)]; (ah)M2[P ij ];(ai)M2[P ij (x+Δx)] and (b) is the input image. (c / d) If we consider the edge as a spring and the feature map as a potential field, the force applied to each point of the spring is related. (e / f) The effect of force synthesis. In Equation 9, m and n can be omitted, and their meanings are explained in Equation 2. Calculate M l [P ij (x+Δx)]-M l [P ij (x-Δx)] is the efficiency bottleneck, which means M = C(P i ) and intuitively we use Fig. 18C Part (a) of M2[Pij (x+Δx)]-M2[P ij (x-Δx)] (l=2, since the wall-floor edge is the second marker from S, set 1). It actually subtracts two pixel-wise masks, where M2[P ij (x+Δx)] is given by Fig. 18C ai shows and M2[P ij (x-Δx)] is given by Fig. 18C ag is shown.
[0240] For one embodiment, M is generated by transforming C. For one embodiment, C can be implemented by iterating over each pixel to determine its label. For one embodiment, the ratio of w and h can be denoted by N, and the complexity of this implementation (hereinafter referred to as NOA) is O(N) for each calculation of Equation 5 or 6. 2 ), which can run for tens of minutes on an image.
[0241] For one embodiment, an improved implementation of C (hereinafter referred to as NOB) computes the pixel coordinates between two connections and directly accesses the corresponding mask elements. Its complexity is O(N), and it runs for about 30s on an image. The idea of further reducing the complexity to O(1) motivates us to introduce PIO.
[0242] For one embodiment, each edge is considered as a spring that can translate, rotate, and change its length. In NO, the movement of the edges is determined by each pixel on them, but there is computational redundancy. Fig. 18C As shown in parts (c) and (d) of the figure, the feature map can be used as a potential field to analyze how points on the edge move. Not surprisingly, their movement is not independent and can be seen from the two end points of the edge (which are Qk a and Qk b ) is roughly interpolated by moving. For one embodiment, based on this observation, it can be used in P i Instead of M l [P i ] to approximate ΔP ij Since the number of connections Pi nC is constant, the complexity is O(1). This is the first key concept of PIO.
[0243] Force synthesis is the second key concept of PIO. Fig. 18C As shown in part (e) of , by considering the endpoints of edges j and k instead of every point on them, they will move towards the local minimum state. This can be corrected by calculating the movement of edge 1 (see Fig. 18C, where another feature map (wall-wall edges) is used as the potential field. Therefore, the movement of each link should be determined by the force exerted on each edge connected to that link. Obviously, adding two gradient vectors (such as Fig. 18C and Fig. 18C Parts (e) and (f) naturally obey the parallelogram law of resultant forces.
[0244] (Physics-Inspired Optimization) For the first concept, a new consistency goal E can be defined for each endpoint of the edge ik =(Q ka , Q kb,c ): CO2=Fc(Okax,Qkay) (10) e2=exp(-CO2) (11) As a reminder, the meanings of E and F are explained at the beginning of this section.
[0245] Computing the gradient of a point in the potential field is simple, as follows: In this physics-inspired optimization, ΔQ ka is considered to be applied to the spring-like edge E ik The endpoint Q ka As for the second concept of force composition, we define E[P ij ]={(Q oa =P ij , Q ob ,c),o∈[1,#(E[P ij ])]}, which is E i And when considering different edges, it is applied to P ij The force on the oa . Thus ΔP ij It can be approximated by: Algorithm 2 Physics-Inspired Optimization Initialization: Average P t while e decreases do for all j do Get the subset E[P ij ] for all o do Calculate Q according to equations 12, 13, and 14 ob =P ij The force applied on end for Calculation of ΔP ij By Equation 15 and updating P ij end for After the update P i Calculate e end while As mentioned before, Equation 15 naturally follows from the parallelogram law of force resultants. In the case of potential chaos, ΔQ oa and ΔQ ka All are calculated according to Equation 14 (k is E i and o is an index in E i The subset E[P ij ]). And to summarize, the efficiency of PIO mainly comes from the O(1) complexity of Equation 10, while that of Equation 2 is at least O(N)(NOB).
[0246] Fig.18D : Left: Qualitative results on the LSUN validation set. Visualized feature maps are merged by pixel-wise max operation to make wf, ww and wc, but they are used independently in PIO. Right: Typical failure cases where the wrong topology produces the lowest energy.
[0247] Table 1: Qualitative results on the LUSUN test set (experimental) LSUN Results LSUN is a room layout estimation dataset consisting of 4000 training, 394 validation, and 1000 holdout test samples. Two standard metrics are used for evaluation: (1) e conner The corner point (connection) error is P i The Euclidean distance between the estimated coordinates and the ground truth. Because of the resolution diversity, e conner Normalized by the length of the image diagonal. (2)e pixel By adding P i Convert to image Fig.18D The pixel error measures the ratio of the number of pixels that are incorrectly labeled to all pixels. pixel The LSUN official evaluation code automatically maximizes the overlap for the label ambiguity problem. ) For large-scale evaluation, both metrics are averaged over the images. On the validation set, the official evaluation code provided by the LSUN committee is used. The third-party evaluation results on the test set are reported in Table 1. On both metrics, the proposed method outperforms conventional methods
[11] and FCN-based methods
[17] [3]
[27] . Qualitative results and failure cases on the validation set are given in Fig.18D exhibit.
[0248] Fig.18D The left side shows an example of qualitative results on the LSUN validation set when visualizing feature maps by merging wf, ww, and wc through a pixel-wise maximum operation according to an exemplary embodiment. The right side shows a typical failure case in which the wrong topology produces the lowest energy according to an exemplary embodiment. Fig.18D ,Part (a) shows a typical simple case, where most edge pixels are visible and the feature map accurately captures their locations.,For one embodiment, the visualized edge map is temporarily distorted near the 30th iteration due to force synthesis and PIO finally aligns it to the true layout.
[0249] Fig.18D Parts (b)-(d) in Fig. 3 show that the feature map cannot accurately locate the edge where the black circle is located, resulting in a relatively high e conner There are many reasons for this, such as severe occlusion (b), insufficient feature map resolution (c), and misleading textures (d).
[0250] Table 2: Qualitative results on the Hedau test set Table 3: Average runtime per frame (artpf) comparison refer to Fig.18D In part (e) of , if we consider the cabinet as part of the wall, the room is no longer a strict box. In fact, those separated wall-ceiling edges are successfully captured by the feature map and aligned by PIO. However, the annotation protocol considers the cabinet as an occlusion. Fig.18D Part (f) of shows a severe occlusion case. For one embodiment, semantic transfer allows the network to infer that there is a wall-floor edge behind the bed, but the connection in the black circle is not accurately located.
[0251] Although not 100% accurate, Fig.18D Parts (a)-(f) in are considered as successful cases because the output topology is correct. Fig.18D Parts (g)-(h) in Fig. 3 are two typical failure cases, where the wrong topology produces the lowest energy. Fig.18D The failure in part (g) is caused by overfitting. The network infers that there is a wall-floor edge behind the bed, but the annotation protocol does not. Fig.18DPart (h) in shows another type of failure due to structural ambiguity. In addition, the scene is no longer a strict box because some parts of the wall protrude outward. The network recognizes them as ceilings, but the annotation protocol does not, resulting in PIO showing the wrong topology.
[0252] (Hedau results) The Hedau dataset consists of 209 training samples and 105 test samples presented in
[11] . On the Hedau test set, for one embodiment, the model trained with the LSUN training set can be directly evaluated. Fig.18E The left side shows an example of qualitative results on the Hedau validation set when the visual feature map is merged by pixel-by-pixel maximum operation according to an exemplary embodiment. Fig.18E As shown, the model extracts reliable features across datasets. Consistent with the literature, pixel error can be a quantitative metric. The disclosed technique can report better results than conventional methods like those described in references [5] and
[11] and FCN-based methods like references [3],
[17] and
[27] (Table 2). The overall pixel error on the Hedau test set (6.60%) is higher than that on the LSUN test set (5.29%) because the ground truth annotated by the Hedau dataset is more rigorous (usually by Fig.18E ).
[0253] (Hyperparameters and efficiency) In Algorithm 2, whether e decreases is determined by a threshold of 10-6. This threshold is related to the numerical scalability of e. During implementation, for one embodiment, e=-CO instead of e=exp(-CO) for equivalence, and the numerical scalability of e is about -15, which has been shown in the video mentioned above. (2) The scaling factor α is adaptive to ensure that the length of the gradient (force) is between 1 and 3. This limits the connection to only a small amount of movement in one iteration, as shown in the video. (3) The impact of the window size Δx (=Δy) is evaluated on the LSUN validation set, and the quantitative results are given by Fig.18F exhibit. Fig.18F is a graph of error vs. window size on the LSUN validation set according to an exemplary embodiment. As the window size grows from 1 pixel to 10 pixels, both metrics show an increasing trend. Since PIO can be viewed as an alignment algorithm, this is not surprising, as computing the gradient in a larger window size results in a weaker ability to accurately capture local structure.
[0254] For one embodiment, the average runtime per frame on the LSUN validation set can be evaluated with NOB and PIO. NOA was not evaluated due to unsolvability. The results are provided in Table 3, showing that PIO brings a sharp speedup for NOB without causing a significant drop in accuracy. The evaluation can be implemented with MATLAB and the disclosed techniques can be used with real-time applications.
[0255] Figure 18G is a diagram comparing two techniques for physical-inspired optimization according to an exemplary embodiment. Specifically, Figure 18G A comparison of naive and physics inspired optimization is shown. The optimization operations are presented as steps and the squares refer to the operations in the five boxes. The first two boxes, ST features and joint point coordinates, are inputs to both processes. The third box, energy target, is performed for both steps 1. The next operation, labeled step 3, is such that: the two optimizations differ in that the gradient operations as described above are different. The remaining operations are updates and repetitions until the optimization is complete.
[0256] (Summarize) The disclosed examples and embodiments implement alternative methods for room layout estimation. Using very deep semantic transfer FCN, reliable edge features can be extracted in various situations. A new reasoning scheme inspired by mechanical concepts is also provided. The effectiveness of the disclosed method can be illustrated by extensive quantitative experiments on public datasets.
[0257] (Quote) References [1] to
[29] referenced in this detailed description are identified as follows.
[0258] [1] O. Barinova, V. Konushin, A. Yakubenko, K. Lee, H. Lim and A. Konushin, Fast automatic single-view 3-D reconstruction of urban scenes, ECCV, March 2008. [2]JM Coughlan and A L Yuille, Manhattan world: Compass direction from a single image by bayesian inference, ICCV, February 1999. [3] S. Dasgupta, K. Fang, K. Chen, and S. Savarese. Delay: Robust spatial layout estimation for cluttered indoor scenes. CVPR, January, February, March, August, November, December 2016. [4] L. Del Pero, J. Bowdish, D. Fried, B. Kermgard, E. Hartley, and K. Barnard. Bayesian, Geometric modeling of indoor scenes, CVPR, February 3, 2012. [5] L. Del Pero, J. Bowdish, B. Kermgard, E. Hartley, and K. Barnard, Understanding Bayesian Rooms Using Composite 3D Object Models, CVPR, February, March, December 2013. [6] D. Eigen and R. Fergus, Predicting depth, surface normals and semantic labels with a common multiscale convolutional architecture, CVPR, January 2015. [7] D. Eigen, C. Puhrsch, and R. Fergus, Depth map prediction from a single image using a multi-scale deep network, NIPS, January 2014. [8] P.F. Elzenszwalb and D.P. Huttenlocher, Pictorial structures for object recognition, IJCV, March 2005. [9] S. Gupta, P. Arbelaez, R. Girshick, and J. Malik, Aligning 3D models to RGB-D images of cluttered′ scenes, CVPR, January 2015.
[10] K. He, X. Zhang, S. Ren, and J. Sun, Deep residual learning for image recognition, CVPR, May 2016.
[11] V. Hedau, D. Hoiem, and D. Forsyth, Recovering the spatial layout of cluttered rooms, CVPR, 2009.
[12] GE Hinton and RR Salakhutdinov, Reducing the dimensionality of data with neural networks, Science, June 2006.
[13] D. Hoiem, A. E. E. Fros, and M. Hebert, Recovering surface layout from an image, IJCV, March 2007.
[14] D.C. Lee, M. Hebert, and T. Kanade, Geometric reasoning for single image structure recovery, CVPR, March 2009.
[15] C. Liang-Chieh, P. George, K. Iasonas, M. Kevin, and LY Alan, Semantic image segmentation with deep convolutional nets and fully connected crfs, ICLR, May 2015.
[16] C. Liu, J. Yuen, and A. Torralba, Nonparametric scene parsing: Label transfer via dense scene alignment, CVPR, March 2009.
[17] A. Mallya and S. Lazebnik, Learning informative edge maps for indoor scene layout prediction, ICCV, January, February, March, May, June, November, December 2015.
[18] V. Nedovic, A. S. Meulders, A. Redert, and J.-M. Geusebroek, Depth information by stage classification, ICCV, March 2007.
[19] S. Ramalingam, J. K. Pillai, A. Jain, and Y. Taguchi, Manhattan junction catalogue for spatial reasoning of indoor scenes, CVPR, February 2013.
[20] A.G. Schwing, S. Fidler, M. Pollefeys, and R. Urtasun, Box in the box: Joint 3D layout and object reasoning from single images, ICCV, February 3, 2013.
[21] A.G. Schwing, T. Hazan, M. Pollefeys, and R. Urtasun, Efficient structured prediction for 3D indoor scene understanding, CVPR, February 3, 2012.
[22] S. Song and J. Xiao, Deep sliding shapes for amodal 3d object detection in rgb-d images, CVPR, January 2016.
[23] S. Song and J. Xiao, Sliding shapes for 3d object detection in depth images, ECCV, January 2014.
[24] L. Van der Maaten and G. Hinton, Visualizing data using t-sne, Journal of Machine Learning Research, May 2008.
[25] H. Wang, S. Gould and D. Koller, Discriminative learning with latent variables for cluttered indoor scene understanding, published in ECCV on February 3, 2010.
[26] F. Yu and V. Koltun, Multi-scale context aggregation by dilated convolutions, ICLR, May 2016.
[27] R. Yuzhuo, C. Chen, L. Shangwen and KC-C. Jay. A coarse-to-fine indoor layout estimation (cfile) method. ACCV, January, February, March, November, December 2016.
[28] H. Zhang, J. Xiao and L. Quan, Supervised label transfer for semantic segmentation of street scenes, ECCV, March 2010.
[29] Y. Zhao and S.-C. Zhu, Scene parsing by integrating function, geometry and appearance models, CVPR, February 3, 2013. Graphics System Overview Fig.19 1 is a block diagram of a processing system 1900 according to an exemplary embodiment. In various embodiments, the system 1900 includes one or more processors 1902 and one or more graphics processors 1908, and may be a single-processor desktop system, a multi-processor workstation system, or a server system with a large number of processors 1902 or processor cores 1907. In one embodiment, the system 1900 is a processing platform incorporated within a system-on-chip (SoC) integrated circuit for use with a mobile device, a handheld device, or an embedded device.
[0259] Embodiments of system 1900 may include or be incorporated in the following: a server-based game platform, a game console, including a game and media console, a mobile game console, a handheld game console, or an online game console. In some embodiments, system 1900 is a mobile phone, a smart phone, a tablet computing device, or a mobile Internet device. Data processing system 1900 may also include, be coupled with, or be integrated in the following: a wearable device, such as a smart watch wearable device, a smart glasses (eyewear) device, an augmented reality device, or a virtual reality device. In some embodiments, data processing system 1900 is a television or set-top box device having one or more processors 1902 and a graphical interface generated by one or more graphics processors 1908.
[0260] In some embodiments, one or more processors 1902 each include one or more processor cores 1907 for processing instructions, which when executed perform operations for system and user software. In some embodiments, each of the one or more processor cores 1907 is configured to process a specific instruction set 1909. In some embodiments, the instruction set 1909 can facilitate complex instruction set computing (CISC), reduced instruction set computing (RISC), or computing via very long instruction words (VLIW). Multiple processor cores 1907 can each process different instruction sets 1909, and the instruction set may include instructions for facilitating emulation of other instruction sets. The processor core 1907 may also include other processing devices, such as a digital signal processor (DSP).
[0261] In some embodiments, the processor 1902 includes a cache memory 1904. Depending on the architecture, the processor 1902 may have a single internal cache or multiple levels of internal cache. In some embodiments, the cache memory is shared between various components of the processor 1902. In some embodiments, the processor 1902 also uses an external cache (e.g., a level 3 (L3) cache or a last level cache (LLC)) (not shown), which may be shared between the processor cores 1907 using known cache coherence techniques. A register file 1906 is additionally included in the processor 1902, and the register file may include different types of registers (e.g., integer registers, floating point registers, status registers, and instruction pointer registers) for storing different types of data. Some registers may be general purpose registers, while other registers may be specific to the design of the processor 1902.
[0262] In some embodiments, the processor 1902 is coupled to a processor bus 1910 to transmit communication signals (such as address, data, or control signals) between the processor 1902 and other components in the system 1900. In one embodiment, the system 1900 uses an exemplary 'hub' system architecture, including a memory controller hub 1916 and an input output (I / O) controller hub 1930. The memory controller hub 1916 facilitates communication between memory devices and other components of the system 1900, while the I / O controller hub (ICH) 1930 provides connections to I / O devices via a local I / O bus. In one embodiment, the logic of the memory controller hub 1916 is integrated within the processor.
[0263] The memory device 1920 may be a dynamic random access memory (DRAM) device, a static random access memory (SRAM) device, a flash memory device, a phase change memory device, or some other memory device having suitable properties to act as process memory. In one embodiment, the memory device 1920 may operate as system memory for the system 1900 to store data 1922 and instructions 1921 for use when the one or more processors 1902 execute applications or processes. The memory controller hub 1916 is also coupled to an optional external graphics processor 1912, which may communicate with one or more graphics processors 1908 in the processor 1902 to perform graphics and media operations.
[0264] In some embodiments, the ICH 1930 enables peripherals to connect to the memory device 1920 and the processor 1902 via a high-speed I / O bus. The I / O peripherals include, but are not limited to, an audio controller 1946, a firmware interface 1928, a wireless transceiver 1926 (e.g., Wi-Fi, Bluetooth), a data storage device 1924 (e.g., a hard drive, flash memory, etc.), and a traditional I / O controller 1940 for coupling traditional (e.g., Personal System 2 (PS / 2)) devices to the system. One or more Universal Serial Bus (USB) controllers 1942 connect input devices, such as a keyboard and mouse 1944 combination. A network controller 1934 may also be coupled to the ICH 1930. In some embodiments, a high-performance network controller (not shown) is coupled to the processor bus 1910. It will be appreciated that the system 1900 shown is exemplary and not limiting, as other types of data processing systems configured in different ways may also be used. For example, the I / O controller hub 1930 may be integrated within the one or more processors 1902 , or the memory controller hub 1916 and the I / O controller hub 1930 may be integrated into a discrete external graphics processor, such as the external graphics processor 1912 .
[0265] Fig. 20 is a block diagram of an exemplary embodiment of a processor 2000 having one or more processor cores 2002A- 2002N, an integrated memory controller 2014, and an integrated graphics processor 2008. Fig. 20 Those elements with the same reference numbers (or names) as those of any other figure herein can operate or function in any manner similar to that described elsewhere herein, but are not limited thereto. Processor 2000 may include additional cores up to and including additional core 2002N represented by a dashed box. Each of processor cores 2002A-2002N includes one or more internal cache units 2004A-2004N. In some embodiments, each processor core also has access to one or more shared cache units 2006.
[0266] Internal cache units 2004A-2004N and shared cache unit 2006 represent a cache memory hierarchy within processor 2000. 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 intermediate level caches, such as level 2 (L2), level 3 (L3), level 4 (L4), or other levels of cache, where the highest level cache in front of external memory is classified as LLC. In some embodiments, cache coherence logic maintains coherence between the various cache units 2006 and 2004A-2004N.
[0267] In some embodiments, the processor 2000 may also include a set of one or more bus controller units 2016 and a system agent core 2010. The one or more bus controller units 2016 manage a set of peripheral buses, such as one or more peripheral component interconnect buses (e.g., PCI, PCI Express). The system agent core 2010 provides management functionality for various processor components. In some embodiments, the system agent core 2010 includes one or more integrated memory controllers 2014 to manage access to various external memory devices (not shown).
[0268] In some embodiments, one or more of the processor cores 2002A-2002N include support for simultaneous multithreading. In such embodiments, the system agent core 2010 includes components for coordinating and operating the cores 2002A-2002N during multithreaded processing. The system agent core 2010 may additionally include a power control unit (PCU) that includes logic and components for regulating the power state of the processor cores 2002A-2002N and the graphics processor 2008.
[0269] In some embodiments, the processor 2000 additionally includes a graphics processor 2008 for performing graphics processing operations. In some embodiments, the graphics processor 2008 is coupled to a set of shared cache units 2006 and a system agent core 2010 (including one or more integrated memory controllers 2014). In some embodiments, a display controller 2011 is coupled to the graphics processor 2008 to drive the graphics processor output to one or more coupled displays. In some embodiments, the display controller 2011 can be a separate module coupled to the graphics processor via at least one interconnect, or can be integrated within the graphics processor 2008 or the system agent core 2010.
[0270] In some embodiments, a ring-based interconnect unit 2012 is used to couple the internal components of the processor 2000. However, alternative interconnect units may be used, such as point-to-point interconnects, switched interconnects, or other technologies, including those well known in the art. In some embodiments, the graphics processor 2008 is coupled to the ring interconnect 2012 via an I / O link 2013.
[0271] Exemplary I / O links 2013 represent at least one of a variety of I / O interconnects, including an on-package I / O interconnect that facilitates communication between various processor components and high-performance embedded memory modules 2018 (such as eDRAM modules). In some embodiments, each of processor cores 2002A-2002N and graphics processor 2008 use embedded memory modules 2018 as a shared last-level cache.
[0272] In some embodiments, processor cores 2002A-2002N are homogeneous cores that execute the same instruction set architecture. In another embodiment, processor cores 2002A-2002N are heterogeneous in terms of instruction set architecture (ISA), wherein one or more of processor cores 2002A-2002N execute a first instruction set, and at least one of the other cores executes a subset or a different instruction set of the first instruction set. In one embodiment, processor cores 2002A-2002N are heterogeneous in terms of microarchitecture, wherein one or more cores with relatively high power consumption are coupled with one or more power cores with lower power consumption. In addition, processor 2000 can be implemented on one or more chips or implemented as a SoC integrated circuit having the components shown in addition to other components.
[0273] Fig.2121 is a block diagram of a graphics processor 2100, which may be a discrete graphics processing unit, or may be a graphics processor integrated with multiple processing cores. In some embodiments, the graphics processor communicates via a mapped I / O interface to registers on the graphics processor and using commands placed in processor memory. In some embodiments, the graphics processor 2100 includes a memory interface 2114 for accessing memory. The memory interface 2114 may be an interface to local memory, one or more internal caches, one or more shared external caches, and / or to system memory.
[0274] In some embodiments, the graphics processor 2100 also includes a display controller 2102 for driving display output data to a display device 2120. The display controller 2102 includes hardware for the composition of multiple layers of video or user interface elements and one or more overlapping planes for the display. In some embodiments, the graphics processor 2100 includes a video codec engine 2106 for encoding, decoding, or transcoding media to, from, or between one or more media encoding formats, including but not limited to: Moving Picture Experts Group (MPEG) formats (such as MPEG-2), Advanced Video Coding (AVC) formats (such as H.264 / MPEG-4 AVC), and Society of Motion Picture & Television Engineers (SMPTE) 421M / VC-1, and Joint Photographic Experts Group (JPEG) formats, such as JPEG, and Motion JPEG (MJPEG) formats.
[0275] In some embodiments, the graphics processor 2100 includes a block image transfer (BLIT) engine 2104 for performing two-dimensional (2D) rasterizer operations, including, for example, bit boundary block transfers. However, in one embodiment, 2D graphics operations are performed using one or more components of a graphics processing engine (GPE) 2110. In some embodiments, the GPE 2110 is a compute engine for performing graphics operations, including three-dimensional (3D) graphics operations and media operations.
[0276] In some embodiments, GPE 2110 includes a 3D pipeline 2112 for performing 3D operations, such as rendering three-dimensional images and scenes using processing functions that act on 3D primitive shapes (e.g., rectangles, triangles, etc.). 3D pipeline 2112 contains programmable and fixed function elements that perform various tasks within the element and / or generate execution threads to 3D / media subsystem 2115. Although 3D pipeline 2112 can be used to perform media operations, embodiments of GPE 2110 also include a media pipeline 2116 that is specifically used to perform media operations, such as video post-processing and image enhancement.
[0277] In some embodiments, the media pipeline 2116 includes fixed-function or programmable logic units for performing one or more specialized media operations (such as video decoding acceleration, video deinterlacing, and video encoding acceleration) instead of or on behalf of the video codec engine 2106. In some embodiments, the media pipeline 2116 additionally includes a thread generation unit to generate threads for execution on the 3D / media subsystem 2115. The generated threads perform calculations for the media operations on one or more graphics execution units included in the 3D / media subsystem 2115.
[0278] In some embodiments, the 3D / media subsystem 2115 includes logic for executing threads generated by the 3D pipeline 2112 and the media pipeline 2116. In one embodiment, the pipeline sends thread execution requests to the 3D / media subsystem 2115, which includes thread scheduling logic for arbitrating and scheduling various requests for available thread execution resources. The execution resources include an array of graphics execution units for processing 3D and media threads. In some embodiments, the 3D / media subsystem 2115 includes one or more internal caches for thread instructions and data. In some embodiments, the subsystem also includes shared memory, which includes registers and addressable memory, for sharing data between threads and storing output data.
[0279] Graphics processing engine Fig. 22 is a block diagram of a graphics processing engine 2210 of a graphics processor according to some embodiments. In one embodiment, the graphics processing engine (GPE) 2210 is Fig.21 The version of the GPE 2210 shown in FIG. Fig. 22 Elements having the same reference numbers (names) as elements of any other figure herein can operate or function in any manner similar to that described elsewhere herein, but are not limited thereto. Fig.21 2210. The 3D pipeline 2212 and the media pipeline 2216 of the GPE 2210. The media pipeline 2216 is optional in some embodiments of the GPE 2210 and may not be explicitly included in the GPE 2210. For example, and in at least one embodiment, independent media and / or image processors are coupled to the GPE 2210.
[0280] In some embodiments, the GPE 2210 is coupled to or includes a command streamer 2203 that provides a command stream to the 3D pipeline 2212 and / or the media pipeline 2116. In some embodiments, the command streamer 2203 is coupled to a memory, which can be a system memory, or one or more of an internal cache memory and a shared cache memory. In some embodiments, the command streamer 2203 receives commands from the memory and sends commands to the 3D pipeline 2112 and / or the media pipeline 2116. The commands are instructions taken from a circular buffer that stores commands for the 3D pipeline 2112 and the media pipeline 2116. In one embodiment, the circular buffer may additionally include a batch command buffer that stores a batch of multiple commands. The commands for the 3D pipeline 2112 may also include references to data stored in the memory, such as, but not limited to, vertex and geometry data for the 3D pipeline 2112 and / or image data and memory objects for the media pipeline 2116. The 3D pipeline 2112 and the media pipeline 2116 process commands and data by performing operations via logic within the respective pipelines or by dispatching one or more execution threads to the graphics core array 2214 .
[0281] In various embodiments, the 3D pipeline 2112 can execute one or more shader programs, such as vertex shaders, geometry shaders, pixel shaders, fragment shaders, compute shaders, or other shader programs, by processing instructions and dispatching execution threads to the graphics core array 2214. The graphics core array 2214 provides a unified execution resource block. The multi-purpose execution logic (e.g., execution unit) within the graphics core array 2214 includes support for various 3D API shader languages and can execute simultaneous execution threads associated with multiple shaders.
[0282] In some embodiments, graphics core array 2214 also includes execution logic for performing media functions such as video and / or image processing. In one embodiment, the execution unit additionally includes general purpose logic that can be programmed to perform parallel general purpose computing operations in addition to graphics processing operations. The general purpose logic can be used with Fig.19 (one or more) processor cores 1907 or as Fig. 20 The general logic within cores 2002A-2002N in the processor performs processing operations in parallel or in combination.
[0283] Output data generated by threads executing on the graphics core array 2214 may output data to memory in a unified return buffer (URB) 2218. URB 2218 may store data for multiple threads. In some embodiments, URB 2218 may be used to send data between different threads executing on the graphics core array 2214. In some embodiments, URB 2218 may also be used for synchronization between threads on the graphics core array and for fixed function logic within shared function logic 2220.
[0284] In some embodiments, graphics core array 2214 is scalable such that the array includes a variable number of graphics cores, each with a variable number of execution units based on the target power and performance level of GPE 2210. In one embodiment, execution resources are dynamically scalable such that execution resources can be enabled or disabled as needed.
[0285] The graphics core array 2214 is coupled to a shared function logic 2220, which includes a plurality of resources shared between the graphics cores in the graphics core array. The shared functions within the shared function logic 2220 are hardware logic units that provide specialized supplemental functionality to the graphics core array 2214. In various embodiments, the shared function logic 2220 includes, but is not limited to, a sampler 2221, math 2222, and inter-thread communication (ITC) 2223 logic. In addition, some embodiments implement one or more caches 2225 within the shared function logic 2220. The shared functions are implemented in situations where the demand for a given specialized function is insufficient to be included within the graphics core array 2214. Instead, a single instantiation of the specialized function is implemented as an independent entity in the shared function logic 2220 and shared between execution resources within the graphics core array 2214. The precise set of functions shared between the graphics core array 2214 and included within the graphics core array 2214 varies with the embodiment.
[0286] Fig.23 is a block diagram of another exemplary embodiment of a graphics processor 2300 . Fig.23 Elements having the same reference number (or name) as elements of any other figure herein may operate or function in any manner similar to that described elsewhere herein, but are not limited thereto.
[0287] In some embodiments, graphics processor 2300 includes ring interconnect 2302, pipeline front end 2304, media engine 2337, and graphics cores 2380A-2380N. In some embodiments, ring interconnect 2302 couples the graphics processor to other processing units, including other graphics processors or one or more general purpose processor cores. In some embodiments, the graphics processor is one of many processors integrated into a multi-core processing system.
[0288] In some embodiments, the graphics processor 2300 receives batches of commands via the ring interconnect 2302. The incoming commands are interpreted by a command streamer 2303 in a pipeline front end 2304. In some embodiments, the graphics processor 2300 includes scalable execution logic for performing 3D geometry processing and media processing via graphics core(s) 2380A-2380N. For 3D geometry processing commands, the command streamer 2303 supplies the commands to a geometry pipeline 2336. For at least some media processing commands, the command streamer 2303 supplies the commands to a video front end 2334, which is coupled to a media engine 2337. In some embodiments, the media engine 2337 includes a video quality engine (VQE) 2330 for video and image post-processing and a multi-format encoding / decoding (MFX) 2333 engine for providing hardware accelerated encoding and decoding of media data. In some embodiments, the geometry pipeline 2336 and the media engine 2337 each generate an execution thread for thread execution resources provided by at least one graphics core 2380A.
[0289] In some embodiments, the graphics processor 2300 includes scalable thread execution resources featuring modular cores 2380A-2380N (sometimes referred to as core slices), each modular core having multiple sub-cores 2350A-2350N, 2360A-2360N (sometimes referred to as core sub-slices). In some embodiments, the graphics processor 2300 can have any number of graphics cores 2380A through 2380N. In some embodiments, the graphics processor 2300 includes a graphics core 2380A, which has at least a first sub-core 2350A and a second sub-core 2360A. In other embodiments, the graphics processor is a low-power processor with a single sub-core (e.g., 2350A). In some embodiments, the graphics processor 2300 includes multiple graphics cores 2380A-2380N, each graphics core including a group of first sub-cores 2350A-2350N and a group of second sub-cores 2360A-2360N. Each of the first sub-cores 2350A-2350N includes at least a first group of execution units 2352A-2352N and a media / texture sampler 2354A-2354N. Each of the second sub-cores 2360A-2360N includes at least a second group of execution units 2362A-2362N and a sampler 2364A-2364N. In some embodiments, each sub-core 2350A-2350N, 2360A-2360N shares a group of shared resources 2370A-2370N. In some embodiments, these shared resources include a shared cache memory and a pixel operation logic. Other shared resources may also be included in various embodiments of the graphics processor.
[0290] Execution Unit Fig.24 Thread execution logic 2400 is shown, including an array of processing elements employed in some exemplary embodiments of a GPE. Fig.24 Those elements in the EMBODIMENTS having the same reference numbers (or names) as elements of any other figure herein can operate or function in any manner similar to that described elsewhere herein, but are not limited thereto.
[0291] In some embodiments, thread execution logic 2400 includes a shader processor 2402, a thread dispatcher 2404, an instruction cache 2406, a scalable execution unit array (including a plurality of execution units 2408A-2408N), a sampler 2410, a data cache 2412, and a data port 2414. In one embodiment, the scalable execution unit array can be dynamically scalable by enabling or disabling one or more execution units (e.g., any one of execution units 2408A, 2408B, 2408C, 2408D to 2408N-1 and 2408N) based on the computational requirements of the workload. In one embodiment, the included components are interconnected via an interconnect structure linked to each of the components. In some embodiments, thread execution logic 2400 includes one or more connections to a memory (e.g., system memory or cache memory) through one or more of the instruction cache 2406, the data port 2414, the sampler 2410, and the execution unit array 2408A-2408N. In some embodiments, each execution unit (e.g., 2408A) is an independently programmable general-purpose computing unit capable of executing multiple simultaneous hardware threads while processing multiple data elements in parallel for each thread. In various embodiments, execution unit arrays 2408A-2408N are scalable to include any number of individual execution units.
[0292] In some embodiments, execution unit arrays 2408A-2408N are primarily used to execute "shader" programs. Shader processor 2402 may process various shader programs and dispatch execution threads associated with the shader programs via thread dispatcher 2404. In one embodiment, thread dispatcher includes logic for arbitrating thread initiation requests from graphics and media pipelines and instantiating the requested threads on one or more of execution units 2408A-2408N. For example, the geometry pipeline (e.g., Fig.23 2336) can execute logic 2400 ( Fig.24 ) dispatches vertex, tessellation or geometry shaders for processing. In some embodiments, thread dispatcher 2404 can also handle runtime thread generation requests from executing shader programs.
[0293] In some embodiments, execution units 2408A-2408N support an instruction set including native support for many standard 3D graphics shader instructions, so that shader programs from graphics libraries (e.g., Direct 3D and OpenGL) are executed with minimal conversion. The execution unit supports vertex and geometry processing (e.g., vertex program, geometry program, vertex shader), pixel processing (e.g., pixel shader, fragment shader) and general processing (e.g., calculation and media shader). Each of the execution units 2408A-2408N is capable of multi-issue single instruction multiple data (SIMD) execution and multi-threaded operation enables efficient execution environment in the face of high latency memory access. Each hardware thread in each execution unit has a dedicated high-bandwidth register stack and an associated independent thread state. Execution is multi-issue per clock to a pipeline capable of integer, single and double precision floating point operations, SIMD branching capabilities, logical operations, transcendental operations and other miscellaneous operations. When waiting for data from one of the memory or shared functions, the dependency logic in the execution unit 2408A-2408N causes the waiting thread to sleep until the requested data has returned. While the waiting thread is sleeping, hardware resources can be devoted to processing other threads. For example, during the delay associated with vertex shader operations, the execution unit can perform operations on a pixel shader, a fragment shader, or another type of shader program (which includes a different vertex shader).
[0294] Each execution unit in execution unit array 2408A-2408N operates on an array of data elements. The number of data elements is the "execution size" or number of lanes for an instruction. An execution lane is a logical unit used for execution of flow control, data element access, and masking within an instruction. The number of lanes may be independent of the number of physical arithmetic logic units (ALUs) or floating point units (FPUs) for a particular graphics processor. In some embodiments, execution units 2408A-2408N support integer and floating point data types.
[0295] The execution unit instruction set includes SIMD instructions. Various data elements can be stored in registers as compact data types, and the execution unit will process various elements based on the data size of the element. For example, when operating on a 256-bit wide vector, the 256-bit vector is stored in a register, and the execution unit operates on the vector as four independent 64-bit compact data elements (data elements of quadruple word length (QW) size), eight independent 32-bit compact data elements (data elements of double word length (DW) size), sixteen independent 16-bit compact data elements (data elements of word length (W) size), or thirty-two independent 8-bit data elements (data elements of byte (B) size). However, different vector widths and register sizes are possible.
[0296] One or more internal instruction caches (e.g., 2406) are included in the thread execution logic 2400 to cache thread instructions for the execution unit. In some embodiments, one or more data caches (e.g., 2412) are included to cache thread data during thread execution. In some embodiments, a sampler 2410 is included to provide texture sampling for 3D operations and media sampling for media operations. In some embodiments, the sampler 2410 includes specialized texture or media sampling functionality to process texture or media data during the sampling process before providing the sampled data to the execution unit.
[0297] During execution, the graphics and media pipeline sends a thread initiation request to the thread execution logic 2400 via the thread generation and dispatch logic. Once a set of geometric objects has been processed and rasterized into pixel data, the pixel processor logic (e.g., pixel shader logic, fragment shader logic, etc.) within the pixel shader 2402 is called to further calculate output information and cause the result to be written to the output surface (e.g., color buffer, depth buffer, stencil buffer, etc.). In some embodiments, the pixel shader or fragment shader calculates the values of various vertex attributes to be interpolated across the rasterized object. In some embodiments, the pixel processor logic within the shader processor 2402 then executes the pixel or fragment shader program supplied by the application programming interface (API). In order to execute the shader program, the shader processor 2402 dispatches a thread to an execution unit (e.g., 2408A) via the thread dispatcher 2404. In some embodiments, the pixel shader 2402 uses the texture sampling logic in the sampler 2410 to access the texture data in the texture map stored in the 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.
[0298] In some embodiments, data port 2414 provides a memory access mechanism for thread execution logic 2400 to output processed data to memory for processing on the graphics processor output pipeline. In some embodiments, data port 2414 includes or is coupled to one or more cache memories (e.g., data cache 2412) to cache data for memory access via the data port.
[0299] Fig.25is a block diagram illustrating a graphics processor instruction format 2500 according to some embodiments. In one or more embodiments, a graphics processor execution unit supports an instruction set having instructions in multiple formats. Solid line boxes illustrate components that are typically included in an execution unit instruction, while dashed lines include components that are optional or included only in a subset of instructions. In some embodiments, the instruction format 2500 described and illustrated are macroinstructions in that they are instructions supplied to the execution unit, as opposed to micro-operations derived from instruction decoding (once the instruction is processed).
[0300] In some embodiments, the graphics processor execution unit natively supports instructions in 128-bit format 2510. 64-bit compact instruction format 2530 is available for some instructions based on the number of selected instructions, instruction options and operands. Native 128-bit format 2510 provides access to all instruction options, while some options and operations are restricted to 64-bit instruction format 2530. Native instructions available in 64-bit instruction format 2530 vary according to the embodiment. In some embodiments, instructions are partially compressed using a set of index values in index field 2513. The execution unit hardware references a set of compact tables based on these index values, and uses the compact table output to reconstruct native instructions in 128-bit format 2510.
[0301] For each format, the instruction opcode 2512 defines 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 addition instruction, the execution unit performs simultaneous addition operations across each color channel representing a texture element or a picture element. The execution unit executes each instruction by default across all data channels of the operand. In some embodiments, the instruction control field 2514 enables control of certain execution options such as channel selection (e.g., prediction) and data channel order (e.g., deployment). For instructions in the 128-bit instruction format 2510, the execution size (exec-size) field 2516 limits the number of data channels that will be executed in parallel. In some embodiments, the execution size field 2516 is not available for use by the 64-bit compact instruction format 2530.
[0302] Some execution unit instructions have up to three operands, including two source operands src0 2520, src1 2522, and a destination 2518. In some embodiments, the execution unit supports dual destination instructions, where one of the destinations is implicit. Data manipulation instructions may have a third source operand (e.g., SRC2 2524), where the instruction opcode 2512 determines the number of source operands. The last source operand of an instruction may be an immediate (e.g., hard-coded) value passed by the instruction.
[0303] In some embodiments, the 128-bit instruction format 2510 includes an access / addressing mode field 2526 that specifies, for example, whether direct register addressing mode or indirect register addressing mode is used. When direct register addressing mode is used, the register address of one or more operands is provided directly by bits in the instruction 2510.
[0304] In some embodiments, the 128-bit instruction format 2510 includes an access / addressing mode field 2526 that specifies an addressing mode and / or access mode for the instruction. In one embodiment, the access mode is used to define the data access alignment for the instruction. Some embodiments support access modes including 16-byte aligned access modes and 1-byte aligned access modes, wherein the byte alignment of the access mode determines the access alignment of the instruction operand. For example, when in a first mode, the instruction may use byte-aligned addressing for source operands and destination operands, and when in a second mode, the instruction 2510 may use 16-byte aligned addressing for all source operands and destination operands.
[0305] In one embodiment, the addressing mode portion of the access / addressing mode field 2526 determines whether the instruction will use direct addressing or indirect addressing. When direct register addressing mode is used, the bits in the instruction directly provide the register address of one or more operands. When indirect register addressing mode is used, the register address of one or more operands can be calculated based on the address immediate field and the address register value in the instruction.
[0306] In some embodiments, instructions are grouped based on opcode 2512 bit fields to simplify opcode decoding 2540. For 8-bit opcodes, positions 4, 5 and 6 allow execution units to determine the type of opcode. The precise opcode grouping shown is only an example. In some embodiments, move and logic opcode groups 2542 include data movement and logic instructions (e.g., move (mov), compare (cmp)). In some embodiments, move and logic groups 2542 share five most significant bits (MSB), wherein the move (mov) instruction adopts the form of 0000xxxxb, and the logic instruction adopts the form of 0001xxxxb. Flow control instruction groups 2544 (e.g., call, jump (jmp)) include instructions using 0010xxxxb form (e.g., 0x20). Miscellaneous instruction groups 2546 include a mixture of instructions, which include synchronization instructions (e.g., wait, send) using 0011xxxxb form (e.g., 0x30). The parallel math instruction group 2548 includes component-wise arithmetic instructions (e.g., add, multiply (mul)) in the form of 0100xxxxb (e.g., 0x40). The parallel math group 2548 performs arithmetic operations in parallel across data lanes. The vector math group 2550 includes arithmetic instructions (e.g., dp4) in the form of 0101xxxxb (e.g., 0x50). The vector math group performs arithmetic such as dot production calculations on vector operands.
[0307] Graphics Pipeline Fig.26 is a block diagram of another embodiment of a graphics processor 2600 . Fig.26 Elements in the drawings having the same reference numbers (or names) as elements of any other figure herein can operate or function in any manner similar to that described elsewhere herein, but are not limited thereto.
[0308] In some embodiments, graphics processor 2600 includes graphics pipeline 2620, media pipeline 2630, display engine 2640, thread execution logic 2650, and rendering output pipeline 2670. In some embodiments, graphics processor 2600 is a graphics processor within a multi-core processing system that includes one or more general-purpose processing cores. The graphics processor is controlled by register writes to one or more control registers (not shown) or by commands issued to graphics processor 2600 via ring interconnect 2602. In some embodiments, ring interconnect 2602 couples graphics processor 2600 to other processing components, such as other graphics processors or general-purpose processors. Commands from ring interconnect 2602 are interpreted by command streamer 2603, which supplies instructions to individual components of graphics pipeline 2620 or media pipeline 2630.
[0309] In some embodiments, command streamer 2603 directs the operation of vertex fetcher 2605, which reads vertex data from memory and executes vertex processing commands provided by command streamer 2603. In some embodiments, vertex fetcher 2605 provides vertex data to vertex shader 2607, which performs coordinate space transformation and lighting operations on each vertex. In some embodiments, vertex fetcher 2605 and vertex shader 2607 execute vertex processing instructions by dispatching execution threads to execution units 2652A, 2652B via thread dispatcher 2631.
[0310] In some embodiments, execution units 2652A, 2652B are arrays of vector processors with instruction sets for performing graphics and media operations. In some embodiments, execution units 2652A, 2652B have an attached L1 cache 2651 specific for each array or shared between arrays. The cache can be configured as a data cache, an instruction cache, or a single cache that is partitioned to contain data and instructions in different partitions.
[0311] In some embodiments, the graphics pipeline 2620 includes a tessellation component for performing hardware accelerated tessellation of 3D objects. In some embodiments, a programmable hull shader 2611 configures the tessellation operation. A programmable domain shader 2617 provides back-end evaluation of the tessellation output. The tessellation 2613 operates at the direction of the hull shader 2611 and contains dedicated logic for generating a set of detailed geometric objects based on a coarse geometric model that is provided as input to the graphics pipeline 2620. In some embodiments, if tessellation is not used, the tessellation components (e.g., hull shader 2611, tessellation 2613, domain shader 2617) can be bypassed.
[0312] In some embodiments, the complete geometric object may be processed by the geometry shader 2619 via one or more threads dispatched to the execution units 2652A, 2652B, or may proceed directly to the clipper 2629. In some embodiments, the geometry shader operates on the entire geometric object rather than patches of vertices or vertices as in previous stages of the graphics pipeline. If tessellation is disabled, the geometry shader 2619 receives input from the vertex shader 2607. In some embodiments, if the tessellation unit is disabled, the geometry shader 2619 may be programmed by a geometry shader program to perform geometry tessellation.
[0313] Before rasterization, the clipper 2629 processes the vertex data. The clipper 2629 can be a fixed function clipper or a programmable clipper with clipping and geometry shader functions. In some embodiments, the rasterizer and depth test component 2673 in the render output pipeline 2670 dispatches pixel shaders to convert geometric objects into their pixel-by-pixel representations. In some embodiments, the pixel shader logic is included in the thread execution logic 2650. In some embodiments, the application can bypass the rasterizer and depth test component 2673 and access the unrasterized vertex data via the stream out unit 2623.
[0314] Graphics processor 2600 has an interconnect bus, interconnect structure or some other interconnect mechanism that allows data and messages to be passed among the major components of the processor. In some embodiments, execution units 2652A-2652B and associated cache(s) 2651, texture and media samplers 2654, and texture / sampler cache 2658 are interconnected via data ports 2656 to perform memory accesses and communicate with the processor's rendering output pipeline components. In some embodiments, samplers 2654, caches 2651, 2658, and execution units 2652A-2652B each have separate memory access paths.
[0315] In some embodiments, the rendering output pipeline 2670 includes a rasterizer and depth test component 2673, which converts vertex-based objects into associated pixel-based representations. In some embodiments, the rasterizer logic includes a windower / masker unit for performing fixed-function triangle and line rasterization. An associated rendering cache 2678 and depth cache 2679 are also available in some embodiments. The pixel operation component 2677 performs pixel-based operations on data, although in some examples, pixel operations associated with 2D operations (e.g., bit block images are transmitted using blending) are performed by the 2D engine 2641, or replaced by a display controller 2643 using overlapping display planes at display time. In some embodiments, a shared L3 cache 2675 can be used for all graphics components, allowing data to be shared without using main system memory.
[0316] In some embodiments, the graphics processor media pipeline 2630 includes a media engine 2637 and a video front end 2634. In some embodiments, the video front end 2634 receives pipeline commands from the command streamer 2603. In some embodiments, the media pipeline 2630 includes a separate command streamer. In some embodiments, the video front end 2634 processes the media commands before sending the commands to the media engine 2637. In some embodiments, the media engine 2637 includes thread generation functionality for generating threads for dispatching to the thread execution logic 2650 via the thread dispatcher 2631.
[0317] In some embodiments, the graphics processor 2600 includes a display engine 2640. In some embodiments, the display engine 2640 is external to the processor 2600 and is coupled to the graphics processor via the ring interconnect 2602, or some other interconnect bus or structure. In some embodiments, the display engine 2640 includes a 2D engine 2641 and a display controller 2643. In some embodiments, the display engine 2640 includes dedicated logic that can operate independently of the 3D pipeline. In some embodiments, the display controller 2643 is coupled to a display device (not shown), which can be a system integrated display device (such as in a laptop computer), or can be an external display device attached via a display device connector.
[0318] In some embodiments, graphics pipeline 2620 and media pipeline 2630 can be configured to perform operations based on multiple graphics and media programming interfaces, and are not specific to any one application programming interface (API). In some embodiments, the driver software for the graphics processor converts the API calls specific to a specific graphics or media library into commands that can be processed by the graphics processor. In some embodiments, all open graphics libraries (OpenGL) and open computing languages (OpenCL) and / or Vulkan graphics and computing APIs from Khronos Group are provided. In some embodiments, support can also be provided for the Direct3D library from Microsoft. In some embodiments, the combination of these libraries can also be supported. Support can also be provided for the open source computer vision library (OpenCV). If the mapping from the pipeline of the future API to the pipeline of the graphics processor can be performed, the future API with compatible 3D pipelines will also be supported.
[0319] Graphics Pipeline Programming Fig.27A is a block diagram of a graphics processor command format 2700 according to some embodiments. Fig.27B is a block diagram of a graphics processor command sequence 2710, according to an embodiment. Fig.27AThe solid-line boxes in show components that are generally included in a graphics command, while the dashed lines include components that are optional or included only in a subset of the graphics commands. Fig.27A The exemplary graphics processor command format 2700 includes a data field for identifying the target client 2702 of the command, a command operation code (opcode) 2704, and associated data 2706 for the command. In some commands, a sub-opcode 2705 and a command size 2708 are also included.
[0320] In some embodiments, client 2702 specifies the client unit of the graphics device that processes the command data. In some embodiments, the graphics processor command parser (parser) checks the client field of each command to adjust the further processing of the command and routes the command data to the appropriate client unit. In some embodiments, the graphics processor client unit includes a memory interface unit, a rendering unit, a 2D unit, a 3D unit, and a media unit. Each client unit has a corresponding processing pipeline for processing commands. Once the command is received by the client unit, the client unit reads the opcode 2704 and (if present) sub-opcode 2705 to determine the operation to be performed. The client unit uses the information in the data field 2706 to execute the command. For some commands, an explicit command size 2708 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 in the command based on the command opcode. In some embodiments, the command is aligned via a multiple of a double word length.
[0321] Fig.27B An exemplary graphics processor command sequence 2710 is shown in the flow chart in FIG. 27. In some embodiments, software or firmware of a data processing system featuring an embodiment of a graphics processor uses a version of the command sequence shown to set up, execute, and terminate a set of graphics operations. The sample command sequence is shown and described for exemplary purposes only, as embodiments are not limited to these particular commands or this command sequence. In addition, the commands may be issued as a batch of commands in a command sequence so that the graphics processor will process the command sequence in an at least partially simultaneous manner.
[0322] In some embodiments, the graphics processor command sequence 2710 may begin with a pipeline flush command 2712 to cause any active graphics pipeline to complete currently pending commands for the pipeline. In some embodiments, the 3D pipeline 2722 and the media pipeline 2724 do not operate simultaneously. The pipeline flush is performed to cause the active graphics pipeline to complete any pending commands. In response to the pipeline flush, the command parser for the graphics processor will suspend command processing until the active drawing engine completes pending operations and the associated read cache is invalidated. Optionally, any data marked as 'dirty' in the rendering cache can be flushed and dumped to memory. In some embodiments, the pipeline flush command 2712 may be used for pipeline synchronization or before placing the graphics processor in a low power state.
[0323] In some embodiments, when a command sequence requires the graphics processor to explicitly switch between pipelines, pipeline select command 2713 is used. In some embodiments, pipeline select command 2713 is only required once within an execution context before issuing pipeline commands, unless the context is to issue commands for both pipelines. In some embodiments, pipeline flush command 2712 is required immediately before a pipeline switch via pipeline select command 2713.
[0324] In some embodiments, pipeline control commands 2714 configure the graphics pipeline for operation and are used to program 3D pipeline 2722 and media pipeline 2724. In some embodiments, pipeline control commands 2714 configure the pipeline state for the active pipeline. In one embodiment, pipeline control commands 2714 are used for pipeline synchronization and to clear data from one or more cache memories within the active pipeline before processing a batch of commands.
[0325] In some embodiments, a set of return buffers for the corresponding pipeline to write data is configured using return buffer state commands 2716. Some pipeline operations require the allocation, selection, or configuration of one or more return buffers into which these operations write intermediate data during processing. In some embodiments, the graphics processor also uses one or more return buffers to store output data and perform cross-thread communication. In some embodiments, configuring return buffer state 2716 includes selecting the size and number of return buffers to use for a set of pipeline operations.
[0326] The remaining commands in the command sequence differ based on the active pipeline for operation. Based on pipeline determination 2720 , the command sequence is tailored for either a 3D pipeline 2722 , which starts with 3D pipeline state 2730 , or a media pipeline 2724 , which starts with media pipeline state 2740 .
[0327] The commands to configure the 3D pipeline state 2730 include 3D state setting commands for the following: vertex buffer state, vertex element state, constant color state, depth buffer state, and other state variables that will be configured before processing 3D primitive commands. The values of these commands are determined at least in part based on the specific 3D API in use. In some embodiments, the 3D pipeline state 2730 commands can also selectively disable or bypass certain pipeline elements if those elements are not to be used.
[0328] In some embodiments, 3D primitive 2732 commands are used to submit 3D primitives processed by 3D pipeline. The commands and associated parameters passed to the graphics processor via 3D primitive 2732 commands are forwarded to the vertex fetching function in the graphics pipeline. The vertex fetching function uses 3D primitive 2732 command data to generate vertex data structure. The vertex data structure is stored in one or more return buffers. In some embodiments, 3D primitive 2732 commands are used to perform vertex operations on 3D primitives via vertex shaders. In order to process vertex shaders, 3D pipeline 2722 dispatches shader execution threads to graphics processor execution units.
[0329] In some embodiments, the 3D pipeline 2722 is triggered via an execution 2734 command or event. In some embodiments, a register write triggers the command execution. In some embodiments, the execution is triggered via a 'go' or 'kick' command in a command sequence. In one embodiment, the command execution is triggered using a pipeline synchronization command to clear the command sequence through the graphics pipeline. The 3D pipeline will perform geometry processing for 3D primitives. Once the operation is completed, the resulting geometric object is rasterized, and the pixel engine colors the resulting pixels. Additional commands for controlling pixel shading and pixel backend operations may also be included for those operations.
[0330] In some embodiments, when performing media operations, the graphics processor command sequence 2710 follows the media pipeline 2724 path. Generally, the manner and specific use of programming for the media pipeline 2724 depends on the media or computing operation to be performed. During media decoding, specific media decoding operations can be offloaded to the media pipeline. In some embodiments, the media pipeline can also be bypassed and media decoding can be performed in whole or in part (using resources provided by one or more general processing cores). In one embodiment, the media pipeline also includes elements for general purpose graphics processor unit (GPGPU) operations, wherein the graphics processor is used to perform SIMD vector operations using compute shader programs, and the compute shader programs are not explicitly related to the rendering of graphics primitives.
[0331] In some embodiments, media pipeline 2724 is configured in a similar manner to 3D pipeline 2722. A set of commands to configure media pipeline state 2740 are dispatched or placed into a command queue prior to media object commands 2742. In some embodiments, the commands for media pipeline state 2740 include data for configuring media pipeline elements that will be used to process media objects. This includes data (such as encoding or decoding formats) for configuring video decoding and video encoding logic within the media pipeline. In some embodiments, the commands for media pipeline state 2740 also support the use of one or more pointers for "indirect" state elements that contain a batch of state settings.
[0332] In some embodiments, media object commands 2742 supply pointers to media objects for processing by the media pipeline. The media object includes a memory buffer that contains video data to be processed. In some embodiments, all media pipeline states must be valid before issuing media object commands 2742. Once the pipeline state is configured and media object commands 2742 are queued, media pipeline 2727 is triggered via an execution command 2744 or an equivalent execution event (e.g., a register write). The output from media pipeline 2724 can then be post-processed by operations provided by 3D pipeline 2722 or media pipeline 2724. In some embodiments, GPGPU operations are configured and executed in a manner similar to media operations.
[0333] Graphics software architecture Fig.28 An exemplary graphics software architecture for data processing system 2800 according to some embodiments is shown. In some embodiments, the software architecture includes a 3D graphics application 2810, an operating system 2820, and at least one processor 2830. In some embodiments, processor 2830 includes a graphics processor 2832 and one or more general purpose processor cores 2834. Graphics application 2810 and operating system 2820 are each executed in system memory 2850 of the data processing system.
[0334] In some embodiments, the 3D graphics application 2810 includes one or more shader programs that include shader instructions 2812. The shader language instructions may be in a high-level shader language, such as High Level Shader Language (HLSL) or OpenGL Shader Language (GLSL). The application also includes executable instructions 2814 in a machine language suitable for execution by the general purpose processor core 2834. The application also includes graphics objects 2816 defined by vertex data.
[0335] In some embodiments, operating system 2820 is from Microsoft Corporation Operating system, proprietary UNIX-like operating system or open source UNIX-like operating system, which uses a deformation of the Linux kernel. Operating system 2820 can support graphics API 2822, such as Direct3D API, OpenGL API or Vulkan API. When Direct3D API is in use, operating system 2820 uses front-end shader compiler 2824 to compile any shader instruction 2812 using HLSL into a lower-level shader language. The compilation can be a just-in-time (JIT) compilation, or the application executable shader precompilation. In some embodiments, during the compilation of 3D graphics application 2810, high-order shaders are compiled into low-level shaders. In some embodiments, shader instructions 2812 are provided in an intermediate form, such as a version of the standard portable intermediate representation (SPIR) used by Vulkan API.
[0336] In some embodiments, the user mode graphics driver 2826 includes a backend shader compiler 2827 that converts shader instructions 2812 into hardware specific representations. When the OpenGL API is in use, shader instructions 2812 in the GLSL high-level language are passed to the user mode graphics driver 2826 for compilation. In some embodiments, the user mode graphics driver 2826 communicates with the kernel mode graphics driver 2829 using the operating system kernel mode functions 2828. In some embodiments, the kernel mode graphics driver 2829 communicates with the graphics processor 2832 to dispatch commands and instructions.
[0337] IP Core Implementation One or more aspects of at least one embodiment may be implemented by representative code stored on a machine-readable medium, which represents and / or defines logic within an integrated circuit such as a processor. For example, a machine-readable medium may include instructions representing various logics within a processor. When read by a machine, the instructions may cause the machine to manufacture logic for performing the techniques described herein. Such representations (referred to as "IP cores") are reusable units of logic for an integrated circuit that may be stored on a tangible, machine-readable medium as a hardware model describing the structure of the integrated circuit. The hardware model may be supplied to various consumers or manufacturing facilities that load the hardware model on a manufacturing machine that manufactures the integrated circuit. An integrated circuit may be manufactured so that the circuit performs the operations described in association with any embodiment described herein.
[0338] Fig.292900 is a block diagram showing an IP core development system 2900 according to an embodiment, which can be used to manufacture an integrated circuit to perform an operation. The IP core development system 2900 can be used to generate a modular, reusable design that can be incorporated into a larger design or used to build an entire integrated circuit (e.g., a SOC integrated circuit). The design facility 2930 can generate a software simulation 2910 for the IP core design using a high-level programming language (e.g., C / C++). The software simulation 2910 can be used to design, test, and verify the behavior of the IP core using a simulation model 2912. The simulation model 2912 can include functional, behavioral, and / or timing simulations. Then, a register transfer level (RTL) design 2915 can be created or synthesized according to the simulation model 2912. The RTL design 2915 is an abstraction of the behavior of an integrated circuit that models the flow of digital signals between hardware registers (including associated logic executed using modeled digital signals). In addition to the RTL design 2915, a lower level design at the logic level or transistor level can also be created, designed, or synthesized. Therefore, the specific details of the initial design and simulation may vary.
[0339] The RTL design 2915 or equivalent may be further synthesized by the design facility into a hardware model 2920, which may be in a hardware description language (HDL) or some other representation of physical design data. The HDL may be further simulated or tested to verify the IP core design. The IP core design may be stored using a non-volatile memory 2940 (e.g., a hard disk, a flash memory, or any non-volatile storage medium) for delivery to a third-party manufacturing facility 2965. Alternatively, the IP core design may be transmitted (e.g., via the Internet) via a wired connection 2950 or a wireless connection 2960. Then, the manufacturing facility 2965 may manufacture an integrated circuit based at least in part on the IP core design. The manufactured integrated circuit may be configured to perform operations according to at least one embodiment described herein.
[0340] Exemplary System-on-Chip Integrated Circuit Figure 30-32 An exemplary integrated circuit and associated graphics processor that can be manufactured using one or more IP cores according to various embodiments described herein are shown. In addition to that shown, other logic and circuits may be included, including additional graphics processors / cores, peripheral interface controllers, or general purpose processor cores.
[0341] Fig.303000, which may be manufactured using one or more IP cores. The exemplary integrated circuit 3000 includes one or more application processors 3005 (e.g., CPUs), at least one graphics processor 3010, and may additionally include an image processor 3015 and / or a video processor 3020, any of which may be modular IP cores from the same or multiple different design facilities. The integrated circuit 3000 includes peripherals or bus logic, including a USB controller 3025, a UART controller 3030, an SPI / SDIO controller 3035, an I 2 S / I 2 The integrated circuit may include a display device 3045 coupled to a high-definition multimedia interface (HDMI) controller 3050 and a mobile industry processor interface (MIPI) display interface 3055. Storage may be provided by a flash memory subsystem 3060 (including flash memory and a flash memory controller). A memory interface may be provided via a memory controller 3065 for accessing SDRAM or SRAM memory devices. Some integrated circuits additionally include an embedded security engine 3070.
[0342] Fig.31 is a block diagram illustrating an exemplary graphics processor 3110 of a system-on-chip integrated circuit that may be manufactured using one or more IP cores according to an embodiment. The graphics processor 3110 may be Fig.30 A variation of the graphics processor 3010 of FIG. The graphics processor 3110 includes a vertex processor 3105 and one or more fragment processors 3115A-3115N (e.g., 3115A, 3115B, 3115C, 3115D to 3115N-1 and 3115N). The graphics processor 3110 can execute different shader programs via independent logic, so that the vertex processor 3105 is optimized to perform the operations of the vertex shader program, while the one or more fragment processors 3115A-3115N perform fragment (e.g., pixel) shading operations of the fragment or pixel shader program. The vertex processor 3105 performs the vertex processing stage of the 3D graphics pipeline and generates primitives and vertex data. (One or more) fragment processors 3115A-3115N use the primitives and vertex data generated by the vertex processor 3105 to generate a frame buffer displayed on a display device. In one embodiment, the fragment processor(s) 3115A-3115N are optimized to execute fragment shader programs as provided in the OpenGL API, which can be used to perform similar operations as pixel shader programs as provided in the Direct 3D API.
[0343] The graphics processor 3110 additionally includes one or more memory management units (MMUs) 3120A-3120B, caches 3125A-3125B, and (one or more) circuit interconnects 3130A-3130B. The one or more MMUs 3120A-3120B provide virtual to physical address mappings to the graphics processor 3110 (which includes the vertex processor 1305 and / or (one or more) fragment processors 3115A-3115N), which may reference vertex or image / texture data stored in memory in addition to vertex or image / texture data stored in the one or more caches 3125A-3125B. In one embodiment, the one or more MMUs 3120A-3120B may be synchronized with other MMUs within the system, including those associated with the graphics processor 3110. Fig.30 One or more MMUs associated with one or more application processors 3005, image processors 3015, and / or video processors 3020 enable each processor 3005-3020 to participate in a shared or unified virtual memory system. According to an embodiment, one or more circuit interconnects 3130A-3130B enable the graphics processor 3110 to interface with other IP cores within the SoC via an internal bus of the SoC or via a direct connection.
[0344] Fig.32 is a block diagram illustrating an additional exemplary graphics processor 3210 of a system-on-chip integrated circuit that may be fabricated using one or more IP cores in accordance with an embodiment. The graphics processor 3210 may be Fig.30 A variation of the graphics processor 3010. The graphics processor 3210 includes Fig.31 One or more MMUs 3120A-3120B, (one or more) caches 3125A-3125B, and circuit interconnects 3130A-3130B of the integrated circuit 3100.
[0345] The graphics processor 3210 includes one or more shader cores 3215A-3215N (e.g., 3215A, 3215B, 3215C, 3215D, 3215E, 3215F to 3215N-1 and 3215N) that provide a unified shader core architecture in which a single core or a single type of core can execute all types of programmable shader code (including shader program code) to implement vertex shaders, fragment shader cores and / or compute shaders. The exact number of shader cores present may vary between embodiments and implementations. In addition, the graphics processor 3210 includes an inter-core task manager 3205 that acts as a thread dispatcher to one or more shader cores 3215A-3215N and a blocking unit 3218 to accelerate blocking operations for tile-based rendering, in which rendering operations for a scene are finely divided in image space, for example to exploit local spatial coherence within a scene or to optimize the use of internal caches.
[0346] Examples and embodiments of the present invention include methods and apparatus for discriminative semantic transfer and physics-inspired optimization in deep learning.
[0347] According to one example, a pipeline framework for running deep learning training includes a first stage, a second stage, and a third stage. The first stage is configured to receive a training image sequence in a convolutional neural network (CNN) to describe an object of a cluttered scene as a semantic segmentation mask. The second stage is configured to receive a semantic segmentation mask in a semantic segmentation network and generate semantic features. The third stage is configured to use the weights from the first stage as a feature extractor and the weights from the second stage as a classifier to identify the edges of the cluttered scene using the semantic features.
[0348] In one example, the third stage is further configured to fine-tune a CNN that receives training images and identifies edges of cluttered scenes.
[0349] In one example, the second stage is further configured to use a softmax operation in a semantic segmentation network.
[0350] In one example, the objects of the cluttered scene are part of a room layout dataset.
[0351] In one example, the room layout dataset comprises pixels and wherein the second stage is configured to consider each pixel of the room layout dataset as a sample in a fully connected layer of the semantic segmentation network.
[0352] In one example, the second stage is further configured to model the relationship between the room layout dataset and the objects in the CNN.
[0353] In one example, the third stage is further configured to mark the edges of the cluttered scene.
[0354] According to one example, a data processing system includes a processing core, an I / O hub controller, and a graphics processor. The processing core is configured with a convolutional neural network (CNN). The I / O hub controller is coupled to the processing core and is configured to provide a network, data storage, and access to the processing core. The graphics processor is coupled to the I / O hub controller and is configured to implement a first level, a second level, and a third level. The first level is configured to receive a training image sequence in a convolutional neural network (CNN) to describe an object of a cluttered scene as a semantic segmentation mask. The second level is configured to receive a semantic segmentation mask in a semantic segmentation network and generate semantic features. The third level is configured to use the weights from the first level as a feature extractor and the weights from the second level as a classifier to identify the edges of a cluttered scene using semantic features.
[0355] In one example, the third stage is further configured to fine-tune a CNN that receives training images and identifies edges of cluttered scenes.
[0356] In one example, the second stage is further configured to use a softmax operation in a semantic segmentation network.
[0357] In one example, the objects of the cluttered scene are parts of a room layout dataset comprising pixels.
[0358] In one example, the second stage is further configured to consider each pixel of the room layout dataset as a sample in a fully connected layer of a semantic segmentation network.
[0359] In one example, the second stage is further configured to model the relationship between the room layout dataset and the objects in the CNN.
[0360] In one example, the third stage is further configured to mark the edges of the cluttered scene.
[0361] According to one example, a computational training method for a convolutional neural network (CNN) includes receiving a training image sequence in a first-level CNN to describe objects of a cluttered scene as a semantic segmentation mask; receiving the semantic segmentation mask in a second-level semantic segmentation network to generate semantic features; and using weights from the first level as a feature extractor and weights from the second level as a classifier in a third level to use the semantic features to identify edges of the cluttered scene.
[0362] In one example, the CNN is fine-tuned in the third stage.
[0363] In one example, a softmax operation is used in the second-level semantic segmentation network.
[0364] In one example, the objects of the cluttered scene are parts of a room layout dataset comprising pixels.
[0365] In one example, each pixel in the room layout dataset is considered as a sample in a fully connected layer of a second-level semantic segmentation network.
[0366] In one example, the relationship between the room layout dataset and the objects in the CNN is modeled in the second stage.
[0367] In one example, the edges of a cluttered scene are marked pixel by pixel in the third level.
[0368] According to one example, a method of training a deep learning-based classification model includes: receiving a plurality of input images; and training the deep learning-based classification model based on the received input images to perform domain pixel-by-pixel scene parsing of cluttered scenes.
[0369] In one example, domain-by-pixel scene parsing is used for a specific domain of cluttered scenes.
[0370] In one example, the clutter scene includes a room layout.
[0371] In one example, the wall-to-floor domain, the wall-to-wall domain, or the wall-to-ceiling domain of the room layout is predicted pixel by pixel.
[0372] In one example, the relationship between domains of room layouts is incorporated into a convolutional neural network (CNN).
[0373] In one example, a CNN is trained in three incremental stages.
[0374] According to one example, a deep learning system includes a sensor array, an input buffer, a network executor, and a training pipeline. The sensor array is configured to capture an image sequence. The input buffer is configured to receive the image sequence. The network executor has multiple cores and is configured to execute a deep learning network on the multiple cores. The training pipeline framework is configured to operate according to any one or more of the examples above.
[0375] According to an example, a machine-readable medium includes instructions that, when operated by the machine, cause the machine to operate according to any one or more of the above examples.
[0376] According to one example, a device includes a memory, a neural network, and a processor. The memory is configured to store input initial, intermediate, and final results. The processor is configured to enable, optimize, or configure the neural network to operate according to any one or more of the above examples.
[0377] According to one example, an apparatus includes memory components for storing input initial, intermediate and final results, logic components for operating according to any one or more of the above examples.
[0378] According to one example, a method for optimizing operation of a fully connected network includes receiving features of a scene and a plurality of locations of junctions in the scene as features; determining gradients of an energy target for the scene; and updating the locations of the junctions based on the gradients.
[0379] In one example, the energy objective is a comparison of the topology of the junction points to an image of the scene.
[0380] In one example, features and join points are converted into an edge labeling map of an image of the scene.
[0381] In one example, the topology of an image of a scene represents a set of possible scene feature arrangements.
[0382] In one example, the gradient is iteratively approached to the minimum energy from the average of the junctions at different locations.
[0383] In one example, a gradient is applied to the endpoints of a feature as a force applied to a spring-like edge.
[0384] In one example, the endpoints are used to approximate the gradient of the entire edge.
[0385] According to one example, an optimization method for a convolutional neural network (CNN) includes: receiving a training image sequence in the CNN to describe objects of a cluttered scene as a room layout dataset; identifying features corresponding to potential edges of objects in the cluttered scene; and considering each potential edge as a spring that can translate, rotate, and change its length.
[0386] In one example, the spring motion is approximated by interpolating the endpoints of each corresponding edge.
[0387] In one example, the interpolation is approximated using a gradient.
[0388] In one example, approximating the interpolation includes determining gradients of endpoints of simulated edges as the particle moves in the potential field.
[0389] In one example, the force of the spring is applied to a different potential field at each edge.
[0390] According to an example, a machine-readable medium includes instructions that, when operated by the machine, cause the machine to operate according to any one or more of the above examples.
[0391] According to one example, a device includes a memory configured to store input initial, intermediate and final results; a neural network; and a processor that causes, optimizes or configures the neural network to operate according to any one or more of the above examples.
[0392] According to one example, an apparatus includes a memory component for storing input initial, intermediate and final results; and a logic component for performing any one or more of the methods of the above examples.
[0393] According to one example, a data processing system includes a processing core, an I / O hub controller, and a graphics processor. The processing core is configured with a convolutional neural network (CNN). The I / O hub controller is coupled to the processing core and configured to provide network, data storage, and access to the processing core. The graphics processor is coupled to the I / O hub controller and configured to receive features of a scene and a plurality of locations of connection points in the scene as features; determine a gradient of an energy target for the scene; and update the location of the connection point based on the gradient.
[0394] In one example, the energy objective is a comparison of the topology of the junction points to an image of the scene.
[0395] In one example, the graphics processor is further configured to convert the features and the junction points into an edge labeled map of the image of the scene.
[0396] In one example, the topology of an image of a scene represents a set of possible scene feature arrangements.
[0397] In one example, the gradient is iteratively approached to the minimum energy from the average of the junctions at different locations.
[0398] In one example, a gradient is applied to the endpoints of a feature as a force applied to a spring-like edge.
[0399] In one example, the endpoints are used to approximate the gradient of the entire edge.
[0400] The foregoing description and figures are to be regarded in an illustrative rather than a restrictive sense. Various modifications and changes may be made to the examples and embodiments described herein without departing from the broader spirit and scope of the invention as set forth in the appended claims.
Claims
1. A method comprising: determining one or more weights based on the input image using a first neural network; generating a feature map from the input image using a second neural network; providing the one or more weights and the feature map to a layer external to the first neural network and the second neural network, the layer generating an output from the one or more weights and the feature map; as well as Edges of objects in the input image are estimated based on the output of the layer.
2. The method according to claim 1, wherein: The layer is a convolutional layer.
3. The method according to claim 2, wherein: The convolutional layer has a kernel size of 1×1.
4. The method according to claim 1, wherein: The second neural network is a convolutional neural network.
5. The method according to claim 1, wherein: The feature map is a three-dimensional tensor.
6. The method according to claim 1, wherein: The second neural network is trained for semantic segmentation.
7. The method according to claim 1, wherein: The one or more weights include weights corresponding to different portions of the input image.
8. A computer readable medium storing instructions which, when executed by at least one processor, cause the processor to perform the method according to any one of claims 1 to 7.
9. A device, comprising: a computer processor for executing computer program instructions; as well as A computer readable medium storing computer program instructions executable by the computer processor to perform the method according to any one of claims 1 to 7.
10. A computer program product comprising instructions which, when executed by at least one processor, cause the processor to perform the method according to any one of claims 1 to 7.
11. An apparatus comprising means for performing the method according to any one of claims 1 to 7.
