Similarity-based feature sorting for improved memory compression transfer during machine learning jobs

By sorting feature maps based on similarity and applying delta-based compression, the method addresses memory bottlenecks in deep learning models, enhancing data transfer efficiency and reducing power consumption.

JP7775211B2Active Publication Date: 2025-11-25ATI TECHNOLOGIES ULC
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2022556479
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-03-31
Filing Date
2021-03-05
Publication Date
2025-11-25
Estimated Expiration
2041-03-05

AI Technical Summary

Technical Problem

Deep learning models experience significant memory bandwidth bottlenecks and increased power consumption due to large memory requirements for storing activation tensor data, necessitating inefficient data transfers between on-chip and off-chip memory.

Method used

A processing device and method that sorts feature maps based on similarity during the training phase, using delta-based compression algorithms to efficiently store and transfer activation tensor data by rearranging memory layouts according to channel similarity.

Benefits of technology

Reduces memory bandwidth usage and power consumption by enhancing data compression efficiency during the inference phase, minimizing redundant data transfers and improving overall performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007775211000002
    Figure 0007775211000002
  • Figure 0007775211000003
    Figure 0007775211000003
  • Figure 0007775211000004
    Figure 0007775211000004
Patent Text Reader

Abstract

A processing device for performing a machine learning neural network operation includes a memory and a processor, the processor being configured to receive input data at a layer of the machine learning neural network operation, receive a plurality of sorted filters to be applied to the input data, apply the plurality of sorted filters to the input data to generate a plurality of distinct feature maps, compress the plurality of distinct feature maps according to similarities of the feature maps to one another, and store the plurality of distinct feature maps in a memory.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] (CROSS-REFERENCE TO RELATED APPLICATIONS) This application claims the benefit of U.S. Patent Application No. 16 / 836,785, filed March 31, 2020, the contents of which are incorporated herein by reference. [Background technology]

[0002] Machine learning (e.g., deep learning) is widely used in various technologies (e.g., image classification) to make predictions or decisions to perform specific tasks (e.g., whether an image contains a specific object). Convolutional neural networks (CNNs) are a class of deep learning algorithms widely used in machine learning applications. These networks typically contain multiple layers. In each layer, a set of filters is applied to the output of the previous layer, and the output of each layer is known as activations or feature maps. The first and last layers in a network are known as the input layer and output layer, respectively, and the layers between the first and last layers are typically known as hidden layers.

[0003] Supervised learning machine learning models are trained to make predictions or decisions to perform a specific task (e.g., whether an image contains a particular object). During training, the model is exposed to different data. At each layer, the model transforms the data and receives feedback on the accuracy of its operation. During the inference phase, the trained model is used to infer or predict outputs for test samples (e.g., input tensors).

[0004] A more detailed understanding may be had from the following description, given by way of example in conjunction with the accompanying drawings, in which: [Brief explanation of the drawings]

[0005] [Figure 1] FIG. 1 is a block diagram of an example device capable of implementing one or more features of the present disclosure. [Figure 2] FIG. 2 is a block diagram of the device of FIG. 1 showing further details. [Figure 3] FIG. 10 illustrates a storage layout of exemplary activation tensor values ​​according to NHWC formatting before being sorted into memory, in accordance with aspects of the present disclosure. [Figure 4] FIG. 4 illustrates an exemplary sorting of the feature maps shown in FIG. 3 according to feature map similarity, and an exemplary memory layout of tensor values ​​stored in memory using NHWC formatting by sorting. [Figure 5] FIG. 1 is a flow diagram illustrating an example method for performing machine learning operations in accordance with aspects of the present disclosure. DETAILED DESCRIPTION OF THE INVENTION

[0006] The terms activation and feature map are used interchangeably in this disclosure. CNNs are used in different types of technical applications. For simplified explanation, the examples described herein include CNNs for image analysis.

[0007] The activations (full or partial) of a CNN model are written to and read from memory in each layer or multiple layers, depending on the particular application. The output of each layer is, for example, a four-dimensional (4D) activation tensor divided into N batches of feature maps (i.e., channels) C, each representing an image and each containing a set of images with a size defined by height (H) and width (W). The activation tensor undergoes an operation defined by the layer (e.g., a convolution kernel, a pooling operation), resulting in a new activation tensor for the next layer.

[0008] Deep learning models typically use significant memory bandwidth, which can lead to bandwidth bottlenecks, adversely affect performance, and increase power consumption. The amount of memory used to store activation tensor data in different layers of a machine learning neural network is typically so large that, depending on the application, the activation tensor data cannot be stored in on-chip memory. Therefore, storing activation tensor data involves transferring data to and from off-chip memory.

[0009] The transferred tensor data is compressed using any number of compression algorithms, such as delta-based compression algorithms, which store or transmit data in the form of differences (deltas) between sequential data. When the differences are small, delta-based compression significantly reduces data redundancy. Therefore, the efficiency of delta-based compression algorithms depends on the similarity between adjacent data stored in memory.

[0010] The present application provides a processing device and method for efficiently compressing tensors transferred to memory during the inference phase of a machine learning model by applying sorted filters to input tensors. The filters are sorted according to the similarity of feature maps obtained during the training phase. That is, during the training phase, a model is determined by changing the order in which tensor values ​​of feature maps are stored in memory locations (i.e., sorted) according to the similarity of their channels relative to each other. For example, the sorting of feature maps is based on the similarity of their mean element amplitudes (e.g., pixel intensities) (i.e., channel similarity). However, feature sorting can be implemented based on similarity according to other types of parameters. Also, feature sorting can be performed based on, for example, one- or two-dimensional discrete gradients or variances.

[0011] Tensor data can be written to memory in different formats, such as NHWC (i.e., channel-first) or NCHW (i.e., width-first). In NHWC (or other channel-first memory layouts), collocated elements of co-located channels are adjacent in memory. The similarity of adjacent elements in memory affects the compression efficiency of a compression algorithm.

[0012] In one application, the tensor data is compressed using a delta-based compression algorithm, however, compression of the tensor data may be implemented in accordance with features of the present disclosure using other types of compression algorithms, such as a dictionary-based compression algorithm.

[0013] A processing device for performing a machine learning neural network operation is provided, including a memory and a processor, wherein the processor is configured, at a layer of the machine learning neural network operation, to receive input data, receive a plurality of sorted filters to be applied to the input data, apply the plurality of sorted filters to the input data to generate a plurality of distinct feature maps, compress the plurality of distinct feature maps according to similarities of the feature maps to one another, and store the plurality of distinct feature maps in the memory.

[0014] A machine learning processing method is provided that includes receiving input data at a layer of a machine learning neural network, receiving a plurality of sorted filters to be applied to the input data, applying the plurality of sorted filters to the input data to generate a plurality of distinct feature maps, compressing the plurality of distinct feature maps according to similarities of the feature maps to one another, and storing the plurality of distinct feature maps in a memory.

[0015] A non-transitory computer-readable storage medium is provided that includes stored instructions for causing a computer to perform a machine learning processing method that includes receiving input data at a layer of a machine learning neural network, receiving a plurality of sorted filters to be applied to the input data, applying the plurality of sorted filters to the input data to generate a plurality of distinct feature maps, compressing the plurality of distinct feature maps according to similarities of the feature maps to one another, and storing the plurality of distinct feature maps in a memory.

[0016] 1 is a block diagram of an example device 100 capable of implementing one or more features of the present disclosure. Device 100 may include, for example, a computer, a gaming device, a handheld device, a set-top box, a television, a mobile phone, or a tablet computer. Device 100 includes a processor 102, a memory 104, a storage device 106, one or more input devices 108, and one or more output devices 110. Device 100 may also optionally include an input driver 112 and an output driver 114. It should be understood that device 100 may include additional components not shown in FIG. 1 .

[0017] In various alternatives, processor 102 includes a central processing unit (CPU), a graphics processing unit (GPU), a CPU and a GPU located on the same die, or one or more processor cores, each of which may be a CPU or a GPU or a standalone accelerator. In various alternatives, memory 104 may be located on the same die as processor 102 or may be located separately from processor 102. Memory 104 may include volatile or non-volatile memory (e.g., random access memory (RAM), dynamic RAM, cache).

[0018] The storage devices 106 include fixed or removable storage devices (e.g., hard disk drives, solid state drives, optical disks, flash drives). The input devices 108 include, but are not limited to, a keyboard, a keypad, a touch screen, a touch pad, a detector, a microphone, an accelerometer, a gyroscope, a biometric scanner, or a network connection (e.g., a wireless local area network card for transmitting and / or receiving wireless IEEE 802 signals). The output devices 110 include, but are not limited to, a display, a speaker, a printer, a haptic feedback device, one or more optics, an antenna, or a network connection (e.g., a wireless local area network card for transmitting and / or receiving wireless IEEE 802 signals).

[0019] Input driver 112 communicates with processor 102 and input device 108, allowing processor 102 to receive input from input device 108. Output driver 114 communicates with processor 102 and output device 110, allowing processor 102 to send output to output device 110. Note that input driver 112 and output driver 114 are optional components, and device 100 operates similarly when input driver 112 and output driver 114 are not present. Output driver 114 includes an accelerated processing device ("APD") 116 coupled to display device 118. The APD accepts computational and graphics rendering commands from processor 102, processes those computational and graphics rendering commands, and provides output to display device 118 for display. As described in further detail below, APD 116 includes one or more parallel processing units for performing computations according to the single-instruction-multiple-data ("SIMD") paradigm. Although various functions are described herein as being performed by or in conjunction with APD 116, in various alternatives, the functions described as being performed by APD 116 are additionally or alternatively performed by other computing devices that are not driven by a host processor (e.g., processor 102) but have similar capabilities to provide graphical output to display device 118. For example, it is contemplated that any processing system that performs processing tasks according to the SIMD paradigm may perform the functions described herein. Alternatively, it is contemplated that computing systems that do not perform processing tasks according to the SIMD paradigm perform the functions described herein.

[0020] FIG. 2 is a block diagram of device 100, showing further details regarding the execution of processing tasks on APD 116. Processor 102 maintains, within system memory 104, one or more control logic modules for execution by processor 102. The control logic modules include operating system 120, kernel-mode driver 122, and applications 126. These control logic modules control various aspects of the operation of processor 102 and APD 116. For example, operating system 120 communicates directly with hardware and provides an interface to the hardware for other software executing on processor 102. Kernel-mode driver 122 controls the operation of APD 116, for example, by providing an application programming interface (API) to software executing on processor 102 (e.g., applications 126) to access various features of APD 116. Kernel-mode driver 122 also includes a just-in-time compiler that compiles programs for execution by processing components of APD 116 (such as SIMD unit 138, described in more detail below).

[0021] APD 116 executes commands and programs for selected functions, such as graphics and non-graphics operations that may be suitable for parallel processing. APD 116 may be used to perform graphics pipeline operations, such as pixel operations, geometric calculations, and rendering of images to display device 118, based on commands received from processor 102. APD 116 also performs computational operations not directly related to graphics operations, such as operations related to video, physics simulations, computational fluid dynamics, or other tasks, based on commands received from processor 102.

[0022] The APD 116 includes a computation unit 132 that includes one or more SIMD units 138 that perform operations in parallel according to the SIMD paradigm at the request of the processor 102. The SIMD paradigm allows multiple processing elements to share a single program control flow unit and program counter, thus executing the same program but with different data. In one example, each SIMD unit 138 includes 16 lanes, each of which executes the same instruction simultaneously with other lanes in the SIMD unit 138 but can execute the instruction with different data. Lanes can be predictively switched off if not all lanes need to execute a given instruction. Prediction can be used to execute programs with branching control flow. More specifically, for programs with conditional branches or other instructions where control flow is based on calculations performed by individual lanes, prediction of lanes corresponding to currently unexecuted control flow paths and serial execution of different control flow paths allows arbitrary control flow.

[0023] The basic unit of execution within the compute unit 132 is the work item. Each work item represents a single instantiation of a program executing in parallel on a particular lane. Work items can execute simultaneously as a “wavefront” on a single SIMD unit 138. One or more wavefronts are included in a “workgroup,” which contains a collection of work items designated to execute the same program. A workgroup can be executed by executing each of the wavefronts that make up the workgroup. Alternatively, a wavefront executes sequentially on a single SIMD unit 138, or partially or fully in parallel on different SIMD units 138. A wavefront can be thought of as the largest collection of work items that can execute simultaneously on a single SIMD unit 138. Thus, if a command received from the processor 102 indicates that a particular program is to be parallelized to an extent that the program cannot execute simultaneously on a single SIMD unit 138, the program is divided into wavefronts that are either parallelized on two or more SIMD units 138, or serialized on the same SIMD unit 138 (or both parallelized and serialized as needed). The scheduler 136 performs operations related to scheduling the various wavefronts on the different compute units 132 and SIMD units 138 .

[0024] The parallel processing provided by the computation units 132 is well suited to graphics-related operations such as pixel value calculations, vertex transformations, and other graphics operations. Thus, in some cases, the graphics processing pipeline 134, which accepts graphics processing commands from the processor 102, provides computational tasks to the computation units 132 for execution in parallel.

[0025] Computation unit 132 is also used to perform computational tasks that are not related to graphics or that are not performed as part of the "normal" operation of graphics processing pipeline 134 (e.g., custom operations performed to supplement the operations performed on graphics processing pipeline 134). Applications 126 or other software executing on processor 102 send programs defining such computational tasks to APD 116 for execution.

[0026] The APD 116 is configured to execute machine learning models, including deep learning models. The APD 116 is configured to store activation tensor data for different layers of a machine learning neural network. At each layer, the APD 116 is configured to perform an operation (e.g., a convolution kernel, a pooling operation) on input data (e.g., an image, activation tensors) of the previous layer and apply a filter to the input data to provide tensor data for the next layer.

[0027] As described above, the amount of memory used to store activation tensor data for different layers of a neural network is typically so large (e.g., in the early layers) that the activation tensor data cannot be stored in on-chip memory (e.g., the memory of the APD 116). Therefore, storing the activation tensor data involves transferring data between the APD 116 and off-chip memory (e.g., the memory 104) over a link (e.g., a bus). The APD 116 is configured to compress (e.g., save bandwidth) the data transferred to the off-chip memory.

[0028] The APD 116 is configured to compress tensor data by changing the order in which tensor values ​​are stored according to any of a plurality of feature map similarity parameters, using any of a plurality of different types of memory formatting using a channel-first configuration, and using any of a plurality of types of compression algorithms. For simplified explanation, the embodiments described herein include delta-based compression of 4D tensor values ​​according to NHWC (i.e., channel-first) formatting by changing the order in which tensor values ​​are written to memory based on the similarity of mean element amplitudes (e.g., pixel intensities) of the feature maps (i.e., channel similarity).

[0029] FIG. 3 is a diagram illustrating the storage layout of an example 4D activation tensor value according to NHWC formatting, before being sorted in memory in accordance with features of the present disclosure.

[0030] In NHWC, activation tensors (e.g., 4D activation tensors) are stored channel-first. For example, a 4D activation tensor is written to memory by mapping each 4D tensor value through an offset function that inputs a logical index (n, h, w, c) and returns the address displacement where each value is located. Thus, two tensor values ​​stored adjacently in memory share the same primary indexes n, h, and w, but have different w indices (e.g., the w index of the second tensor value differs from that of the first tensor value by 1). Uppercase letters represent the four dimensions of the activation tensor (i.e., N, H, W, and C), and lowercase letters represent the indices for each dimension (i.e., n, h, w, and c).

[0031] For example, if NHWC formatting is used to store tensor values ​​of multiple feature maps, each representing, e.g., an activation, the element in the first location (e.g., value row 1, column 1) of each feature map is stored in memory first, followed by the element in the second location (e.g., value row 1, column 2) of each feature map, and so on, until each of the elements in each batch has been stored in memory.

[0032] The activation tensor shown in Figure 3 includes eight feature maps 302 (i.e., eight channels), each of which is a 2x2 element matrix. The dimensions of the feature maps shown in Figure 3 are merely examples. Features of the present disclosure can be implemented using any number of feature maps (i.e., channels) with dimensions different from those shown in Figure 3 (i.e., rows of width W and columns of height H).

[0033] Each feature map 302 is a different representation of the input tensor to which a different filter (e.g., a weight) is applied. For example, the input tensor is operated on using a first filter (e.g., a convolution kernel, a pooling operation), which produces a first feature map 302 (C0) containing element values ​​00, 01, 02, and 03. The input tensor is then operated on using a second filter, which produces a second feature map 302 (C1) containing element values ​​04, 05, 06, and 07. The process continues with a different filter to produce each feature map 302 (C0-C7).

[0034] 3 also illustrates an exemplary memory layout showing locations within memory portion 304 where each element value is stored according to NHWC formatting without sorting (i.e., rearranging) the element values ​​in memory in accordance with features of the present disclosure. As illustrated, a first element 00 of a first feature map 302(C0) is stored in a first location within memory portion 304. A collocated first element 04 of a second feature map 302(C1) is then stored in a second location within memory portion 304 adjacent to the first element 00 of the first feature map 302(C0).

[0035] After each of the collocated first elements (i.e., 08, 12, 16, 20, 24, 28) of the remaining feature maps 302 (C2-C7) are stored in the next location in the memory portion 304, the second element 01 (along width W from element 00) of the first feature map 302 (C0) is stored, followed by the collocated second element 05 of the second feature map 302 (C1).

[0036] After each of the collocated second elements (i.e., 09, 13, 17, 21, 25, 29) of the remaining feature maps 302 (C2-C7) are stored in the next location in the memory portion 304, element 02 (along height H from element 00) of the first feature map 304 (C0) is stored, followed by collocated element 06 of the second feature map 302 (C1), and then each of the collocated elements (i.e., 10, 14, 18, 22, 26, 30) of the remaining feature maps 302 (C2-C7) in the next location in the memory portion 304.

[0037] After element 30 is stored, element 03 of the first feature map 304 (C0) is stored, followed by collocated element 07 of the second feature map 302 (C1), and then the remaining collocated elements (11, 15, 19, 23, 27, 31) are stored in memory portion 304.

[0038] As mentioned above, the efficiency of compression of tensor values ​​(e.g., delta-based compression) depends on the similarity between adjacent data stored in memory, for example.

[0039] 4 shows an example of how the feature maps 302 shown in FIG. 3 are sorted during the training phase according to feature map similarity, and an exemplary memory layout of element values ​​stored in memory using NHWC formatting according to the sorting. That is, the channels are sorted during training so that neighboring data elements in memory are more similar to each other than in unsorted channels. Because the channels are sorted according to similarity, the number of memory transfers made to run the model during the inference phase is reduced (i.e., memory bandwidth is reduced).

[0040] The number of bits for each element shown in Figures 3 and 4 (i.e., 4) is merely an example. In other embodiments, features of the present disclosure are implemented using elements represented by a different number of bits. Because each element is represented by 4 bits in the example, there are 16 different amplitude (e.g., intensity) levels (i.e., level 0 through level 15) to represent the amplitude of each element (e.g., integer element).

[0041] After or during training (i.e., before the inference stage), the data for different feature maps 302 (i.e., channels) are examined to determine the similarity of the feature maps 302 to one another. Based on the results, it is determined (during or after training) that each of the multiple filters applied to the activations produces a new activation tensor that can be evaluated based on the mean element amplitude values.

[0042] Table 1 below shows exemplary filter information determined during the training phase, including the mean element amplitudes of different feature maps 302 (C0-C7), resulting in eight different filters being applied to the input tensor and the input tensor being subjected to an operation (e.g., a convolution kernel, a pooling operation). For example, the mean element amplitudes are determined during the training of the model, which may include many iterations of applying different filters to the input tensor.

[0043] [Table 1]

[0044] For example, as shown in Table 1, a first filter applied to the input tensor results in a first feature map (C0) having a mean element amplitude value of 7; a second filter applied to the input tensor results in a second feature map 302 (C1) having a mean element amplitude value of 10; a third filter applied to the input tensor results in a third feature map 302 (C2) having a mean element amplitude value of 14; a fourth filter applied to the input tensor results in a fourth feature map 302 (C3) having a mean element amplitude value of 8; a fifth filter applied to the input tensor results in a first feature map (C4) having a mean element amplitude value of 11; a sixth filter applied to the input tensor results in a second feature map 302 (C5) having a mean element amplitude value of 4; a seventh filter applied to the input tensor results in a third feature map 302 (C6) having a mean element amplitude value of 9; and an eighth filter applied to the input tensor results in a fourth feature map 302 (C7) having a mean element amplitude value of 13.

[0045] Based on the filter information (e.g., the information shown in Table 1), the neural network is reconfigured by shuffling the filters to rearrange (i.e., sort) the output channels. For example, the eight filters are applied to the input tensor data in a different order than that shown in FIG. 3, as applied by the NHWC formatting, without the filters being resorted according to similarity of feature maps 302 (e.g., similarity of mean element amplitudes). The element values ​​are then stored in memory using the NHWC formatting.

[0046] For example, the filters are applied to the input tensor data in a different order than the order of the feature maps 302 shown in FIG. 4. That is, the filters are sorted according to the similarity of the feature maps using the predetermined mean element amplitudes shown in Table 1. Thus, as shown in FIG. 4, the first element 20 of feature map 302(C5) is stored in a first location in memory portion 402. Next, the collocated first element 00 of feature map 302(C0) is stored in a second location in memory portion 402 adjacent to the first element 20 of feature map 302(C5). The remaining feature maps 302(C3, C 6、 C1, C 4、 After each of the collocated first elements (i.e., 12, 24, 04, 16, 28, 08) of feature map 302 (C7, C2) is stored in the next location in memory portion 402, second element 21 (along width W from element 20) of feature map 302 (C5) is stored, followed by collocated second element 01 of feature map 302 (C0).

[0047] The remaining feature maps 302 (C3, C 6、 C1, C 4、 After each of the collocated second elements (i.e., 13, 25, 05, 17, 29, 09) of feature map 402 (C7, C2) is stored in the next location in memory portion 402, element 22 (along height H from element 20) of feature map 402 (C5) is stored, followed by collocated element 02 of feature map 302 (C0). 6、 C1, C 4、 After each of the collocated elements (i.e., 14, 26, 06, 18, 30, 10) of feature map 402 (C7, C2) is stored in the next location in memory portion 402, element 23 of feature map 402 (C5) is stored, followed by the remaining feature maps 302 (C3, C 6、 The collocated elements 03, 15, 27, 07, 19, 31, 11 of C1, C4, C7, C2) are stored.

[0048] Using a model developed during training that includes the above-described sorted filter, the sorted filter is applied to input tensors during the inference phase of the machine learning model. Due to the similarity of sorted adjacent data items, the tensor data is more efficiently compressed during the inference phase of running the model. For example, data is more efficiently compressed (e.g., using delta-based compression) because data redundancy is reduced when differences between nearby (e.g., adjacent) tensor data in memory are reduced.

[0049] FIG. 5 is a flow diagram illustrating an example method for improving compression during the inference stage of performing machine learning operations according to aspects of the present disclosure.

[0050] At block 502, the method 500 includes receiving an input tensor. For example, the input tensor is received (e.g., by a processor) during an inference stage at a layer of a CNN.

[0051] At block 504, the method 500 includes receiving a plurality of sorted filters to be applied to the input tensors during the inference phase. The sorted filters received during the inference phase may be filters that were sorted prior to the inference phase (e.g., during training), such as the sorted filters shown in FIG.

[0052] Once the input tensor is read from memory in a compressed format, the input tensor is decompressed, as indicated by the dotted line at block 506. For example, the input tensor of a layer is decompressed by the processor so that the tensor can undergo an operation (e.g., a convolution kernel, a pooling operation), resulting in a new activation tensor for the next layer. In some embodiments, the input tensor is written to memory in a compressed format, and the uncompressed input tensor is stored locally (e.g., locally to the processor) and used as the next input data for the next layer of the machine learning neural network. If the input tensor is not read from memory in a compressed format, the method proceeds to block 508.

[0053] At block 508, the method 500 includes applying a plurality of sorted filters to the input tensor received at block 504. For example, the plurality of sorted filters are filters sorted according to the similarity of the mean element amplitudes of each feature map 302.

[0054] At block 510, the method 500 includes compressing the tensor data (e.g., the resulting feature maps 302). For example, the tensor data is compressed according to the similarity of the feature maps to one another and transmitted over a link (e.g., a bus) to a non-local memory (e.g., an off-chip memory). Thus, when sorted, neighboring data (e.g., feature maps) are more similar to one another, so the sorted data is compressed more efficiently than if a filter were applied without sorting according to similarity.

[0055] At block 512, the method 500 includes storing the tensor data. For example, the tensor data is stored in memory using NHWC formatting. Because the channels are sorted according to similarity, the number of memory transfers performed to execute the model during the inference phase is reduced (i.e., memory bandwidth is reduced).

[0056] It should be understood that many variations are possible based on the disclosure herein, and although features and elements are described above in particular combinations, each feature or element can be used alone without other features and elements, or in various combinations with or without other features and elements.

[0057] The various functional units illustrated in the figures and / or described herein (including, but not limited to, processor 102, input driver 112, input device 108, output driver 114, output device 110, acceleration processing device 116, scheduler 136, graphics processing pipeline 134, computation unit 132, SIMD unit 138) may be implemented as a general purpose computer, processor, or processor core, or as a program, software, or firmware stored in a non-transitory computer-readable storage medium or another medium executable by the general purpose computer, processor, or processor core. The provided methods may be implemented in a general purpose computer, processor, or processor core. Suitable processors include, by way of example, general-purpose processors, special-purpose processors, conventional processors, digital signal processors (DSPs), multiple microprocessors, one or more microprocessors associated with a DSP core, a controller, a microcontroller, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) circuit, any other type of integrated circuit (IC), and / or a state machine. Such processors may be fabricated by configuring a manufacturing process using the results of processed hardware description language (HDL) instructions and other intermediate data such as a netlist (such instructions may be stored on a computer-readable medium). The result of such processing may be a mask work that is used in subsequent semiconductor manufacturing processes to produce a processor implementing features of the present disclosure.

[0058] The methods or flow diagrams provided herein may be implemented in a computer program, software, or firmware embodied in a non-transitory computer-readable storage medium for execution by a general-purpose computer or processor. Examples of non-transitory computer-readable storage media include read-only memory (ROM), random access memory (RAM), registers, cache memory, semiconductor memory devices, magnetic media (e.g., internal hard disks and removable disks), magneto-optical media, and optical media (e.g., CD-ROM disks and digital versatile disks (DVDs)).

Claims

1. 1. A processing device for executing a machine learning neural network, comprising: Memory and a processor, The processor: receiving input data at a layer of the machine learning neural network; receiving a plurality of sorted filters to be applied to the input data, the plurality of sorted filters being sorted based on similarity of feature maps obtained during training; applying the plurality of sorted filters to the input data to generate a plurality of different feature maps; compressing the plurality of different feature maps according to their similarities to one another; storing the plurality of different feature maps in the memory; configured to: Processing device.

2. the machine learning neural network is executed during an inference phase, and the sorted filters are sorted during training prior to executing the machine learning neural network during the inference phase. The processing device of claim 1 .

3. the processor is configured to store the plurality of different feature maps in the memory using an NHWC format. The processing device of claim 1 .

4. the processor is configured to compress the plurality of different feature maps using delta-based compression. The processing device of claim 1 .

5. the input data is a tensor; The processing device of claim 1 .

6. the similarity of the different feature maps is the similarity of the mean element amplitudes of the different feature maps to each other; The processing device of claim 5.

7. the processor is configured to store the compressed different feature maps in the memory according to the similarity by transferring the compressed different feature maps over a link; an amount of memory transfer used to store the compressed distinct feature maps obtained from the sorted filter is less than an amount of memory transfer used to store the compressed distinct feature maps obtained from an unsorted filter; The processing device of claim 1 .

8. the processor is configured to decompress the input data if the input data is read from the memory in a compressed format; The processing device of claim 1 .

9. the processor is configured to write the input data to the memory in the compressed format and use the input data in an uncompressed format as next input data for a next layer of the machine learning neural network. The processing device of claim 8.

10. A machine learning processing method, comprising: receiving input data at a layer of a machine learning neural network; receiving a plurality of sorted filters to be applied to the input data, the plurality of sorted filters being sorted based on similarity of feature maps obtained during training; applying the plurality of sorted filters to the input data to generate a plurality of different feature maps; compressing the plurality of different feature maps according to their similarities to one another; storing the plurality of different feature maps in a memory. Machine learning processing methods.

11. The machine learning neural network is executed during an inference phase, and the sorted filters are sorted during training prior to executing the machine learning neural network during the inference phase. The method of claim 10.

12. storing the plurality of different feature maps in the memory using an NHWC format. The method of claim 10.

13. compressing the plurality of distinct feature maps using delta-based compression. The method of claim 10.

14. the input data is a tensor; The method of claim 10.

15. each feature map being a different representation of said tensor; the similarity of the different feature maps is the similarity of the mean element amplitudes of the different feature maps to each other; 15. The method of claim 14.

16. storing the compressed different feature maps in the memory according to the similarity by transferring the compressed different feature maps over a link; an amount of memory transfer used to store the compressed distinct feature maps obtained from the sorted filter is less than an amount of memory transfer used to store the compressed distinct feature maps obtained from an unsorted filter; The method of claim 10.

17. decompressing the input data if the input data is read from the memory in a compressed format; The method of claim 10.

18. writing the input data to the memory in the compressed format; and using the input data in an uncompressed format as next input data for a next layer of the machine learning neural network.

18. The method of claim 17.

19. A computer-readable storage medium storing instructions for causing a computer to execute a machine learning processing method, The machine learning processing method includes: receiving input data at a layer of a machine learning neural network; receiving a plurality of sorted filters to be applied to the input data, the plurality of sorted filters being sorted based on similarity of feature maps obtained during training; decompressing the input data; applying the plurality of sorted filters to the input data to generate a plurality of different feature maps; compressing the plurality of different feature maps according to their similarities to one another; storing the plurality of different feature maps in a memory. A computer-readable storage medium.

20. The machine learning neural network is executed during an inference phase, and the sorted filters are sorted during training prior to executing the machine learning neural network during the inference phase.

20. The computer-readable storage medium of claim 19.

Citation Information

Patent Citations

  • Differential Coding in Neural Networks

    JP2017516192A

  • Method and device for processing multi-channel feature map images

    US20180350110A1

  • Inference device, convolutional computation execution method, and program

    WO2019082859A1