This is the first application filed for this invention.
This disclosure pertains generally to the field of photonic computing and in particular to an optical crossbar array architecture usable for implementing vector or matrix multiplication operations.
In a variety of applications, such as but not necessarily limited to machine learning and signal processing for communications, it is required to perform a significant amount of vector-to-vector, vector-to-matrix, matrix-to-vector, or matrix-to-matrix multiplication. Such multiplications are referred to herein as matrix-vector multiplications (MVMs). Moreover, it is required to perform such multiplications in a timely and energy-efficient manner. One device for performing such multiplications is known as an optical crossbar array.
In the optical crossbar array, optical signals representing elements of an input vector (which may be a row or column of a matrix) are generated and provided to a set of horizontal, vertically separated (at least diagrammatically) input waveguides. A set of vertical, horizontally separated (again, at least diagrammatically) output waveguides is also provided, with each input waveguide sequentially crossing each output waveguide. The crossings of the input waveguides and output waveguides are thus arranged in the form of a rectangular array, and a set of devices are located at these crossings. Each such device can be controlled to represent an element in a matrix, and configured to output a signal which represents a (scalar) multiplication between an element of the input vector and an element of the matrix. Each output waveguide accumulates (sums) multiple such outputs of multiplications, to generate an output which represents a (vector) multiplication between the input vector and one row or column of the matrix. Thus a multiplication between a vector and a matrix can be performed with the result being read from the output waveguides. By performing a sequence of such multiplications, with the same matrix but different vectors representing different rows or columns of another matrix, a multiplication between two matrices can similarly be performed. An electrical crossbar array can be similarly provided, with electrical signals being used and manipulated, rather than optical signals.
Phase change materials (PCMs) are materials that can be set to a configurable, persistent state, being a fully (or maximally) crystalline state, a fully (or maximally) amorphous state, or an intermediate (partially crystalline, partially amorphous) state. Different states can exhibit different optical properties, different electrical properties, or both. For example, a PCM cell can pass a fraction of received input light to an output, such a fraction being dependent on the PCM cell's state. Thus, the devices at the crossings of a crossbar array can each include a respective PCM cell, which is programmed according to an element in the matrix involved in a multiplication. The input signals can similarly be set to have intensities which represent (e.g. are in proportion to) elements of an input vector. PCMs with varying electrical (e.g. resistive) properties are similarly available and usable in electrical crossbar arrays.
However, implementing such crossbar arrays comes with a variety of challenges. For example, negative vector or matrix values are not straightforward to represent via optical signal intensities, since a “negative” intensity of light is not directly representable. As another example, undesired and unavoidable leakages or losses of light (or electrical current) in a crossbar array can occur due for example to imperfections or inherent limitations in components. Understanding and compensating for such imperfections is required to produce a properly operating crossbar array for performing MVMs or other tasks.
Therefore, there is a need for an optically implemented matrix-vector multiplication method and apparatus that obviates or mitigates one or more limitations in the prior art.
This background information is intended to provide information that may be of possible relevance to the present invention. No admission is necessarily intended, nor should be construed, that any of the preceding information constitutes prior art against the present invention.
Embodiments of the present disclosure generally provide for a method and apparatus for performing MVMs such as vector-to-vector, matrix-to-vector (or vector-to-matrix), or matrix-to-matrix multiplications. A crossbar array is used to perform a multiplication between an input vector (which may in some cases be a row or column of a matrix) and an input matrix (which may in some cases be a vector, i.e. a matrix with one row or column). In some embodiments, a set of components is provided which interacts with input signals, indicative of the input vector, to generate a compensation output. The compensation output can be used to compensate for errors in the MVM, such errors being due to limitations in attenuative components, such as PCMs, which implement parts of the MVM by attenuating signals having intensities that represent elements of the input vector.
Embodiments of the present disclosure provide for a method and apparatus for representing negative entries in an input vector presented to a crossbar array, for multiplying with an input matrix. The crossbar array may or may not also include the above-mentioned set of components generating a compensation output.
According to embodiments, there is provided an apparatus having an optical crossbar array, a compensation device, and a readout device. The optical crossbar array includes a set of input waveguides, a set of output waveguides, and a set of processing elements. Each of the input waveguides is configured to propagate a different respective one of a set of input optical signals. Each one of the input optical signals has an intensity representative of a corresponding element of an input vector. Each one of the output waveguides is configured to provide a different respective one of a set of output optical signals. Each processing element is configured to receive a portion of one of the set of input optical signals and pass a respective controllable fraction of that portion to one of the set of output waveguides. The controllable fractions are based on values of elements of an input matrix to be multiplied with the input vector. Each one of the output optical signals includes multiple ones of the controllable fractions. The compensation device is configured to receive further portions of each one of the input optical signals from the set of input waveguides, and generate a compensation output optical signal having an intensity proportional to a sum of intensities of these further portions. The readout device is configured to: receive the set of output optical signals; receive the compensation output optical signal; and provide a compensated result of a multiplication between the input vector and the input matrix. The compensated result is generated based at least in part on the set of output optical signals and the compensation output optical signal.
In some embodiments, the compensation device includes a plurality of further processing elements. Each further processing element is configured to receive a different one of the further portions and pass a fixed part or all of said different one of the further portions to a further output waveguide. This is performed in order to generate the compensation output optical signal within the further output waveguide. In various embodiments, each of the processing elements and each of the further processing elements has an identical structure, within manufacturing tolerances. In various embodiments, each of the processing elements and the further processing elements includes a phase change material (PCM).
In some embodiments, providing the compensated result of the multiplication between the input vector and the input matrix includes generating an indication of a raw output vector based on the set of output optical signals; generating an indication of a compensation value based on the compensation output optical signal; and generating the compensated result to represent a scaled result of a difference between: the raw output vector; and the compensation value or the compensation value multiplied by a predetermined scalar value. In some further embodiments, the scaled result corresponds to said difference multiplied by another predetermined scalar value, and the predetermined scalar value, the other predetermined scalar value, or both, are determined using a calibration operation performed on the apparatus.
In some embodiments, the apparatus is further configured to generate, using the optical crossbar array or another optical crossbar array having a same configuration as the optical crossbar array, a second set of output optical signals indicative of a result of multiplying the input vector with a second input matrix. In such embodiments, the apparatus is further configured to provide a second compensated result of a multiplication between the input vector and the second input matrix. The second compensated result is generated based at least in part on the second set of output optical signals and the compensation output optical signal. In some further embodiments, the compensation output optical signal, or an indication thereof, is stored in and subsequently retrieved from a memory to support generating the compensated result, generating the second compensated result, or both. In some embodiments, the input matrix and the second input matrix are different partitions of an overall matrix.
In some embodiments, the input vector is a row or column of a further input matrix, and the apparatus is configured to perform a matrix-to-matrix multiplication by multiplying each of two or more rows or columns of the further input matrix with the input matrix.
According to embodiments, there is provided a method comprising operating an optical crossbar array, operating a compensation device, and operating a readout device. The optical crossbar array is as already described above. Operating the compensation device includes: receiving further portions of each one of the set of input optical signals from the set of input waveguides; and generating a compensation output optical signal having an intensity proportional to a sum of intensities of said further portions. Operating the readout device includes: receiving the set of output optical signals; receiving the compensation output optical signal; and providing a compensated result of a multiplication between the input vector and the input matrix. The compensated result is generated based at least in part on the set of output optical signals and the compensation output optical signal. Other aspects of the method may be provided, corresponding to aspects of the of the apparatus as already described above.
According to embodiments, there is provided an apparatus comprising: one or a pair of optical crossbar arrays each respectively comprising: a set of input waveguides each configured to propagate a different respective one of a set of input optical signals, each one of the set of input optical signals having an intensity representative of a corresponding element of an input vector; a set of output waveguides each configured to provide a different respective one of a set of output optical signals; and a set of processing elements each configured to receive a portion of one of the set of input optical signals and to pass a respective controllable fraction of said portion to one of the set of output waveguides. The controllable fractions are based on values of an input matrix to be multiplied with the input vector, each one of the set of output optical signals comprising multiple ones of the controllable fractions. The apparatus further includes an input splitting device configured to: decompose a first vector into a first partial vector and a second partial vector, wherein each element of the first partial vector and each element of the second partial vector is positive, and wherein the first vector is equal to a difference between the first partial vector and the second partial vector; provide the first partial vector as the input vector to the optical crossbar array at a first time to obtain the set of output optical signals therefrom as indicative of a first result of multiplying the first partial vector with the input matrix, or provide the first partial vector as the input vector to a first one of the pair of optical crossbar arrays to obtain the set of output optical signals therefrom as indicative of the first result; provide the second partial vector as the input vector to the optical crossbar array at a second time to obtain the set of output optical signals therefrom as indicative of a second result of multiplying the second partial vector with the input matrix, or provide the second partial vector as the input vector to a second one of the pair of optical crossbar arrays to obtain the set of output optical signals therefrom as indicative of the second result. The apparatus further includes a readout device configured to: receive the optical signals indicative of the first result and the optical signals indicative of the second result; and provide a result of a multiplication between the input vector and the input matrix, the result being generated based at least in part on the optical signals indicative of the first result and the optical signals indicative of the second result, the result being indicative of a difference between the first result and the second result. An associated method may also be provided.
In some embodiments, decomposing the first vector into the first partial vector and the second partial vector comprises: producing each ith element of the first partial vector as being: equal to a corresponding ith element of the first vector when said corresponding ith element of the first vector is greater than zero; and equal to zero when said corresponding ith element of the first vector is less than or equal to zero; and producing each ith element of the second partial vector as being: equal to the corresponding ith element of the first vector when said corresponding ith element of the first vector is less than zero; and equal to zero when said corresponding ith element of the first vector is greater than or equal to zero.
In some embodiments, the above apparatus includes (and the associated method involves operating) a compensation device configured to receive further portions of each one of the set of input optical signals from the set of input waveguides of the optical crossbar array or one or both of the pair of optical crossbar arrays, and generate a compensation output optical signal having an intensity proportional to a sum of intensities of said further portions. The readout device is further configured to provide the result of the multiplication based in part on the compensation output optical signal.
Embodiments have been described above in conjunctions with aspects of the present disclosure upon which they can be implemented. Those skilled in the art will appreciate that embodiments may be implemented in conjunction with the aspect with which they are described but may also be implemented with other embodiments of that aspect. When embodiments are mutually exclusive, or are otherwise incompatible with each other, it will be apparent to those skilled in the art. Some embodiments may be described in relation to one aspect, but may also be applicable to other aspects, as will be apparent to those of skill in the art.
It will be noted that throughout the appended drawings, like features are identified by like reference numerals.
Embodiments of the present disclosure generally provide for a method and apparatus for performing vector-to-vector, matrix-to-vector, or matrix-to-matrix multiplications (collectively referred to as matrix-vector multiplications or MVMs) using a (e.g. photonic) computing apparatus, which may in various embodiment perform in-memory computing. Embodiments can be applied in a variety of applications such as, but not necessarily limited to, artificial intelligence (AI) implementations, machine learning (ML) or deep learning (DL) neural networks, wireless communications, autonomous driving, LIDAR, robotics, and other applications that require matrix or vector multiplication operations. When used for wireless communications applications, embodiments may be used either at the user side or at the base station side and implement features such as detection, estimation, distortion cancellation, and beamforming.
Values for m and n, e.g. the number of rows and columns of the matrix C, are greater than or equal to one. The vector x, matrix C, or both, can be portions of larger vectors or matrices, and obtained via partitioning. This allows large MVM operations to be decomposed into multiple smaller MVM operations, according to the principle of matrix partitioning and block matrix multiplication. Such a decomposition and associated multiple MVM operations, can be performed in association with the method and apparatus as described herein. For example, multiple optical crossbar arrays can be used to implement different ones of the multiple MVM operations, the same optical crossbar array can be used to implement different ones of the multiple MVM operations at different times or at the same time using frequency/wavelength division multiplexing techniques, or the like, or a combination thereof. The results of the block multiplications can then be aggregated together to obtain a final result. This allows large vectors and matrices to be multiplied using optical crossbar arrays of limited size (limited processing elements).
The optical crossbar array 200 further includes a set of processing element pairs 250, the pairs forming (as illustrated) an m-row by n-column rectangular array. Each processing element pair 250 includes two processing elements 220, and each of the two processing elements includes an attenuation device 205, such as a PCM cell.
In operation, a processing element 220 receives a portion of an input optical signal, from an input waveguide 210 to which it is coupled, and passes a controllable fraction of this received portion to an output waveguide 215 to which it is also coupled. To facilitate such coupling, the processing element may include an input coupler and an output coupler (shown as line segments parallel to the input and output waveguides, respectively), each of which may be a directional coupler, a contra-directional coupler, or the like. Between the input coupler, which couples the portion of the input optical signal onto the processing element, and the output coupler, which couples the controllable fraction of this received portion onto the output waveguide, is the attenuation device 205, which receives light from the input coupler, and implements the controllable fraction by passing a controllable portion of this received light to the output coupler. This may involve blocking or filtering out some of the light at the attenuation device. Thus, by controlling (e.g. by electrical or optical programming) the attenuation device 205, the controllable fraction of light can be passed from the input waveguide to the output waveguide. Such controllable fractions are used to represent elements of the multiplicand (input) matrix C.
The illustrated intersections between input waveguides and output waveguides are not necessarily locations at which light couples from input waveguide to output waveguide or vice-versa, and indeed it is desirable for light not to couple from input waveguides to output waveguides except via the processing elements.
In the embodiment of
Here, it is assumed that the matrix C is normalized so that the absolute value of all elements is less than or equal to one. This may be achieved for example by dividing the matrix C by a scalar value which is equal to or greater than the element of C having maximum absolute value among all elements of C. This normalization allows the attenuation devices to directly represent the elements of the matrix. A non-normalized version of the matrix C can be recovered via scalar multiplication, if necessary.
The two output waveguides of a same pair 216 provide output optical signals which are coupled to two inputs of a balanced photodetector (BPD) having a first photodetector 212 and a second photodetector 213, each of which may be a photodiode, for example. It is also noted that the output waveguides are coupled to multiple processing element pairs, to accumulate output light from each of these multiple pairs. Thus, each output optical signal includes multiple controllable fractions of light, from multiple processing elements, and the intensity of an output optical signal is consequently a sum of intensities of these multiple controllable fractions of light. The output zi 214 of the BPD is indicative of the difference between the intensities of the two output optical signals received thereby. The BPD may be part of a readout device 211, which receives the output optical signals.
In operation, therefore, the optical crossbar array 200 receives, via its input waveguides, a set of m input optical signals having intensities proportional to elements xi of input vector x. The ith input optical signal, representing element xi and propagating on the ith input waveguide, is split so that portions are fed into each of 2n processing elements forming n processing element pairs. The jth processing element pair coupled to the ith input waveguide passes, onto the jth pair of output waveguides, controllable fractions of light having intensities proportional to xi f1(ij) and xi f2(ij), respectively. The jth pair of output waveguides, accumulating outputs from multiple processing element pairs, produces an output optical signal having intensities, respectively, of:
In an ideal device, in which cij=f1(ij)−f2(ij), the jth BPD then outputs a signal zi proportional to:
In this manner, the set of n BPDs output signals form a vector which is ideally equal to (or at least in known proportion to) the multiplication result xC. That is, the vector in this ideal case is equal to the desired result y, and no further processing is necessary. The proportions are known and can be compensated for, thus allowing the multiplication to be implemented, at least in the ideal situation.
In operation, therefore, the optical crossbar array 300 receives, via its input waveguides, a set of m input optical signals having intensities proportional to elements xi of input vector x. The ith input optical signal, representing element xi and propagating on the ith input waveguide, is split so that portions are fed into each of n processing elements. The jth processing element coupled to the ith input waveguide passes, onto the jth output waveguide, a controllable fraction of light having intensities proportional to the product xicij. The jth output waveguide, accumulating outputs from multiple processing element pairs, thus directly produces an output optical signal having intensities proportional to the Equation (2), and the photodetectors 216 also output signals representative of these quantities. In this manner, the set of n photodetector output signals form a vector which is ideally proportional to the multiplication result xC. The photodetectors are part of a readout device 311. That is, the vector z in this ideal case is equal to the desired result y, and no further processing is necessary. The proportions are known and can be compensated for, thus allowing the multiplication to be implemented, at least in the ideal situation.
It is noted that the optical crossbar array 300 can be operated similarly to the optical crossbar array 200 by operating processing elements in pairs, and by subtracting (e.g. using digital processing, analog processing, or both in the readout device) outputs from associated pairs of photodetectors.
In
In various embodiments, the controllable fraction of a portion of an input optical signal, as passed to the output waveguide, refers to a fraction which is less than or equal to one, relative to the maximum amount of input optical signal that might be passed to the output optical waveguide, given the configurations and limitations of the input coupler, output coupler, and under the assumption (for the sake of the present calculation) that a+b=1. Thus, for example, assume that an attenuation device is linear such that, when provided with a control input indicating a value cij for a matrix element (between zero and one), the attenuation device passes a controllable fraction proportional to acij+b of the input signal xi onto the output waveguide. (Because input signal xi is shared between several processing elements, there will be a further fixed fractioning, which is not considered here, but which is addressed by the “proportional to” language.) Thus, the contribution to the associated output optical signal is proportional to xi(acij+b). Alternative formulations are also possible.
In a crystalline state of the PCM device, most of the light provided thereto is absorbed. In an amorphous state of the PCM device, most of the light provided thereto is passed. By configuring the PCM device to be in the crystalline or amorphous state, or in an intermediate (partially crystalline/amorphous) state, the PCM device can be operated as a controllable attenuator with multiple (at least two) states. The state of the PCM device may be persistent, so that it need not be actively maintained e.g. via electrical current.
Next, consider the impact of this non-ideality on the optical crossbar array 200 of
Noting cancellation of the terms involving b when subtracting the two quantities in Equation (1a), the jth BPD then outputs a signal zi proportional to:
In this manner, the set of n BPDs output signals form a vector which is ideally proportional to the multiplication result axC. The value of a can be determined via calibration operations, for example performing, using the optical crossbar array 200, test multiplications using vectors and matrices having known results, and comparing the known results to the output of the optical crossbar array 200 in order to discover scaling errors, which indicate the value a. The vector y, i.e. the actual (compensated) result of a multiplication, can then be recovered from the obtained vector by dividing the vector , as obtained from the BPDs, by this determined value a. Other known proportionality constants can also be compensated for, e.g. by similar calibration operations.
As noted above, it may be assumed that the values of a and b are assumed to be substantially the same for all PCM (or other attenuation) devices. In practice, different instances of PCM (or other attenuation) devices may have different characteristics, and thus potentially different a and b values. However, in such cases, embodiments of the present disclosure can incorporate further measures to cause the PCM or other attenuation devices to function as is they have the same characteristics, and thus the same or similar a and b values.
For example, each PCM device of an optical crossbar array can be calibrated so that it passes a same proportion of optical signal in response to a same control input. The control input can be set so that the appropriate crystallization ratio of the PCM device, resulting in this proportion of optical signal, is set in the PCM device. The calibration can be performed for each PCM device in view of the wavelengths of light which the PCM device operates on, noting that different wavelengths of light are effected differently even by a same PCM device. The a and b values can then be the common, effective a and b values for a collection of PCM devices (of the same optical crossbar array) after such a calibration. As part of the calibration, the effective a and b values may be set to reflect a range of optical attenuation which is achievable by each PCM device, given the wavelengths of optical input signal presented thereto. Thus, due for example to such calibration, it is considered feasible that all PCM devices can be characterized by the same a and b values, i.e. by the same (linear) transmission curve 662 of
Furthermore, the effective a and b values can be one can consider the smallest transmission range amongst the wavelengths used in the optical crossbar array, and accordingly force the mapping from input control values to amounts of optical transmission to be the same for all the wavelengths.
Next, consider the impact of the non-ideality on the optical crossbar array 300 of
The jth photodetector (PD) then outputs a signal zi proportional to the value of Equation (1b), which can alternatively be represented as:
In this case, in order to recover the required result (as expressed in Equation (2)), one needs not only to determine the value of a, but also the value of the right-hand term in Equation (2b), which is dependent on the input vector x. Embodiments of the present disclosure address this need by use of a compensation device. The compensation device optically determines the right-hand term, or a related quantity. The compensation device can perform this by receiving portions of the input optical signals, for example via the input waveguides of the optical crossbar array 300). Such portions can be further to the portions used in the crossbar array multiplication operations. The compensation device then generates a compensation output optical signal having an intensity proportional to a sum of intensities of these portions of the optical signal, and thus proportional to the right-hand term in Equation (2b). This compensation output optical signal can then be used, by the optical crossbar array's readout device, to generate a compensated result of the multiplication, that is to provide the desired output y using the actual provided output .
It is noted that the imperfections (e.g. of the attenuation devices) being compensated for are also present in the compensation device itself. However, embodiments of the present disclosure nonetheless can perform the appropriate compensation. For example, by setting all of the attenuation devices (PCM devices) within the compensation device to pass a minimal amount (nominally zero) of light, the attenuation devices, due to their imperfection, actually pass a proportion b of light, thus the output of each attenuation device is bxi. Summing these outputs gives the right-hand term of Equation (2b) directly (see e.g. Equation (3) below and the associated discussion). This is the required term to be subtracted from the crossbar array output in order to appropriately perform the compensation.
The attenuation devices 205 of the further processing elements 620 may be controllable or non-controllable. Non-controllable attenuation devices may be set to attenuation optical signals provided thereto by a predetermined fixed amount. The attenuation devices of the processing elements and the further processing elements may be PCM devices.
In various embodiments, the number of processing elements 620 is at least equal to the number of input waveguides of the optical crossbar array 300. Each of the processing elements 620 is operatively coupled to a different one of these input waveguides, to receive a different respective further portion of an input optical signal therefrom. The processing elements 220 of the crossbar array and the processing elements 620 may be co-configured so that appropriate portions of input optical signal are obtained thereby. For example, to accommodate the requirements of the additional processing elements 620, each processing elements 220 may be configured to couple a lesser portion of input optical signal from its input waveguide, compared to the case where the compensation device 650 is absent. The further processing elements
The compensation device 650 further includes a further output waveguide 670, which is operatively coupled to the processing elements 620 in order to receive output therefrom, similarly to the output waveguides 215. The output waveguide 670 accumulates these outputs to generate a compensation output optical signal propagating within the further output waveguide 670. Although the optical crossbar array 300 is illustrated as being between the inputs to the input waveguides and the processing elements 620 of the compensation device, this is only one possibility. In other embodiments, the processing elements 620 can be between the inputs to the input waveguides and the optical crossbar array 300, or the processing elements 620 can be placed within the optical crossbar array 300 so that they are between some processing elements 220 of the crossbar array and other processing elements 220 of the crossbar array. The readout device 311 of the array 300 can be extended here to provide a readout device 611. The readout device 611 includes a further photodetector 632 which receives the compensation output optical signal from the further output waveguide 670 and produces an electrical representation of the compensation output optical signal. Then, the readout device 611 is configured to provide a compensated result of a multiplication of the input vector and the input matrix based on the compensation output optical signal (using its electrical representation) and the set of output optical signals as provided by the photodetectors 216. The compensated result can be produced using subtraction (e.g. subtracting a scalar from each element of a vector), in order to produce a result of the multiplication in which the non-ideal effects as characterized by parameters a and b and expressed in Equation (2b) are mitigated or removed.
The compensation (e.g. involving subtracting a scalar value from each element of a vector) can be performed in the electrical domain, for example by signal processing or by using balanced photodetectors, or other configuration of the photodetectors (e.g. adjusting response characteristics thereof). Alternatively, the compensation can be performed in the optical domain, in which case the photodetectors may be moved to an output of photonic devices performing such compensation operations, or the photodetectors may participate in such compensation operations. If present, photonic devices implementing compensation operations (e.g. subtraction) may directly receive outputs of the output waveguides and the further output waveguide.
In some embodiments, if required, the readout device 611 may include at least one multiplier 634, which may be an analog or digital multiplier. The multiplier 634 may be controllable. The multiplier may multiply output of the photodetectors 216, output of the further photodetector 632, or both. The multiplication can be performed before or after a subtraction operation is performed involving output of the photodetectors 216 and output of the further photodetector 632, as necessary, in order to produce the compensated result.
An example operation for producing a compensated result of a MVM, with respect to
The photodetector 632 outputs an electrical signal proportional to the compensation output optical signal, and this electrical signal can be referred to as a compensation value. The output of the photodetector 632 may then be subtracted from the output of each photodetector 216 using the readout device. This subtraction can be performed in the analog or digital domain. For example, the photodetector 632 may operate substantially as half of a BPD with respect to each of the photodetectors 216, or the outputs can be digitized and subtracted using digital signal processing, or the like. As can be seen by subtracting Equation (3) from Equation (2b), the result of this operation is a vector which is proportional to the desired result vector y. Dividing the result of the subtraction by the scalar value a recovers the result vector y, which can also be referred to as a compensated result. The division may be implemented using the multiplier 634, for example.
In various embodiments, the readout device of 211 of
In some embodiments, the compensation value (e.g. in optical, digital electronic or analog electronic form) can be stored and re-used in multiple computations. The multiple computations can involve two or more different outputs (e.g. at different times) of a same optical crossbar array, or different outputs (e.g. at the same time) of two or more different optical crossbar arrays. In some embodiments, an analog memory can be used to store the compensation value, and the compensation value can be retrieved from the analog memory for reuse. Such reuse may be useful when a same vector (or matrix column) is used as a multiplier with different matrix multiplicands. This may occur for example when a large matrix is decomposed into blocks, each block to be multiplied by a same vector as parts of a larger MVM. Storing and reusing the compensation value may provide for a more efficient compensation operation, a more consistent compensation operation, or both.
It is noted that, throughout this disclosure, some scalar parameters (e.g. a and b) are dealt with explicitly, while others are dealt with implicitly. For example, as discussed above, each processing element obtains and operates on only a portion of an input optical signal. Also as discussed above, optical representations (e.g. attenuation or absorption values) of matrix elements may be normalized. Optical representations of vector elements (e.g. input optical signal intensities) may also be normalized so that they are relative to a predetermined maximum value. The electrical output of a photodetector is also in proportion to its input optical signal via some relationship. For simplicity, it is assumed that these scalar parameters and constants of proportionality are known, for example through design, calibration, observation, or a combination thereof, and that they are accounted for in computations. In some embodiments, such scalar parameters may be compensated for via embodiments of the present disclosure, in addition to or alternatively to compensation of the parameters a and b of the attenuation devices.
Embodiments of the present disclosure provide for a method and apparatus for representing negative elements in an input vector acting as a multiplier in an optical crossbar array, such as the optical crossbar arrays 200 and 300 of
The right-hand side 922 of
As can be seen with respect to
In more detail with respect to
Therefore, according to embodiments, there is provided a method and apparatus involving an optical crossbar array for multiplication, which is capable of representing both positive and negative valued entries of a matrix multiplicand. A vector multiplier having both positive and negative entries is used to generate to a revised vector multiplier having only positive entries, where the entries of the revised vector multiplier are equal to the absolute values of the corresponding entries of the vector multiplier. The revised vector multiplier is then represented using intensities of input optical signals provided to the optical crossbar array. A matrix multiplicand is used to generate a revised matrix multiplicand using a rule as described above, namely to implement that: if the ith element of the original vector multiplier is negative, then the ijth element of the revised matrix multiplicand is set equal to the ijth element of the original matrix multiplicand, multiplied by negative one. Otherwise, the ijth element of the revised matrix multiplicand is set equal to the ijth element of the original matrix multiplicand. The optical crossbar array then operates to multiply the revised vector multiplier with the revised matrix multiplicand, as described elsewhere herein for example with respect to
For the optical crossbar array of
According to such embodiments, a multiplier vector x, which is signed, can be represented as a difference between two unsigned multiplier vectors. A first one of the unsigned multiplier vectors (also referred to as a first partial vector) can have its ith entry set to max{xi, 0}, where xi is the ith entry of the original multiplier vector x. A second one of the unsigned multiplier vectors (also referred to as a second partial vector) can have its ith entry set to min{−xi, 0}. (Other implementations can be used, for example with zero being replaced by another value.) Then, the difference between the unsigned multiplier vectors is equal to the original multiplier vector x. Furthermore, the difference between: the product of the first unsigned multiplier and the multiplicand; and the second unsigned multiplier and the same multiplicand, is equal to the product of the original multiplier and the multiplicand. Thus, two multiplications are performed, either by using the same optical crossbar array twice (e.g. at two separate times or at the same time but using wavelength division multiplication techniques) or by using two different optical crossbar arrays. The first multiplication is between the first unsigned multiplier vector and the matrix multiplicand, while the second multiplication is between the second unsigned multiplier vector and the same matrix multiplicand. The results of the first multiplication and the second multiplication are then subtracted to obtain the final result. The subtraction can be performed in the optical domain, or in the electrical domain either as a digital or analog subtraction. An analog subtraction may be implemented for example by using BPDs.
An input splitting device, such as an electronic controller, can be used to decompose the multiplier vector into the first and second unsigned multiplier vectors. The input splitting device can then provide the two unsigned multiplier vectors as inputs to two optical crossbar arrays, or to the same optical crossbar array at different times or for representation via optical signals of different wavelengths at the same time. A readout device can be configured to receive the results of the first and second multiplications and perform the required subtraction to produce a final result.
An advantage of the above-described configuration is that multipliers with both negative and positive elements can be represented using the architecture of
As shown, the device includes a processor 1910, such as a Central Processing Unit (CPU) or specialized processors such as a Graphics Processing Unit (GPU) or other such processor unit, memory 1920, non-transitory mass storage 1930, I/O interface 1940, network interface 1950, and a transceiver 1960, all of which are communicatively coupled via bi-directional bus 1970. According to certain embodiments, any or all of the depicted elements may be utilized, or only a subset of the elements. Further, the device 1900 may contain multiple instances of certain elements, such as multiple processors, memories, or transceivers. Also, elements of the hardware device may be directly coupled to other elements without the bi-directional bus.
The memory 1920 may include any type of non-transitory memory such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), read-only memory (ROM), any combination of such, or the like. The mass storage element 1930 may include any type of non-transitory storage device, such as a solid state drive, hard disk drive, a magnetic disk drive, an optical disk drive, USB drive, or any computer program product configured to store data and machine executable program code. According to certain embodiments, the memory 1920 or mass storage 1930 may have recorded thereon statements and instructions executable by the processor 1910 for performing any of the aforementioned method steps described above.
It will be appreciated that, although specific embodiments of the technology have been described herein for purposes of illustration, various modifications may be made without departing from the scope of the technology. The specification and drawings are, accordingly, to be regarded simply as an illustration of the disclosure as defined by the appended claims, and are contemplated to cover any and all modifications, variations, combinations or equivalents that fall within the scope of the present disclosure. In particular, it is within the scope of the technology to provide a computer program product or program element, or a program storage or memory device such as a magnetic or optical wire, tape or disc, or the like, for storing signals readable by a machine, for controlling the operation of a computer according to the method of the technology and/or to structure some or all of its components in accordance with the system of the technology.
Acts associated with the method described herein can be implemented as coded instructions in a computer program product. In other words, the computer program product is a computer-readable medium upon which software code is recorded to execute the method when the computer program product is loaded into memory and executed on the microprocessor of the wireless communication device.
Acts associated with the method described herein can be implemented as coded instructions in plural computer program products. For example, a first portion of the method may be performed using one computing device, and a second portion of the method may be performed using another computing device, server, or the like. In this case, each computer program product is a computer-readable medium upon which software code is recorded to execute appropriate portions of the method when a computer program product is loaded into memory and executed on the microprocessor of a computing device.
Further, each step of the method may be executed on any computing device, such as a personal computer, server, PDA, or the like and pursuant to one or more, or a part of one or more, program elements, modules or objects generated from any programming language, such as C++, Java, or the like. In addition, each step, or a file or object or the like implementing each said step, may be executed by special purpose hardware or a circuit module designed for that purpose.
Although the present invention has been described with reference to specific features and embodiments thereof, it is evident that various modifications and combinations can be made thereto without departing from the invention. The specification and drawings are, accordingly, to be regarded simply as an illustration of the invention as defined by the appended claims, and are contemplated to cover any and all modifications, variations, combinations or equivalents that fall within the scope of the present invention.