US-20260127768-A1 - BLOCK-BASED DATA COMPRESSION WITH SHARED EXPONENTS
Abstract
A method for data compression includes dividing a dataset of data elements into a plurality of blocks, such that each block includes a subset of data elements, and each block has a predetermined size. Compressed floating-point representations are calculated for the subset of data elements of each block. The compressed floating-point representations are calculated by, for each data element in a block, selecting a selected exponent from a set of two or more exponents, wherein two or more data elements of the block share the selected exponent; and for each data element in the block, calculating a mantissa value, such that the mantissa value and the selected exponent for the data element together comprise a compressed floating-point representation of the data element. The compressed floating-point representations for the subset of data elements of each block are stored in a compressed representation of the dataset.
Inventors
- Christian Markus MAEKELAE
- Casey Lee MILLER
- Michael Bleyer
Assignees
- MICROSOFT TECHNOLOGY LICENSING, LLC
Dates
- Publication Date
- 20260507
- Application Date
- 20241104
Claims (20)
- 1 . A method for data compression, the method comprising: dividing a dataset of data elements into a plurality of blocks, such that each block includes a subset of data elements, and each block has a same predetermined size, wherein the dataset is represented using a first quantity of bits; calculating compressed floating-point representations for the subset of data elements of each block, wherein the compressed floating-point representations are calculated by: for each data element in a block of the plurality of blocks, selecting a selected exponent from a set of two or more exponents, wherein two or more data elements of the block share the selected exponent; and for each data element in the block, calculating a mantissa value, such that the mantissa value and the selected exponent for the data element together comprise a compressed floating-point representation of the data element; and storing the compressed floating-point representations for the subset of data elements of each block in a compressed representation of the dataset, wherein the compressed representation of the dataset is represented using a second quantity of bits, smaller than the first quantity of bits, to conserve storage space and memory bandwidth of a computing system.
- 2 . The method of claim 1 , further comprising storing one or more index bits for each compressed floating-point representation, the one or more index bits specifying which of the set of two or more exponents is the selected exponent for the compressed floating-point representation.
- 3 . The method of claim 2 , wherein the set of two or more exponents is stored in the block as a block-level exponent set, and wherein the one or more index bits specify the selected exponent relative to the block-level exponent set.
- 4 . The method of claim 2 , wherein the set of two or more exponents is stored in a dataset-level exponent set shared between each of the plurality of blocks, and wherein the one or more index bits specify the selected exponent relative to the dataset-level exponent set.
- 5 . The method of claim 1 , wherein the set of two or more exponents are stored using delta encoding, such that a second exponent of the set is defined as an offset relative to a first exponent of the set.
- 6 . The method of claim 1 , wherein the set of two or more exponents includes a first exponent and a second exponent higher than the first exponent, and wherein a minimum mantissa value of the second exponent is set to a positive non-zero mantissa value determined based at least in part on the first exponent.
- 7 . The method of claim 1 , wherein an exponent of the set of two or more exponents is used to represent data elements having negative values.
- 8 . The method of claim 1 , wherein the set of two or more exponents is predetermined based at least in part on values of the dataset of data elements.
- 9 . The method of claim 1 , wherein each mantissa value is between zero and one.
- 10 . The method of claim 1 , further comprising transforming the mantissa value using a mantissa transformation function prior to storing the compressed floating-point representation.
- 11 . The method of claim 10 , wherein the mantissa transformation function is a square root function.
- 12 . The method of claim 1 , wherein the dataset is a digital image, and wherein the data elements are pixel values of the digital image.
- 13 . The method of claim 12 , wherein the digital image is a dark frame calibration image.
- 14 . A computing system, comprising: a logic subsystem; and a storage subsystem holding instructions executable by the logic subsystem to: divide a dataset of data elements into a plurality of blocks, such that each block includes a subset of data elements, and each block has a same predetermined size, wherein the dataset is represented using a first quantity of bits; calculate compressed floating point representations for the subset of data elements of each block, wherein the compressed floating-point representations are calculated by: for each data element in a block of the plurality of blocks, selecting a selected exponent from a set of two or more exponents, wherein two or more data elements of the block share the selected exponent; and for each data element in the block, calculating a mantissa value, such that the mantissa value and the selected exponent for the data element together comprise a compressed floating-point representation of the data element; and store the compressed floating-point representations for the subset of data elements of each block in a compressed representation of the dataset, wherein the compressed representation of the dataset is represented using a second quantity of bits, smaller than the first quantity of bits, to conserve storage space and memory bandwidth of a computing system.
- 15 . The computing system of claim 14 , wherein the instructions are further executable to store one or more index bits for each compressed floating-point representation, the one or more index bits specifying which of the set of two or more exponents is the selected exponent for the compressed floating-point representation.
- 16 . The computing system of claim 15 , wherein the set of two or more exponents is stored in the block as a block-level exponent set, and wherein the one or more index bits specify the selected exponent relative to the block-level exponent set.
- 17 . The computing system of claim 14 , wherein the set of two or more exponents is predetermined based at least in part on values of the dataset of data elements.
- 18 . The computing system of claim 14 , wherein each mantissa value is between zero and one.
- 19 . The computing system of claim 14 , further comprising transforming the mantissa value using a square root transformation function prior to storing the compressed floating-point representation.
- 20 . A method for data compression to conserve memory bandwidth of a graphics processing unit (GPU), the method comprising: receiving a dataset of data elements to be processed by the GPU, the dataset of data elements represented using a first quantity of bits; dividing a dataset of data elements into a plurality of blocks, such that each block includes a subset of data elements, and each block has a same predetermined size; calculating compressed floating-point representations for the subset of data elements of each block, wherein the compressed floating-point representations are calculated by: for each data element in a block of the plurality of blocks, selecting a selected exponent from a set of two or more exponents, wherein two or more data elements of the block share the selected exponent; and for each data element in the block, calculating a mantissa value, such that the mantissa value and the selected exponent for the data element together comprise a compressed floating-point representation of the data element; storing the compressed floating-point representations for the subset of data elements of each block in a compressed representation of the dataset, wherein the compressed representation of the dataset is represented using a second quantity of bits, lower than the first quantity of bits; and transmitting the compressed representation of the dataset to the GPU for processing, such that transmission of the compressed representation of the dataset uses less memory bandwidth of the GPU as compared to transmission of the dataset of data elements.
Description
BACKGROUND Data compression techniques are widely used in various fields, such as digital communication, multimedia processing, and data storage, to reduce the amount of data required to represent information. One class of data compression methods, referred to as block-based data compression, involves dividing data into different blocks, and applying compression algorithms to each block individually. SUMMARY This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter. Furthermore, the claimed subject matter is not limited to implementations that solve any or all disadvantages noted in any part of this disclosure. A method for data compression includes dividing a dataset of data elements into a plurality of blocks, such that each block includes a subset of data elements, and each block has a predetermined size. Compressed floating-point representations are calculated for the subset of data elements of each block. The compressed floating-point representations are calculated by, for each data element in a block, selecting a selected exponent from a set of two or more exponents, wherein two or more data elements of the block share the selected exponent; and for each data element in the block, calculating a mantissa value, such that the mantissa value and the selected exponent for the data element together comprise a compressed floating-point representation of the data element. The compressed floating-point representations for the subset of data elements of each block are stored in a compressed representation of the dataset. BRIEF DESCRIPTION OF THE DRAWINGS FIGS. 1A-1C schematically depict an example dataset including a plurality of data elements divided into blocks. FIG. 2 illustrates an example method for data compression. FIG. 3 schematically illustrates compression of a dataset into a compressed dataset representation that includes a plurality of compressed floating-point representations of data elements. FIGS. 4A-4C schematically illustrate calculating and storing compressed floating-point representations for data elements of a dataset. FIG. 5 schematically shows an example compressed dataset representation including a block-level shared exponent set. FIG. 6 schematically shows an example compressed dataset representation including a dataset-level shared exponent set. FIG. 7 illustrates an example method for data decompression. FIG. 8 schematically shows an example computing system. DETAILED DESCRIPTION Memory bandwidth often causes a bottleneck in computer data processing, particularly when large datasets are processed using graphics processing units (GPUs). This may be exacerbated when the data is represented in floating point format, which commonly uses 32 bits of data per data element. Retrieving such a relatively high number of bits per data value can saturate the available memory bandwidth, thereby slowing the overall data processing operation. While memory bandwidth can be conserved by reducing the number of bits used to store each data element, this can negatively reduce both the precision with which the data is represented (e.g., when fewer bits are used for storing the mantissa), and/or the dynamic range (e.g., when fewer bits are used for storing the exponent). Accordingly, the present disclosure is directed to techniques for data compression that can beneficially reduce the number of bits used to store each data element, while still preserving suitable precision and dynamic range. For instance, the present disclosure primarily focuses on cases where the dataset is a digital image, and the data elements are pixel values. However, this is non-limiting. As other examples, datasets may include digital video (e.g., a sequence of video frames), digital audio (e.g., comprising a plurality of audio samples as data elements), text data (e.g., comprising a plurality of tokens), matrices for network operations (e.g., comprising a plurality of parameters), and/or any other suitable computer data. While the present disclosure primarily focuses on datasets in which the initial, uncompressed data elements take the form of floating-point values, which are then compressed into compressed floating-point representations of the data elements, this is non-limiting. Rather, the compression techniques discussed herein may be applied to any suitable input data, expressed in any suitable form. For instance, the dataset may include integer values, which are converted into floating-point values and then compressed using the compression techniques described herein. Specifically, the present disclosure describes a block-based compression technique, in which data elements of a dataset are divided into a plurality of blocks, each having the same predetermined