Optical computing device, system and convolution computation method
Patent Information
- Application Number
- CN202110502270.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-02-01
- Filing Date
- 2021-05-08
- Publication Date
- 2026-09-29
- Estimated Expiration
- 2041-05-08
AI Technical Summary
然而,现有技术中基于级联马赫-曾德干涉仪(Mach-ZehnderInterferometer,MZI)的光芯片实现的片上光学卷积是通过将卷积分解为多次矩阵乘法来实现的,计算效率较低
Smart Images

Figure CN114841334B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of optical computing technology, and in particular to an optical computing device, system and convolution computing method. Background Technology
[0002] Artificial Neural Networks (ANNs) are computational models that simulate the human brain's information processing. Convolutional Neural Networks (CNNs), a new type of ANN proposed in the 1990s, have been widely used in image processing, video processing, and natural language processing. The core operation in CNNs is convolution. Traditional methods of calculating convolution require breaking down the convolution operation into multiple vector or matrix multiplications, which consumes a lot of computational resources.
[0003] Optical computing leverages the physical properties of light to achieve large-scale parallel signal processing and transmission, offering advantages such as high processing speed and low power consumption. However, in existing technologies, on-chip optical convolution implemented using optical chips based on cascaded Mach-Zehnder interferometers (MZIs) is achieved by decomposing the convolution into multiple matrix multiplications, resulting in low computational efficiency. Summary of the Invention
[0004] This application provides an optical computing device, system, and convolutional computing method that can improve the computational efficiency of convolutional neural networks.
[0005] In a first aspect, embodiments of the present invention provide an optical computing device applicable to convolution calculations in the field of artificial neural networks. The optical computing device includes a light source array, a modulator array, and a wavelength router. The light source array transmits multiple sets of optical signals based on first data to be calculated, wherein each set of optical signals includes multiple optical signals obtained based on all elements of the first data, the first data including multiple elements. The modulator array receives the multiple sets of optical signals and outputs multiple intermediate optical signals based on modulated second data. The wavelength router receives the multiple intermediate optical signals output by the modulator array and outputs the multiple intermediate optical signals from multiple output ports based on the wavelengths and input ports of the multiple intermediate optical signals, wherein the multiple optical signals output from the multiple output ports indicate the calculation results of the first data and the second data. In practical applications, the first data may include a vector or a matrix, and the second data may also include a vector or a matrix.
[0006] The optical computing device provided in this embodiment of the invention is an on-chip integrated optical convolution system based on a wavelength router. This computing device can perform convolution operations in one step, without having to break down the convolution calculation into multiple matrix multiplication operations, thereby improving the computational efficiency of convolution calculation and enhancing the performance of neural networks. Furthermore, the core component of the optical computing device provided in this embodiment of the invention is a wavelength router, which can be pre-designed according to the convolution operation rules. During the execution of the convolution operation, no external control is required, and no power consumption is generated. Therefore, the optical computing device provided in this embodiment of the invention can save computational power consumption. Moreover, since the components in the optical computing device provided in this embodiment of the invention can be on-chip devices, the optical computing device can exist in the form of a chip, exhibiting a high degree of integration.
[0007] In one possible implementation, a first output port of the plurality of output ports is used to output at least two intermediate optical signals, each of the at least two intermediate optical signals being used to indicate the product of an element in the first data and an element in the second data. In practical applications, during the implementation of vector convolution, the wavelength router can use the element 'a' used to indicate the first data. i element b in the second data j Multiple intermediate optical signals with the same sequence number difference (ij) are routed to the same output port for the product of elements with the same sequence number difference (ij), where i is used to indicate element a. i In the first data, the index j is used to indicate element b. j The sequence number in the second data. For example, a wavelength router can route the intermediate optical signal used to indicate the product a1b2 and the intermediate optical signal used to indicate the product a2b3 to the same output port.
[0008] In another possible implementation, each element of the first data corresponds to a wavelength of optical signal, and multiple optical signals belonging to the same group have different wavelengths.
[0009] In another possible implementation, the wavelength router includes an arrayed waveguide grating router (AWGR) or an etched diffraction grating router (EDGR). Both AWGR and EDGR are planar waveguide devices that achieve routing functionality based on multi-beam interference. Furthermore, AWGR and EDGR can be pre-designed according to convolution operation rules, requiring no additional control during operation. Therefore, using AWGR and EDGR is more conducive to chip-based implementation and can save power consumption.
[0010] In another possible implementation, the optical computing device further includes a detector array comprising multiple detectors for detecting the light intensity of optical signals at multiple output ports of the wavelength router to obtain the calculation results of the first data and the second data. Specifically, the calculation results of the first data and the second data include the result of performing a convolution on the first data and the second data.
[0011] In another possible implementation, the modulator array includes multiple modulators, each modulator being used to receive one set of optical signals from the multiple sets of optical signals and output multiple intermediate optical signals based on the modulated data.
[0012] In another possible implementation, the light source array includes a light-emitting array and a beam splitter. The light-emitting array is used to emit multiple light signals of different wavelengths according to multiple elements in the first data, wherein each light signal is used to indicate one element in the first data. The beam splitter is used to receive the multiple light signals of different wavelengths emitted by the light-emitting array and split the multiple light signals of different wavelengths into multiple sets of light signals.
[0013] In another possible implementation, the light-emitting array includes multiple lasers capable of transmitting multiple optical signals of different wavelengths based on multiple elements in the first data. Furthermore, the intensity of each optical signal also differs, determined by the value of the corresponding element. Directly employing lasers capable of modulating light intensity to implement the light-emitting array results in a relatively simple structure.
[0014] In another possible implementation, the light-emitting array includes multiple lasers and multiple modulators. The multiple lasers are used to transmit multiple optical signals of different wavelengths. The modulators are used to receive the multiple optical signals of different wavelengths and modulate the multiple elements of the first data onto the multiple optical signals of different wavelengths, respectively. In this case, the multiple lasers do not have intensity modulation capabilities; therefore, the modulators are needed to modulate the multiple elements of the first data onto the multiple optical signals of different wavelengths transmitted by the lasers. It is understood that the intensity of the light signal modulated by the modulator is determined by the value of the modulated element.
[0015] In another possible implementation, the light-emitting array includes an optical frequency comb, a wavelength demultiplexer, and multiple modulators. The optical frequency comb transmits an optical signal comprising multiple different wavelengths. The wavelength demultiplexer receives the optical signal emitted by the optical frequency comb and decomposes it into multiple optical signals of different wavelengths. The multiple modulators receive the multiple optical signals of different wavelengths emitted by the wavelength demultiplexer and modulate multiple elements of the first data onto the multiple optical signals of different wavelengths, respectively. In this implementation, the optical frequency comb, the wavelength demultiplexer, and the multiple modulators can all be connected by waveguides.
[0016] In another possible implementation, the beam splitter includes a wavelength division multiplexer and a beam splitter. The wavelength division multiplexer receives multiple optical signals of different wavelengths emitted by the light-emitting array and combines the multiple optical signals of different wavelengths into a first set of optical signals. The beam splitter decomposes the first set of optical signals into multiple sets of optical signals, wherein each set of optical signals includes the first set of optical signals.
[0017] In another possible implementation, the beam splitter includes a planar waveguide for spatially splitting multiple optical signals of different wavelengths emitted by the light-emitting array into multiple sets of optical signals.
[0018] In another possible implementation, the beam splitter includes a beam splitter element and a planar waveguide. The beam splitter element is used to split multiple optical signals of different wavelengths emitted by the light-emitting array into n groups of optical signals, where n is the number of elements in the second data and n is an integer greater than 1. The planar waveguide is used to transmit the multiple optical signals of different wavelengths split by the beam splitter to a modulator array, wherein the modulator array includes the n modulators, each modulator being used to receive one group of optical signals from the n groups of optical signals, and each group of optical signals includes the multiple optical signals of different wavelengths emitted by the light-emitting array.
[0019] In another possible implementation, the optical computing device includes a chip. Since the devices in the optical computing device provided in this embodiment of the invention can be on-chip devices, the optical computing device can exist in the form of a chip, exhibiting a high degree of integration.
[0020] Secondly, embodiments of the present invention provide an optical computing system, the optical computing system including a processor and an optical computing device as described in the first aspect or any implementation thereof, connected to the processor. The processor is configured to send at least one of the first data and the second data to the optical computing device.
[0021] Thirdly, embodiments of the present invention provide a convolution calculation method, which is executed by the optical computing device described in the first aspect or any implementation thereof. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention.
[0023] Figure 1 This is a schematic diagram of the structure of an optical computing device provided in an embodiment of the present invention;
[0024] Figure 2A This is a schematic diagram of a light source array provided in an embodiment of the present invention;
[0025] Figure 2B , Figure 2C and Figure 2D A schematic diagram illustrating three methods of implementing the light-emitting array provided in the embodiments of the present invention;
[0026] Figure 3 This is a schematic diagram of the structure of another beam splitter provided in an embodiment of the present invention;
[0027] Figure 4A and Figure 4B This is a schematic diagram of the structure of another beam splitter provided in an embodiment of the present invention;
[0028] Figure 5A and 5B This is a schematic diagram of the structure of a wavelength router provided in an embodiment of the present invention;
[0029] Figure 6 A flowchart of a convolution calculation method provided in an embodiment of the present invention;
[0030] Figure 7 A computational example diagram of an optical computing device provided in an embodiment of the present invention;
[0031] Figure 8 A routing diagram of a wavelength router provided in an embodiment of the present invention;
[0032] Figure 9 This is an example diagram illustrating another type of convolution calculation provided in an embodiment of the present invention;
[0033] Figure 10 This is a schematic diagram of routing rules for a wavelength router provided in an embodiment of the present invention;
[0034] Figure 11 A schematic diagram of yet another optical computing device provided in an embodiment of the present invention;
[0035] Figure 12 This is a schematic diagram of the structure of a convolution calculation system provided in an embodiment of the present invention. Detailed Implementation
[0036] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments.
[0037] Convolution is the core operation in the field of artificial neural networks. Convolution is the sum of the products of two variables within a certain range. Specifically, convolution starts with a convolution kernel (also called a weight matrix) and gradually "scans" the input data. While the kernel "slides," the product of the weight matrix and the scanned data matrix is calculated, and the results are summed to obtain the convolution result (also called the output data). The convolution operation on data A and data B can be represented as: When both data A and data B are vectors containing multiple elements, the convolution operation between data A and data B is a vector convolution operation. When both data A and data B are matrices containing multiple elements, the convolution operation between data A and data B is a matrix convolution operation. Here, data A can be considered the convolution kernel, and data B can be considered the input data, and vice versa. Those skilled in the art will know that the convolution kernel typically slides according to a "sliding stride," which is usually 1, but can be set to other values as needed. In the field of Artificial Intelligence (AI), convolution can be described as: h(step) = ∑ n f(n)g(n-step) is a descriptive expression where the convolution of vector f (or matrix) and vector g (or matrix) yields vector h (or matrix), where n is the index used for integration and step is the sliding step size in the convolution calculation.
[0038] Photonic integrated circuits (PICs) typically integrate light-emitting elements, lenses, optical transmission, optical modulation, optical coupling, and optical receiving devices onto a single chip using optical waveguides. Integrated optics enables the miniaturization and integration of optical systems. Compared to systems composed of discrete optical components, integrated photonic chips offer significant improvements in size, power consumption, and reliability, while also greatly reducing system costs.
[0039] However, traditional convolution calculation methods typically decompose the convolution operation into the multiplication of multiple subvectors or submatrices, which consumes a lot of computing power. Optical computing, with its advantages of high speed and low power consumption, has also been used to implement convolution calculations. However, existing schemes for implementing convolution using optical computing usually only implement matrix multiplication operations, requiring multiple iterations to achieve convolution, resulting in relatively low efficiency.
[0040] Figure 1 This is an architectural diagram of an optical computing device provided in an embodiment of the present invention. This computing device is an on-chip integrated optical computing device based on a wavelength router. Figure 1 As shown, the computing device 100 may include a light source array 102, a modulator array 104, a wavelength router 106, and a detector array 108.
[0041] The light source array 102 can be used to send multiple sets of optical signals based on first data to be calculated. The first data may include multiple elements, and each set of optical signals includes multiple optical signals obtained from all elements in the first data. The wavelengths of the multiple optical signals belonging to the same set are different. For clarity, in this embodiment, sending multiple optical signals to a modulator is referred to as a set of optical signals. Specifically, the light source array 102 can send multiple optical signals based on each element of the first data, and the wavelengths of the optical signals for different elements are different. Assuming the first data includes m elements, the light source array 102 can send m different wavelength optical signals based on the m elements, and then divide the m different wavelength optical signals into multiple sets of optical signals according to the number of elements in the second data. For example, assuming the first data includes elements a1 and a2, the light source array 102 can send multiple optical signals with wavelength λ1 based on a1, and multiple optical signals with wavelength λ2 based on a2. The light source array 102 can load data using intensity modulation. For example, different light intensities can be used to represent elements with different values in the first data. After obtaining multiple optical signals based on elements a1 and a2 respectively, these signals can be split into multiple groups of optical signals. Each group includes an optical signal with wavelength λ1 and an optical signal with wavelength λ2 emitted from elements a1 and a2. Assuming the second data contains four elements, the multiple optical signals obtained from elements a1 and a2 need to be split into four groups of optical signals, each group including an optical signal with wavelength λ1 and an optical signal with wavelength λ2.
[0042] The modulator array 104 modulates the intensity of the incident light, equivalent to performing a multiplication operation on the input optical signal. The modulator array 104 receives the multiple sets of optical signals and outputs multiple intermediate optical signals based on the modulated second data. The modulator array 104 may include multiple modulators, each modulator receiving one set of optical signals from the multiple sets of optical signals transmitted by the light source array 102, and modulating the received multiple optical signals based on elements of the second data loaded on the modulator, respectively, to obtain multiple intermediate optical signals. In this way, each modulator can obtain multiple optical signals of different wavelengths transmitted by the light source array 102, and can modulate the received multiple optical signals of different wavelengths based on elements loaded on the modulator, respectively, to obtain multiple intermediate optical signals. The multiple intermediate optical signals obtained by one modulator are used to indicate the product of one element of the second data loaded on the modulator and all elements of the first data. The multiple intermediate optical signals obtained by the modulator array 104 are used to indicate the product of each element in the first data and each element in the second data. Specifically, each intermediate optical signal indicates the product of one element of the first data and one element of the second data.
[0043] The modulator array 104 can load second data through intensity modulation to perform multiplication operations on the input optical signal. For example, if the first data to be calculated includes m (where m≥2) elements, and the second data to be calculated includes n (where n≥2) elements, then each modulator in the modulator array 104 can load one element from the n elements, and the n modulators in the modulator array 104 can respectively load the n elements of the second data. Each modulator is used to receive a set of optical signals transmitted by the light source array 102, the set of optical signals including m different wavelength optical signals used to indicate each element in the first data, and outputs multiple intermediate optical signals based on the modulated data, thereby obtaining n*m intermediate optical signals. The n*m intermediate optical signals are used to indicate the product of each element in the first data and each element in the second data. Each of the n*m intermediate optical signals indicates the product of one element in the first data and one element in the second data.
[0044] In practical applications, modulators typically employ thermal modulation, electrical modulation, or modulation using phase change materials. Electrical modulation can be achieved through structures such as doped silicon waveguides, electro-absorption modulators, and semiconductor optical amplifiers (SOAs). When the data loaded onto the modulator array does not need to change rapidly, phase change materials (PCMs) can also be used.
[0045] Wavelength router 106 is used to receive the plurality of intermediate optical signals output by the modulator array, and output the plurality of intermediate optical signals from a plurality of output ports based on the wavelengths and input ports of the plurality of intermediate optical signals. The plurality of optical signals output from the output ports are used to indicate the calculation results of the first data and the second data. In practical applications, each modulator of modulator array 104 can correspond to one input port of wavelength router 106. Specifically, each modulator of modulator array 104 can be connected to a corresponding input port of wavelength router 106 via a waveguide. The number of modulators in modulator array 104 can be equal to the number of input ports of wavelength router 106.
[0046] Wavelength router 106 is a device for routing optical signals. Wavelength router 106 can achieve routing functionality based on multi-beam interference. Wavelength router 106 includes multiple input ports and multiple output ports. For any input port and any output port, there is always an optical signal of a certain wavelength that establishes a connection between that input port and that output port. In this way, wavelength router 106 can determine the output port of the intermediate optical signal based on the wavelength of the received intermediate optical signal and the input port of the intermediate optical signal. To achieve convolution of first data and second data, in this embodiment of the invention, the intermediate optical signals that need to be summed can be routed to the same output port, wherein, as previously described, an intermediate optical signal is used to indicate the product of an element of the first data and an element of the second data.
[0047] It is understood that at least one of the plurality of output ports of the wavelength router 106 (e.g., the first output port) can output at least two intermediate optical signals, each of the at least two intermediate optical signals being used to indicate the product of an element in the first data and an element in the second data. In practical applications, the wavelength router can use element a, which indicates the first data, to... i element b in the second data j Multiple intermediate optical signals with the same sequence number difference (ij) are routed to the same output port for the product of elements with the same sequence number difference (ij), where i is used to indicate element a. i In the first data, the index j is used to indicate element b. j The sequence number in the second data. For example, a wavelength router can route the intermediate optical signal used to indicate the product a1b2 and the intermediate optical signal used to indicate the product a2b3 to the same output port.
[0048] The detector array 108 is used to detect the light intensity of the optical signals at each output port of the wavelength router 106, and obtain the convolution calculation result of the first data and the second data. In this embodiment of the invention, the detector array 108 may include multiple detectors, wherein one detector is used to detect the light intensity of the output signal at one output port of the wavelength router 106. The light intensity of the output signals at multiple output ports of the wavelength router 106 detected by the detector array 108 is used to indicate the convolution result of the first data and the second data. It is understood that in practical applications, some output ports may output an intermediate optical signal, while the optical signals output by some output ports may include the converged result of multiple intermediate optical signals. When the optical signal output by a certain output port includes the converged result of multiple intermediate optical signals, the optical signal output by that output port is used to represent the sum of the products of the elements of the first data and the elements of the second data. In specific embodiments, the detector array 108 can be implemented by a semiconductor photodiode array, a photoconductive detector array (such as a photoresistor array), etc.
[0049] The optical computing device provided in this embodiment of the invention is an on-chip integrated optical convolution system based on a wavelength router. This computing device can perform convolution operations in one step, without having to break down the convolution calculation into multiple matrix multiplication operations, thereby improving the computational efficiency of convolution calculation and enhancing the performance of neural networks. Furthermore, the core component of the optical computing device provided in this embodiment of the invention is a wavelength router, which can be pre-designed according to the convolution operation rules. During the execution of the convolution operation, no external control is required, and no power consumption is generated. Therefore, the optical computing device provided in this embodiment of the invention can save computational power consumption. Moreover, since the components in the optical computing device provided in this embodiment of the invention can be on-chip devices, the optical computing device can exist in the form of a chip, exhibiting a high degree of integration.
[0050] To describe the present invention more clearly, the implementation methods of various devices of the optical computing device provided in the embodiments of the present invention will be described in detail below. Figure 2A This is a schematic diagram of a light source array provided in an embodiment of the present invention. Figure 2AAs shown, the light source array 102 may include a light-emitting array 1021 and a beam splitter 1022. The light-emitting array 1021 is used to emit multiple optical signals of different wavelengths according to multiple elements in the first data, wherein each optical signal is used to indicate one element in the first data. The light-emitting array 1021 may be an array composed of multiple light-emitting units, wherein the light-emitting units may include light-emitting devices such as laser diodes (LDs) and light-emitting diodes. The light-emitting array 1021 can also obtain multiple optical signals of different wavelengths by demultiplexing the optical signal transmitted from an optical frequency comb source. In practical applications, the data loading method of the light source array 102 can be direct modulation or external modulation. The beam splitter 1022 is used to receive the multiple optical signals of different wavelengths emitted by the light-emitting array 1021 and split the multiple optical signals of different wavelengths into multiple groups of optical signals, wherein the wavelengths of the optical signals in the same group are different.
[0051] Figure 2B , Figure 2C and Figure 2D These are schematic diagrams illustrating three different implementations of the light-emitting array 1021 provided in this embodiment of the invention. As mentioned earlier, the light source in the light-emitting array 1021 may include a laser (LD). Figure 2B and Figure 2C As shown, the light-emitting array 1021 may include multiple lasers (LDs). For example, it may include m lasers, where m is an integer greater than or equal to 2. In this embodiment of the invention, the wavelength of the light emitted by each laser in the light-emitting array 1021 is different, and the light emission intensity can also be modulated. For example, as... Figure 2B and Figure 2C As shown, the wavelength of the light signal emitted by laser LD1 is λ1, and the wavelength of the light signal emitted by laser LD2 is λ2.
[0052] As mentioned earlier, the light-emitting array 1021 can use direct modulation or external modulation to load data into the optical signal. Direct modulation refers to directly controlling the light intensity emitted by the LD according to the data to be loaded, thus loading the data onto the optical signal. Different light intensities are used to indicate different data. Figure 2B As shown, lasers LD1 and LD2 emit optical signals with different intensities to indicate different elements in the first data. External modulation refers to a process where the intensity or power of the optical signal emitted by the LD is fixed, and then the intensity is changed by an external modulator to load data onto the optical signal. For example, as... Figure 2CAs shown, the light-emitting array 1021 includes multiple lasers (LDs) and multiple modulators (MDs), with each laser (LD) corresponding to one modulator (MD). After laser LD1 emits a first optical signal with wavelength λ1, modulator MD1 can adjust the intensity of the first optical signal emitted by LD1 according to the first element to be loaded, so as to load the first element onto the first optical signal. Similarly, after laser LD2 emits a second optical signal with wavelength λ2, modulator MD2 can modulate the intensity of the second optical signal emitted by LD2 according to the second element to be loaded, so as to load the second element onto the second optical signal. It is understood that in practical applications, the number of modulators in the light-emitting array 1021 can be the same as the number of lasers, or multiple lasers can share the same modulator. However, when multiple lasers share the same modulator, the modulation efficiency may be affected.
[0053] As mentioned earlier, the light-emitting array 1021 can also generate multiple wavelengths using an optical frequency comb source and a wavelength demultiplexer, specifically as follows: Figure 2D As shown. In this embodiment of the invention, the optical frequency comb source is a light source device capable of generating multiple equally spaced frequencies of light. Specifically, the optical frequency comb source is used to generate an optical frequency comb. An optical frequency comb, also known as an optical frequency distribution, refers to a spectrum composed of a series of uniformly spaced frequency components with a coherent and stable phase relationship. A wave demultiplexer can separate these different wavelengths of light. For example... Figure 2DAs shown, the light-emitting array 1021 may include an optical frequency comb source 202, a wavelength demultiplexer 204, and multiple modulators (MDs). The optical frequency comb source 202 can emit optical signals including different wavelengths, such as optical signals including wavelengths λ1 and λ2. After receiving the optical signal emitted by the optical frequency comb source 202, the wavelength demultiplexer 204 can decompose the received optical signal into multiple optical signals of different wavelengths according to the wavelength. For example, it can be decomposed into a first optical signal with wavelength λ1 and a second optical signal with wavelength λ2. The wavelength demultiplexer 204 is connected to multiple modulators. For example, if the optical frequency comb source 202 emits optical signals containing m different wavelengths, the wavelength demultiplexer 204 can be connected to m modulators 206, and the m modulators can be connected to the wavelength demultiplexer 204 through waveguides. Thus, the m modulators can modulate the light intensity of the received optical signal emitted by the wavelength demultiplexer 204 according to the m elements in the first data, thereby modulating the m elements in the first data into the received optical signal. For example, modulator MD1 can adjust the intensity of the first optical signal based on the first element in the first data, thereby modulating the first element into the first optical signal. Similarly, modulator MD2 can adjust the intensity of the received second optical signal based on the second element in the first data, thereby modulating the second element into the second optical signal, and so on. It is understood that the number of modulators in the light-emitting array 1021 can be the same as the number of wavelengths of the optical signal emitted by the optical frequency comb source 202. However, the number of modulators in the light-emitting array 1021 can also be different from the number of wavelengths of the optical signal emitted by the optical frequency comb source 202; that is, multiple optical signals of different wavelengths can multiplex the same modulator. However, in such cases, the modulation efficiency may also be affected.
[0054] Since each element of the first data to be calculated needs to be multiplied by each element of the second data during the convolution operation, this embodiment of the invention requires that the light emitted by each light source be uniformly input into all modulators. Therefore, the design of the beam splitter is also very important. In one embodiment of the invention, the beam splitter 1022 can use a wavelength division multiplexing scheme to split the light signal emitted by the light-emitting array and send it to each modulator in the modulator array 104. Figure 3 This is a schematic diagram of a beam-splitting device provided in an embodiment of the present invention. For clarity, [the diagram is omitted]. Figure 3 The light-emitting array and modulator array connected to the beam splitter are illustrated. For example... Figure 3As shown, the beam splitter 1022 may include a wavelength division multiplexer 302 and a beam splitter 304. The function of the wavelength division multiplexer 302 is to couple multiple optical signals of different wavelengths emitted by the light-emitting array 1021 into the same waveguide 303. The function of the beam splitter 304 is to split a single input light transmitted through the waveguide 303 into n optical signals of equal power (without distinguishing wavelengths), each containing multiple optical signals of different wavelengths, and then transmit the n optical signals to the modulators of the modulator array 104 through the waveguide. For example, each optical signal may include wavelengths λ1, λ2, ..., λ... m The value of n is determined by the number of modulators in the modulator array 104, or by the number of elements in the second data, and n is an integer greater than or equal to 2. Since the multiple light signals of different wavelengths emitted by the light-emitting array 1021 each carry multiple elements of the first data to be calculated, in this way, the n optical signals obtained after passing through the wavelength division multiplexer 302 and the beam splitter 304 all include wavelengths λ1, λ2...λ... m The data carried by multiple optical signals. Figure 3 The beam splitter shown is suitable for optical computing devices comprising m light sources and n modulators. It is understood that when using… Figure 3 When the wavelength division multiplexing method shown is connected to the modulator array 104, the devices in the entire optical computing device can be connected through waveguides.
[0055] In practical applications, beam splitters can also be used to ensure that the light emitted by each light source can be evenly distributed into all modulators by adding a beam splitting structure behind the light source. Figure 4A and Figure 4B This is a schematic diagram of another beam splitter provided in an embodiment of the present invention. It should be noted that, for clarity, [the diagram is incomplete]. Figure 4A and Figure 4B The diagram illustrates the light-emitting array and the modulator array together, providing a better understanding of the connection between them. Figure 4A and Figure 4B In the example shown, the light-emitting array 1021 and the modulator array 104 are not connected via a waveguide, but rather via a beam splitting structure of a spatial optical system. For example, a planar waveguide can be used. A planar waveguide is an on-chip spatial optical device and therefore can be well integrated into a chip. In practical applications, in one case, such as... Figure 4A The beam splitter 1022 shown can be a planar waveguide. In this case, multiple optical signals of different wavelengths emitted by the light-emitting array are transmitted spatially to multiple modulators of the modulator array through the planar waveguide. It should be noted that in the case of transmission only through the planar waveguide (e.g....) Figure 4AAs shown, discretization of the beam is difficult, and it is also difficult to achieve uniform beam splitting. Therefore, in this case, the optical signals received by each modulator on the modulator array 104 will not be very uniform.
[0056] In another case, such as Figure 4B As shown, the beam splitter 1022 may include a beam splitter element 402 and a planar waveguide 404. Specifically, the beam splitter element 402 may include a microlens array, a Damman grating, a metasurface, or other beam splitting elements. The beam splitter element 402 is used to discretely and uniformly split multiple optical signals of different wavelengths emitted by the light-emitting array. Each wavelength of optical signal is discretely and uniformly split into multiple optical signals. After being discretely split by the beam splitter element 402, the multiple optical signals of different wavelengths can be transmitted through the planar waveguide 404 to multiple modulators in the modulator array 104.
[0057] In practical applications, the beam splitter 1022 can be placed adjacent to the light-emitting array 1021, allowing multiple optical signals of different wavelengths emitted by the light-emitting array 1021 to be transmitted in free space within the beam splitter 1022, thus obtaining multiple sets of optical signals containing different wavelengths. For example, a first optical signal with wavelength λ1 emitted by the laser LD1, after passing through the beam splitter 1022, can obtain n optical signals with wavelength λ1. These n optical signals with wavelength λ1 are then sent to n modulators in the modulator array 104, with one modulator receiving one optical signal with wavelength λ1. In this way, the multiple optical signals of different wavelengths emitted by the light-emitting array 1021 can be converted into multiple sets of optical signals after passing through the beam splitter 1022, where each set of optical signals includes multiple optical signals with different wavelengths. These multiple sets of optical signals with different wavelengths are then sent to multiple modulators in the modulator array 104, where each modulator needs to receive one set of optical signals from the multiple sets of optical signals. As mentioned above, in this embodiment of the invention, multiple optical signals received by a modulator are referred to as a set of optical signals.
[0058] In practical applications, the wavelength router 106 can be an on-chip wavelength router. There are two main implementation methods for on-chip wavelength routers: Arrayed Waveguide Grating Router (AWGR) and Etched Diffraction Grating Router (EDGR). Both AWGR and EDGR operate on the principle of multi-beam interference to achieve routing functionality. Adjacent paths in both AWGR and EDGR have an optical path difference of ΔL. The difference lies in that the optical path difference in AWGR is introduced by the arrayed waveguide, while in EDGR it is introduced by the grating reflector. Figure 5A and 5BThis is a schematic diagram of the structure of the wavelength router 106 provided in an embodiment of the present invention. Figure 5A This is a schematic diagram of an Arrayed Waveguide Grating Router (AWGR). Figure 5B This is a schematic diagram of an etched diffraction grating router (EDGR).
[0059] An arrayed waveguide grating (AWG) is a planar waveguide device. AWGs possess filtering characteristics and versatility, enabling the acquisition of a large number of wavelengths and channels, achieving multiplexing and demultiplexing of tens to hundreds of wavelengths, thus they can also be used as routers. In this embodiment of the invention, AWGR refers to an AWG that implements routing functions; therefore, in this embodiment, AWG also refers to AWGR. The basic structure of an AWGR is as follows... Figure 5A As shown, the AWGR 500 may include an input waveguide 502, an input planar region 504, an array waveguide 506, an output planar region 508, and an output waveguide 510. The input waveguide 502 is used to input one or more optical signals. After entering the input planar region 504, the input optical signals diffuse freely and enter the array waveguide 506 with the same phase. Since the optical path difference between adjacent array waveguides is ΔL, different waveguides introduce different phase differences. When the light reaches the output planar region 508, multi-beam interference occurs and the light is focused onto the output waveguide 510. Because the array waveguide 506 introduces different phase differences for different wavelengths of light, different wavelengths are focused at different positions and output from different output waveguides 510, thus achieving the routing function.
[0060] The basic structure of EDGR is as follows Figure 5B As shown, it includes multiple input waveguides 501, a planar region 505 with a grating reflector 503, and multiple output waveguides 507. The EDGR's working principle is similar to that of the AWGR. The input waveguides 501 are used to input optical signals. After the incident light enters the planar region 505, it diffuses freely, is reflected by the grating surface 503, and returns to the planar region 505. After diffraction and interference, it is focused onto the output waveguide 507. Because different wavelengths correspond to different focusing positions, a routing function is achieved. For example, as... Figure 5B As shown in the EDGR, an optical signal with wavelength λ1 received from input port 1 can be routed to output port 4 for output; an optical signal with wavelength λ2 received from input port 1 can be routed to output port 1 for output; an optical signal with wavelength λ3 received from input port 1 can be routed to output port 2 for output; an optical signal with wavelength λ4 received from input port 1 can be routed to output port 3 for output; an optical signal with wavelength λ1 received from input port 2 can be routed to output port 1 for output, and so on.
[0061] In this embodiment of the invention, a wavelength router can be designed according to the calculation rules of convolution, and the output port of the intermediate optical signal can be determined based on the wavelength of the received intermediate optical signal and the input port. Specific rules are detailed below. Figure 8 or Figure 10 Therefore, no additional control over the wavelength router is required during use to obtain the convolution calculation results, resulting in low computational power consumption.
[0062] The structure of the optical computing device provided in the embodiments of the present invention has been described above. For ease of understanding, the following will be combined with... Figure 6 The calculation method shown and Figure 7 The example shown further illustrates how the optical computing device provided in the embodiments of the present invention implements convolution calculation. Figure 6 This is a flowchart of a convolution calculation method provided in an embodiment of the present invention. This method can... Figure 1 The optical computing device shown is used for implementation. Specifically, in step S602, the first data to be calculated can be loaded onto the light source array 102. Each element a in the first data... i Corresponding to a wavelength λ i Where i can take values from 1 to m, and m is the number of elements included in the first data. The light source array 102 can emit n light signals with wavelength λ1 based on element a1 of the first data, and the light source array 102 can also emit n light signals with wavelength λ2 based on element a2 of the first data, where n is the number of elements in the second data to be calculated, and n is an integer greater than or equal to 2. The n light signals with wavelength λ1 and the n light signals with wavelength λ2 can be referred to as n sets of light signals, where each of the n sets of light signals includes one light signal with wavelength λ1 and one light signal with wavelength λ2.
[0063] For clarity, this embodiment of the invention uses m=2 and n=4 as an example. Specifically, it is described using the convolution of the first data [a1,a2] and the second data [b1,b2,b3,b4] as an example. Figure 7 As shown, the light source array 102 can obtain four sets of optical signals according to the first data [a1, a2] to be calculated. Each set of optical signals can include an optical signal with wavelength λ1 obtained according to element a1 and an optical signal with wavelength λ2 obtained according to element a2.
[0064] In step S604, the second data to be calculated can be loaded onto the modulator array 104, and multiple intermediate optical signals can be output based on the loaded second data. As mentioned above, the modulator array 104 may include multiple modulators, each of which can load one element of the second data. As mentioned above, taking the second data as an example containing n elements, each element b of the second data can be loaded onto the modulator array 104. j The modulators MD are respectively modulated into the modulator array 104. j Above, where j can take values from 1 to n. For example, as Figure 7 As shown, the second data to be calculated contains four elements [b1, b2, b3, b4]. These four elements are loaded onto four modulators MD1, MD2, MD3, and MD4 in sequence.
[0065] Because the light signals emitted by each light source in the light source array 102 are uniformly distributed into each modulator, each modulator in the modulator array 104 receives one set of light signals from the four sets of light signals emitted by the light source array 102. In this way, the modulator array 104 can, based on the second data loaded on each modulator, make element a in the first data... i element b in the second data j By performing pairwise multiplication, a total of 8 intermediate optical signals are generated. These 8 intermediate optical signals are used to indicate element a. i and element b j The product a i b j The wavelength of each intermediate optical signal can be λ. i ,like Figure 7 As shown, λ in parentheses i The wavelength of the intermediate optical signal corresponding to this product is λ. i .
[0066] Each modulator in the modulator 104 corresponds to an input port of a wavelength router, and each modulator can be connected to an input port of the wavelength router via a waveguide. According to this method, each element b in the second data... j One input port of the corresponding wavelength router j From each input port of the wavelength router in j The input optical signal includes the optical signal generated based on all elements in the first data, therefore each input port in j The input optical signals all carry wavelengths λ i In other words, each input port of the wavelength router 106 needs to receive all the optical signals emitted by the light source array 102 according to the first data. Since each input port... jThe input optical signal includes all wavelengths λ i And through its corresponding input port in j On the modulator MD j Complete with element b in the second data j The multiplication operation allows for the acquisition of multiple sets of modulated intermediate optical signals. The modulator MD... j Obtain the intermediate optical signal to indicate element a i and element b j The product a i b j .
[0067] In step 606, the wavelength router can route the received intermediate optical signals of different wavelengths to different ports. As mentioned earlier, the wavelength router 106 can implement the routing function based on multi-beam interference. Specifically, the wavelength router can route the received intermediate optical signals according to a pre-designed routing rule. Taking the number of elements in the first data as m, the number of elements in the second data as n, and the sliding step size of the convolution as 1 as an example, after performing convolution on the first data and the second data, the number of elements in the convolution result is q, q = m + n - 1. Therefore, with a sliding step size of 1, the output ports of the router can be designed according to m + n - 1 and numbered sequentially. In this case, the routing rule of the wavelength router 106 can be designed as: all a satisfying ij equals i b j The corresponding optical signals will be routed to the same output port. k In this context, 'i' can indicate the element number of the first data or the wavelength number of the corresponding optical signal. Similarly, 'j' can indicate the element number of the second data, the input port number of the wavelength router, or the modulator number in the modulator array 104. 'k' is the output port number, k = m - (ij), where k can range from 1 to q, q = m + n - 1. In practical applications, if only a portion of the convolution result is relevant, the outputs of redundant router output ports can be discarded according to this correspondence.
[0068] It should be noted that the above example is described with a convolution step size of 1. In practical applications, when step is not 1, the number and changes of router output ports can be determined first according to the case of step=1. Then, redundant output ports are discarded according to the principle of taking the output value of one output port from each number of output ports in the step size. For example, if there are 5 output ports out1 to out5 when step=1, then when step=2, only the optical signals of 3 ports out1, out3, and out5 need to be detected, while the outputs of output ports out2 and out4 are discarded. When step=3, only the light intensity of the optical signals output by output ports out1 and out4, or only the light intensity of the optical signals output by output ports out2 and out5, can be detected.
[0069] Specifically, such as Figure 8 As shown, Figure 8 This is a schematic diagram of a routing rule corresponding to a wavelength router provided in an embodiment of the present invention. Figure 8 Let's continue with the example where the first data contains 2 elements and the second data contains 4 elements. In this case, the router has 4 input ports (in1 to in4) and 5 output ports (out1 to out5). Therefore, the 8 sets of input data can be redistributed according to the routing rules in the table. For example, light with wavelength λ2 input from input port in1 will be output from output port out1, and light with wavelength λ1 input from input port in1 will be output from output port out2. In this way, a total of 5 sets of optical signals can be output from the five output ports of the wavelength router. It is understood that when multiple optical signals indicating different products are output from one output port, the output optical signal is the aggregated optical signal of the multiple optical signals, and the output optical signal is used to indicate the sum of the multiple products.
[0070] For example, such as Figure 7 As shown, taking the convolution of the first data [a1,a2] and the second data [b1,b2,b3,b4] as an example, where both the first and second data are vectors. At output port out1, an optical signal with wavelength λ1 indicating the product of elements a2 and b1 (a2b1) is output. At output port out2, an optical signal with wavelength λ1 indicating the product of elements a1 and b1 (a1b1) and an optical signal with wavelength λ2 indicating the product of elements a2 and b2 (a2b2) are output. At output port out3, an optical signal with wavelength λ1 indicating the product of elements a1 and b2 (a1b2) and an optical signal with wavelength λ2 indicating the product of elements a2 and b3 (a2b3) are output, and so on. Therefore, based on the five output ports of the wavelength router 106, the convolution result of the first and second data is [a2b...]. 1,a1b1+a2b 2, a1b2+a2b 3, a1b3+a2b 4, a1b4]
[0071] In step 608, the detector array 108 can detect the light intensity of the optical signal at each output port of the wavelength router 106 to obtain the convolution result of the first data and the second data. It is understood that the light intensity value of the optical signal output from the output port of the wavelength router 106 is proportional to the convolution result of the first data and the second data; the larger the value of the convolution result, the larger the light intensity value of the output optical signal. In practical applications, when the complete convolution result is needed, it is necessary to detect the light intensity values of all output ports. In practical applications, when only a portion of the convolution result is of interest, it is also possible to detect only the light intensity values of a few output ports of the wavelength router 106.
[0072] As can be seen from the above embodiments, the optical computing device provided by the embodiments of the present invention can realize data convolution operations. Furthermore, the optical computing device provided by the embodiments of the present invention performs convolution operations in one step, without needing to decompose the convolution calculation into multiple vector multiplications or matrix multiplications, thus improving computational efficiency. Moreover, in the optical computing device provided by the embodiments of the present invention, the wavelength router can be pre-designed according to the rules of convolution operations, thus requiring no external control and generating no power consumption, thereby saving computational power consumption. Furthermore, since the devices in the optical computing device provided by the embodiments of the present invention can be on-chip devices, the optical computing device can exist in the form of a chip, exhibiting a high degree of integration.
[0073] It should be noted that the above embodiments are described using the convolution of vectors as an example, specifically in that the light source array and the modulator array are both line arrays, not area arrays. However, in practical applications, the architecture of the optical convolution system provided in this embodiment can also be used for convolution between matrices, in which case the light source array and the modulator array can be area arrays. No limitation is made here.
[0074] In another embodiment provided by the present invention, it can be achieved by... Figure 1 The optical computing device shown implements convolution between matrices. The following will combine... Figure 9 , Figure 10 as well as Figure 11 This invention describes how the optical computing device provided in the embodiments of the present invention implements matrices and matrix convolution. Figure 9 This is a schematic diagram of convolution provided in an embodiment of the present invention. Figure 10 This is a schematic diagram of routing rules for a wavelength router provided in an embodiment of the present invention. Figure 11This is a schematic diagram illustrating how the optical computing device provided in the embodiments of the present invention implements matrix and matrix convolution.
[0075] like Figure 9 As shown, to implement the convolution of a 2x2 matrix and a 2x2 matrix, where the first data includes a 2x2 matrix... The second data includes a 2x2 matrix. Those skilled in the art will understand that in convolution calculations, to ensure the input and output data remain the same size, the original matrix can be padded before the convolution operation. This involves adding values to the matrix boundaries to increase its size; typically, zeros are used. By padding, when the convolution kernel scans the input data, it can extend to pixels beyond the edges of the original image, thus ensuring the output and input data are the same size. Figure 9 In the matrix calculations shown, the first data can be used. As the convolution kernel, the second data As input data, by filling in the second data and setting the sliding step size to 1, we can obtain... Figure 9 The diagram shows the 3x3 convolution result. That is, when performing a convolution calculation on two 2x2 matrices, after padding the input data (e.g., the second data), and performing the convolution calculation on the input data based on the convolution kernel (e.g., the first data), a 3x3 result is obtained, which includes 9 elements. In this case, it can be determined according to... Figure 9 The example of matrix convolution shown illustrates the routing rules of the wavelength router in this embodiment of the invention. Specifically, it can be as follows: Figure 10 As shown.
[0076] The following will combine Figure 11 A detailed description of how the optical computing device provided in the embodiments of the present invention achieves this is given. Figure 9 The convolution calculation is shown below. Figure 11As shown, the light source array 102 can emit multiple optical signals based on each element of the first data. Since the second data includes four elements, four modulators in the modulator array 104 are needed to load the elements of the second data, with one modulator loading one element. To enable the optical signals emitted by the light source array 102 to be sent to each modulator in the modulator array 104 that modulates the elements of the second data, during the calculation process, the light source array 102 can emit four sets of optical signals based on elements a1, a2, a3, and a4 of the first data, respectively. Each set of optical signals includes four different wavelengths of optical signals emitted based on all elements of the first data, thus allowing each modulator to receive one set of optical signals. For example, the light source array 102 can emit four optical signals with wavelength λ1 based on element a1, four optical signals with wavelength λ2 based on element a2, and so on. Each modulator receives a group of optical signals, so the multiple optical signals emitted by the light source array 102 according to the first data can include four groups of optical signals. Each group of optical signals includes an optical signal with wavelength λ1 emitted according to element a1, an optical signal with wavelength λ2 emitted according to element a2, an optical signal with wavelength λ3 emitted according to element a3, and an optical signal with wavelength λ4 emitted according to element a4. Specifically, as follows... Figure 11 As shown, the light source array 102 sends multiple light signals of different wavelengths emitted by the elements of the first data to each modulator of the modulator array 104.
[0077] Continue as Figure 11 As shown, after the elements [b1,b2,b3,b4] in the second data are loaded onto the modulators in the modulator array 104, when the modulators in the modulator array 104 receive the optical signals sent by the light source array 102, 4*4=16 intermediate optical signals are generated. These 16 intermediate optical signals are used to indicate the product of the four elements in the first data and the four elements in the second data. The 16 intermediate optical signals emitted by the four modulators in the modulator array 104 are input to the wavelength router 106. After receiving the 16 intermediate optical signals sent by the modulator array, the wavelength router 106... Figure 10 The routing rule shown routes the 16 received intermediate optical signals to different output ports according to their wavelengths and input ports, resulting in a total of 9 outputs. The light intensity of the optical signal at each output port is used to represent an element c in the convolution result. k Thus, it is possible to obtain Figure 9 The convolution results shown
[0078] It should be noted that, Figure 9The convolution example shown uses padding of the input data. If padding is not required, meaning the output data does not need to be the same size as the input data, then padding is unnecessary. In this case, the convolution result will contain only one element, i.e., the convolution result is equal to a1b1 + a2b2 + a3b3 + a4b4 = c5. In this situation, the convolution result can be obtained by simply detecting the light intensity of the optical signal at the fifth output port of the wavelength router 106.
[0079] As can be seen from the above embodiments, the optical computing device provided by the embodiments of the present invention, whether implementing convolution between vectors or convolution between matrices, does not require dividing the convolution calculation into multiple matrix multiplication operations; it is completed in one step. Therefore, it can improve computational efficiency. In practical applications, the optical computing device provided by the embodiments of the present invention can exist in the form of a chip.
[0080] It should be noted that the optical computing device provided in this embodiment of the invention can be designed with light source arrays and modulator arrays according to design requirements (e.g., chip size, number of devices), thereby maximizing the utilization of various devices such as light-emitting devices, modulators, and detectors. In other words, the number of light-emitting devices, modulators, and detectors in the optical computing device provided in this embodiment of the invention is not limited by the number of elements in the specific data to be convolved. It is understood that when the number of elements in the data to be computed is greater than the number of lasers or modulators in the optical computing device, the data to be computed can be split into multiple computeable data sets for computation. When the number of elements in the data to be computed is less than the number of lasers or modulators in the optical computing device, only a portion of the lasers, modulators, or detectors in the optical computing device can be used for computation.
[0081] It should be further noted that the optical computing device provided in this embodiment of the invention can also perform 1*1 convolutions, that is, the first or second data may include only one element. For example, the number of weights in the convolution kernel may include one weight (or one element), i.e., m=1 in the above embodiment. In this case, one approach is to pad the data containing one element to include data containing multiple elements. For example, "0" can be used to pad the data to include multiple elements. Another approach is to not pad the data and perform the calculation directly. During the calculation process, some lasers (e.g., one laser), some modulators, or some detectors may participate in the calculation process. The optical computing device provided in this embodiment of the invention is not affected by the amount of data to be calculated; it can perform the calculation regardless of the size of the data.
[0082] Figure 12 This is a schematic diagram of the structure of an optical computing system provided in an embodiment of the present invention. Figure 12 As shown, the optical computing system 1200 may include a processor 1202 and an optical computing device 1204, wherein the optical computing device 1204 may be the optical computing device as described in the foregoing embodiments. For example, it may be as follows: Figure 1 The optical computing device shown is described above. In practical applications, the optical computing device 1204 can exist in the form of a chip, or it can serve as a neural network acceleration device, specifically used to perform convolution calculations or other neural network calculations.
[0083] Processor 1202 is the computing core and control unit of optical computing system 1200. Processor 1202 may include multiple processor cores. Processor 1202 may be a very large-scale integrated circuit. An operating system and other software programs are installed in processor 1202, enabling it to access memory, cache, and optical computing devices. In this embodiment of the invention, processor 1202 may be a central processing unit (CPU), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), artificial intelligence (AI) chip, system-on-chip (SoC), complex programmable logic device (CPLD), graphics processing unit (GPU), etc.
[0084] In practical applications, the processor 1202 can be used to input data to be used for convolution calculation into the optical computing device 1204. For example, taking the first data as the convolution kernel and the second data as the input data in the aforementioned embodiment as an example, the processor 1202 can input both the first data and the second data into the convolution calculation device 1204. In one case, when the optical computing device provided in this embodiment is used in a camera device to directly perform image processing through convolution, only the processor 1202 needs to input the first data into the convolution calculation device 1204, while the second data can be directly obtained from the light signal when the image is captured. For details on how the optical computing system implements convolution calculation, please refer to the description of the aforementioned embodiments, which will not be repeated here.
[0085] This invention also provides a computer program product for implementing the above-described convolution calculation method, and a computational program product for implementing the above-described convolution calculation method. All of these computer program products include a computer-readable storage medium storing program code. The instructions included in the program code are used to execute the method flow described in any of the foregoing method embodiments. Those skilled in the art will understand that the aforementioned storage medium includes various non-transitory machine-readable media capable of storing program code, such as USB flash drives, portable hard drives, magnetic disks, optical disks, random-access memory (RAM), solid-state drives (SSDs), or non-volatile memory.
[0086] It should be noted that the embodiments provided in this application are merely illustrative. Those skilled in the art will understand that, for the sake of convenience and brevity, the descriptions of each embodiment have different focuses, and parts not described in detail in a certain embodiment can be referred to in the relevant descriptions of other embodiments. The features disclosed in the embodiments, claims, and drawings of this invention can exist independently or in combination. Features described in hardware form in the embodiments of this invention can be executed by software, and vice versa. No limitations are imposed here.
Claims
1. An optical computing device, characterized in that, include: A light source array is used to send multiple sets of light signals according to a first set of data to be calculated, wherein each set of light signals includes multiple light signals obtained based on all elements in the first set of data; A modulator array is used to receive the multiple sets of optical signals and output multiple intermediate optical signals based on the modulated second data; A wavelength router is configured to receive the plurality of intermediate optical signals output by the modulator array, and output the plurality of intermediate optical signals from a plurality of output ports based on a first rule, the wavelengths of the plurality of intermediate optical signals, and the input ports. The multiple optical signals output from the multiple output ports are used to indicate the calculation results of the first data and the second data, and the calculation results include the result of performing convolution on the first data and the second data; The first output port of the plurality of output ports is used to output at least two intermediate optical signals, each of the at least two intermediate optical signals being used to indicate the product of an element of the first data and an element of the second data; The first rule includes multiple intermediate optical signals having a first feature corresponding to the same output port, wherein the first feature includes the same sequence number difference between the sequence number of the first data element indicated by the intermediate optical signal and the sequence number of the second data element.
2. The optical computing device according to claim 1, characterized in that, Each element of the first data corresponds to a wavelength of optical signal, and multiple optical signals belonging to the same group have different wavelengths.
3. The optical computing device according to claim 1 or 2, characterized in that, The wavelength router includes an arrayed waveguide grating router (AWGR) or an etched diffraction grating router (EDGR).
4. The optical computing device according to claim 1 or 2, characterized in that, Also includes: The detector array includes multiple detectors for detecting the light intensity of optical signals at multiple output ports of the wavelength router to obtain the calculation results of the first data and the second data.
5. The optical computing device according to claim 1 or 2, characterized in that, The light source array includes: A light-emitting array is used to emit multiple light signals of different wavelengths according to multiple elements in the first data, wherein each light signal is used to indicate one element in the first data; A beam splitter is used to receive the multiple optical signals of different wavelengths emitted by the light-emitting array and split the multiple optical signals of different wavelengths into multiple groups of optical signals.
6. The optical computing device according to claim 5, characterized in that, The light-emitting array includes: Multiple lasers are used to send multiple optical signals based on multiple elements in the first data, the multiple optical signals having different wavelengths.
7. The optical computing device according to claim 5, characterized in that, The light-emitting array includes: Multiple lasers are used to send optical signals with different wavelengths; Multiple modulators are used to receive multiple optical signals of different wavelengths and modulate the multiple elements in the first data onto the multiple optical signals of different wavelengths, respectively.
8. The optical computing device according to claim 5, characterized in that, The light-emitting array includes: An optical frequency comb source is used to transmit optical signals, which include a variety of different wavelengths; Wavelength demultiplexer is used to receive the optical signal emitted by the optical frequency comb source and decompose the optical signal into multiple optical signals of different wavelengths; Multiple modulators are used to receive multiple optical signals of different wavelengths sent by the wavelength demultiplexer, and modulate multiple elements of the first data onto the multiple optical signals of different wavelengths respectively.
9. The optical computing device according to claim 5, characterized in that, The beam-splitting device includes: A wavelength division multiplexer is used to receive multiple optical signals of different wavelengths emitted by the light-emitting array and combine the multiple optical signals of different wavelengths into a first set of optical signals; A beam splitter is used to decompose the first group of optical signals into the plurality of groups of optical signals, wherein each group of optical signals includes the first group of optical signals.
10. The optical computing device according to claim 5, characterized in that, The beam-splitting device includes: A planar waveguide is used to split multiple optical signals of different wavelengths emitted by the light-emitting array into multiple sets of optical signals in space.
11. The optical computing device according to claim 5, characterized in that, The beam-splitting device includes: A beam splitter is used to split multiple light signals of different wavelengths emitted by the light-emitting array into n groups of light signals, where n is the number of elements in the second data and n is an integer greater than 1; A planar waveguide is used to transmit multiple optical signals of different wavelengths split by the beam splitter to a modulator array, wherein the modulator array includes n modulators, each modulator is used to receive one set of optical signals from the n sets of optical signals, and each set of optical signals includes the multiple optical signals of different wavelengths emitted by the light-emitting array.
12. The optical computing device according to any one of claims 1, 2, or 6-11, characterized in that: The modulator array includes multiple modulators, each modulator being used to receive one set of optical signals from the multiple sets of optical signals and output multiple intermediate optical signals based on the modulated data.
13. The optical computing device according to any one of claims 1, 2, or 6-11, characterized in that, The optical computing device includes a chip.
14. An optical computing system, characterized in that, The device includes a processor and an optical computing apparatus as described in any one of claims 1-13 connected to the processor, wherein the processor is configured to send at least one of the first data and the second data to the optical computing apparatus.
15. A convolution calculation method, characterized in that, The method is performed by an optical computing device, and the method includes: The light source array in the optical computing device sends multiple sets of optical signals according to the first data to be calculated, wherein each set of optical signals includes multiple optical signals obtained based on all elements in the first data, and the first data includes multiple elements; The modulator array in the optical computing device receives the multiple sets of optical signals and outputs multiple intermediate optical signals based on the modulated second data; The wavelength router in the optical computing device receives the plurality of intermediate optical signals output by the modulator array, and outputs the plurality of intermediate optical signals from the plurality of output ports based on the first rule, the wavelengths of the plurality of intermediate optical signals, and the input ports. The multiple optical signals output from the multiple output ports are used to indicate the calculation results of the first data and the second data, and the calculation results include the result of performing convolution on the first data and the second data; The first output port of the plurality of output ports is used to output at least two intermediate optical signals, each of the at least two intermediate optical signals being used to indicate the product of an element of the first data and an element of the second data; The first rule includes multiple intermediate optical signals having a first feature corresponding to the same output port, wherein the first feature includes the same sequence number difference between the sequence number of the first data element indicated by the intermediate optical signal and the sequence number of the second data element.
16. The convolution calculation method according to claim 15, characterized in that: Each element of the first data corresponds to a wavelength of optical signal, and multiple optical signals belonging to the same group have different wavelengths.
17. The convolution calculation method according to claim 15 or 16, characterized in that, Also includes: The optical intensity of the optical signal at multiple output ports of the wavelength router is detected by the detector array in the optical computing device to obtain the calculation results of the first data and the second data.
Citation Information
Patent Citations
Large-scale artificial neural-network accelerators based on coherent detection and optical data fan-out
WO2020102204A1