# An Optical Processor Specialized on Matrix Operations

Antonio Mucherino, Simon B. Hengeveld, Nara Rubiano da Silva, Douglas Gonçalves, Paulo H. Souto Ribeiro

<figure><img src="image_1.png" /></figure>

## To cite this version:

Antonio Mucherino, Simon B. Hengeveld, Nara Rubiano da Silva, Douglas Gonçalves, Paulo H. Souto Ribeiro. An Optical Processor Specialized on Matrix Operations. Proceedings of the Autumn Meeting of the Brazilian Physical Society 2023, May 2023, Ouro Preto, Minas Gerais, Brazil. hal-04126365

HAL Id: hal-04126365

https://inria.hal.science/hal-04126365

Submitted on 13 Jun 2023

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>
# An Optical Processor Specialized on Matrix Operations

A. Mucherino

IRISA, University of Rennes, Rennes, France.

joint work with:

S.B. Hengeveld¹, N. Rubiano da Silva², D.S. Gonçalves³, P.H. Souto Ribeiro³

¹ IRISA, University of Rennes, Rennes, France.

² Federal University of Santa Catarina, Blumenau, SC, Brazil.

³ Federal University of Santa Catarina, Florianópolis, SC, Brazil.

Linear algebra operations are at the core of solution methods for several important problems. One may cite, just to give an example, the GOOGLE PAGE RANK algorithm, whose basic operation consists in a matrix-by-vector multiplication, where the size of the matrix is generally very large. Because of their importance, several works can be found in the scientific literature where researchers have attempted, by using different approaches, to speed-up the computations of linear algebra operations. On the one hand, people have exploited the architecture of computer machines (optimal use of cache memory is a typical example), or modern digital devices such as GPUs, in order to enhance the computations; on the other hand, alternative analog devices have been more recently proposed in an attempt to attain better and better performances.

Our works belong to the latter category and employ an optical processor to perform matrix-by-vector multiplications [3]. This is achieved by using Spatial Light Modulators (SLMs) to encode the data, as well as to perform the computations. The SLMs act on the phase modulation of the horizontal polarization component of the light, in such a way to modify the polarization state when interacting with the corresponding vertical components. By using a Half-Wave Plate (HWP) and a Polarizing Beam Splitter (PBS), the diagonal polarization component is thereafter selected, so that to convert the phase modulation into an amplitude modulation. The result of the computation is finally measured through the intensity distribution in the light beam.

Before proceeding with the realization at hardware level of our optical processor, we have conducted some preliminary experiments on GPUs [2]. We used as a test example the distance geometry problem in dimension 1 [1], which can be solved by computing the sums of the rows or columns of a given matrix (this can be seen as a special case of matrix-by-vector multiplication). When compared against one of the traditional algorithms for distance geometry, we could notice an interesting speed-up, which encourages us to pursue our work. The experiments, however, also pointed out how important is the role of floating-point precision in the representation of the real numbers composing our test problems. This precision issue is likely to have a stronger impact on our optical processor (because it performs computations in an analog fashion), and opens new challenges that we will try to overcome in our future works.

## References

[1] S.B. Hengeveld, A. Mucherino, *The Discrete Side of Distance Geometry: a Focus on the 1-dimensional Case*, Proceedings of Discrete Math Days (DMD22), Santander, 301–305, 2022.

[2] S.B. Hengeveld, A. Mucherino, *A GPU Approach to Distance Geometry in 1D: an Implementation in C/CUDA*, IEEE Conference Proceedings, Federated Conference on Computer Science and Information Systems (FedCSIS22), Workshop on Computational Optimization (WCO22), Sofia, Bulgaria, 333–336, 2022.

[3] S.B. Hengeveld, N. Rubiano da Silva, D.S. Gonçalves, P.H. Souto Ribeiro, A. Mucherino, *An Optical Processor for Matrix-by-Vector Multiplication: an Application to the Distance Geometry Problem in 1D*, Journal of Optics **24**(1), 015701, 2022.