A portion of the disclosure of this patent document contains material that is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure, as it appears in the Patent and Trademark Office patent files or records, but otherwise reserves all copyright rights whatsoever.
The following relates generally to the field of data processing and device architectures. Specifically, in one exemplary aspect, a processor-memory architecture that converts a memory array into a matrix fabric for matrix transformations and performing video processing matrix operation therein is disclosed.
Memory devices are widely used to store information in various electronic devices such as computers, wireless communication devices, cameras, digital displays, and the like. Information is stored by programing different states of a memory device. For example, binary devices have two states, often denoted by a logical “l” or a logical “O” To access the stored information, the memory device may read (or sense) the stored state in the memory device. To store information, the memory device may write (or program) the state in the memory device. So-called volatile memory devices may require power to maintain this stored information, while non-volatile memory devices may persistently store information even after the memory device itself has, for example, been power cycled. Different memory fabrication methods and constructions enable different capabilities. For example, dynamic random access memory (DRAM) offers high density volatile storage inexpensively. Incipient research is directed to resistive random access memory (ReRAM) which promises non-volatile performance similar to DRAM.
Processor devices are commonly used in conjunction with memory devices to perform a myriad of different tasks and functionality. During operation, a processor executes computer readable instructions (commonly referred to as “software”) from memory. The computer readable instructions define basic arithmetic, logic, controlling, input/output (I/O) operations, etc. As is well known in the computing arts, relatively basic computer readable instructions can perform a variety of complex behaviors when sequentially combined. Processors tend to emphasize circuit constructions and fabrication technologies that differ from memory devices. For example, processing performance is generally related to clock rates, thus most processor fabrication methods and constructions emphasize very high rate transistor switching structures, etc.
Over time, both processors and memory have increased in speed and power consumption. Typically, these improvements are a result of shrinking device sizes because electrical signaling is physically limited by the dielectric of the transmission medium and distance. As previously alluded to, most processors and memories are manufactured with different fabrication materials and techniques. Consequently, even though processors and memory continue to improve, the physical interface between processors and memories is a “bottleneck” to the overall system performance. More directly, no matter how fast a processor or memory can work in isolation, the combined system of processor and memory is performance limited to the rate of transfer allowed by the interface. This phenomenon has several common names e.g., the “processor-memory wall”, the “von Neumann Bottleneck Effect,” etc.
Video processing (e.g., compression) methods are one class of processing applications which are known to require frequent communication between memory and processors. The speed of conventional video processing is therefore particularly impacted by the aforementioned processor-memory interface limitations. Hence, there is a salient need for improved apparatus and methods which reduce the effects of these limitations, including in such video processing applications.
The present disclosure provides, inter a/ia, methods and apparatus for converting a memory array into a matrix fabric for matrix transformations and performing matrix operations therein.
In one aspect of the present disclosure, a non-transitory computer readable medium is disclosed. In one exemplary embodiment, the non-transitory computer readable medium includes: an array of memory cells, where each memory cell of the array of memory cells is configured to store a digital value as an analog value in an analog medium; a memory sense component, where the memory sense component is configured to read the analog value of a first memory cell as a first digital value; and logic. In one embodiment, the array of memory cells includes a stack of at least two memory cell sub-arrays. In one variant, at least some of the memory cell sub-arrays are configured to run in parallel to each other.
In one implementation, at least some of the memory cell sub-arrays are connected to a single memory sense component.
In another implementation, individual memory cell sub-arrays are connected to individual memory sense components.
In another variant, the memory cells are configured to store the analog value as an impedance or a conductance in the memory cell.
In another exemplary embodiment, the logic is further configured to: receive a subjective opcode; operate the array of memory cells as a matrix multiplication unit (MMU) based on the matrix transformation opcode; wherein each memory cell of the MMU modifies the analog value in the analog medium in accordance with the matrix transformation opcode and a matrix transformation operand; configure the memory sense component to convert the analog value of the first memory cell into a second digital value in accordance with the matrix transformation opcode and the matrix transformation operand; and responsive to reading the matrix transformation operand into the MMU, write a matrix transformation result based on the second digital value.
In one variant, the matrix transformation opcode indicates a size of the MMU. In one such variant, the matrix transformation opcode corresponds to a frequency domain transform operation. In one implementation, the frequency domain transform operation is a DCT (Discrete Cosine Transform) operation, and at least some aspect of the size of the MMU corresponds to the size of the DCT operation (e.g., the size of the MMU may correspond to the size of the DC operation, or multiples or fractions thereof). In one exemplary variant, the frequency domain transform operation spans at least one other MMU.
In yet another variant, the matrix transformation operand includes a vector derived from pixel values of a pixel image block. In one implementation, the pixel values correspond to Red, Green, Blue, Luminance (Y), Chrominance Red (Cr), or Chrominance Blue (Cr) pixel values. In one exemplary configuration, the pixel image block is an N×N image block (e.g., 8×8 pixels, 16×16 pixels, etc.).
In one variant, the matrix transformation opcode identifies one or more analog values corresponding to one or more memory cells. In one such variant, the one or more analog values corresponding to the one or more memory cells are stored within a look-up-table (LUT) data structure. In one implementation, the one or more analog values include DCT transformation matrix values.
In one variant, each memory cell of the MMU comprises resistive random access memory (ReRAM) cells; and each memory cell of the MMU multiplies the analog value in the analog medium in accordance with the matrix transformation opcode and the matrix transformation operand.
In one variant, each memory cell of the MMU further accumulates the analog value in the analog medium with a previous analog value.
In one variant, the first digital value is characterized by a first radix of two (2); and the second digital value is characterized by a second radix greater than two (2).
In one aspect of the present disclosure, a device is disclosed. In one embodiment, the device includes a processor coupled to a non-transitory computer readable medium; where the non-transitory computer readable medium includes one or more instructions which, when executed by the processor, cause the processor to: write a matrix transformation opcode and a matrix transformation operand to the non-transitory computer readable medium; wherein the matrix transformation opcode causes the non-transitory computer readable medium to operate an array of memory cells as a matrix structure; wherein the matrix transformation operand modifies one or more analog values of the matrix structure; and read a matrix transformation result from the matrix structure.
In one variant, the non-transitory computer readable medium further comprises one or more instructions which, when executed by the processor, cause the processor to: capture image data comprising one or more captured color values; and wherein the matrix transformation operand comprises the one or more captured color values and the matrix transformation result comprises one or more shifted color values.
In one variant, the non-transitory computer readable medium further comprises one or more instructions which, when executed by the processor, cause the processor to: receive video data comprising one or more image blocks; wherein the matrix transformation operand comprises the one or more image blocks and the matrix transformation result comprises one or more frequency domain image coefficients; and wherein the one or more analog values of the matrix structure accumulate the one or more frequency domain image coefficients from video data over time. In one implementation, the one or more frequency domain image coefficients comprises DCT image coefficients.
In one variant, the matrix transformation opcode causes the non-transitory computer readable medium to operate another array of memory cells as another matrix structure; and the matrix transformation result associated with the matrix structure and another matrix transformation result associated with another matrix structure are logically combined.
In one variant, the one or more analog values of the matrix structure are stored within a look-up-table (LUT) data structure. In one variant, at least some of the values of the matrix structure are stored in a portion of the memory cells not configured as a matrix structure.
In one aspect of the present disclosure, a method to perform transformation matrix operations is disclosed. In one embodiment, the method includes: receiving a matrix transformation opcode; configuring an array of memory cells of a memory into a matrix structure, based on the matrix transformation opcode; configuring a memory sense component based on the matrix transformation opcode; and responsive to reading a matrix transformation operand into the matrix structure, writing a matrix transformation result from the memory sense component. In one variant, configuring the matrix structure includes configuring the array of memory cells with values of a DCT transformation matrix and the matrix transformation result includes a DCT image coefficient matrix. In one implementation, the matrix structure is configured with the values of two matrices: a matrix of positive DCT transformation matrix values and a matrix of negative DCT transformation matrix values. In one variant, multiple arrays of memory cells are configured with values of the DCT transformation matrix.
In one variant, configuring the array of memory cells includes connecting a plurality of word lines and a plurality of bit lines corresponding to a row dimension and a column dimension associated with the matrix structure.
In one variant, the method also includes determining the row dimension and the column dimension from the matrix transformation opcode.
In one variant, configuring the array of memory cells includes setting one or more analog values of the matrix structure based on a look-up-table (LUT) data structure.
In one variant, the method includes identifying an entry from the LUT data structure based on the matrix transformation opcode.
In one variant, configuring the memory sense component enables matrix transformation results having a radix greater than two (2).
In one aspect, an apparatus configured to configure a memory device into a matrix fabric is disclosed. In one embodiment, the apparatus includes: a memory; a processor configured to access the memory; pre-processor logic configured to allocate one or more memory portions for use as a matrix fabric.
In another aspect of the disclosure, a computerized image processing device apparatus configured to dynamically configure a memory into a matrix fabric is disclosed. In one embodiment, the computerized image processing device includes: a camera interface; digital processor apparatus in data communication with the camera interface; and a memory in data communication with the digital processor apparatus and including at least one computer program.
In another aspect of the disclosure, a computerized video processing device apparatus configured to dynamically configure a memory into a matrix fabric is disclosed. In one embodiment, the computerized video processing device includes: a camera interface; digital processor apparatus in data communication with the camera interface; and a memory in data communication with the digital processor apparatus and including at least one computer program.
In another aspect of the disclosure, a computerized wireless access node apparatus configured to dynamically configure a memory into a matrix fabric is disclosed. In one embodiment, the computerized wireless access node includes: a wireless interface configured to transmit and receive RF waveforms in the spectrum portion; digital processor apparatus in data communication with the wireless interface; and a memory in data communication with the digital processor apparatus and including at least one computer program.
In an additional aspect of the disclosure, computer readable apparatus is described. In one embodiment, the apparatus includes a storage medium configured to store one or more computer programs within or in conjunction with characterized memory. In one embodiment, the apparatus includes a program memory or HDD or SDD on a computerized controller device. In another embodiment, the apparatus includes a program memory, HDD or SSD on a computerized access node.
These and other aspects shall become apparent when considered in light of the disclosure provided herein.
All figures© Copyright 2019 Micron Technology, Inc. All rights reserved.
Reference is now made to the drawings wherein like numerals refer to like parts throughout.
As used herein, the term “application” (or “app”) refers generally and without limitation to a unit of executable software that implements a certain functionality or theme. The themes of applications vary broadly across any number of disciplines and functions (such as on-demand content management, e-commerce transactions, brokerage transactions, home entertainment, calculator etc.), and one application may have more than one theme. The unit of executable software generally runs in a predetermined environment; for example, the unit could include a downloadable application that runs within an operating system environment.
As used herein, the term “computer program” or “software” is meant to include any sequence or human or machine cognizable steps which perform a function. Such program may be rendered in virtually any programming language or environment including, for example, C/C++, Fortran, COBOL, PASCAL, assembly language, markup languages (e.g., HTML, SGML, XML, VoXML), and the like, as well as object-oriented environments such as the Common Object Request Broker Architecture (CORBA), Java™ (including J2ME, Java Beans, etc.), Register Transfer Language (RTL), VHSIC (Very High Speed Integrated Circuit) Hardware Description Language (VHDL), Verilog, and the like.
As used herein, the term “decentralized” or “distributed” refers without limitation to a configuration or network architecture involving multiple computerized devices that are able to perform data communication with one another, rather than requiring a given device to communicate through a designated (e.g., central) network entity, such as a server device. For example, a decentralized network enables direct peer-to-peer data communication among multiple UEs (e.g., wireless user devices) making up the network.
As used herein, the term “distributed unit” (DU) refers without limitation to a distributed logical node within a wireless network infrastructure. For example, a DU might be embodied as a next-generation Node B (gNB) DU (gNB-DU) that is controlled by a gNB CU described above. One gNB-DU may support one or multiple cells; a given cell is supported by only one gNB-DU.
As used herein, the terms “Internet” and “internet” are used interchangeably to refer to inter-networks including, without limitation, the Internet. Other common examples include but are not limited to: a network of external servers, “cloud” entities (such as memory or storage not local to a device, storage generally accessible at any time via a network connection, and the like), service nodes, access points, controller devices, client devices, etc. 5G-servicing core networks and network components (e.g., DU, CU, gNB, small cells or femto cells, 5G-capable external nodes) residing in the backhaul, fronthaul, crosshaul, or an “edge” thereof proximate to residences, businesses and other occupied areas may be included in “the Internet.”
As used herein, the term “memory” includes any type of integrated circuit or other storage device adapted for storing digital data including, without limitation, random access memory (RAM), pseudostatic RAM (PSRAM), dynamic RAM (DRAM), synchronous dynamic RAM (SDRAM) including double data rate (DDR) class memory and graphics DDR (GDDR) and variants thereof, ferroelectric RAM (FeRAM), magnetic RAM (MRAM), resistive RAM (ReRAM), read-only memory (ROM), programmable ROM (PROM), electrically erasable PROM (EEPROM or EEPROM), DDR/2 SDRAM, EDO/FPMS, reduced-latency DRAM (RLDRAM), static RAM (SRAM), “flash” memory (e.g., NAND/NOR), phase change memory (PCM), 3-dimensional cross-point memory (3D Xpoint), stacked memory such as HBM/HBM2, and magnetoresistive RAM (MRAM), such as spin torque transfer RAM (STT RAM).
As used herein, the terms “microprocessor” and “processor” or “digital processor” are meant generally to include all types of digital processing devices including, without limitation, digital signal processors (DSPs), reduced instruction set computers (RISC), general-purpose processors (GPP), microprocessors, gate arrays (e.g., FPGAs), PLDs, reconfigurable computer fabrics (RCFs), array processors, secure microprocessors, and application-specific integrated circuits (ASICs). Such digital processors may be contained on a single unitary IC die, or distributed across multiple components.
As used herein, the term “server” refers to any computerized component, system or entity regardless of form which is adapted to provide data, files, applications, content, or other services to one or more other devices or entities on a computer network.
As used herein, the term “storage” refers to without limitation computer hard drives (e.g., hard disk drives (HDD), solid state drives (SDD)), Flash drives, DVR device, memory, RAID devices or arrays, optical media (e.g., CD-ROMs, Laserdiscs, Blu-Ray, etc.), or any other devices or media capable of storing content or other information, including semiconductor devices (e.g., those described herein as memory) capable of maintaining data in the absence of a power source. Common examples of memory devices that are used for storage include, without limitation: ReRAM, DRAM (e.g., SDRAM, DDR SDRAM, DDR2 SDRAM, DDR3 SDRAM, DDR4 SDRAM, GDDR, RLDRAM, LPDRAM, etc.), DRAM modules (e.g., RDIMM, VLP RDIMM, UDIMM, VLP UDIMM, SODIMM, SORDIMM, Mini-DIMM, VLP Mini-DIMM, LRDIMM, NVDIMM, etc.), managed NAND, NAND Flash (e.g., SLC NAND, MLC NAND, TLS NAND, Serial NAND, 3D NAND, etc.), NOR Flash (e.g., Parallel NOR, Serial NOR, etc.), multichip packages, hybrid memory cube, memory cards, solid state storage (SSS), and any number of other memory devices.
As used herein, the term “Wi-Fi” refers to, without limitation and as applicable, any of the variants of IEEE Std. 802.11 or related standards including 802.11 a/b/g/n/s/v/ac/ad/av or 802.11-2012/2013, 802.11-2016, as well as Wi-Fi Direct (including inter a/ia, the “Wi-Fi Peer- to-Peer (P2P) Specification”, incorporated herein by reference in its entirety).
As used herein, the term “wireless” means any wireless signal, data, communication, or other interface including without limitation Wi-Fi, Bluetooth/BLE, 3G/4G/4.5G/5G/B5G (3GPP/3GPP2), HSDPA/HSUPA, TDMA, CBRS, CDMA (e.g., IS-95A, WCDMA, etc.), FHSS,DSSS, GSM, PAN/802.15, WiMAX (802.16), 802.20, Zigbee®, Z-wave, narrowband/FDMA, OFDM, PCS/DCS, LTE/LTE-A/LTE-U/LTE-LAA, analog cellular, CDPD, satellite systems, millimeter wave or microwave systems, acoustic, and infrared (i.e., IrDA).
The aforementioned “processor-memory wall” performance limitations can be egregious where a processor-memory architecture repeats similar operations over a large data set. Under such circumstances, the processor-memory architecture has to individually transfer, manipulate, and store for each element of the data set, iteratively. For example, a matrix multiplication of 4×4 (sixteen (16) elements) takes four (4) times as long as a matrix multiplication of 2×2 (four (4) elements). In other words, matrix operations exponentially scale as a function of the matrix size.
Matrix transformations are commonly used in many different applications and can take a disproportionate amount of processing and/or memory bandwidth. For example, many image signal processing (ISP) techniques commonly use matrix transformations for e.g., color interpolation, white balance, color correction, color conversion, etc. Many communication technologies employ fast Fourier transforms (FFTs) and matrix multiplication for beamforming and/or massive multiple input multiple output (MIMO) channel processing.
In particular, video, audio, and image compression commonly use the discrete cosine transform (DCT) to identify video image data that can be removed with minimum fidelity loss. For example, DCT-based compression is used in e.g., the JPEG, MP3, AAC, MPEG, H.264/AVC, H.265/HEVC image/image/audio standards, as well as HDR (High Dynamic Range) applications. DCT-based image/video compression involves several matrix multiplication operations. Various embodiments of the present disclosure are directed to converting a memory array into a matrix fabric for matrix transformations and performing video processing matrix operations therein.
Exemplary embodiments described herein perform matrix transformations within a memory device that includes a matrix fabric and matrix multiplication unit (MMU). In one exemplary embodiment, the matrix fabric uses a “crossbar” construction of resistive elements. Each resistive element stores a level of impedance that represents the corresponding matrix coefficient value. The crossbar connectivity can be driven with an electrical signal representing the input vector as an analog voltage. The resulting signals can be converted from analog voltages to a digital values by an MMU to yield a vector-matrix product. In some cases, the MMU may additionally perform various other logical operations within the digital domain.
Unlike existing solutions that iterate through each element of the matrix to calculate the element value, the crossbar matrix fabric described hereinafter computes multiple elements of the matrix “atomically” i.e., in a single processing cycle. For example, at least a portion of a vector-matrix product may be calculated in parallel. The “atomicity” of matrix fabric based computations yields significant processing improvements over iterative alternatives. In particular, while iterative techniques grow as a function of matrix size, atomic matrix fabric computations are independent of matrix dimensions. In other words, an N×N vector-matrix product can be completed in a single atomic instruction.
Various embodiments of the present disclosure internally derive and/or use matrix coefficient values to further minimize interface transactions. As described in greater detail herein, many useful matrix transformations may be characterized by “structurally defined dimensions” and performed with “structurally defined coefficients.” Structurally definition refers to those aspects of a matrix computation that are defined for a specific matrix structure (e.g., the rank and/or size of the matrix); in other words, the matrix coefficients can be inferred from the matrix structure and need not be explicitly provided via the processor-memory interface. For example, as described in greater detail hereinafter, DCT transformation matrix values (i.e., the DCT “twiddle factors”) are a function of the matrix size. The “twiddle factors” for the fast Fourier transform (FFT) are also a function of the matrix size, while ISP filtering and/or massive MIMO channel coding techniques may use e.g., predefined matrixes and/or codebooks of matrixes having known structures and weighting.
As a brief aside, practical limitations on component manufacture limit the capabilities of each element within an individual memory device. For example, most memory arrays are only designed to discern between two (2) states (logical “I”, logical “O”). While existing memory sense components may be extended to discern higher levels of precision (e.g., four (4) states, eight (8) states, etc.) the increasing the precision of memory sense components may be impractical to support the precision required for large transforms typically used in e.g., video compression, mathematical transforms, etc.
To these ends, various embodiments of the present disclosure logically combine one or more matrix fabrics and/or MMUs to provide greater degrees of precision and/or processing sophistication than would otherwise be possible. In one such embodiment, a first matrix fabric and/or MMU may be used to calculate a positive vector-matrix product and a second matrix fabric and/or MMU may be used to calculate a negative vector-matrix product. The positive and negative vector-matrix product can be summed to determine the net vector-matrix product.
In another such embodiment, multiple simple matrix transformations can be used to implement a larger matrix transformation. For example, to perform a DCT operation, a matrix- matrix multiplication of two N×N matrices may be decomposed into N separate matrix-vector multiplications (i.e., N×N matrix multiplied by an N size vector). Handling various parts of a DCT operation in matrix fabric can further be sequenced or parallelized, in accordance with any number of design considerations. Other examples of logical matrix operations can be substituted with equivalent success (e.g., decomposition, common matrix multiplication, etc.) given the contents of the present disclosure.
Certain applications can save a significant amount of power by turning off system components when not in use. For example, video compression may benefit from “sleep” during video blanking intervals (when no video data is active), etc. However, the sleep procedure often requires a processor and/or memory to shuttle data from operational volatile memory to non- volatile storage memory such that the data is not lost while powered down. Wake-up procedures are also needed to retrieve the stored information from the non-volatile storage memory. Shuttling data back and forth between memories is an inefficient use of processor-memory bandwidth. Consequently, various embodiments disclosed herein leverage the “non-volatile” nature of the matrix fabric. In such embodiments, the matrix fabric can retain its matrix coefficient values even when the memory has no power. More directly, the non-volatile nature of the matrix fabric enables a processor and memory to transition into sleep/low power modes or to perform other tasks without shuffling data from volatile memory to non-volatile memory and vice versa.
Various other combinations and/or variants of the foregoing will be readily appreciated by artisans of ordinary skill, given the contents of the present disclosure.
Exemplary embodiments of the apparatus and methods of the present disclosure are now described in detail. While these exemplary embodiments are described in the context of the previously specific processor and/or memory configurations, the general principles and advantages of the disclosure may be extended to other types of processor and/or memory technologies, the following therefore being merely exemplary in nature.
It will also be appreciated that while described generally in the context of a consumer device (within a camera device, video codec, cellular phone, and/or network base station), the present disclosure may be readily adapted to other types of devices including, e.g., server devices, Internet of Things (loT) devices, and/or for personal, corporate, or even governmental uses, such as those outside the proscribed “incumbent” users such as U.S. DoD and the like. Yet other applications are possible.
Other features and advantages of the present disclosure will immediately be recognized by persons of ordinary skill in the art with reference to the attached drawings and detailed description of exemplary embodiments as given below.
In order to calculate the first element of the vector-matrix product h0, the processor must iterate through each permutation of input vector a elements for each element within a row of the matrix M. During the first iteration, the first element of the input vector ao is read, the current value of the vector-matrix product b0 is read and the corresponding matrix coefficient value M0,0 is read. The three (3) read values are used in a multiply-accumulate operation to generate an “intermediary” vector-matrix product b0. Specifically, the multiply-accumulate operation calculates: (a0 M0,0)+h0 and writes the result value back to b0. Notably, bo is an “intermediary value.” After the first iteration but before the second iteration, the intermediary value of h0 may not correspond to the final value of the vector-matrix product b0.
During the second iteration, the second element of the input vector al is read, the previously calculated intermediary value bo is retrieved, and a second matrix coefficient value M1,0 is read. The three (3) read values are used in a multiply-accumulate operation to generate the first element of the vector-matrix product b0. The second iteration completes the computation of b0.
While not expressly shown, the iterative process described above is also performed to generate the second element of the vector-matrix product Additionally, while the foregoing example is a 2×2 vector-matrix product, the techniques described therein are commonly extended to support vector-matrix computations of any size. For example, a 3×3 vector-matrix product calculation iterates over an input vector of three (3) elements for each of the three (3) rows of the matrix; thus, requiring nine (9) iterations. A matrix operation of 1024×1024 (which is not uncommon for many applications) would require more than one million iterations. More directly, the aforementioned iterative process exponentially scales as a function of the matrix dimension.
Even though the foregoing discussion is presented in the contest of a vector-matrix product, artisans of ordinary skill will readily appreciate that a matrix-matrix product can be performed as a series of vector-matrix products. For example, a first vector-matrix product corresponding to the first single column matrix of the input vector is calculated, a second vector- matrix product corresponding to the second single column matrix of the input vector is calculated, etc. Thus, a 2×2 matrix-matrix product would require two (2) vector-matrix calculations (i.e., 2×4=8 total), a 3×3 matrix-matrix product would require three (3) vector- matrix calculations (i.e., 3×9=27 total).
Artisans of ordinary skill in the related arts will readily appreciate that each iteration of the process described in
One common approach to improve the performance of matrix operations is to perform the matrix operation within the local processor cache. Unfortunately, the local processor cache takes processor die space, and has a much higher cost-per-bit to manufacture than e.g., comparable memory devices. As a result, the processor's local cache size is usually much smaller (e.g., a few megabytes) than its memory (which can be many gigabytes). From a practical aspect, the smaller local cache is a hard limitation on the maximum amount of matrix operations that can be performed locally within the processor. As another drawback, large matrix operations result in poor cache utilization since only one row and one column are being accessed at a time (e.g., for a 1024×1024 vector-matrix product, only 1/1024 of the cache is in active use during a single iteration). Consequently, while processor cache implementations may be acceptable for small matrixes, this technique becomes increasingly less desirable as matrix operations grow in complexity.
Another common approach is a so-called processor-in-memory (PIM).
Similar to the process described in
While the processor-PIM architecture 150 yields substantial improvements m performance over e.g., the processor-memory architecture 100, the processor-PIM architecture 150 may have other drawbacks. For example, the fabrication techniques (“silicon process”) are substantially different between processor and memory devices because each silicon process is optimized for different design criteria. For example, the processor silicon process may use thinner transistor structures than memory silicon processes; thinner transistor structures offer faster switching (which improves performance) but suffer greater leakage (which is undesirable for memory retention). As a result, manufacturing a PIM 162 and memory array 164 in the same wafer results in at least one of them being implemented in a sub-optimal silicon process. Alternatively, the PIM 162 and memory array 164 may be implemented within separate dies and joined together; die-to-die communication typically increases manufacturing costs and complexity and may suffer from various other detriments (e.g., introduced by process discontinuities, etc.)
Moreover, artisans of ordinary skill in the related arts will readily appreciate that the PIM 162 and the memory array 164 are “hardened” components; a PIM 162 cannot store data, nor can the memory 164 perform computations. As a practical matter, once the memory 154 is manufactured, it cannot be altered to e.g., store more data and/or increase/decrease PIM performance/power consumption. Such memory devices are often tailored specifically for their application; this is both costly to design and modify, in many cases they are “proprietary” and/or customer/manufacturer specific. Moreover, since technology changes at a very rapid pace, these devices are quickly obsoleted.
For a variety of reasons, improved solutions for matrix operations within processors and/or memory are needed. Ideally, such solutions would enable matrix operations within a memory device in a manner that minimizes performance bottlenecks of the processor-memory wall. Furthermore, such solutions should flexibly accommodate a variety of different matrix operations and/or matrix sizes.
The plurality of external terminals included in the semiconductor device 200 may include address terminals 260, command terminals 262, clock terminals 264, data terminals 240 and power supply terminals 250. The address terminals 260 may be supplied with an address signal and a bank address signal. The address signal and the bank address signal supplied to the address terminals 260 are transferred via an address input circuit 202 to an address decoder 204. The address decoder 204 receives, for example, the address signal and supplies a decoded row address signal to the row decoder 216, and a decoded column address signal to the column decoder 218. The address decoder 204 may also receive the bank address signal and supply the bank address signal to the row decoder 216 and the column decoder 218.
The command terminals 262 are supplied with a command signal to a command input circuit 206. The command terminals 262 may include one or more separate signals such as e.g., row address strobe (RAS), column address strobe (CAS), read/write (R/W). The command signal input to the command terminals 262 is provided to the command decoder 208 via the command input circuit 206. The command decoder 208 may decode the command signal 262 to generate various control signals. For example, the RAS can be asserted to specify the row where data is to be read/written, and the CAS can be asserted to specify where data is to be read/written. In some variants, the R/W command signal determines whether or not the contents of the data terminal 240 are written to memory cells 220, or read therefrom.
During a read operation, the read data may be output externally from the data terminals 240 via a read/write amplifier 222 and an input/output circuit 224. Similarly, when the write command is issued and a row address and a column address are timely supplied with the write command, a write data command may be supplied to the data terminals 240. The write data command may be supplied via the input/output circuit 224 and the read/write amplifier 222 to a given memory cell array 220 and written in the memory cell designated by the row address and the column address. The input/output circuit 224 may include input buffers, in accordance with some implementations.
The clock terminals 264 may be supplied with external clock signals for synchronous operation. In one variant, the clock signal is a single ended signal; in other variants, the external clock signals may be complementary (differential signaling) to one another and are supplied to a clock input circuit 210. The clock input circuit 210 receives the external clock signals and conditions the clock signal to ensure that the resulting internal clock signal has sufficient amplitude and/or frequency for subsequent locked loop operation. The conditioned internal clock signal is supplied to feedback mechanism (internal clock generator 212) provide a stable clock for internal memory logic. Common examples of internal clock generation logic 212 includes without limitation: digital or analog phase locked loop (PLL), delay locked loop (DLL), and/or frequency locked loop (FLL) operation.
In alternative variants (not shown), the memory 200 may rely on external clocking (i.e., with no internal clock of its own). For example, a phase controlled clock signal may be externally supplied to the input/output (IO) circuit 224. This external clock can be used to clock in written data, and clock out data reads. In such variants, IO circuit 224 provides a clock signal to each of the corresponding logical blocks (e.g., address input circuit 202, address decoder 204, command input circuit 206, command decoder 208, etc.).
The power supply terminals 250 may be supplied with power supply potentials. In some variants (not shown), these power supply potentials may be supplied via the input/output (I/O) circuit 224. In some embodiments, the power supply potentials may be isolated from the I/O circuit 224 so that power supply noise generated by the I/O circuit 224 does not propagate to the other circuit blocks. These power supply potentials are conditioned via an internal power supply circuit 230. For example, the internal power supply circuit 230 may generate various internal potentials that e.g., remove noise and/or spurious activity, as well as boost or buck potentials, provided from the power supply potentials. The internal potentials may be used in e.g., the address circuitry (202, 204), the command circuitry (206, 208), the row and column decoders (216, 218), the RW amplifier 222, and/or any various other circuit blocks.
A power-on-reset circuit (PON) 228 provides a power on signal when the internal power supply circuit 230 can sufficiently supply internal voltages for a power-on sequence. A temperature sensor 226 may sense a temperature of the semiconductor device 200 and provides a temperature signal; the temperature of the semiconductor device 200 may affect some memory operations.
In one exemplary embodiment, the memory arrays 220 may be controlled via one or more configuration registers. In other words, the use of these configuration registers selectively configure one or more memory arrays 220 into one or more matrix fabrics and/or matrix multiplication units (MMUs) described in greater detail herein. In other words, the configuration registers may enable the memory cell architectures within the memory arrays to dynamically change both e.g., their structure, operation, and functionality. These and other variations would be readily apparent to one of ordinary skill given the contents of the present disclosure.
In one exemplary embodiment of the present disclosure, the memory array 320 is composed of a resistive random access memory (ReRAM). ReRAM is a non-volatile memory that changes the resistance of memory cells across a dielectric solid-state material, sometimes referred to as a “memristor.” Current ReRAM technology may be implemented within a two- dimensional (2D) layer or a three-dimensional (3D) stack of layers; however higher order dimensions may be used in future iterations. The complementary metal oxide semiconductor (CMOS) compatibility of the crossbar ReRAM technology may enable both logic (data processing) and memory (storage) to be integrated within a single chip. A crossbar ReRAM array may be formed in a one transistor/one resistor (1TIR) configuration and/or in a configuration with one transistor driving n resistive memory cells (1TNR), among other possible configurations.
Multiple inorganic and organic material systems may enable thermal and/or ionic resistive switching. Such systems may, in a number of embodiments include: phase change chalcogenides (e.g., Ge2Sb2Tes, AginSbTe, among others); binary transition metal oxides (e.g., NiO, Ti02, among others); perovskites (e.g., Sr(ZR)Tr03, PCMO, among others); solid state electrolytes (e.g., GeS, GeSe, SiOx, CmS, among others); organic charge transfer complexes (e.g., Cu tetracynaoquinodimethane (TCNQ), among others); organic charge acceptor systems (e.g., Al amino-dicyanoimidazole (AIDCN), among others); and/or 2D (layered) insulating materials (e.g., hexagonal BN, among others); among other possible systems for resistive switching.
In the illustrated embodiment, the resistive element 302 is a non-linear passive two- terminal electrical component that can change its electrical resistance based on a history (e.g., hysteresis or memory) of current application. In at least one exemplary embodiment, the resistive element 302 may form or destroy a conductive filament responsive to the application of different polarities of currents to the first terminal (connected to the word-line 304) and the second terminal (connected to the bit-line 306). The presence or absence of the conductive filament between the two terminals changes the conductance between the terminals. While the present operation is presented within the context of a resistive element, artisans of ordinary skill in the related arts will readily appreciate that the principles described herein may be implemented within any circuitry that is characterized by a variable impedance (e.g., resistance and/or reactance). Variable impedance may be effectuated by a variety of linear and/or non-linear elements (e.g., resistors, capacitors, inductors, diodes, transistors, thyristors, etc.)
For illustrative purposes, the operation of the memory array 320 in the first configuration 300 is briefly summarized. During operation in the first configuration, a memory “write” may be effectuated by application of a current to the memory cell corresponding to the row and column of the memory array. The row decoder 316 can selectively drive various ones of the row terminals so as to select a specific row of the memory array circuitry 320. The column decoder 318 can selectively sense/drive various ones of the column terminals so as to “read” and/or “write” to the corresponding memory cell that is uniquely identified by the selected row and column (as emphasized in
Artisans of ordinary skill in the related arts will readily appreciate that the foregoing discussion of memory array 320 in the first configuration 300 is consistent with existing memory operation in accordance with e.g., ReRAM memory technologies. In contrast, the second configuration 350 uses the memory cells as an analog crossbar fabric (matrix fabric) 321 to perform matrix multiplication operations. While the exemplary implementation of
In analog crossbar fabric (matrix fabric) 321 operation, each of the row terminals is concurrently driven by an analog input signal, and each of the column terminals is concurrently sensed for the analog output (which is an analog summation of the voltage potentials across the corresponding resistive elements for each row/column combination). Notably, in the second configuration 350, all of the row and column terminals associated with a matrix multiplication are active (as emphasized in
In other words, the ReRAM crossbar fabric (matrix fabric) 321 uses the matrix fabric structure to perform an “analog computation” that calculates a vector-matrix product (or scalar-matrix product, matrix-matrix product, etc.)
Notably, the concurrent vector-matrix product calculation within the crossbar fabric is atomic. Specifically, the analog computation of vector-matrix products can complete in a single access cycle. As previously mentioned, an atomic operation is immune to data race conditions. Moreover, the vector-matrix product calculation performs calculations on all rows and all columns of the matrix operation concurrently; in other words, the vector-matrix product calculation does not scale in complexity as a function of matrix dimension. While fabrication constraints (e.g., ADC/DAC granularity, manufacturing tolerance, etc.) may limit the amount of precision and complexity that a single matrix fabric can produce, multiple matrix operations may be mathematically combined together to provide much higher precisions and complexities.
For example, in one exemplary embodiment of the present disclosure, inputs are converted to the analog domain by the DAC 308 for analog computation, but may also be converted back to the digital domain by the ADC 310 for subsequent digital and/or logical manipulation. In other words, the arithmetic logic unit 312 can enable sophisticated numeric manipulation of matrix fabric 321 output. Such capabilities may be used where the analog domain cannot implement the required computation due to practical implementation limitations (e.g., manufacturing cost, etc.)
Consider the illustrative example of
This simple FFT butterfly 400 of EQN. 1 can be decomposed into two distinct matrices representing the positive and negative coefficients (EQN. 2 and EQN. 3):
EQN. 2 and EQN. 3 can be implemented as analog computations with the matrix fabric circuitry. Once calculated, the resulting analog values may be converted back to the digital domain via the aforementioned ADC. Existing ALU operations may be used to perform subtraction in the digital domain (EQN. 4):
In other words, as illustrated in
As used herein, the terms “digital” and/or “logical” within the context of computation refers to processing logic that uses quantized values (e.g., “0” and “1”) to represent symbolic values (e.g., “ON-state”, “OFF-state”). In contrast, the term “analog” within the context of computation refers to processing logic that uses the continuously changeable aspects of physical signaling phenomena such as electrical, chemical, and/or mechanical quantities to perform a computation. Various embodiments of the present disclosure represent may represent analog input and/or output signals as a continuous electrical signal. For example, a voltage potential may have different possible values (e.g., any value between a minimum voltage (0V) and a maximum voltage (1.8V) etc.). Combining analog computing with digital components may be performed with digital-to-analog converters (DACs), analog-digital-converters (ADCs), arithmetic logic units (ALUs), and/or variable gain amplification/attenuation.
Referring back to
In one embodiment of the present disclosure, the matrix coefficient values are stored ahead of time within a look-up-table (LUT) and configured by associated control logic 315. During an initial configuration phase, the matrix fabric 321 is written with matrix coefficient values from the LUT via control logic 315. Artisans of ordinary skill in the related arts will readily appreciate that certain memory technologies may also enable write-once-use-many operation. For example, even though forming (or destroying) a conductive filament for a ReRAM cell may require a specific duration, magnitude, polarity, and/or direction of current; subsequent usage of the memory cell can be repeated many times (so long as the conductive filament is not substantially formed nor destroyed over the usage lifetime). In other words, subsequent usages of the same matrix fabric 321 configuration can be used to defray initial configuration times.
Furthermore, certain memory technologies (such as ReRAM) are non-volatile. Thus, once matrix fabric circuitry is programmed, it may enter a low power state (or even powered off) to save power when not in use. In some cases, the non-volatility of the matrix fabric may be leveraged to further improve power consumption. Specifically, unlike existing techniques which may re-load matrix coefficient values from non-volatile memory for subsequent processing, the exemplary matrix fabric can store the matrix coefficient values even when the memory device is powered off. On subsequent wake-up, the matrix fabric can be directly used.
In one exemplary embodiment, the matrix coefficient values may be derived according to the nature of the matrix operation. For example, the coefficients for certain matrix operations can be derived ahead of time based on the “size” (or other structurally defined parameter) and stored within the LUT. As but two such examples, the fast Fourier transform (EQN. 5) and the discrete cosine transform (DCT) (EQN. 6) are reproduced infra:
Note that EQN. 6 represents the DCT-11 version of the DCT, and is commonly used in video/image compression. As can be mathematically determined from the foregoing equations, the matrix coefficient values (also referred to as the “twiddle factors”) are determined according to the size of the transform. For example, once the size of the DCT matrix is known, the values of the matrix can be set a priori (using e.g., EQN. 6).
In another exemplary embodiment, the matrix coefficient values may be stored ahead of time. For example, the coefficients for certain matrix multiplication operations may be known or otherwise defined by e.g., an application or user. For example, image processing computations, such as are described in co-owned and co-pending U.S. patent application Ser. No. 16/002,644 filed Jun. 7, 2018 and entitled “AN IMAGE PROCESSOR FORMED IN AN ARRAY OF MEMORY CELLS”, previously incorporated supra, may define a variety of different matrix coefficient values so as to effect e.g., defect correction, color interpolation, white balance, color adjustment, gamma lightness, contrast adjustment, color conversion, down-sampling, and/or other image signal processing operations.
In another example, the coefficients for certain matrix multiplication operations may be determined or otherwise defined by e.g., user considerations, environmental considerations, other devices, and/or other network entities. For example, wireless devices often experience different multipath effects that can interfere with operation. Various embodiments of the present disclosure determine multipath effects and correct for them with matrix multiplication. In some cases, the wireless device may calculate each of the independent different channel effects based on degradation of known signaling. The differences between an expected and an actual reference channel signal can be used to determine the noise effects that it experienced (e.g., attenuation over specific frequency ranges, reflections, scattering, and/or other noise effects). In other embodiments, a wireless device may be instructed to use a predetermined “codebook” of beamforming configurations. The codebook of beamforming coefficients may be less accurate but may be preferable for other reasons (e.g., speed, simplicity, etc.).
As previously alluded to, the matrix coefficient values are stored ahead of time within a look-up-table (LUT) and configured by associated control logic 315. In one exemplary embodiment, the matrix fabric may be configured via dedicated hardware logic. Such internal hardware logic may not be limited by processor word size; thus matrix coefficient values of any dimension may be concurrently configurable (e.g., a 4×4, 8×8, 16×16, etc.) While the present disclosure is presented in the context of internal control logic 315, external implementations may be substituted with equivalent success. For example, in other embodiments, the logic includes internal processor-in-memory (PIM) that can set the matrix coefficient values based on LUT values in a series of reads and writes. In still other examples, for example, an external processor can perform the LUT and/or logic functionality.
Memory arrays configured to perform specific matrix multiplication operations are described below with respect to
In various embodiments, aspects of the present disclosure can be applied to video/image compression or other operations, whether lossy or not. Discrete cosine transform (DCT) is used by various image/video processing and compression techniques (including JPEG) to express pixel values (e.g., Y, Cb, or Cr values) of an image as sums of different cosine functions. For example, an image can be broken up into 8×8 pixel blocks, where each of the 64 pixels in the block is expressed with values of luminance (Y) and chrominance (Cb, Cr). A DCT can be applied to each 8×8 block to obtain a matrix D of DCT frequency coefficients for that pixel block. This matrix of DCT frequency coefficients is then used to perform the actual compression of the image block. Note that DCT can similarly be applied to pixel blocks of other sizes (e.g. 16×16 pixel blocks).
The DCT of an N×N pixel block can be performed using matrix multiplication operation D=TMT′, where T represents the DCT transform matrix (whose values can be calculated using EQN. 6), T′ represents the transpose of the T matrix, M represents a matrix of pixel values (e.g., Y values, Cb values, R values, etc.), and D represents the matrix of DCT frequency coefficients of the pixel block. This operation may be broken up into two separate matrix-matrix multiplication stages/operations: a first operation (EQN. 7) and a second operation (EQN. 8).
B=TM EQN. 7:
D=BT′ EQN. 8:
The individual values of the matrices in the first and second matrix-matrix multiplication operations are explicitly written out below.
Each of the matrix-matrix multiplication operations may be performed using separate matrix-vector multiplication operations, and there are various ways of deconstructing the two matrix-matrix multiplication operations of EQN. 7 and EQN. 8 into matrix-vector operations, as will be appreciated by one of ordinary skill when given the present disclosure. And as previously described, matrix-vector multiplication operations may be performed using matrix fabric(s) and MMU(s).
In one exemplary embodiment, the individual columns of the B matrix can be calculated using EQN. 7A:
b
cn
=T·m
cn EQN. 7A:
where vector bcn represents column n of the B matrix, and vector men represents column n of the M matrix.
For example, the first column of the B matrix (b00, b10, b20. . . bn0) can be calculated using the matrix-vector multiplication operation bc0=T·mc0, as shown below.
By performing the bcn=T·mc0 matrix-vector operation n times (for each of the n columns of B), the entire B matrix can be obtained. Similarly, to obtain D=BT′, the rows of the D matrix can be calculated using EQN. 8A:
d
m
=T·b
m EQN. 8
where vector dm represents row n of the D matrix, and vector bm represents row n of the B matrix.
For example, the first row of the D matrix (d00, d01, d0. . . don) can be calculated using the matrix-vector multiplication shown below. Note that the matrix used in this operation is T, not
T′.
In one implementation, the matrix fabric 521 is an 8×16 cell array, the first matrix fabric portion 521A is configured with the positive values of an 8×8 T matrix, and the second matrix fabric 521B is configured with the negative values of an 8×8 T matrix. The 8×16 matrix fabric 521 may be used to perform a DCT operation on an 8×8 matrix M, representing pixel values of an 8×8 pixel block.
In another implementation, the matrix fabric 521 is a 16×32 cell array, programmed with the positive and negative values of a 16×16 T matrix, and configured to perform a DCT operation on a 16×16 matrix M.
In other implementations, the size of the matrix fabric 521 may be appropriately scaled up or down for DCT operations performed on matrices M representing various other sized pixel blocks. As previously stated, the matrix multiplication operations of the present disclosure could be performed on very large matrices, since they do not face the exponential scaling of time issues of conventional methods. Thus, in accordance with aspects of the present disclosure, a matrix fabric based DCT operation could be performed on very large pixel blocks (e.g., 64×64 pixels) within a reasonable amount of time.
In the system 500 of
To perform the first stage of the DCT operation (EQN. 7 or 7A), vectors mcn representing individual columns of matrix M may be extracted from the memory array 522 and sequentially fed into the row driver 517 by the control logic 515, and then converted into analog input signals by the DAC 508 of the row driver 517. These converted analog input signals are then used to concurrently drive all the row terminals of the matrix fabric 521. The matrix fabric results are outputted into the MMU 519, which converts the results into digital values via the ADC 510 thereof. The digital values are then used by the arithmetic logic unit (ALU) 512 of the MMU to obtain the values of individual bcn vector (from EQN. 7A), representing columns of the B matrix. The values of each bcn vector can then be temporarily stored in the memory array 522 until the entire B matrix is obtained, if desired.
Once the entire B matrix is calculated, the second stage of the DCT operation (EQN. 8 or 8A) can be performed using the same matrix fabric 521 (configured with T matrix values). Each vector bm representing an individual column of matrix B is fed back into the row driver 517 by the control logic 515, converted by the DAC 508, and used to simultaneously drive all the row inputs of matrix fabric 521. The MMU 519 (including ADC 510 and ALU 512) is then used to obtain the dm vectors, which be stored in memory array 522 until all the values of the D matrix are calculated. Thus, the system 500 of FIG. SA may be used calculate the DCT frequency matrix coefficients of an N×N matrix Musing a single N×2N matrix fabric 521, configured with the values of the DCT transformation matrix T, by first running a series of matrix-vector operations through the matrix fabric 521 and MMU 519 to obtain a first matrix-matrix product B, and then running a series of matrix-vector operations through the matrix fabric 521 and MMU 519 to obtain a second matrix-matrix product D.
Another system 550, as illustrated in
It will further be appreciated that although each matrix fabric 521 of
Using the memory fabric system 550, in one embodiment, the entire matrix-matrix multiplication stage of EQN. 7 can be performed in the time it takes to drive one matrix fabric 521 once, since all n of the matrix-vector operations of EQN. 7A can be performed concurrently. The control logic 515 in this embodiment of the apparatus is configured to take the n separate vectors mcn and simultaneously feed them to n individual row drivers. Each individual row driver uses its mcn vector to simultaneously drive the row terminals of its respective matrix fabric 521. The matrix fabrics 521 and their respective MMUs 519 output the values of their individual vectors bcn to the memory array 522. Thus, the individual columns of matrix B are all calculated in parallel and stored in the memory array 522 at the same time. Similarly, in the second stage of the DCT operation, all rows of matrix D can be obtained by performing the matrix-vector multiplications of EQN. 8A in parallel using the multiple matrix fabric system 550 of FIG. SB.
EQNS. 7A and 8A illustrate one way of deconstructing the two matrix-matrix multiplications required by a DCT operation. However, either or both of the DCT matrix-matrix multiplication operations (EQNS. 7 and 8) may be deconstructed using matrix-vector multiplication operations that are different than those of EQNS. 7A and 8A, as recognized by those of ordinary skill given this disclosure.
After configuring the first matrix fabric 621, the control logic 615 provides individual vectors tm (e.g. vectors tr0, trt, etc.) to the first row driver 617, which converts the vector values from digital to analog (using DAC 608), and uses the analog signals to concurrently drive the row terminals of the first matrix fabric 621. Vector values trn depend on the size of matrix T and may be stored ahead of time in a look-up-table (LUT). The first matrix fabric 621 and first MMU 619 are used to sequentially obtain all the brn vectors (representing rows of matrix B).
In one variant, the values of the bm vectors may be temporarily stored in a memory array 622 and then provided to the second row driver from the memory array 622. In another variant, the bm vector values are fed from the first MMU 619 directly into the second row driver 637. The second stage of the DCT operation (EQN. 8) can be implemented using in the second (right) portion of the memory system 600, including the second row driver 637, the second matrix fabric 641, and the second MMU 639.
During the second stage of the DCT operation, each vector brn is fed into the second row driver 637 by the control logic 615, converted by the DAC 628, and used to simultaneously drive all the row inputs of second matrix fabric 641. The individual vector outputs of the first operation (EQN. 7B) are used as the individual vector inputs of the second operation (EQN. 8A). In other words, unlike in the embodiment of
In one embodiment, the LUT 706 stores a plurality of matrix value coefficients, dimensions, and/or other parameters, associated with different matrix operations In one exemplary embodiment, the LUT 706 stores a plurality of discrete cosine transform (DCT) coefficients (e.g., “twiddle factors”) associated with different DCT dimensions.
In another exemplary embodiment, the LUT 706 stores a plurality of fast Fourier transform (FFT) “twiddle factors” where various subsets of the twiddle factors are associated with different FFT dimensions. For example, a LUT 706 that stores the twiddle factors for a 64-point FFT has 64 coefficient values, which include all 32 coefficients used in a 32-point FFT, and all 16 coefficients used in a 16-point FFT, etc.
In yet other embodiments, the LUT 706 stores a plurality of different matrix coefficient values for image signal processing (ISP) e.g., defect correction, color interpolation, white balance, color adjustment, gamma lightness, contrast adjustment, color conversion, down- sampling, and/or other image signal processing operations. In yet another embodiment of the LUT 706, the LUT 706 may include various channel matrix codebooks that may be predefined and/or empirically determined based on radio channel measurements.
In one embodiment, the control logic 708 controls operation of the matrix fabric and MMU 710 based on instructions received from the processor 702. In one exemplary embodiment, the control logic 708 can form/destroy conductive filaments of varying conductivity within each of the memory cells of a matrix fabric in accordance with the aforementioned matrix dimensions and/or matrix value coefficients provided by the LUT 706. Additionally, the control logic 708 can configure a corresponding MMU to perform any additional arithmetic and/or logical manipulations of the matrix fabric. Furthermore, the control logic 708 may select one or more digital vectors to drive the matrix fabric, and one or more digital vectors to store the logical outputs of the MMU.
In the processing arts, an “instruction” generally includes different types of “instruction syllables”: e.g., opcodes, operands, and/or other associated data structures (e.g., registers, scalars, vectors).
As used herein, the term “opcode” (operation code) refers to an instruction that can be interpreted by a processor logic, memory logic, or other logical circuitry to effectuate an operation. More directly, the opcode identifies an operation to be performed on one or more operands (inputs) to generate one or more results (outputs). Both operands and results may be embodied as data structures. Common examples of data structures include without limitation: scalars, vectors, arrays, lists, records, unions, objects, graphs, trees, and/or any number of other form of data. Some data structures may include, in whole or in part, referential data (data that “points” to other data). Common examples of referential data structures include e.g., pointers, indexes, and/or descriptors.
In one exemplary embodiment, the opcode may identify one or more of: a matrix operation, the dimensions of the matrix operation, and/or the row and/or column of the memory cells. In one such variant, an operand is a coded identifier that specifies the one or more digital vectors that are to be operated upon.
For example, an instruction to perform a DCT process involving on an input digital 8×8 matrix, and store the results in an output digital matrix might include the opcode and operands: DCT8×8 ($input, $output), where: DCT8×8 identifies the size and nature of the operation, $input identifies an input digital matrix base address, and $output identifies an output digital matrix base address. In another such example, the DCT process may be split into several distinct atomic operations, e.g., (i) DCT8×8($address) that converts the memory array at the $address into an 8×8 (64-point) matrix fabric, (ii) ROWS8($input, $output) that breaks up an 8×8 digital matrix at $input into 8 separate digital vectors ($output), and (iii) MULT($address, $input,$output) that stores the vector-matrix product of the $input and the matrix fabric at $address to $output.
In one embodiment, the memory-processor architecture 700 can be used to perform DCT video processing on sequential video frames by calculating one video frame (e.g., an I-Frame) in memory 704, at least partly powering down the processor 702 (or allocating it for other tasks), and then waking the processor back up to calculate the next frame (e.g., a B-Frame). Since each DCT matrix operation is performed inside the memory and the video frame data always resides in the memory, the memory bandwidth load is greatly reduced.
In one embodiment, the matrix fabric and MMU 710 are tightly coupled to a memory array 712 to read and write digital vectors (operands). In one exemplary embodiment, the operands are identified for dedicated data transfer hardware (e.g., a direct memory access (DMA)) into and out of the matrix fabric and MMU 710. In one exemplary variant, the digital vectors of data may be of any dimension, and are not limited by processor word size. For example, an operand may specify an operand of N-bits (e.g., 2, 4, 8, 16, . . . etc.). In other embodiments, the DMA logic 708 can read/write to the matrix fabric 710 using the existing memory row/column bus interfaces. In still other embodiments, the DMA logic 708 can read/write to the matrix fabric 710 using the existing address/data and read/write control signaling within an internal memory interface.
The control logic 708 determines whether or not the matrix fabric and/or matrix multiplication unit (MMU) should be configured/reconfigured. For example, a section of the memory array is converted into one or more matrix fabrics and weighted with the associated matrix coefficient values defined by the matrix Mx,y. Digital-to-analog (DAC) row drivers and analog-to-digital (ADC) sense amps associated with the matrix fabric may need to be adjusted for dynamic range and/or amplification. Additionally, one or more MMU ALU components may be coupled to the one or more matrix fabrics.
When the matrix fabric and/or matrix multiplication unit (MMU) are appropriately configured, the input operand a is read by the digital-to-analog (DAC) and applied to the matrix fabric Mx,y for analog computation. The analog result may additionally be converted with analog-to-digital (ADC) conversion for subsequent logical manipulation by the MMU ALUs. The output is written into the output operand b.
More directly, when the matrix fabric contains the appropriate matrix value coefficients Mx,y, matrix operations may be efficiently repeated. For example, image processing computations, such as are described in co-owned and co-pending U.S. patent application Ser. No. 16/002,644 filed Jun. 7, 2018 and entitled “AN IMAGE PROCESSOR FORMED IN AN ARRAY OF MEMORY CELLS”, previously incorporated supra, may configure a number of matrix fabric and MMU processing elements so as to pipeline e.g., defect correction, color interpolation, white balance, color adjustment, gamma lightness, contrast adjustment, color conversion, down-sampling, and/or other image signal processing operations. Each one of the pipeline stages may be configured once, and repeatedly used for each pixel (or group of pixels) of the image. For example, the white balance pipeline stage may operate on each pixel of data using the same matrix fabric with the matrix coefficient values set for white balance; the color adjustment pipeline stage may operate on each pixel of data using the same matrix fabric with the matrix coefficient values set for color adjustment, etc. In another such example, the DCT of an 8×8 matrix can be handled, e.g., in two stages, each stage including e.g., eight atomic MMU computations using the same DCT transformation matrix T (as described supra).
Moreover, artisans of ordinary skill in the related arts will further appreciate that some matrix fabrics may have additional versatilities and/or uses beyond their initial configuration. For example, as previously noted, a 64-point FFT has 64 coefficient values, which include all 32 coefficients used in a 32-point FFT. Thus, a matrix fabric that is configured for 64-point operation could be reused for 32-point operation with the appropriate application of the 32-point input operand a on the appropriate rows of the 64-point FFT matrix fabric. Similarly, FFT twiddle factors are a superset of discrete cosine transform (DCT) twiddle factors; thus, an FFT matrix fabric could also be used (with appropriate application of input operand a) to calculate DCT results.
Still other permutations and/or variants of the foregoing example will be made clear to those of ordinary skill in the related arts, given the content of the present disclosure.
Referring now to
At step 802 of the method 800, a memory device receives one or more instructions. In one embodiment, the memory device receives the instruction from a processor. In one such variant, the processor is an application processor (AP) commonly used in consumer electronics. In other such variants, the processor is a baseband processor (BB) commonly used in wireless devices.
As a brief aside, so-called “application processors” are processors that are configured to execute an operating system (OS) and one or more applications, firmware, and/or software. The term “operating system” refers to software that controls and manages access to hardware. An OS commonly supports processing functions such as e.g., task scheduling, application execution, input and output management, memory management, security, and peripheral access.
A so-called “baseband processor” is a processor that is configured to communicate with a wireless network via a communication protocol stack. The term “communication protocol stack” refers to the software and hardware components that control and manage access to the wireless network resources. A communication protocol stack commonly includes without limitation: physical layer protocols, data link layer protocols, medium access control protocols, network and/or transport protocols, etc.
Other peripheral and/or co-processor configurations may similarly be substituted with equivalent success. For example, server devices often include multiple processors sharing a common memory resource. Similarly, many common device architectures pair a general purpose processor with a special purpose co-processor and a shared memory resource (such as a graphics engine, or digital signal processor (DSP)). Common examples of such processors include without limitation: graphics processing units (GPUs), video processing units (VPUs), tensor processing units (TPUs), neural network processing units (NPUs), digital signal processors (DSPs), image signal processors (ISPs). In other embodiments, the memory device receives the instruction from an application specific integrated circuit (ASIC) or other forms of processing logic e.g., field programmable gate arrays (FPGAs), programmable logic devices (PLDs), camera sensors, audio/video processors, and/or media codecs (e.g., image, video, audio, and/or any combination thereof).
In one exemplary embodiment, the memory device is a resistive random access memory (ReRAM) arranged in a “crossbar” row-column configuration. While the various embodiments described herein assume a specific memory technology and specific memory structure, artisans of ordinary skill in the related arts given the contents of the present disclosure will readily appreciate that the principles described herein may be broadly extended to other technologies and/or structures. For example, certain programmable logic structures (e.g., commonly used in field programmable gate arrays (FPGAs) and programmable logic devices (PLDs)) may have similar characteristics to memory with regard to capabilities and topology. Similarly, certain processor and/or other memory technologies may vary resistance, capacitance, and/or inductance; in such cases, varying impedance properties may be used to perform analog computations. Additionally, while the “crossbar” based construction provides a physical structure that is well adapted to two-dimensional (2D) matrix structures, other topologies may be well adapted to higher order mathematical operations (e.g., matrix-matrix products via three- dimensional (3D) memory stacking, etc.)
In one exemplary embodiment, the memory device further includes a controller. The controller receives the one or more instructions and parses each instruction into one or more instruction components (also commonly referred to as “instruction syllables”). In one exemplary embodiment, the instruction syllables include at least one opcode and one or more operands. For example, an instruction may be parsed into an opcode, a first source operand, and a destination operand. Other common examples of instruction components may include without limitation, a second source operand (for binary operations), a shift amount, an absolute/relative address, a register (or other reference to a data structure), an immediate data structure (i.e., a data structure provided within the instruction itself), a subordinate function, and/or branch/link values (e.g., to be executed depending on whether an instruction completes or fails).
In one embodiment, each received instruction corresponds to an atomic memory controller operation. As used herein, an “atomic” instruction is an instruction that completes within a single access cycle. In contrast, a “non-atomic” instruction is an instruction that may or may not complete within a single access cycle. Even though non-atomic instructions might complete in a single cycle, they must be treated as non-atomic to prevent data race conditions. A race condition occurs where data that is being accessed by a processor instruction (either a read or write) may be accessed by another processor instruction before the first processor instruction has a chance to complete; the race condition may unpredictably result in data read/write errors. In other words, an atomic instruction guarantees that the data cannot be observed in an incomplete state.
In one exemplary embodiment, an atomic instruction may identify a portion of the memory array to be converted to a matrix fabric. In some cases, the atomic instruction may identify characteristic properties of the matrix fabric. For example, the atomic instruction may identify the portion of the memory array on the basis of e.g., location within the memory array (e.g., via offset, row, column), size (number of rows, number of columns, and/or other dimensional parameters), granularity (e.g., the precision and/or sensitivity). Notably, atomic instructions may offer very fine grained control over memory device operation; this may be desirable where the memory device operation can be optimized in view of various application specific considerations.
In other embodiments, a non-atomic instruction may specify portions of the memory array that are to be converted into a matrix fabric. For example, the non-atomic instruction may specify various requirements and/or constraints for the matrix fabric. The memory controller may internally allocate resources so as to accommodate the requirements and/or constraints. In some cases, the memory controller may additionally prioritize and/or de-prioritize instructions based on the current memory usage, memory resources, controller bandwidth, and/or other considerations. Such implementations may be particularly useful where memory device management is unnecessary and would otherwise burden the processor.
In one embodiment, the instruction specifies a matrix operation. In one such variant, the matrix operation may be a vector-matrix product. In another variant, the matrix operation may be a matrix-matrix product. Still other variants may be substituted by artisans of ordinary skill in the related arts, given the contents of the present disclosure. Such variants may include e.g., scalar- matrix products, higher order matrix products, and/or other transformations including e.g., linear shifts, rotations, reflections, and translations.
As used herein, the terms “transformation”, “transform”, etc. refer to a mathematical operation that converts an input from a first domain into a second domain. Transformations can be “injective” (every element of the first domain has a unique element in the second domain), “surjective” (every element of the second domain has a unique element in the first domain), or “bijective” (a unique one-to-one mapping of elements from the first domain to the second domain).
More complex mathematically defined transformations that are regularly used in the computing arts include Fourier transforms (and its derivatives, such as the discrete cosine transform (DCT)), Hilbert transforms, Laplace transforms, and Legendre transforms. In one exemplary embodiment of the present disclosure, matrix coefficient values for mathematically defined transformations can be calculated ahead of time and stored within a look-up-table (LUT) or other data structure. For example, twiddle factors for the fast Fourier transform (FFT) and/or DCT can be calculated and stored within a LUT. In other embodiments, matrix coefficient values for mathematically defined transformations can be calculated by the memory controller during (or in preparation for) the matrix fabric conversion process.
Other transformations may not be based on a mathematical definition per se, but may instead by defined based on e.g., an application, another device, and/or a network entity. Such transformations may be commonly used in encryption, decryption, geometric modeling, mathematical modeling, neural networks, network management, and/or other graph theory based applications. For example, wireless networks may use a codebook of predetermined antenna weighting matrixes so as to signal the most commonly used beamforming configurations. In other examples, certain types of encryption may agree upon and/or negotiate between different encryption matrices. In such embodiments, the codebook or matrix coefficient values may be agreed ahead of time, exchanged in an out-of-band manner, exchanged in-band, or even arbitrarily determined or negotiated.
Empirically determined transformations may also be substituted with equivalent success given the contents of the present disclosure. For example, empirically derived transformations that are regularly used in the computing arts include radio channel coding, image signal processing, and/or other mathematically modeled environmental effects. For example, a multi- path radio environment can be characterized by measuring channel effects on e.g., reference signals. The resulting channel matrix can be used to constructively interfere with signal reception (e.g., improving signal strength) while simultaneously destructively interfering with interference (e.g., reducing noise). Similarly, an image that has a skewed hue can be assessed for overall color balance, and mathematically corrected. In some cases, an image may be intentionally skewed based on e.g., user input, so as to impart an aesthetic “warmth” to an image.
Various embodiments of the present disclosure may implement “unary” operations within a memory device. Other embodiments may implement “binary”, or even higher order “N-ary” matrix operations. As used herein, the terms “unary”, “binary”, and “N-ary” refer to operations that take one, two, or N input data structures, respectively. In some embodiments, binary and/or N-ary operations may be subdivided into one or more unary matrix in-place operators. As used herein, an “in-place” operator refers to a matrix operation that stores or translates its result its own state (e.g., its own matrix coefficient values). For example, a binary operation may be decomposed into two (2) unary operations; a first in-place unary operation is executed (the result is stored “in-place”). Thereafter, a second unary operation can be performed on the matrix fabric to yield the binary result (for example, a multiply-accumulate operation).
Still other embodiments may serialize and/or parallelize matrix operations based on a variety of considerations. For example, sequentially related operations may be performed in a “serial” pipeline. For example, image processing computations, such as are described in co- owned and co-pending U.S. patent application Ser. No. 16/002,644 filed Jun. 7, 2018 and entitled “AN IMAGE PROCESSOR FORMED IN AN ARRAY OF MEMORY CELLS”, previously incorporated supra, configures a number of matrix fabric and MMU processing elements to pipeline e.g., defect correction, color interpolation, white balance, color adjustment, gamma lightness, contrast adjustment, color conversion, down-sampling, etc. Pipelined processing can often produce very high throughput data with minimal matrix fabric resources. In contrast, unrelated operations may be performed in “parallel” with separate resources. For example, the first stage of a DCT operation performed on an 8×8 matrix can be handled with eight separate matrix fabrics, as described with respect to
In one exemplary embodiment, the instruction is received from a processor via a dedicated interface. Dedicated interfaces may be particularly useful where the matrix computation fabric is treated akin to a co-processor or a hardware accelerator. Notably, dedicated interfaces do not require arbitration, and can be operated at very high speeds (in some cases, at the native processor speed). In other embodiments, the instruction is received via a shared interface.
The shared interface may be multiplexed in time, resource (e.g., lanes, channels, etc.), or other manner with other concurrently active memory interface functionality. Common examples of other memory interface functionality include without limitation: data input/output, memory configuration, processor-in-memory (PIM) communication, direct memory access, and/or any other form of blocking memory access. In some variants, the shared interface may include one or more queuing and/or pipelining mechanisms. For example, some memory technologies may implement a pipelined interface so as to maximize memory throughput.
In some embodiments, the instructions may be received from any entity having access to the memory interface. For example, a camera co-processor (image signal processor (ISP)) may be able to directly communicate with the memory device to e.g., write captured data. In certain implementations, the camera co-processor may be able offload its processing tasks to a matrix fabric of the memory device. For example, the ISP may accelerate/offload/parallelize e.g., color interpolation, white balance, color correction, color conversion, etc. In other examples, a baseband co-processor (BB) may be able to may be able to directly communicate with the memory device to e.g., read/write data for transaction over a network interface. The BB processor may be able to offload e.g., FFT/IFFT, channel estimation, beamforming calculations, and/or any number of other networking tasks to a matrix fabric of a memory device. Similarly, video and/or audio codecs often utilize DCT/IDCT transformations, and would benefit from matrix fabric operations. Still other variants of the foregoing will be readily appreciated by artisans of ordinary skill in the related arts, given the contents of the present disclosure.
Various implementations of the present disclosure may support a queue of multiple instructions. In one exemplary embodiment, matrix operations may be queued together. For example, multiple vector-matrix multiplications may be queued together in order to effectuate a matrix-matrix multiplication. For example, as described elsewhere in the disclosure, multiple matrix-vector multiplications may be used to effectively perform the matrix-matrix multiplication operations required for DCT. Similarly, as previously noted, a higher order transform (e.g., FFT1024) may be achieved by queuing multiple iterations of a lower order constituent transform (e.g., FFTS12, etc.) In yet another example, ISP processing for an image may include multiple iterations over the iteration space (each iteration may be queued in advance). Still other queuing schemes may be readily substituted by artisans of ordinary skill in the related arts with equal success, given the contents of the present disclosure.
In some cases, matrix operations may be cascaded together to achieve matrix operations of a higher rank. For example, a higher order FFT (e.g., 1024×1024) can be decomposed into multiple iterations of lower rank FFTs (e.g., four (4) iterations of 512×512 FFTs, sixteen (16) iterations of 256×256 FFTs, etc.). In other examples, arbitrarily sized N-point DFTs (e.g., that is not a power of 2) can be implemented by cascading DFTs of other sizes. Still other examples of cascaded and/or chained matrix transformations may be substituted with equivalent success, the foregoing being purely illustrative.
As previously alluded to, the ReRAM's non-volatile nature retains memory contents even when the ReRAM is unpowered. Thus, certain variants of the processor-memory architecture may enable one or more processors to independently power the memory. In some cases, the processor may power the memory when the processor is inactive (e.g., keeping the memory active while the processor is in low power). Independent power management of the memory may be particularly useful for e.g., performing matrix operations in memory, even while the processor is asleep. For example, the memory may receive a plurality of instructions to execute; the processor can transition into a sleep mode until the plurality of instructions have been completed. Still other implementations may use the non-volatile nature of ReRAM to hold memory contents while the memory is powered off; for example, certain video and/or image processing computations may be held within ReRAM during inactivity.
At step 804 of the method 800, a memory array (or portion thereof) may be converted into a matrix fabric based on the instruction. As used herein, the term “matrix fabric” refers to a plurality of memory cells having a configurable impedance that, when driven with an input vector, yield an output vector and/or matrix. In one embodiment, the matrix fabric may be associated with a portion of the memory map. In some such variants, the portion is configurable in terms of its size and/or location. For example, a configurable memory register may determine whether a bank is configured as a memory or as a matrix fabric. In other variants, the matrix fabric may reuse and/or even block memory interface operation. For example, the memory device may allow the memory interface may be GPIO based (e.g., in one configuration, the pins of the memory interface may selectively operate as ADDR/DATA during normal operation, or e.g., FFT16, etc. during matrix operation.)
In one embodiment, the instruction identifies a matrix fabric characterized by structurally defined coefficients. In one exemplary embodiment, a matrix fabric contains the coefficients for a structurally defined matrix operation. For example, a matrix fabric for an 8×8 DCT is an 8×8 matrix fabric that has been pre-populated with structurally defined coefficients for the DCT. In some variants, the matrix fabric may be pre-populated with coefficients of a particular sign (positive, negative) or of a particular radix (the most significant bits, least significant bits, or intermediary bits).
As used herein, the term “structurally defined coefficients” refer to the fact that the coefficients of the matrix multiplication are defined by the matrix structure (e.g., the size of the matrix), not the nature of the operation (e.g., multiplying operands). For example, a structurally defined matrix operation may be identified by e.g., a row and column designation (e.g., 8×8, 16×16, 32×32, 64×64, 128×128, 256×256, etc.) While the foregoing discussions are presented in the context of full rank matrix operations, deficient matrix operators may be substituted with equivalent success. For example, a matrix operation may have asymmetric columns and/or rows (e.g., 8×16, 16×8, etc.) In fact, many vector-based operations may be treated as a row with a single column, or a column with a single row (e.g., 8×1, 1×8).
In some hybrid hardware/software embodiments, controlling logic (e.g., a memory controller, processor, PIM, etc.) may determine whether resources exist to provide the matrix fabric. In one such embodiment, a matrix operation may be evaluated by a pre-processor to determine whether or not it should be handled within software or within dedicated matrix fabric. For example, if the existing memory and/or matrix fabric usage consumes all of the memory device resources, then the matrix operation may need to be handled within software rather than via the matrix fabric. Under such circumstances, the instruction may be returned incomplete (resulting in traditional matrix operations via processor instructions). In another such example, configuring a temporary matrix fabric to handle a simple matrix operation may yield such little return, that the matrix operation should be handled within software.
Various considerations may be used in determining whether a matrix fabric should be used. For example, memory management may allocate portions of the memory array for memory and/or matrix fabric. In some implementations, portions of the memory array may be statically allocated. Static allocations may be preferable to reduce memory management overhead and/or simplify operational overhead (wear leveling, etc.). In other implementations, portions of the memory array may be dynamically allocated. For example, wear-leveling may be needed to ensure that a memory uniformly degrades in performance (rather than wearing out high usage areas). Still other variants may statically and/or dynamically allocate different portions; for example, a subset of the memory and/or matrix fabric portions may be dynamically and/or statically allocated.
As a brief aside, wear leveling memory cells can be performed in any discrete amount of memory (e.g., a bank of memory, a chunk of memory, etc.) Wear leveling matrix fabric may use similar techniques; e.g., in one variant, wear leveling matrix fabric portions may require that the entire matrix fabric is moved in aggregate (the crossbar structure cannot be moved in pieces). Alternatively, wear leveling matrix fabric portions may be performed by first decomposing the matrix fabric into constituent matrix computations and dispersing the constituent matrix computations to other locations. More directly, matrix fabric wear leveling may indirectly benefit from the “logical” matrix manipulations that are used in other matrix operations (e.g., decomposition, cascading, parallelization, etc.). In particular, decomposing a matrix fabric into its constituent matrix fabrics may enable better wear leveling management with only marginally more complex operation (e.g., the additional step of logical combination via MMU).
In one exemplary embodiment, conversion includes reconfiguring the row decoder to operate as a matrix fabric driver that variably drives multiple rows of the memory array. In one variant, the row driver converts a digital value to an analog signal. In one variant, digital-to- analog conversion includes varying a conductance associated with a memory cell in accordance with a matrix coefficient value. Additionally, conversion may include reconfiguring the column decoder to perform analog decoding. In one variant, the column decoder is reconfigured to sense analog signals corresponding to a column of varying conductance cells that are driven by corresponding rows of varying signaling. The column decoder converts an analog signal to a digital value. While the foregoing construction is presented in one particular row-column configuration, other implementations may be substituted with equal success. For example, a column driver may convert a digital value to an analog signal, and a row decoder may convert an analog signal to a digital value. In another such example, a three-dimension (3D) row-column- depth memory may implement 2D matrices in any permutation (e.g., row-driver/column- decoder, row-driver/depth-decoder, column-driver/depth-decoder, etc.) and/or 3D matrix permutations (e.g., row-driver/column-decoder-driver/depth-decoder).
In one exemplary embodiment, the matrix coefficient values correspond to a structurally determined value. Structurally determined values may be based on the nature of the operation. For example, a discrete cosine transform (DCT) performed on an N×N matrix uses an N×N DCT matrix T, where the values of the DCT matrix are calculated as functions of N. As a practical matter, a variety of different transformations are similar in this regard. For example, the discrete Fourier transform (DFT) and fast Fourier transform (FFT), both use structurally defined coefficients.
In one exemplary embodiment, the matrix fabric itself has structurally determined dimensions. Structurally determined dimensions may be based on the nature of the operation; for example, an ISP white balance processing may use a 3×3 matrix (corresponding to different values of Red (R), Green (G), Blue (B), Luminance (Y), Chrominance Red (Cr), Chrominance Blue (Cb), etc.) In another such example, channel matrix estimations and/or beamforming codebooks are often defined in terms of the number of multiple-input-multiple-output (MIMO) paths. For example, a 2×2 MIMO channel has a corresponding 2×2 channel matrix and a corresponding 2×2 beamforming weighting. Various other structurally defined values and/or dimensions useful for matrix operations may be substituted by artisans of ordinary skill in the related arts, given the contents of the present disclosure.
Certain variants may additionally subdivide matrix coefficient values so as to handle manipulations that may be impractical to handle otherwise. Under such circumstances, a matrix fabric may include only a portion of the matrix coefficient values (to perform only a portion of the matrix operation). For example, performing signed operation and/or higher level radix computations may require levels of manufacturing tolerance that are prohibitively expensive. Signed matrix operation may be split into positive and negative matrix operations (which are later summed by a matrix multiplication unit (MMU) described elsewhere herein). Similarly, high radix matrix operation may be split into e.g., a most significant bit (MSB) portion, a least significant bit (LSB) portion, and/or any intermediary bits (which may be bit shifted and summed by the aforementioned MMU). Still other variants would be readily appreciated by artisans of ordinary skill, given the contents of the present disclosure.
In one exemplary embodiment, the matrix coefficient values are determined ahead of time and stored in a look-up-table for later reference. For example, a matrix operation that has both structurally determined dimensions and structurally determined values may be stored ahead of time. As but one such example, an 8×8 DCT matrix T has structurally determined dimensions (8×8) and structurally determined values (e.g., calculated with EQN. 6). A DCT8×8 instruction may result in the configuration of an 8×8 matrix fabric that is pre-populated with the corresponding DCT8×8 structurally determined values. As another such example, antenna beamforming coefficients are often defined ahead of time within a codebook; a wireless network may identify a corresponding index within the codebook to configure antenna beamforming. For example, a MIMO codebook may identify the possible configurations for a 4×4 MIMO system; during operation, the selected configuration can be retrieved from a codebook based an index thereto.
While the foregoing examples are presented in the context of structurally defined dimensions and/or values, other embodiments may use dimensions and/or values that are defined based on one or more other system parameters. For example, less granularity may be required for low power operation. Similarly, as previously alluded to, various processing considerations may weigh in favor of (or against) performing matrix operations within a matrix fabric. Additionally, matrix operation may affect other memory considerations including without limitation: wear leveling, memory bandwidth, process-in-memory bandwidth, power consumption, row column and/or depth decoding complexity, etc. Artisans of ordinary skill in the related arts given the contents of the present disclosure may substitute a variety of other considerations, the foregoing being purely illustrative.
At step 806 of the method 800, one or more matrix multiplication units may be configured on the basis of the instruction. As previously alluded to, certain matrix fabrics may implement logical (mathematical identities) to handle a single stage of a matrix operation; however, multiple stages of matrix fabrics may be cascaded together to achieve more complex matrix operations. In one exemplary embodiment, a first matrix is used to calculate positive products of a matrix operation and a second matrix is used to calculate the negative products of a matrix operation. The resulting positive and negative products can be compiled within an MMU to provide a signed matrix multiplication. In one exemplary embodiment, a first matrix is used to calculate a first radix portion of a matrix operation and a second matrix is used to calculate a second radix portion of a matrix operation. The resulting radix portions can be bit shifted and/or summed within an MMU to provide a larger radix product.
As a brief aside, logical matrix operations are distinguished from analog matrix operations. The exemplary matrix fabric converts analog voltages or current into digital values that are read by the matrix multiplication unit (MMU). Logical operations can manipulate digital values via mathematical properties (e.g., via matrix decomposition, etc.); analog voltages or current cannot be manipulated in this manner.
More generally, different logical manipulations can be performed with groups of matrices. For example, a matrix can be decomposed or factorized into one or more constituent matrices. Similarly, multiple constituent matrices can be aggregated or combined into a single matrix. Additionally, matrices may be expanded in row and/or column to create a deficient matrix of larger dimension (but identical rank). Such logic may be used to implement many higher order matrix operations. For example, as explained elsewhere in the disclosure, multiplying two matrices together may be decomposed as a number of vector-matrix multiplications. These vector-matrix multiplications may be further implemented as multiply-accumulate logic within a matrix multiplication unit (MMU). In other words, even non-unary operations may be handled as a series of piece-wise unary matrix operations. More generally, artisans of ordinary skill in the related arts will readily appreciate that any matrix operation which can be expressed in whole, or in part, as a unary operation may greatly benefit from the various principles described herein.
Various embodiments of the present disclosure use matrix multiplication units (MMUs) as glue logic between multiple constituent matrix fabrics. Additionally, MMU operation may be selectively switched for connectivity to various rows and/or columns. Not all matrix fabrics may be used concurrently; thus, depending on the current processing and/or memory usage, matrix fabrics may be selectively connected to MMUs. For example, a single MMU may be dynamically connected to different matrix fabrics.
In some embodiments, controlling logic (e.g., a memory controller, processor, PIM, etc.) may determine whether resources exist to provide the MMU manipulations within e.g., column decoder or elsewhere. For example, the current MMU load may be evaluated by a pre-processor to determine whether or not an MMU may be heavily loaded. Notably, the MMU is primarily used for logical manipulations, thus any processing entity with equivalent logical functionality may assist with the MMU's tasks. For example, a processor-in-memory (PIM) may offload MMU manipulations. Similarly, matrix fabric results may be directly provided to the host processor (which can perform logical manipulations in software).
More generally, various embodiments of the present disclosure contemplate sharing MMU logic among multiple different matrix fabrics. The sharing may be based on e.g., a time sharing scheme. For example, the MMU may be assigned to a first matrix fabric during one time slot, and a second matrix fabric during another time slot. In other words, unlike the physical structure of the matrix fabric (which is statically allocated for the duration of the matrix operation), the MMU performs logical operations that can be scheduled, subdivided, allocated, reserved, and/or partitioned in any number of ways. More generally, various embodiments of the matrix fabric are based on memory and non-volatile. As a result, the matrix fabric may be configured in advance, and read from when needed; the non-volatile nature ensures that the matrix fabric retains contents without requiring processing overhead even if e.g., the memory device is powered off
If both matrix fabrics and corresponding matrix multiplication units (MMUs) are successfully converted and configured, then at step 808 of the method 800, the matrix fabric is driven based on the instruction and a logical result is calculated with the one or more matrix multiplication units at step 810. In one embodiment, one or more operands are converted into an electrical signal for analog computation via the matrix fabric. The analog computation results from driving an electrical signal through the matrix fabric elements; for example, the voltage drop is a function of a coefficient of the matrix fabric. The analog computation result is sensed and converted back to a digital domain signal. Thereafter, the one or more digital domain values are manipulated with the one or more matrix multiplication units (MMUs) to create a logical result.
Referring back to
At step 804 of method 800, a portion of the memory array is converted into a matrix fabric configured to perform the DCT matrix operations. In one embodiment, at least one N×2N portion of the memory array is configured as matrix fabric with the values of the DCT matrix T (separated into positive T and negative T matrix values), as described in
At step 806, one or more matrix multiplication units may be configured to, e.g., compile the matrix-vector products from the positive T matrix fabric and the negative T matrix fabric in order to provide a signed matrix multiplication (similar to that described in
Referring now to
In step 811 of the method 850, one or more vectors mcn representing columns of matrix M are obtained from the memory array. In one embodiment, control logic is used to access one vector at a time based on the instructions received in step 802 of method 800.
In step 812, one vector mcn is used to drive the matrix fabric that has been configured with the positive and negative T matrix values.
In step 814, the MMU obtains the results of the matrix fabric, and calculates a bcn vector by subtracting the matrix-vector product obtained at the negative T side of the matrix fabric from the matrix-vector product obtained at the positive T side of the matrix fabric.
In step 816, the value of the resulting bcn vector is stored in a memory array.
Steps 811 through 816 are then repeated until the entire B matrix is calculated and accumulated in the memory array. Additional detail can be found in the discussion of
Once the entire B matrix is calculated per steps 811 through 816, at step 817 of
In step 818, one vectorbm is used to drive the matrix fabric that has been configured with the positive and negative T matrix values, as described with respect to
In step 820, the MMU obtains the results of the matrix fabric and calculates a dm vector by subtracting the matrix-vector product obtained at the negative T side of the matrix fabric from the matrix-vector product obtained at the positive T side of the matrix fabric.
In step 822, the value of the resulting dm vector is stored in the memory array. Steps 817 through 822 are then repeated until the entire D matrix is calculated and the DCT operation is complete. It will be recognized that the foregoing methodologies may be readily adapted by one of ordinary skill, when given this disclosure, for use with the multi-matrix fabric architectures of
It will also be recognized that while certain aspects of the disclosure are described in terms of a specific sequence of steps of a method, these descriptions are only illustrative of the broader methods of the disclosure, and may be modified as required by the particular application. Certain steps may be rendered unnecessary or optional under certain circumstances. Additionally, certain steps or functionality may be added to the disclosed embodiments, or the order of performance of two or more steps permuted. Furthermore, features from two or more of the methods may be combined. All such variations are considered to be encompassed within the disclosure disclosed and claimed herein.
The description set forth herein, in connection with the appended drawings, describes example configurations and does not represent all the examples that may be implemented or that are within the scope of the claims. The term “exemplary” used herein means “serving as an example, instance, or illustration,” and not “preferred” or “advantageous over other examples.” The detailed description includes specific details for the purpose of providing an understanding of the described techniques. These techniques, however, may be practiced without these specific details. In some instances, well-known structures and devices are shown in block diagram form in order to avoid obscuring the concepts of the described examples.
Information and signals described herein may be represented using any of a variety of different technologies and techniques. For example, data, instructions, commands, information, signals, bits, symbols, and chips that may be referenced throughout the above description may be represented by voltages, currents, electromagnetic waves, magnetic fields or particles, optical fields or particles, or any combination thereof.
While the above detailed description has shown, described, and pointed out novel features of the disclosure as applied to various embodiments, it will be understood that various omissions, substitutions, and changes in the form and details of the device or process illustrated may be made by those skilled in the art without departing from the disclosure. This description is in no way meant to be limiting, but rather should be taken as illustrative of the general principles of the disclosure. The scope of the disclosure should be determined with reference to the claims.
It will be further appreciated that while certain steps and aspects of the various methods and apparatus described herein may be performed by a human being, the disclosed aspects and individual methods and apparatus are generally computerized/computer-implemented. Computerized apparatus and methods are necessary to fully implement these aspects for any number of reasons including, without limitation, commercial viability, practicality, and even feasibility (i.e., certain steps/processes simply cannot be performed by a human being in any viable fashion).
The functions described herein may be implemented in hardware, software executed by a processor, firmware, or any combination thereof. If implemented in software executed by a processor, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable apparatus (e.g., storage medium). Computer-readable media include both non-transitory computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A non-transitory storage medium may be any available medium that can be accessed by a general purpose or special purpose computer. Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, include CD, laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above are also included within the scope of computer-readable media.
The present application is a continuation application of U.S. patent application Ser. No. 16/689,981 filed Nov. 20, 2019, the entire disclosures of which application are hereby incorporated herein by reference. The subject matter of this application is related to co-owned and co-pending U.S. patent Application Serial No. 16/002,644 filed June 7, 2018 and entitled “AN IMAGE PROCESSOR FORMED IN AN ARRAY OF MEMORY CELLS”, U.S. patent application Ser. No. 16/211,029, filed Dec. 5, 2018, and entitled “METHODS AND APPARATUS FOR INCENTIVIZING PARTICIPATION IN FOG NETWORKS”, Ser. No. 16/242,960, filed Jan. 8, 2019, and entitled “METHODS AND APPARATUS FOR ROUTINE BASED FOG NETWORKING”, Ser. No. 16/276,461, filed on Feb. 14, 2019, and entitled “METHODS AND APPARATUS FOR CHARACTERIZING MEMORY DEVICES”, Ser. No. 16/276,471, filed on Feb. 14, 2019, and entitled “METHODS AND APPARATUS FOR CHECKING THE RESULTS OF CHARACTERIZED MEMORY SEARCHES”, Ser. No. 16/276,489, filed on Feb. 14, 2019, and entitled “METHODS AND APPARATUS FOR MAINTAINING CHARACTERIZED MEMORY DEVICES”, each of the foregoing incorporated herein by reference in its entirety.
Number | Date | Country | |
---|---|---|---|
Parent | 16689981 | Nov 2019 | US |
Child | 17948126 | US |