Space-depth conversion optimization with DMA and DPU executors
By employing DMA and DPU executors to optimize Space-Depth conversions, the inefficiencies in existing AI compute operations are addressed, resulting in improved performance and resource utilization.
Patent Information
- Application Number
- PCT/CN2023/123050
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-09-29
- Publication Date
- 2025-04-03
AI Technical Summary
Space-Depth conversions in artificial intelligence (AI) compute operations are bottlenecks due to inefficient use of computing resources, as these conversions primarily involve data reallocation rather than calculations, leading to blocked resources.
The use of direct memory access (DMA) and data processing unit (DPU) executors to bypass traditional processing units and optimize Space-Depth conversions by conducting these operations directly through DMA tasks or convolution operations on DPUs.
This approach reduces the time consumption of Space-Depth conversions and frees up calculation resources for other AI network layers, enhancing overall performance and reducing reliance on inefficient kernel implementations.
Smart Images

Figure CN2023123050_03042025_PF_FP_ABST
Abstract
Description
SPACE-DEPTH CONVERSION OPTIMIZATION WITH DMA AND DPU EXECUTORSTECHNICAL FIELD
[0001] Embodiments generally relate to Space-Depth conversions in artificial intelligence (AI) compute operations. More particularly, embodiments relate to space-depth conversion optimization with direct memory access (DMA) and data processing unit (DPU) executors.BACKGROUND
[0002] SpaceToDepth and DepthToSpace (collectively Space-Depth) conversions are typically used to place data in a more efficient format for artificial intelligence (AI) operations such as, for example, convolution operations. In the AI acceleration area, the SpaceToDepth and DepthToSpace conversion layers are the bottleneck of many widely used neural networks, such as super-resolution, object detection, and classification. The main reason for this bottleneck is that the Space-Depth conversions cannot fully use computing resources. More particularly, the conversion does not involve calculations on the data, but only reallocations of the data, which leads to computing resources being blocked by memory execution.BRIEF DESCRIPTION OF THE DRAWINGS
[0003] The various advantages of the embodiments will become apparent to one skilled in the art by reading the following specification and appended claims, and by referencing the following drawings, in which:
[0004] FIG. 1 is a comparative block diagram of an example of a conventional network processing unit (NPU) and enhanced NPUs according to embodiments;
[0005] FIG. 2 is an illustration of an example of a data pattern for padded input and output tensor data according to an embodiment;
[0006] FIG. 3 is an illustration of an example of direct memory access (DMA) task descriptors for padded input and output tensor data according to an embodiment;
[0007] FIG. 4 is an illustration of an example of a data pattern for unpadded input and output tensor data according to an embodiment;
[0008] FIG. 5 is an illustration of an example of DMA task descriptors for unpadded input and output tensor data according to an embodiment;
[0009] FIG. 6 is an illustration of an example of a table of NPU direct memory access (DMA) hardware task performance according to an embodiment;
[0010] FIG. 7 is a block diagram of an example of a Space-Depth conversion layer and a convolution layer of a neural network according to an embodiment;
[0011] FIG. 8 is a comparative illustration of an example of a conventional Space-Depth conversion workflow and an enhanced Space-Depth conversion workflow according to an embodiment;
[0012] FIG. 9 is an illustration of an example of a job descriptor according to an embodiment;
[0013] FIG. 10 is an illustration of an example of a space to depth conversion via one or more DMA tasks according to an embodiment;
[0014] FIG. 11 is an illustration of an example of a depth to space conversion via one or more DMA tasks according to an embodiment;
[0015] FIG. 12 is an illustration of an example of a space to depth conversion via convolution hardware according to an embodiment;
[0016] FIG. 13 is an illustration of an example depth to space conversion via convolution hardware according to an embodiment;
[0017] FIGs. 14 and 15 are flowcharts examples of methods of conducting Space-Depth conversions according to embodiments;
[0018] FIG. 16 is a block diagram of an example of a performance-enhanced computing system according to an embodiment;
[0019] FIG. 17 is an illustration of an example of a semiconductor package apparatus according to an embodiment;
[0020] FIG. 18 is a block diagram of an example of a processor according to an embodiment; and
[0021] FIG. 19 is a block diagram of an example of a multi-processor based computing system according to an embodiment.DETAILED DESCRIPTION
[0022] Turning now to FIG. 1, a conventional network processing unit (NPU) 20 is shown. The conventional NPU 20 may provide visual intelligence on embedded devices for complex applications such as three-dimensional (3D) scanning and mapping, object detection, and classification. Neural network (NN) models can be optimized to fit into the conventional NPU 20 to improve inference speed. The illustrated conventional NPU 20 includes a streaming hybrid architecture vector engine (SHAVE) 22, which is a fully-programmable processor (e.g., central processing unit / CPU, graphics processing unit / GPU and / or digital signal processor / DSP core having a relatively low development cost) that may be used to perform tasks such as unified processing array (UPA) tasks. The conventional NPU 20 also uses manually defined kernels (e.g., written in a high-level programming language) to conduct SpaceToDepth (S2D) conversion operations 24 and DepthToSpace (D2S) conversion operations 26 on the SHAVE 22. The S2D conversion operations 24 convert input tensor data from block regions in a spatial dimension format to channels in a depth dimension format (e.g., input is compressed) . The D2S conversion operations 26 convert input tensor data from channels in the depth dimension format to block regions in the spatial dimension format (e.g., input is expanded) .
[0023] In the illustrated conventional NPU 20, the computing resources of the SHAVE 22 are blocked and not fully used. More particularly, the Space-Depth conversion operations 24, 26 involve relatively low computation resources because there is almost no mathematical calculation. The main cost is memory rearrangement. For example, the S2D conversion operations 24 “squeeze” the height and width and split a single feature map into multiple channels in a grid-like approach. The S2D conversion operations 24 do not change the values in the tensor but rearrange the values to different channels. When the SHAVE 22 is used to execute the Space-Depth conversion operations 24, 26, the computing resources of the SHAVE 22 are wasted (e.g., only the buffer and memory engine perform work) . Another disadvantage is that the efficiency of the SHAVE 22 depends on the kernel implementation, which varies considerably between different engineers. Thus, a poor kernel implementation may lead to deep code loops and result in inefficient inference.
[0024] By contrast, a first enhanced NPU 30 uses one or more direct memory access (DMA) tasks / executors to bypass a SHAVE 34 and conduct the S2D conversion operations 24 and the D2S conversion operations 26 on a DMA engine 32. The first enhanced NPU 30 reduces the time consumption of the Space-Depth conversion operations 24, 26 and frees up the calculation resources of the SHAVE 34 for other layers in the AI network (e.g., enhancing performance) .
[0025] Additionally, a second enhanced NPU 40 uses convolution operations to bypass the SHAVE 34 and conduct the S2D conversion operations 24 and the D2S conversion operations 26 on a data processing unit (DPU) 42 of a neural compute engine (NCE) 44 (e.g., hardware accelerator) . In general, the NCE 44 has a relatively long development cycle and the DPU 42 supports the most common layers in AI neural networks (e.g., convolutional layers, group convolutional layers, max pooling layers, etc. ) . The Space-Depth conversion operations 24, 26 are common but not used in most neural networks. As will be discussed in greater detail, the DPU 42 can be used to conduct the S2D conversion operations 24 and the D2S conversion operations 26 using convolutions and specially defined weight sets. The second enhanced NPU 40 also reduces the time consumption of the Space-Depth conversion operations 24, 26 and frees up the calculation resources of the SHAVE 34 for other layers in the AI network (e.g., enhancing performance) .
[0026] NPU DMA HW Task Descriptors (Data Movement Technical Details)
[0027] The fundamental data movement patterns to implement the S2D conversion operations 24 and the D2S conversion operations 26 and how the patterns are mapped to the DMA engine 32 of the first enhanced NPU 30 depending on operator characteristics such as block size and padded channels are as follows (where “E” denotes the input element) .
[0028] Terminology
[0029] - NHWC (batch, height, width, channel) Data Layout Format
[0030] - Block First Operators
[0031] - where block size is BxB
[0032] - assuming square block
[0033] - Space to Depth (block regions to channels)
[0034] - input is compressed and each block region is converted into output channels
[0035] - Input N x Hi x Wi x Ci x E
[0036] - Output N x (Hi / B) x (Wi / B) x (CixBxB) x E
[0037] - Depth to Space (channels to block regions)
[0038] - input is expanded and channels are converted into block regions
[0039] - Input N x Hi x Wi x Ci x E
[0040] - Output N x (Hi x B) x (Wi x B) x (Ci / BxB) x E
[0041] FIG. 2 shows a data pattern 50 for padded input tensor data and padded output tensor data when processing NHWC formatted input, block first with block size B and with padded channels. On the top-left of the data pattern 50 is the space data layout, which is either the input or the output of the S2D / D2S conversion operation. The data pattern 50 shows two-dimensional (2D) striding patterns 52 and three-dimensional (3D) striding patterns 54 used by the NPU DMA hardware (HW) to collect and write out data elements according to the specific operation. Arrows 56 represent the element access pattern.
[0042] FIG. 3 shows S2D DMA task descriptors 60 and D2S DMA task / job descriptors 62 for padded input tensor data and padded output tensor data. The illustrated task descriptors 60, 62 specify a plane length and number of planes, as well as an address, width, stride and plane stride for both the source of the input tensor data and the destination of the output tensor data.
[0043] FIG. 4 shows a data pattern 70 for unpadded input tensor data and unpadded output tensor data when processing NHWC formatted input, block first with block size B and with no padded channels. On the top-left of the data pattern 70 is the space data layout, which is either the input or the output of the S2D / D2S conversion operation. The data pattern 70 shows 2D striding patterns 72 and 3D striding patterns 74 used by the NPU DMA HW to collect and write out data elements according to the specific operation. Arrows 76 represent the element access pattern. The illustrated data pattern 70 is simpler than the data pattern 50 (FIG. 2) and can yield better performance.
[0044] FIG. 5 shows S2D DMA task descriptors 80 and D2S DMA task descriptors 82 for unpadded input tensor data and unpadded output tensor data. The illustrated task descriptors 80, 82 specify a plane length and number of planes, as well as an address, width, stride and plane stride for both the source of the input tensor data and the destination of the output tensor data.
[0045] FIG. 6 shows a table 90 of NPU DMA hardware task performance. The task performance is expressed in terms of the number of elements processed per each cycle and generalized according to the operation parameters.
[0046] FIG. 7 shows a Space-Depth conversion layer 100 and a convolution layer 102 of a neural network. In general, a connection matrix crossbar (CMX) DMA resides between the CMX memory (UPA or NCE) and a Network-on-Chip (NoC) . The CMX DMA supports scheduling high-bandwidth data transfers between the CMX and other system memories (e.g., dual data rate / DDR dynamic random access memory / DRAM, in system programming / ISP) . The CMX DMA also supports data transfers from and to the same location (e.g., from DRAM back to DRAM, or from CMX to CMX) . The configuration / pattern of the Space-Depth conversion layer 100 and the convolution layer 102 therefore demonstrates how the DMA works between NCE, SHAVE, and different levels of memory.
[0047] Turning now to FIG. 8, a conventional Space-Depth conversion workflow 110 is shown for the configuration / pattern of the Space-Depth conversion layer 100 (FIG. 7) and the convolution layer 102 (FIG. 7) . In the illustrated example, the following operations are conducted.
[0048] 1. Move the input data from DDR to CMX
[0049] 2. Execute the Space-Depth conversion on SHAVE
[0050] *3. Move the result from CMX to DDR
[0051] *4. Move the input data of Convolution from DDR to CMX
[0052] 5. Execute the Convolution on NCE
[0053] 6. Move the Convolution result from CMX to DDR
[0054] Operations *3 and *4 can be optional, and are typically only conducted when the full tensor size does not fit into the CMX. For cases when the tensor size is small enough to fit into the CMX memory, operations *3 and *4 are eliminated. For most cases in real models, however, the tensor sizes of Space-Depth conversions are typically too large to fit into the CMX. Accordingly, DMAs are used to move the tensor out to the DDR, concatenate the split tiles in the DDR, and then read back to CMX as the input of the following NCE operations.
[0055] By contrast, an enhanced Space-Depth conversion workflow 112 for the configuration / pattern of the Space-Depth conversion layer 100 (FIG. 7) and the convolution layer 102 (FIG. 7) is executed via DMA tasks. In the illustrated example, the workflow 112 is condensed to three operations (e.g., both the DMA tasks and the SHAVE tasks are reduced) .
[0056] FIG. 9 demonstrates that each DMA operation may have a job descriptor 120. The illustrated job descriptor 120 is a set of 64-bit words that encapsulate a single DMA transfer configuration, such as source address, the destination address, a plane (e.g., burst) length, a source width, a destination width, a source stride, a destination stride, a source plane stride, a destination plane stride or a number of planes. The job descriptor 120 can be stored either in CMX or DDR. In one example, the job descriptor 120 is linked in a linked list 122 to optimize register-access time. Accordingly, the technology described herein changes the configuration of the job descriptor 120 and uses DMA tasks to transform data similarly to Space-Depth conversion layers.
[0057] FIG. 10 shows an S2D conversion 130 via one or more DMA tasks. The illustrated S2D conversion 130 is from block regions in a spatial dimension format 132 to channels in a depth dimension format 134. An example of the corresponding job descriptor 136 is also shown.
[0058] FIG. 11 shows a D2S conversion 140 via one or more DMA tasks. The illustrated D2S conversion 140 is from channels in a depth dimension format 142 to block regions in a spatial dimension format 144. An example of the corresponding job descriptor 146 is also shown.
[0059] More particularly, the D2S conversion 140 rearranges data from the depth dimension of the input tensor into spatial dimensions of the output tensor. The D2S conversion 140 has two modes –block-first and depth-first. The illustrated D2S conversion 140 shows how to convert in block-first mode with the NHWC layout and the corresponding job descriptor 146. OC is the output channel, OH is output height, OW is output width, and BS is the block size, which is the size of the spatial block. In one example, the block size is an attribution of the D2S conversion 140.
[0060] The Space-Depth DMA solution is generally more efficient than conventional approaches. For some specific cases, however, the number of DMA operations can be relatively large. For example, when the block size or the input height is a large number, the block-first NHWC D2S conversion 140 can result in numerous DMA tasks, which make it more complicated for the task scheduler and may cause a less performant result. Another potential challenge of the DMA solution is that DMA tasks with “stride” may not be as efficient as the bandwidth, leading to less improvement than expected. Overall, however, the Space-Depth DMA is a useful solution to accelerate the Space-Depth conversion.
[0061] Space-Depth conversion DPU implementation
[0062] Given the pros and cons of the DMA solution, a DPU solution can be used to further accelerate the Space-Depth conversion, by replacing the conversion with a DPU Convolution task. The design of the DPU Convolution task to execute the Space-Depth with higher efficiency is as follows.
[0063] Depending on whether the conversion is operated in block-first or depth-first mode, the weights (e.g., weight tensors) are generated by a compiler accordingly with zeros (0’s) and ones (1's) . The DPU excels in providing the same throughput irrespective of whether the attributes are block-first or depth-first, unlike the DMA approach where optimal performance is achieved for block-first with NHWC layout. For completeness, the set-up of the weight tensors for convolution operations is shown for both modes: Kernel size (Fh, Fw) = (block_size, block_size) Stride (block_size, block_size) C = Ci (Pad wherever necessary at the end) Co= Ci x block_size x block_size
[0064] Initialize weight tensor: Wt = np. zeros ( (Co, Fh, Fw, Ci)
[0065] Set the weight tensor for block_first mode:
[0066] for K in range (0, Co) : Wt[K, (K / / (Fw*Ci) ) , (K% (Ci*Fw) ) / / Ci, K%Ci] = 1
[0067] Set weight tensor for depth_first mode:
[0068] for K in range (0, Co) : Wt[K, (K% (Fw*Fh) ) / / Fw, K%Fw, K / / (Fw*Fh) ] = 1
[0069] FIG. 12 demonstrates how S2D conversion operations are achieved through convolution for a block size of four. In general, a weight tensor may include a plurality of weight sets 150 (150a-150n) , wherein each weight set 150 has only a single weight equal to 1 and all other weights (e.g., remaining weights) are equal to 0. The weight that is equal to 1 “selects” the activation from an input tensor 152 that is written to the corresponding channel in an output tensor 154 for that weight set 150. The convolution is executed with a 4x4 kernel, and a stride of 4 in the X and Y dimensions (e.g., kernel and stride are equal to block size) . Accordingly, each iteration of the kernel is non-overlapping (e.g., non-overlapping kernel) .
[0070] This operation is typically used for image patches at the beginning of a neural network where input channels are < 16. Therefore, mapping to the DPU through convolution is the most effective way of implementing this operation.
[0071] FIG. 13 demonstrates how D2S conversion operations are achieved through convolution for a block size of four. Again, a weight tensor may include a plurality of weight sets 160 (160a-160n) , wherein the DPU implementation involves some DMA tasks / operations. These DMA tasks, however, are maximum width DMA transfers, which provide maximum efficiency and result in better overall performance than a DMA-only D2S conversion operation. This operation is typically used at the end of a neural network where output channels are < 16. Therefore, mapping to DPU and DMA (e.g., through convolution transpose) is the most effective way of implementing this operation. The DPU D2S conversion operations are as follows.
[0072] 1. DMA insertion of padding between each successive row in an input tensor 162 (e.g., implemented as two DMA tasks)
[0073] - Zero data –this operation zeroes the memory for the entire expanded input tensor 162.
[0074] - Scatter tensor –this operation scatters the input tensor 162 so that the net effect is a row of 0’s between each row in the input tensor 162.
[0075] 2. Convolution
[0076] - Each weight set 160 includes two weights equal to one and the remaining weights equal to zero. The weight that is equal to one “selects” the activation from the input tensor 162 that is written to the corresponding channel in an output tensor 164 for that weight set 160. Even though there are two non-zero weights in each weight set 160, the non-zero weights are in different rows of the kernel. Therefore, the activation corresponding to one of the weight sets will always be zero. This condition is the reason for the insertion of zeroes between each row in the input tensor 162.
[0077] - Weight Sets 0-7 have BIT [K] and BIT [K+40] set while weight sets 8-15 have BIT [K+8] and BIT [K+48] as illustrated
[0078] - The horizontal stride is equal to the block size (e.g., two) , and the vertical stride is one.
[0079] - The DPU inserts a row of padding at the top and bottom of the input tensor 162.
[0080] 3. Implicit reshape
[0081] - There is no operation at this stage. Rather, an implicit output tensor 166 is merely a redefinition of the tensor dimensions as a 16*128*512 and a 4*512*512 tensor have the same layout in memory.
[0082] FIG. 14 shows a method 170 of conducting Space-Depth conversions via DMA tasks. The method 170 may generally be implemented in a DMA engine such as, for example, the DMA engine 32 (FIG. 1) , already discussed. More particularly, the method 170 may be implemented in one or more modules as a set of logic instructions stored in a machine-or computer-readable storage medium such as random access memory (RAM) , read only memory (ROM) , programmable ROM (PROM) , firmware, flash memory, etc., in hardware, or any combination thereof. For example, hardware implementations may include configurable logic, fixed-functionality logic, or any combination thereof. Examples of configurable logic (e.g., configurable hardware) include suitably configured programmable logic arrays (PLAs) , field programmable gate arrays (FPGAs) , complex programmable logic devices (CPLDs) , and general purpose microprocessors. Examples of fixed-functionality logic (e.g., fixed-functionality hardware) include suitably configured application specific integrated circuits (ASICs) , combinational logic circuits, and sequential logic circuits. The configurable or fixed-functionality logic can be implemented with complementary metal oxide semiconductor (CMOS) logic circuits, transistor-transistor logic (TTL) logic circuits, or other circuits.
[0083] For example, computer program code to carry out operations shown in the method 170 can be written in any combination of one or more programming languages, including an object oriented programming language such as JAVA, SMALLTALK, C++ or the like and conventional procedural programming languages, such as the “C” programming language or similar programming languages. Additionally, logic instructions might include assembler instructions, instruction set architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, state-setting data, configuration data for integrated circuitry, state information that personalizes electronic circuitry and / or other structural components that are native to hardware (e.g., host processor, central processing unit / CPU, microcontroller, etc. ) .
[0084] Illustrated processing block 172 provides for retrieving input tensor data from a source address and block 174 conducts a conversion of the input tensor data between a depth dimension format and a spatial dimension format, wherein the conversion is conducted via one or more DMA tasks. In one example, block 174 bypasses a SHAVE processor. Additionally, the conversion may be from block regions in the spatial dimension format to channels in the depth dimension format (e.g., S2D conversion operation) or from channels in the depth dimension format to block regions in the spatial dimension format (e.g., D2S conversion operation) . Moreover, the input tensor data and the output tensor data can be either padded or unpadded.
[0085] As already noted, the conversion may be conducted in accordance with one or more job descriptors. In such a case, the job descriptor (s) can specify the source address, a destination address, a plane length, a source width, a destination width, a source stride, a destination stride, a source plane stride, a destination plane stride, a number of planes, etc., or any combination thereof. Block 176 stores a result of the conversion to the destination address as output tensor data.
[0086] The method 170 therefore enhances performance at least to the extent that conducting the conversion via DMA tasks reduces the conversion time. Indeed, the larger the layer size, the more significant the conversion time improvement. Additionally, bypassing a fully-programmable processor such as the SHAVE frees up calculation resources for other layers in the AI network. Moreover, eliminating reliance on manually defined kernels reduces the likelihood of deep code loops and inefficient inferences (e.g., due to poor kernel implementations) .
[0087] FIG. 15 shows a method 180 of conducting Space-Depth conversions via convolution hardware. The method 180 may generally be implemented in a DPU such as, for example, the DPU 42 (FIG. 1) , already discussed. More particularly, the method 180 may be implemented in one or more modules as a set of logic instructions stored in a machine-or computer-readable storage medium such as RAM, ROM, PROM, firmware, flash memory, etc., in hardware, or any combination thereof. For example, hardware implementations may include configurable logic, fixed-functionality logic, or any combination thereof.
[0088] Illustrated processing block 182 provides for identifying input tensor data and block 184 defines a weight tensor for the input tensor data. Block 186 conducts a convolution on the input tensor data and the weight tensor to obtain output tensor data, wherein the convolution converts the input tensor data between a depth dimension format and a spatial dimension format. In an embodiment, block 186 bypasses a SHAVE.
[0089] In one example, the convolution converts the input tensor from block regions in the spatial dimension format to channels in the depth dimension format (e.g., S2D conversion operation) . In such a case, the convolution may be conducted in accordance with a non-overlapping kernel. Additionally, block 184 can define the weight tensor to include a plurality of weight sets, wherein each weight set includes a single weight equal to one and remaining weights equal to zero.
[0090] In another example, the convolution converts the input tensor from channels in the depth dimension format to block regions in the spatial dimension format (e.g., D2S conversion operation) . In such a case, block 186 can include inserting, via one or more DMA tasks, zero-valued rows between successive rows in the input tensor data and block 184 can define the weight tensor to include a plurality of weight sets, wherein each weight set includes two weights equal to one and remaining weights equal to zero. In one example, the two weights equal to one are located in different rows.
[0091] The method 180 therefore enhances performance at least to the extent that conducting the conversion via convolution hardware reduces the conversion time. Indeed, the larger the layer size, the more significant the conversion time improvement. Additionally, bypassing a fully-programmable processor such as the SHAVE frees up calculation resources for other layers in the AI network. Moreover, eliminating reliance on manually defined kernels reduces the likelihood of deep code loops and inefficient inferences (e.g., due to poor kernel implementations) .
[0092] Turning now to FIG. 16, a performance-enhanced computing system 280 is shown. The system 280 may generally be part of an electronic device / platform having computing functionality (e.g., personal digital assistant / PDA, notebook computer, tablet computer, convertible tablet, server) , communications functionality (e.g., smart phone) , imaging functionality (e.g., camera, camcorder) , media playing functionality (e.g., smart television / TV) , wearable functionality (e.g., watch, eyewear, headwear, footwear, jewelry) , vehicular functionality (e.g., car, truck, motorcycle) , robotic functionality (e.g., autonomous robot) , Internet of Things (IoT) functionality, drone functionality, etc., or any combination thereof.
[0093] In the illustrated example, the system 280 includes a host processor 282 (e.g., CPU) having an integrated memory controller (IMC) 284 that is coupled to a system memory 286 (e.g., dual inline memory module / DIMM) . In an embodiment, an IO module 288 is coupled to the host processor 282. The illustrated IO module 288 communicates with, for example, a display 290 (e.g., touch screen, liquid crystal display / LCD, light emitting diode / LED display) , and a network controller 292 (e.g., wired and / or wireless) . The host processor 282 may be combined with the IO module 288, a graphics processor 294, and an AI accelerator 296 into a system on chip (SoC) 298. The illustrated AI accelerator 296 includes a SHAVE 300, a DPU 302 and a DMA engine 304.
[0094] In an embodiment, the DPU 302 includes logic 306 (e.g., including executable program instructions, configurable hardware, fixed-functionality hardware, etc., or any combination thereof) to perform one or more aspects of the method 170 (FIG. 14) and / or the method 180 (FIG. 15) , already discussed. Thus, the logic 306 (e.g., including at least partly configurable and / or fixed-functionality hardware) can identify input tensor data, define a weight tensor for the input tensor data, bypass the SHAVE 300, and conduct a convolution on the input tensor and the weight tensor to obtain output tensor data, wherein the convolution converts the input tensor data between a depth dimension format and a spatial dimension format. The logic 306 (e.g., including executable program instructions) can also retrieve input tensor data from a source address, conduct a conversion of the input tensor data between a depth dimension format and a spatial dimension format, wherein the conversion is conducted via one or more DMA tasks, and store a result of the conversion to a destination address as output tensor data.
[0095] The computing system 280 is therefore considered performance-enhanced at least to the extent that conducting the conversion via convolution hardware and / or DMA tasks reduces the conversion time. Indeed, the larger the layer size, the more significant the conversion time improvement. Additionally, bypassing a fully-programmable processor such as the SHAVE 300 frees up calculation resources for other layers in the AI network. Moreover, eliminating reliance on manually defined kernels reduces the likelihood of deep code loops and inefficient inferences (e.g., due to poor kernel implementations) .
[0096] FIG. 17 shows a semiconductor apparatus 350 (e.g., chip, die, package) . The illustrated apparatus 350 includes one or more substrates 352 (e.g., silicon, sapphire, gallium arsenide) and logic 354 (e.g., transistor array and other integrated circuit / IC components) coupled to the substrate (s) 352. In an embodiment, the logic 354 implements one or more aspects of the method 170 (FIG. 14) and / or the method 180 (FIG. 15) , already discussed. The logic 354 may also be substituted for the logic 306 (FIG. 16) , already discussed.
[0097] The logic 354 can be implemented at least partly in configurable or fixed-functionality hardware. In one example, the logic 354 includes transistor channel regions that are positioned (e.g., embedded) within the substrate (s) 352. Thus, the interface between the logic 354 and the substrate (s) 352 may not be an abrupt junction. The logic 354 may also be considered to include an epitaxial layer that is grown on an initial wafer of the substrate (s) 352.
[0098] FIG. 18 illustrates a processor core 400 according to one embodiment. The processor core 400 may be the core for any type of processor, such as a micro-processor, an embedded processor, a digital signal processor (DSP) , a network processor, or other device to execute code. Although only one processor core 400 is illustrated in FIG. 18, a processing element may alternatively include more than one of the processor core 400 illustrated in FIG. 18. The processor core 400 may be a single-threaded core or, for at least one embodiment, the processor core 400 may be multithreaded in that it may include more than one hardware thread context (or “logical processor” ) per core.
[0099] FIG. 18 also illustrates a memory 470 coupled to the processor core 400. The memory 470 may be any of a wide variety of memories (including various layers of memory hierarchy) as are known or otherwise available to those of skill in the art. The memory 470 may include one or more code 413 instruction (s) to be executed by the processor core 400, wherein the code 413 may implement the method 170 (FIG. 14) and / or the method 180 (FIG. 15) , already discussed. The processor core 400 follows a program sequence of instructions indicated by the code 413. Each instruction may enter a front end portion 410 and be processed by one or more decoders 420. The decoder 420 may generate as its output a micro operation such as a fixed width micro operation in a predefined format, or may generate other instructions, microinstructions, or control signals which reflect the original code instruction. The illustrated front end portion 410 also includes register renaming logic 425 and scheduling logic 430, which generally allocate resources and queue the operation corresponding to the convert instruction for execution.
[0100] The processor core 400 is shown including execution logic 450 having a set of execution units 455-1 through 455-N. Some embodiments may include a number of execution units dedicated to specific functions or sets of functions. Other embodiments may include only one execution unit or one execution unit that can perform a particular function. The illustrated execution logic 450 performs the operations specified by code instructions.
[0101] After completion of execution of the operations specified by the code instructions, back end logic 460 retires the instructions of the code 413. In one embodiment, the processor core 400 allows out of order execution but requires in order retirement of instructions. Retirement logic 465 may take a variety of forms as known to those of skill in the art (e.g., re-order buffers or the like) . In this manner, the processor core 400 is transformed during execution of the code 413, at least in terms of the output generated by the decoder, the hardware registers and tables utilized by the register renaming logic 425, and any registers (not shown) modified by the execution logic 450.
[0102] Although not illustrated in FIG. 18, a processing element may include other elements on chip with the processor core 400. For example, a processing element may include memory control logic along with the processor core 400. The processing element may include I / O control logic and / or may include I / O control logic integrated with memory control logic. The processing element may also include one or more caches.
[0103] Referring now to FIG. 19, shown is a block diagram of a computing system 1000 embodiment in accordance with an embodiment. Shown in FIG. 19 is a multiprocessor system 1000 that includes a first processing element 1070 and a second processing element 1080. While two processing elements 1070 and 1080 are shown, it is to be understood that an embodiment of the system 1000 may also include only one such processing element.
[0104] The system 1000 is illustrated as a point-to-point interconnect system, wherein the first processing element 1070 and the second processing element 1080 are coupled via a point-to-point interconnect 1050. It should be understood that any or all of the interconnects illustrated in FIG. 19 may be implemented as a multi-drop bus rather than point-to-point interconnect.
[0105] As shown in FIG. 19, each of processing elements 1070 and 1080 may be multicore processors, including first and second processor cores (i.e., processor cores 1074a and 1074b and processor cores 1084a and 1084b) . Such cores 1074a, 1074b, 1084a, 1084b may be configured to execute instruction code in a manner similar to that discussed above in connection with FIG. 18.
[0106] Each processing element 1070, 1080 may include at least one shared cache 1896a, 1896b. The shared cache 1896a, 1896b may store data (e.g., instructions) that are utilized by one or more components of the processor, such as the cores 1074a, 1074b and 1084a, 1084b, respectively. For example, the shared cache 1896a, 1896b may locally cache data stored in a memory 1032, 1034 for faster access by components of the processor. In one or more embodiments, the shared cache 1896a, 1896b may include one or more mid-level caches, such as level 2 (L2) , level 3 (L3) , level 4 (L4) , or other levels of cache, a last level cache (LLC) , and / or combinations thereof.
[0107] While shown with only two processing elements 1070, 1080, it is to be understood that the scope of the embodiments are not so limited. In other embodiments, one or more additional processing elements may be present in a given processor. Alternatively, one or more of processing elements 1070, 1080 may be an element other than a processor, such as an accelerator or a field programmable gate array. For example, additional processing element (s) may include additional processors (s) that are the same as a first processor 1070, additional processor (s) that are heterogeneous or asymmetric to processor a first processor 1070, accelerators (such as, e.g., graphics accelerators or digital signal processing (DSP) units) , field programmable gate arrays, or any other processing element. There can be a variety of differences between the processing elements 1070, 1080 in terms of a spectrum of metrics of merit including architectural, micro architectural, thermal, power consumption characteristics, and the like. These differences may effectively manifest themselves as asymmetry and heterogeneity amongst the processing elements 1070, 1080. For at least one embodiment, the various processing elements 1070, 1080 may reside in the same die package.
[0108] The first processing element 1070 may further include memory controller logic (MC) 1072 and point-to-point (P-P) interfaces 1076 and 1078. Similarly, the second processing element 1080 may include a MC 1082 and P-P interfaces 1086 and 1088. As shown in FIG. 19, MC’s 1072 and 1082 couple the processors to respective memories, namely a memory 1032 and a memory 1034, which may be portions of main memory locally attached to the respective processors. While the MC 1072 and 1082 is illustrated as integrated into the processing elements 1070, 1080, for alternative embodiments the MC logic may be discrete logic outside the processing elements 1070, 1080 rather than integrated therein.
[0109] The first processing element 1070 and the second processing element 1080 may be coupled to an I / O subsystem 1090 via P-P interconnects 1076 1086, respectively. As shown in FIG. 19, the I / O subsystem 1090 includes P-P interfaces 1094 and 1098. Furthermore, I / O subsystem 1090 includes an interface 1092 to couple I / O subsystem 1090 with a high performance graphics engine 1038. In one embodiment, bus 1049 may be used to couple the graphics engine 1038 to the I / O subsystem 1090. Alternately, a point-to-point interconnect may couple these components.
[0110] In turn, I / O subsystem 1090 may be coupled to a first bus 1016 via an interface 1096. In one embodiment, the first bus 1016 may be a Peripheral Component Interconnect (PCI) bus, or a bus such as a PCI Express bus or another third generation I / O interconnect bus, although the scope of the embodiments are not so limited.
[0111] As shown in FIG. 19, various I / O devices 1014 (e.g., biometric scanners, speakers, cameras, sensors) may be coupled to the first bus 1016, along with a bus bridge 1018 which may couple the first bus 1016 to a second bus 1020. In one embodiment, the second bus 1020 may be a low pin count (LPC) bus. Various devices may be coupled to the second bus 1020 including, for example, a keyboard / mouse 1012, communication device (s) 1026, and a data storage unit 1019 such as a disk drive or other mass storage device which may include code 1030, in one embodiment. The illustrated code 1030 may implement the method 170 (FIG. 14) and / or the method 180 (FIG. 15) , already discussed. Further, an audio I / O 1024 may be coupled to second bus 1020 and a battery 1010 may supply power to the computing system 1000.
[0112] Note that other embodiments are contemplated. For example, instead of the point-to-point architecture of FIG. 19, a system may implement a multi-drop bus or another such communication topology. Also, the elements of FIG. 19 may alternatively be partitioned using more or fewer integrated chips than shown in FIG. 19.
[0113] Additional Notes and Examples:
[0114] Example 1 includes a performance-enhanced computing system comprising a streaming hybrid architecture vector engine (SHAVE) and a data processing unit coupled to the SHAVE, wherein the DPU includes logic coupled to one or more substrates, the logic to identify input tensor data, define a weight tensor for the input tensor data, bypass the SHAVE and conduct a convolution on the input tensor data and the weight tensor to obtain output tensor data, wherein the convolution converts the input tensor data between a depth dimension format and a spatial dimension format.
[0115] Example 2 includes the computing system of Example 1, wherein the convolution converts the input tensor data from block regions in the spatial dimension format to channels in the depth dimension format.
[0116] Example 3 includes the computing system of Example 2, wherein the convolution is conducted in accordance with a non-overlapping kernel.
[0117] Example 4 includes the computing system of any one of Examples 2 to 3, wherein the weight tensor is to include a plurality of weight sets, and wherein each weight set is to include a single weight equal to one and remaining weights equal to zero.
[0118] Example 5 includes the computing system of Example 1, wherein the convolution converts the input tensor data from channels in the depth dimension format to block regions in the spatial dimension format.
[0119] Example 6 includes the computing system of Example 5, wherein the logic is to insert, via one or more direct memory access (DMA) tasks, zero-valued rows between successive rows in the input tensor data, wherein the weight tensor is to include a plurality of weight sets, wherein each weight set is to include two weights equal to one and remaining weights equal to zero, and wherein the two weights equal to one are to be located in different rows.
[0120] Example 7 includes a semiconductor apparatus comprising one or more substrates, and logic coupled to the one or more substrates, wherein the logic is implemented at least partly in one or more of configurable or fixed-functionality hardware, the logic to identify input tensor data, define a weight tensor for the input tensor data, and conduct a convolution on the input tensor data and the weight tensor to obtain output tensor data, wherein the convolution converts the input tensor data between a depth dimension format and a spatial dimension format.
[0121] Example 8 includes the semiconductor apparatus of Example 7, wherein the logic is to bypass a streaming hybrid architecture vector engine.
[0122] Example 9 includes the semiconductor apparatus of any one of Examples 7 to 8, wherein the convolution converts the input tensor data from block regions in the spatial dimension format to channels in the depth dimension format.
[0123] Example 10 includes the semiconductor apparatus of Example 9, wherein the convolution is conducted in accordance with a non-overlapping kernel.
[0124] Example 11 includes the semiconductor apparatus of Example 9, wherein the weight tensor is to include a plurality of weight sets, and wherein each weight set is to include a single weight equal to one and remaining weights equal to zero.
[0125] Example 12 includes the semiconductor apparatus of any one of Examples 7 to 8, wherein the convolution converts the input tensor data from channels in the depth dimension format to block regions in the spatial dimension format.
[0126] Example 13 includes the semiconductor apparatus of Example 12, wherein the logic is to insert, via one or more direct memory access (DMA) tasks, zero-valued rows between successive rows in the input tensor data, wherein the weight tensor is to include a plurality of weight sets, wherein each weight set is to include two weights equal to one and remaining weights equal to zero, and wherein the two weights equal to one are to be located in different rows.
[0127] Example 14 includes at least one computer readable storage medium comprising a set of instructions, which when executed by a computing system, cause the computing system to retrieve input tensor data from a source address, conduct a conversion of the input tensor data between a depth dimension format and a spatial dimension format, wherein the conversion is conducted via one or more direct memory access (DMA) tasks, and store a result of the conversion to a destination address as output tensor data.
[0128] Example 15 includes the at least one computer readable storage medium of Example 14, wherein the conversion is to bypass a streaming hybrid architecture vector engine.
[0129] Example 16 includes the at least one computer readable storage medium of Example 14, wherein the conversion is from block regions in the spatial dimension format to channels in the depth dimension format.
[0130] Example 17 includes the at least one computer readable storage medium of Example 14, wherein the conversion is from channels in the depth dimension format to block regions in the spatial dimension format.
[0131] Example 18 includes the at least one computer readable storage medium of Example 14, wherein the input tensor data and the output tensor data are to be padded.
[0132] Example 19 includes the at least one computer readable storage medium of Example 14, wherein the input tensor data and the output tensor data are to be unpadded.
[0133] Example 20 includes the at least one computer readable storage medium of any one of Examples 14 to 19, wherein the conversion is conducted in accordance with one or more job descriptors, and wherein the one or more job descriptors are to specify one or more of the source address, the destination address, a plane length, a source width, a destination width, a source stride, a destination stride, a source plane stride, a destination plane stride or a number of planes.
[0134] Example 21 includes a method of operating a performance-enhanced computing system, the method comprising identifying input tensor data, defining a weight tensor for the input tensor data, and conducting a convolution on the input tensor data and the weight tensor to obtain output tensor data, wherein the convolution converts the input tensor data between a depth dimension format and a spatial dimension format.
[0135] Example 22 includes a method of operating a performance-enhanced computing system, the method comprising retrieving input tensor data from a source access, conducting a conversion of the input tensor data between a depth dimension format and a spatial dimension format, wherein the conversion is conducted via one or more direct memory access (DMA) tasks, and storing a result of the conversion to a destination address as output tensor data.
[0136] Example 23 includes an apparatus comprising means for performing the method of any one of Example 21 to 22.
[0137] Embodiments are applicable for use with all types of semiconductor integrated circuit ( “IC” ) chips. Examples of these IC chips include but are not limited to processors, controllers, chipset components, programmable logic arrays (PLAs) , memory chips, network chips, systems on chip (SoCs) , SSD / NAND controller ASICs, and the like. In addition, in some of the drawings, signal conductor lines are represented with lines. Some may be different, to indicate more constituent signal paths, have a number label, to indicate a number of constituent signal paths, and / or have arrows at one or more ends, to indicate primary information flow direction. This, however, should not be construed in a limiting manner. Rather, such added detail may be used in connection with one or more exemplary embodiments to facilitate easier understanding of a circuit. Any represented signal lines, whether or not having additional information, may actually comprise one or more signals that may travel in multiple directions and may be implemented with any suitable type of signal scheme, e.g., digital or analog lines implemented with differential pairs, optical fiber lines, and / or single-ended lines.
[0138] Example sizes / models / values / ranges may have been given, although embodiments are not limited to the same. As manufacturing techniques (e.g., photolithography) mature over time, it is expected that devices of smaller size could be manufactured. In addition, well known power / ground connections to IC chips and other components may or may not be shown within the figures, for simplicity of illustration and discussion, and so as not to obscure certain aspects of the embodiments. Further, arrangements may be shown in block diagram form in order to avoid obscuring embodiments, and also in view of the fact that specifics with respect to implementation of such block diagram arrangements are highly dependent upon the computing system within which the embodiment is to be implemented, i.e., such specifics should be well within purview of one skilled in the art. Where specific details (e.g., circuits) are set forth in order to describe example embodiments, it should be apparent to one skilled in the art that embodiments can be practiced without, or with variation of, these specific details. The description is thus to be regarded as illustrative instead of limiting.
[0139] The term “coupled” may be used herein to refer to any type of relationship, direct or indirect, between the components in question, and may apply to electrical, mechanical, fluid, optical, electromagnetic, electromechanical or other connections. In addition, the terms “first” , “second” , etc. may be used herein only to facilitate discussion, and carry no particular temporal or chronological significance unless otherwise indicated.
[0140] As used in this application and in the claims, a list of items joined by the term “one or more of” may mean any combination of the listed terms. For example, the phrases “one or more of A, B or C” may mean A; B; C; A and B; A and C; B and C; or A, B and C.
[0141] Those skilled in the art will appreciate from the foregoing description that the broad techniques of the embodiments can be implemented in a variety of forms. Therefore, while the embodiments have been described in connection with particular examples thereof, the true scope of the embodiments should not be so limited since other modifications will become apparent to the skilled practitioner upon a study of the drawings, specification, and following claims.
Claims
1.A computing system comprising:a streaming hybrid architecture vector engine (SHAVE) ; anda data processing unit (DPU) coupled to the SHAVE, wherein the DPU includes logic coupled to one or more substrates, the logic to:identify input tensor data,define a weight tensor for the input tensor data,bypass the SHAVE, andconduct a convolution on the input tensor data and the weight tensor to obtain output tensor data, wherein the convolution converts the input tensor data between a depth dimension format and a spatial dimension format.2.The computing system of claim 1, wherein the convolution converts the input tensor data from block regions in the spatial dimension format to channels in the depth dimension format.3.The computing system of claim 2, wherein the convolution is conducted in accordance with a non-overlapping kernel.4.The computing system of any one of claims 2 to 3, wherein the weight tensor is to include a plurality of weight sets, and wherein each weight set is to include a single weight equal to one and remaining weights equal to zero.5.The computing system of claim 1, wherein the convolution converts the input tensor data from channels in the depth dimension format to block regions in the spatial dimension format.6.The computing system of claim 5, wherein the logic is to insert, via one or more direct memory access (DMA) tasks, zero-valued rows between successive rows in the input tensor data, wherein the weight tensor is to include a plurality of weight sets, wherein each weight set is to include two weights equal to one and remaining weights equal to zero, and wherein the two weights equal to one are to be located in different rows.7.A semiconductor apparatus comprising:one or more substrates; andlogic coupled to the one or more substrates, wherein the logic is implemented at least partly in one or more of configurable or fixed-functionality hardware, the logic to:identify input tensor data;define a weight tensor for the input tensor data; andconduct a convolution on the input tensor data and the weight tensor to obtain output tensor data, wherein the convolution converts the input tensor data between a depth dimension format and a spatial dimension format.8.The semiconductor apparatus of claim 7, wherein the logic is to bypass a streaming hybrid architecture vector engine.9.The semiconductor apparatus of any one of claims 7 to 8, wherein the convolution converts the input tensor data from block regions in the spatial dimension format to channels in the depth dimension format.10.The semiconductor apparatus of claim 9, wherein the convolution is conducted in accordance with a non-overlapping kernel.11.The semiconductor apparatus of claim 9, wherein the weight tensor is to include a plurality of weight sets, and wherein each weight set is to include a single weight equal to one and remaining weights equal to zero.12.The semiconductor apparatus of any one of claims 7 to 8, wherein the convolution converts the input tensor data from channels in the depth dimension format to block regions in the spatial dimension format.13.The semiconductor apparatus of claim 12, wherein the logic is to insert, via one or more direct memory access (DMA) tasks, zero-valued rows between successive rows in the input tensor data, wherein the weight tensor is to include a plurality of weight sets, wherein each weight set is to include two weights equal to one and remaining weights equal to zero, and wherein the two weights equal to one are to be located in different rows.14.At least one computer readable storage medium comprising a set of instructions, which when executed by a computing system, cause the computing system to:retrieve input tensor data from a source address;conduct a conversion of the input tensor data between a depth dimension format and a spatial dimension format, wherein the conversion is conducted via one or more direct memory access (DMA) tasks; andstore a result of the conversion to a destination address as output tensor data.15.The at least one computer readable storage medium of claim 14, wherein the conversion is to bypass a streaming hybrid architecture vector engine.16.The at least one computer readable storage medium of claim 14, wherein the conversion is from block regions in the spatial dimension format to channels in the depth dimension format.17.The at least one computer readable storage medium of claim 14, wherein the conversion is from channels in the depth dimension format to block regions in the spatial dimension format.18.The at least one computer readable storage medium of claim 14, wherein the input tensor data and the output tensor data are to be padded.19.The at least one computer readable storage medium of claim 14, wherein the input tensor data and the output tensor data are to be unpadded.20.The at least one computer readable storage medium of any one of claims 14 to 19, wherein the conversion is conducted in accordance with one or more job descriptors, and wherein the one or more job descriptors are to specify one or more of the source address, the destination address, a plane length, a source width, a destination width, a source stride, a destination stride, a source plane stride, a destination plane stride or a number of planes.
Citation Information
Patent Citations
Method and system for implementing convolution transpose layer of neural network
CN111723904A
Neural network model compiling method and device, electronic equipment and storage medium
CN114239803A
Generating and managing deep tensor neural networks
US20230306276A1
Cited By
Method and device for optimizing DPU side memory, DPU chip, AI cluster accelerator card and cloud computing host
CN121070624A
OpenVX framework system for NPU acceleration
CN121560823A
Data processing method and device for neural network processor, computer equipment, storage medium and program product
CN122220257A
Data processing methods, apparatus, computer equipment, storage media, and program products for neural network processors
CN122220257B