<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Lightmatter - Medium]]></title>
        <description><![CDATA[Lightmatter is leading the (r)evolution of computing, reducing its impact on our planet, and enabling the next great leaps in human progress. - Medium]]></description>
        <link>https://medium.com/lightmatter?source=rss----3943c2ca1164---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Lightmatter - Medium</title>
            <link>https://medium.com/lightmatter?source=rss----3943c2ca1164---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 15 Nov 2026 03:59:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/lightmatter" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Introducing Envise, Idiom and Passage — Next Generation AI Compute, Compile and Interconnect…]]></title>
            <link>https://medium.com/lightmatter/introducing-envise-idiom-and-passage-next-generation-ai-compute-compile-and-interconnect-331878d6cea5?source=rss----3943c2ca1164---4</link>
            <guid isPermaLink="false">https://medium.com/p/331878d6cea5</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[neural-networks]]></category>
            <category><![CDATA[photonics]]></category>
            <category><![CDATA[chips]]></category>
            <category><![CDATA[high-performace-computing]]></category>
            <dc:creator><![CDATA[Nicholas Harris]]></dc:creator>
            <pubDate>Wed, 10 Mar 2021 14:57:19 GMT</pubDate>
            <atom:updated>2021-03-10T14:57:19.869Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introducing Envise, Idiom and Passage — Next Generation AI Compute, Compile and Interconnect Platforms</h3><p>Today, we are thrilled to introduce Envise — the world’s first general-purpose photonic artificial intelligence (AI) accelerator. Inference, which is synonymous with the deployment of AI models, represents the fastest-growing, largest energy footprint endeavor in the AI computing space. Envise enables ultra-high performance inference on the world’s most advanced AI models (GPT-3, Megatron) as well as staple neural networks (BERT-Large, DLRM, ResNet-50).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Sa3Ik7ybjOJA0idkW1RRmw.png" /><figcaption><strong>Envise 4-U Server Blade.</strong></figcaption></figure><p>Envise will be offered in a 4-U server blade form factor — enabling customers to tackle the most advanced workloads with an array of 16 Lightmatter Envise chips. Each Envise 4-U server blade offers up to 6.4 Tbps of optical interconnect for multi-blade scale-out, 1TB of DDR4 DRAM, and 3TB of solid-state memory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/568/1*InBdP2WSisGCyxpGk2J2NQ.png" /><figcaption><strong>Envise 4-U Server Blade. </strong>What’s in the box?</figcaption></figure><p>To enable our customers to extract maximum performance from Envise, we are introducing our software stack: Idiom. Idiom compiles and executes neural network models on Envise and offers tools for debug, profiling and model optimization. Idiom also enables automatic blade detection — enabling rapid deployment of large AI models across entire server racks.</p><p>It’s a momentous day for Lightmatter. For the past three years we’ve been hard at work inventing the foundation upon which this new class of computers operates. It hasn’t been easy, but we’ve kept a steady eye on our motivating principles:</p><ol><li>Human progress is inextricably linked to progress in computing.</li><li>Our environment is fragile and likely irreplaceable; reducing emissions associated with the growth in computing is important.</li><li>The story of computing has been one of democratization; the world is better off when everyone has access to the fruits of technology.</li></ol><p>We couldn’t be announcing our products at a better time: migration to next-generation transistor process nodes is slowing and that’s just the tip of the iceberg. Over the past 15 years, process node advancement has delivered marginal reductions in transistor energy consumption — making it increasingly challenging to deliver power to computer chips and to keep them cool. This translates into massive energy consumption in data centers and a rapidly growing, planet scale environmental impact.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L7ModTMWn1mh7W6moRN09w.jpeg" /><figcaption>Passage test platform. An 8&quot; by 8&quot; computer chip that allows heterogeneous chips to communicate optically over programmable integrated photonic links.</figcaption></figure><p>We are proud of the work we’ve done on Envise, but we know it isn’t complete without solving the communications bottleneck. Today, we’re announcing Passage—a new, wafer-scale programmable photonic interconnect through which computer chips communicate at unprecedented speed. Passage, an 8&quot; by 8&quot; computer chip, integrates transistors and photonics (including lasers, modulators, and photodetectors). Heterogeneous computer chips are integrated with the platform using standard chip-on-wafer packaging technology. We think Passage will enable a world where configurable-topology supercomputing systems are built on a single platform that takes advantage of the benefits of optics, without the packaging cost and complexity. 100Tbps chip-to-chip interconnect.</p><p>Interested in joining our early access program and getting your own Envise blade or partnering with us on the future of interconnect? Visit <a href="http://lightmatter.co/">lightmatter.co</a>.</p><p>We’re just getting started.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=331878d6cea5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/lightmatter/introducing-envise-idiom-and-passage-next-generation-ai-compute-compile-and-interconnect-331878d6cea5">Introducing Envise, Idiom and Passage — Next Generation AI Compute, Compile and Interconnect…</a> was originally published in <a href="https://medium.com/lightmatter">Lightmatter</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Techniques for performing design verification of an optical processor]]></title>
            <link>https://medium.com/lightmatter/techniques-for-performing-design-verification-of-a-mixed-signal-digital-analog-and-optical-d0068c9ff868?source=rss----3943c2ca1164---4</link>
            <guid isPermaLink="false">https://medium.com/p/d0068c9ff868</guid>
            <category><![CDATA[computing]]></category>
            <category><![CDATA[hardware]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[design-verification]]></category>
            <dc:creator><![CDATA[John Sweeney]]></dc:creator>
            <pubDate>Wed, 12 Feb 2020 18:57:00 GMT</pubDate>
            <atom:updated>2020-02-12T19:55:58.258Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>In previous blog posts from<a href="http://lightmatter.co/"> Lightmatter</a>,<a href="https://medium.com/lightmatter/matrix-processing-with-nanophotonics-998e294dabc1"> Martin Forsythe</a> [1] discussed how general matrix multiplication (GEMM) is powering most advanced neural networks being developed and applied today. He also compared implementing GEMM processing in pure digital electronics to integrated photonics.<a href="https://medium.com/lightmatter/optical-components-for-matrix-processing-73687cdd7aa6"> Mike Gould’s</a> [2] subsequent blog post described the various optical components that can be combined to realize a GEMM calculation in an integrated photonics device. This was followed by<a href="https://medium.com/lightmatter/analog-interface-of-optical-processors-46c40f63b0e7"> Ozgur Yildirim’s</a> [3] post which described the integrated analog components that are being designed to drive the photonic GEMM implementation. Here, we will cover Design Verification (“DV”) as it pertains to the kind of mixed-signal, mixed-domain circuit design we do at Lightmatter. We discuss our methodology for modeling analog and photonic components in Python, which runs alongside the digital portion of our design.</p><p>DV is an essential part of any product design process. At its core, DV involves validating the functionality of a product against target specifications. Because chip design and fabrication is a highly capital intensive endeavor (advanced node tapeouts can cost more than $10,000,000), DV is a critical part of any chip design flow. After decades of refinement, standardized and trusted protocols have been developed for validating digital circuit designs. Validation protocols for chips that contain a mix of digital, analog, and opto-electronic components are less refined. This typically involves applying directed random stimulus to the design under test and checking that the design produces the correct outputs.</p><p>DV engineers and digital designers typically write code in Verilog. Analog designers and photonics designers typically favor MATLAB, C, or Python. At Lightmatter, we have agreed on Python as a common exchange language between teams for its ease of use and learnability.</p><h3>System and component overview</h3><p>A conceptual drawing of Lightmatter’s optical compute core is shown in Figure 1. The optical core performs a GEMM operation. The system feeds the GEMM with input vectors and weights, and records the corresponding output vectors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/0*ukHTKZVPgDR9GMzR" /></figure><p><em>Figure 1. Conceptual drawing of Lightmatter systems, including digital to analog converters (DACs), analog-to-digital converters (ADCs), transimpedance amplifiers (TIAs), and photodetectors (PDs).</em></p><p>As indicated in Figure 1, a large portion of the design is outside of the digital domain, which renders traditional digital techniques insufficient. To simulate this system, we created a methodology for modeling analog, optical, and electro-optical components and their interfaces.</p><h3>The SystemVerilog language and simulation</h3><p>In a typical chip design, the system is described in a<a href="https://en.wikipedia.org/wiki/Register-transfer_level"> Register Transfer Level (RTL)</a> [4] language. Over decades of maturation of the chip design process, many RTL languages have been used. Today the industry standard is SystemVerilog, which is an extension of the Verilog language. The SystemVerilog language is a unified hardware design, specification, and verification language. It is codified in an IEEE standard which includes support for behavioral and RTL hardware descriptions as well as test benches that provide stimulus and checking. SystemVerilog also provides application programming interfaces (APIs) to foreign programming languages [5].</p><p>SystemVerilog support for both behavioral modeling and APIs for foreign programming languages enables us to extend the standard digital design process to include models of analog and photonic components, which are integral to our design.</p><h3>Real number modeling</h3><p>SystemVerilog simulators as described in the IEEE standard are<a href="https://en.wikipedia.org/wiki/Discrete-event_simulation"> discrete time, event based simulators</a> [6] — they sequentially simulate discrete units of time and only model events or signal changes. For pure digital designs, this leads to efficient simulations of the binary values of signals even for large synchronous designs. Event-based modeling is not sufficient for analog and photonic components since the output quantities of these devices are generally continuous.</p><p>SystemVerilog is primarily focused on synchronous, clock-based designs with binary values, but it also has the ability to use real-numbers in behavioral model semantics. In the design industry, this methodology is known as “real-number modeling”. We use real-number modeling to represent analog and photonic properties including voltage, current, light intensity and phase. Below, we consider real-number modeling of DACs as an example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/551/0*uh7XX1lj_euGZpTC" /></figure><p><em>Figure 2. DAC driving transmission line and photonic load.</em></p><p>At the architectural exploration phase, a simple SystemVerilog function was used to model the DAC’s transfer function. We also used a component called a<a href="https://en.wikipedia.org/wiki/Finite_impulse_response"> Finite Impulse Response (FIR) filter</a> [7] to model the combination of the transmission line and the load. Below is a simple code snippet which shows the function which converts the DAC input code to a real-number voltage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/0*OWP86mrbE5yfIYg9" /></figure><p><em>Figure 3. Verilog code implementing Digital to Analog Converter (DAC)</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/685/0*2_ETOX5H8-u7ruKJ" /></figure><p><em>Figure 4. Simulation of ideal DAC and FIR transfer function.</em></p><p>With the code shown in Figure 3, we are able to explore a wide range of architectural possibilities, including how many bits of precision the DAC should use, what voltage range it should cover, and more. The simulation waveform in Figure 4 shows a simple transmission line delay driving a capacitive load. Virtually any transmission line and load characteristics can be simulated through appropriate choice of the FIR model coefficients, enabling rapid exploration of many system configurations.</p><p>Real-number models are also applicable later in the design process when design parameters are known and the DAC circuit has been fully designed and characterized. A lengthy<a href="https://en.wikipedia.org/wiki/SPICE"> Spice circuit simulation</a> [8] of the DAC driving the transmission line and load can be captured and programmed into the FIR model coefficients giving sufficient accuracy in a fast discrete time simulation that can run alongside the simulations of all of the digital logic and memory.</p><h3>Co-simulation SW architecture</h3><p>As the design progresses, various analog and photonic component models become more detailed and accurate. We still need to simulate those components along with the digital control logic and memory.</p><p>In addition to detailed component models, we have a high level <a href="https://en.wikipedia.org/wiki/Instruction_set_architecture">Instruction Set Architecture</a> (ISA) model [9] which is used by the software development team. This model is used as a reference for the complete RTL/analog/photonic system. This insures that the hardware matches the intended behavior and that fast software simulations match the behavior they will see on the real hardware. A wide variety of both high level and detailed models are co-simulated in our standard Verilog design. This prompted us to develop a full-featured, multi-language co-simulation software toolset.</p><p>Our initial models spanned a variety of languages including SystemVerilog, C/C++, Python, and combinations of these. Figure 5 shows an example co-simulation software architecture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/0*TzXP_EV9t2iiy_O7" /></figure><p><em>Figure 5. Co-simulation SW architecture</em></p><p>The shared library linking the SystemVerilog DPI to the Python interpreter is written in C, but it is mostly auto generated from Python and SystemVerilog code and function prototypes. The models developed are used across various phases of the chip design process including architectural exploration, component-level design, subsystem RTL, and full-system simulations including the software stack and device drivers.</p><h3>Why Python?</h3><p>Python is designed to be highly extensible and expressed using a simple and easy-to-read syntax. Python’s standard library is full-featured and provides more than 130,000 packages to extend base functionality. As an example, the Numpy (numerical Python) library implements a wide variety of linear algebra functionality as well as complex scientific functions that are widely used in machine learning research and development.</p><p>Modern chip design teams are multidisciplinary with engineers specializing in digital, analog, and now photonic design. Across these disciplines, Python has become the “lingua franca”. Similar to the way English is the common language of pilots and air traffic controllers worldwide, Python is “spoken” fluently across the disciplines of most modern chip design teams.</p><p>Python is an interpreted language, so design changes are relatively quick, avoiding the compile/link steps of many other languages. With proper coding conventions, models can be shared between disciplines. Faster iteration on the part of programmers helps to quickly identify and remove undesired interactions between simulated components.</p><p>Due to the very rich Python libraries available, much of the analysis and development of the component models can be performed outside of the SystemVerilog simulation environment. This enables cross-functional development and rapid design iterations.</p><p>While the compile/link step is not generally considered cumbersome for software-only teams, large chip designs often require 30 minutes for a SystemVerilog simulation to compile. The ability to change a Python component model, or test stimulus, without the need for the 30 minute compile/link step enables increased productivity and reductions in overall chip design schedule.</p><h3>Multi-language co-simulation implementation decisions</h3><p>This section describes the major decision points for a custom co-simulation implementation.</p><h3>SystemVerilog simulator interface</h3><p>SystemVerilog already has a well defined interface to external functions called the Direct Programming Interface or DPI. The DPI allows bidirectional access to the SystemVerilog simulation. External functions can call SystemVerilog functions and SystemVerilog can call external functions. We chose the latter. SystemVerilog masters the simulation and calls Python functions.</p><p>In general for models of analog or opto-electronic system components, SystemVerilog shell models were made. These shell models were connected to other portions of the system and managed by place and route tools in the back end of the physical design process. From these relatively lightweight shell models, external models were accessed via function calls.</p><p>Although it will not be covered in detail in this blog post, we provide access to the Python interpreter. This allows production software to be used as stimulus in the simulation environment.</p><h3>Cross language data considerations</h3><p>For our system, memory management and cross language data conversion needed to be solved cleanly such that programmers are isolated from the internal cross language complexities.</p><p>We needed to handle the following cross language data and memory models:</p><ul><li>SystemVerilog objects are statically typed, dynamically allocated and garbage collected</li><li>Python objects are dynamically typed, dynamically allocated and garbage collected</li><li>C and C++ are statically typed, user allocated as well as de-allocated (malloc, free)</li></ul><p>In our case we chose to make SystemVerilog the memory owner for cross language data. Any variables or structures that needed to pass between SystemVerilog and the external models were created in the SystemVerilog domain, and either “passed by value” for simple integers or real-numbers or “passed by reference” in which the external model was simply given a handle to the SystemVerilog structure and SystemVerilog managed it’s lifetime. This also allows C/C++ models to avoid memory management.</p><h3>Python to C tool suite</h3><p>Python calling a foreign language is typically called “extending” the language, while a foreign language calling Python functions is called “embedding”. We use embedding.</p><p>There are multiple options for embedding support. We chose<a href="https://cffi.readthedocs.io/en/latest/overview.html"> CFFI for C Foreign Function Interface</a> [10]. The CFFI tool suite is primarily designed to extend Python, but it also has very good support for embedding Python, which is the direction we implemented. To simplify its use, it adheres to the philosophy that most of the embedding logic is written in Python, and the conversion of datatypes for Python objects to/from C is auto generated.</p><p>The CFFI build process generates a shared library in which Python functions are exported as C functions. The shared library invokes a single instance of the Python interpreter to execute the Python functions and takes care of any necessary data conversion.</p><p>Once the shared library generated above is linked with the SystemVerilog simulator executable, the exported C functions are directly available within the SystemVerilog simulator through the API. These functions then appear to be native SystemVerilog functions to the remainder of the SystemVerilog code.</p><p>This entire process is automated within our make based build flow, so the users are mostly isolated from the intermediate implementation. With just SystemVerilog and Python coding knowledge they are ready to start writing the models.</p><h3>Performance</h3><p>In any co-sim environment, performance is critical in order to allow sufficiently complex tests to be run within a reasonable time (e.g. hours, not days). Cross language calls can have a significant cost so they should be made only when needed. In our system, Python model calls are only made when the SystemVerilog shell detects a signal change which would affect the component.</p><p>With appropriate attention to performance and some code tuning along the way, we achieved the following performance:</p><ul><li>For functions with simple data types (non arrayed integer or real variables), the Python call and return takes 3us per call.</li><li>For functions with single dimension arrays of up to hundreds of array elements, the raw Python call and return time is 50us per call. The extra time is due to the array data conversion: SystemVerilog ← → C ← → Python</li></ul><p>This level of performance allows fine grained models to be implemented in Python, even if they end up getting called every clock cycle. A SystemVerilog simulation of a chip composed of billions of transistors is computationally intensive. In our experience, the Python interface calls make up a small percentage of the total simulation time.</p><h3>Putting it all together</h3><p>This section provides an example of a simple analog model implemented in Python rather than purely within the SystemVerilog language as was shown in the earlier example.</p><p>The example used here is for a current based Analog to Digital Converter (iADC).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/0*a2ugzrSUqj1YO57d" /></figure><p><em>Figure 6. Verilog code snippet with imported functions implemented in Python</em></p><p>The code given above gives an example of a SystemVerilog shell for a model in which the implementation details of the model are actually in Python Code.</p><p>The <em>initial</em> block executes at the beginning of simulation time and creates a Python object instance to correspond to the SystemVerilog shell instance. The <em>always@*</em> code block executes any time a variable in the right side of any expression changes. The code executed in that case reflects any state changes in the SystemVerilog model, into the Python object instance, so the Python object can now use those new values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/0*vlfVc9nv35YSuS6u" /></figure><p><em>Figure 7. Python code snippet</em></p><p>The Python snippet shows the simple code which implements the Python function definition which is made available to SystemVerilog. The <em>@ffi.def_extern()</em> is a Python decorator defined by the CFFI package. This decorator, combined with the C function prototype, auto-generates all the data conversion code as well as exports the C function in the generated shared object library. When the function is called it creates a Python object instance and stores that instance in the <em>iadc_dict</em> dictionary, thus creating a Python instance for each SystemVerilog instance.</p><p>As these examples show, engineers with Python familiarity can now implement complex models in Python. And, more importantly, digital designers can reuse Python models that analog or photonics engineers have already made. The complexities of the framework connecting the two languages is largely hidden.</p><h3>Conclusions</h3><p>Lightmatter is implementing a machine learning accelerator containing a mixture of digital, analog, and photonics elements. We are developing a methodology to model many of these elements in Python and link them with detailed SystemVerilog simulations of the system.</p><p>We have performed the design verification process on our mixed technology design with excellent results. We gain significant flexibility in the mixed technology modelling and we performed much of the component design process purely in the Python domain.</p><h3>References</h3><ol><li>Martin Forsythe <a href="https://medium.com/lightmatter/matrix-processing-with-nanophotonics-998e294dabc1">Matrix processing with nanophotonics</a></li><li>Mike Gould <a href="https://medium.com/lightmatter/optical-components-for-matrix-processing-73687cdd7aa6">Optical components for matrix processing</a></li><li>Ozgur Yildirim <a href="https://medium.com/lightmatter/analog-interface-of-optical-processors-46c40f63b0e7">Analog Interface of Optical Processors</a></li><li>Wikipedia: <a href="https://en.wikipedia.org/wiki/Register-transfer_level">Register Transfer Level</a></li><li>IEEE Std 1800™-2012 (Revision of IEEE Std 1800–2009) IEEE Standard for SystemVerilog — Unified Hardware Design, Specification, and Verification Language</li><li>Wikipedia: <a href="https://en.wikipedia.org/wiki/Discrete-event_simulation">Discrete-event simulation</a></li><li>Wikipedia <a href="https://en.wikipedia.org/wiki/Finite_impulse_response">Finite impulse response</a></li><li>Wikipedia <a href="https://en.wikipedia.org/wiki/SPICE">SPICE (“Simulation Program with Integrated Circuit Emphasis”)</a></li><li>Wikipedia <a href="https://en.wikipedia.org/wiki/Instruction_set_architecture">Instruction Set Architecture</a></li><li>CFFI <a href="https://cffi.readthedocs.io/en/latest/overview.html">documentation</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d0068c9ff868" width="1" height="1" alt=""><hr><p><a href="https://medium.com/lightmatter/techniques-for-performing-design-verification-of-a-mixed-signal-digital-analog-and-optical-d0068c9ff868">Techniques for performing design verification of an optical processor</a> was originally published in <a href="https://medium.com/lightmatter">Lightmatter</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Analog Interface of Optical Processors]]></title>
            <link>https://medium.com/lightmatter/analog-interface-of-optical-processors-46c40f63b0e7?source=rss----3943c2ca1164---4</link>
            <guid isPermaLink="false">https://medium.com/p/46c40f63b0e7</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[data-converter]]></category>
            <category><![CDATA[analog-circuit-design]]></category>
            <category><![CDATA[photonics]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Ozgur Yildirim]]></dc:creator>
            <pubDate>Wed, 04 Dec 2019 17:08:21 GMT</pubDate>
            <atom:updated>2019-12-04T17:08:21.829Z</atom:updated>
            <content:encoded><![CDATA[<p>In previous blogs, we detailed how artificial intelligence algorithms run efficiently in our nanophotonics processing units. In this blog, we explore the analog interface needed between these optical cores and the digital world. As we explained in previous blogs, the optical processor performs general matrix multiplication. There are three groups of elements in the multiplication equation, namely input vector, weights, and output vector.</p><p>The figure below shows a matrix multiplication (a), its block diagram (b), and implementation using optical and analog systems (c). The value of each element in the input vector and weight matrix needs to be converted into the analog domain, which can be implemented by digital-to-analog converters (DAC). The number of bits in each DAC determine the precision of the corresponding vector or matrix element.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/521/1*0JN9FqohHOdHppcn3vxVYw.jpeg" /></figure><p>Optical core drives an array of photodiodes (PDs). The currents generated by these photodiodes are amplified by an array of transimpedance amplifiers (TIAs) and then converted into the digital domain by an array of analog-to-digital converters (ADCs). The number of bits in each ADC determine the precision of the output vector.</p><p>In this blog, we will go over the operation principles and performance parameters of these analog blocks.</p><h3>High-speed medium-precision DACs</h3><p>A digital-to-analog converter is an electronic circuit that converts a multi-bit digital signal into an analog signal with multiple levels as shown in the below picture (a). Resolution, maximum operation frequency, settling time, and power consumption are the main performance parameters of a DAC. In a linear binary-weighted DAC, an N-bit digital input corresponds to 2^N equally separated analog levels at the output. 2^N is the dynamic range of this DAC, as it is the ratio of the biggest possible step and the smallest step at the output. Deviation from the ideal transfer function is quantified with integral nonlinearity (INL) and differential nonlinearity (DNL) as shown below (b). If the DNL is smaller than the least significant bit (LSB) step size, the DAC becomes monotonic, which means that with the increasing digital input code, the output can only increase.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/465/1*hltlL7xTKp7oEUpL_JXFgg.jpeg" /></figure><p>In general, a linear, monotonic, high-resolution DAC dissipates a lot of power and occupies a large silicon area. In our artificial intelligence applications, we adopted mid-resolution DACs for optimum performance, as they can run at very high speed, driving the optical core with high bandwidth, while still being power efficient.</p><h3>Amplification of photodiode current</h3><p>Photodiodes have high-speed current outputs. These currents are converted into the voltage domain by transimpedance amplifiers (TIAs). For the given power consumption, there is a trade off between dynamic range and bandwidth of the TIA. The TIA needs to have a very high bandwidth to leverage the high performance available in the optical domain. To meet the high bandwidth requirement, the feedback resistor (shown as R in the picture below) cannot be very large. As R is also equal to the gain of the TIA, to achieve rail-to-rail swing at the final output, an additional voltage gain stage is needed after the TIA. This final output signal is sampled and converted into the digital domain by the ADC.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/521/1*ahxWELUcV1s6XEHdJdR_-g.jpeg" /></figure><h3>High-speed medium-precision ADCs</h3><p>An analog-to-digital converter is an electronic circuit that converts analog signals into digital signals as shown in the below picture. First, the analog input is sampled and held on an internal capacitor. Next it is quantized into a digital signal after multiple comparison steps. The real resolution, which is known as ENOB (effective number of bits) including high-speed and nonlinear effects, maximum sampling frequency, and power consumption are the main performance parameters of an ADC.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*eE7v7wUrTP5EYG7EBfC--Q.jpeg" /></figure><p>One of the benchmarks for ADCs is the Walden figure of merit (FOMW) shown in below equation, where P is power consumption, f_S,Nyq is the Nyquist sampling frequency.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/0*dUGjALsjEaA_7Heu" /></figure><p>The picture below shows the FOMW of all the ADCs published in the two main integrated circuits conferences in the last two decades. This graph suggests that to double the sampling frequency of an ADC on the state-of-the-art envelope, you need to quadruple the power consumption. From the equation we can see that for each additional bit (for example if you increase ENOB from 9 to 10, or from 11 to 12) you need to double the power consumption.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1013/1*3jxDVgetmAxYPY6FhNNZ9Q.png" /><figcaption>B. Murmann, “ADC Performance Survey 1997–2019,” [Online]. Available: <a href="http://web.stanford.edu/~murmann/adcsurvey.html.">http://web.stanford.edu/~murmann/adcsurvey.html.</a></figcaption></figure><p>This implies a high-cost design space for high-speed mid-resolution ADCs needed by artificial intelligence applications. However, this state-of-the-art boundary moves down each year, as many of the most efficient ADCs were designed in the last couple of years. The reason for this positive trend is the availability of higher-speed process nodes and new circuit design techniques, such as novel ADC topologies and new amplifier designs used within the ADCs. Here, at Lightmatter, we are applying multiple of these new methods to develop power efficient, high-speed, mid-resolution ADCs that can digitize the high bandwidth outputs from the optical core without adding a significant power overhead to the total power consumption of the chip. This efficiency rule also applies to our DAC and TIA designs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=46c40f63b0e7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/lightmatter/analog-interface-of-optical-processors-46c40f63b0e7">Analog Interface of Optical Processors</a> was originally published in <a href="https://medium.com/lightmatter">Lightmatter</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Optical components for matrix processing]]></title>
            <link>https://medium.com/lightmatter/optical-components-for-matrix-processing-73687cdd7aa6?source=rss----3943c2ca1164---4</link>
            <guid isPermaLink="false">https://medium.com/p/73687cdd7aa6</guid>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[photonics]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[computers]]></category>
            <dc:creator><![CDATA[Michael Gould]]></dc:creator>
            <pubDate>Wed, 09 Oct 2019 13:34:59 GMT</pubDate>
            <atom:updated>2019-10-10T15:01:52.445Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>In our <a href="https://medium.com/lightmatter">previous blog posts</a>, we introduced the idea of using silicon photonics to perform large-scale linear arithmetic operations faster and more efficiently than can be done with digital electronics. As you may recall, our systems make use of many identical devices called Mach-Zehnder interferometers (MZIs) <a href="https://en.wikipedia.org/wiki/Mach%E2%80%93Zehnder_interferometer">[1]</a> to implement a basic linear operation, a 2x2 <a href="https://en.wikipedia.org/wiki/Matrix_multiplication">matrix multiplication</a>, from which much larger matrix multiplications can be built up. In this blog post, we aim to follow up with a more detailed description of how MZIs work, and hopefully elucidate some of the advantages of silicon photonics over digital electronics for performing arithmetic.</p><h3>Scalar MZI</h3><p>We first consider an MZI that can be used for scalar multiplication. A basic layout is shown below. A single input waveguide is split symmetrically to become two arms of the interferometer. As the light travels down each arm, the electromagnetic waves pick up a phase, which is (in general) path-dependent, before being recombined into a single output waveguide. We’ll refer to this configuration as a “scalar MZI.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/1*N546AYBlDQDJi_UnDbd-Sw.png" /><figcaption>Schematic representation of a scalar MZI, showing Y-junctions and differential phase-shift section</figcaption></figure><p>A scalar MZI can be divided into 3 sub-sections: two Y-junctions and a differential phase-shift. Before we go through the analysis of the full system, let’s first get acquainted with these sub-systems.</p><h4>Y-Junctions</h4><p>A Y-junction is a 3-port integrated optical device with a single port (A), coupled equally to a pair of ports (B and C). A simple version can be implemented by connecting a straight waveguide to both left- and right-turning waveguide bends as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*CNmPcaY617D2VcYyeVH77Q.gif" /><figcaption>Simulated electric field intensity (|E|²) in rudimentary Y-junction, with optical input at port A</figcaption></figure><p>When sending light into port A, the light signal undergoes a transformation that can be described by the following transfer matrix:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/96/1*fu_OgjnhCTWuzBODaME5bQ.png" /></figure><p>In order to obtain the optical field amplitudes in the output waveguide modes (B and C), we can multiply the input field amplitude by the transfer matrix. Assuming the input amplitude to be 1, we obtain identical output field amplitudes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/270/1*Tjs4DKaM9R3MdLUzacMOOA.png" /></figure><p>Much as one might expect, the input light at port A is simply split in two, with half of the optical power in each of the output waveguides (optical power is proportional to the magnitude squared of the field amplitude). In this situation, the light behaves much like water in a system of pipes.</p><p>Let us now examine what happens when we input light at port B. By optical reciprocity (a principle in optics that says light can travel both directions down the same path — think about the lenses of your glasses), the transfer matrix for passing backwards through it is simply the transpose of the forward transfer matrix:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/175/1*PUpjFVI4Zy4CR0MQgiQyCg.png" /></figure><p>Using the same matrix multiplication formalism, we obtain:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/280/1*AG5NdQOBRJFCZN3dyYWLZw.png" /></figure><p>Note that only half of the input power made it to the output, and the remainder seems to have magically disappeared (in reality it was radiated out of the system). In this case, the wave nature of light causes it not to behave like a classical fluid (water in a pipe), as can be seen in the simulation below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*08e62nqLT7kNoqL0zRTXSw.gif" /><figcaption>Simulated electric field intensity (|E|²) in rudimentary Y-junction, with optical input at port B</figcaption></figure><p>Let’s now consider one final situation, wherein light is launched into both port B and port C. In this case, we can arbitrarily set the input field amplitudes to <em>b</em> and <em>c</em> respectively. Once again, we multiply the input amplitude vector by the transfer matrix to obtain:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/339/1*dt87UEZZI030Mx0BsCk3kw.png" /></figure><p>This final Y-junction result illustrates a fundamental concept in optics known as superposition: a system’s response to multiple excitation sources is simply the sum (or superposition) of the responses to each individual source. This is one of the main advantages of optics for performing linear arithmetic: as a direct result of the inherent linearity of the system, addition is as simple as combining (e.g. interfering) two optical modes. Further, <strong>the addition operation is effectively free: no power consumption is required! </strong>Note that generation of the input light does require power consumption but this should not be included in the cost of the addition operation, as is discussed toward the end of this post.</p><h4>Phase Shift</h4><p>The scalar MZI without a differential phase shift section is a useless device that transmits all input light to the output. In terms of arithmetic operations, it can be thought of as dividing a number into equal halves and subsequently adding those two halves together again. However, as we will see, the introduction of a phase shift between the two arms results in a change in the optical power transmitted to the output mode. The transfer matrix for the phase shift section can be written as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/146/1*fkG77c0JZyuDTL2e6UXYAg.png" /></figure><p>There are many ways of introducing a phase difference between the two arms, but they are all essentially based on delaying the wave-fronts in one arm versus the other.</p><p>Perhaps the simplest method is to make the arms of different length. Because the waves in each arm travel at the same speed, those in the longer arm are delayed with respect to those in the shorter arm, resulting in a relative phase difference:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/121/1*wK39FNGPEYUeYhnHCaA8-A.png" /></figure><p>where <em>n</em> is the refractive index of the waveguide, <em>ΔL </em>is the length difference between the two arms, and <em>λ</em> is the free-space wavelength of the light.</p><h4>Let’s Put the Pieces Together…</h4><p>The system’s transfer matrix is obtained by multiplying the transfer matrices of the component parts (confusingly, the transfer matrices are written out in the opposite spatial order of the elements assuming the light travels from left to right). The resultant transfer matrix for the scalar MZI can thus be calculated as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/517/1*cB37G5JLtT7ZN08erfrXQw.png" /></figure><p>The output of the scalar MZI, then, is simply its input multiplied by a scalar value (cos(φ)). This illustrates the second key functionality required for linear arithmetic: scalar multiplication. And once again, <strong>just like addition, scalar multiplication using optics does not require the dissipation of energy!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*H8rN1qhPxYo9kCxoNeP0kA.gif" /><figcaption>Simulations of MZIs with path-length induced phase shifts of: (a) φ = 0; (b) φ = π/4; (c) φ = π/2. Note that there is some excess loss in these devices due to the rudimentary Y-junctions.</figcaption></figure><h4>Electro-Optic Scalar MZI</h4><p>Rather than relying on optical path-length, programmable phase shifts typically rely on changing the speed of the waves in the guiding material, i.e. its refractive index. Depending on the material in question, there are several common ways of accomplishing this. These include the thermo-optic effect, in which the refractive index of a material changes with temperature; the plasma dispersion effect, where the quasi-Fermi level of a semiconductor (concentration of electrons and holes) changes its refractive index; and the electro-optic effect, wherein application of an electric field to a material induces a proportional change in its refractive index. Using any one of the above effects enables the implementation of a <strong>programmable</strong> phase difference.</p><p>Let’s now consider a specific example: let the waveguides in the phase-difference section be made of an electro-optic material. In this case, opposite electric fields applied across each arm can be used to induce a differential phase between the arms. These electric fields can be obtained with a single voltage, as illustrated below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*NvydzCKyO9_QY_N_U5m8GQ.png" /><figcaption>Schematic representation of an electro-optic scalar MZI, showing electro-optic phase shift sections and applied electric potential (V)</figcaption></figure><p>In this case the phase difference can be written as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/197/1*A9GY_lWxTp9edzp5wr6Row.png" /></figure><p>where <em>c</em> is the electro-optic coefficient of the material, <em>d</em> is the distance between the electrodes, <em>L </em>is the length of the electro-optic section, and <em>λ</em> is the free-space wavelength of the light. For an input field amplitude A, the output field amplitude of the MZI is given by:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/192/1*ZG_Qn9m6MWSbkRX2kZSQKA.png" /></figure><p>From this example we can see that the scalar multiplier implemented by an MZI can be encoded in a voltage. This is an important point as it allows the value of electro-optic multipliers to be programmed using high-speed electronics, enabling a fully integrated reconfigurable solution. Though changing the multiplier value requires the transport of charges through an electric potential and thus energy dissipation, maintaining a static multiplier value does not, provided in this case that the electro-optic material is non-conductive.</p><h3>Vector MZI</h3><p>Having now seen how the “scalar MZI” can be used for scalar multiplication, we will now modify it into a “vector MZI” to perform matrix-vector multiplication. A schematic version is shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*yCDGxHJ3YzO9pdqXmNT8kA.png" /><figcaption>Schematic representation of a vector MZI, showing directional couplers (DC), and differential phase-shift section</figcaption></figure><p>Once again, we can divide the system into 3 sub-sections, but this time we replace the y-junctions with 50:50 directional couplers.</p><h4>Directional Couplers</h4><p>Directional couplers are 4-port integrated optical devices with two pairs of ports (A/B and C/D). Each port in a pair is coupled to both ports in the other pair, but not to its partner. So if, for example light is input into ports A and B, the output amplitudes at ports C and D will each be linear combinations of the input amplitudes. Such devices are realized by bringing two waveguides into close proximity so that they are evanescently coupled to one another, as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*F8ns6OM6wz49Et1mk4jiZQ.gif" /><figcaption>Simulated electric field intensity (|E|²) in directional coupler, with optical input at port A</figcaption></figure><p>A version of a lossless directional coupler can be represented by the 2x2 unitary transfer matrix:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/179/1*DLkKwoEuKw12C-DllSOtKA.png" /></figure><h4>2x2 Unitary Operation</h4><p>As in the case of the scalar MZI, we can obtain the transfer matrix of the system by multiplying the transfer matrices of the sub-components in the correct order:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*u5dEnvUrAfC-x65pk0llrw.png" /></figure><p>Note that in this case the resulting matrix is a 2x2, rather than a 1x1 as in the case of the scalar version. Much like its component directional couplers, the output field amplitudes are linear combinations of the input field amplitudes; in fact it is correct to consider the vector MZI to be a programmable directional coupler. The arithmetic operation of the device is identically multiplication of the input amplitude vector by its transfer matrix. As many of those reading will recall from introductory linear algebra courses, matrix multiplication is simply an organized series of scalar multiplications and additions: the two basic operations we have already identified as energy-free in electro-optic circuits. <strong>It should come as no surprise that this compound operation can also be performed with zero power consumption.</strong></p><p>By stringing vector and scalar MZIs into a suitable network along with simple phase shifters, <strong>arbitrary matrix multiplication can be implemented, and again the multiplication can be performed without consuming any power</strong>. It should be noted that it is necessary to consume power at the inputs and outputs of the network to encode the input vectors (this includes light generation), and decode the output vectors. However multiplying an <em>N </em>x <em>N </em>matrix by an <em>N</em> x 1 vector requires only O{<em>N</em>} encode/decode operations, while requiring O{<em>N</em>²} scalar multiplications and additions. <strong>Digital electronics require the dissipation of energy to perform scalar multiplications and additions</strong>. From the dramatically lower scaling of energy-consuming operations required in optics, it should be clear that there is some value α for which when <em>N</em> &gt; α, optics will always be more efficient.</p><p>A challenge here at Lightmatter is engineering our systems to both reduce that value of α, <strong>and</strong> increase the value of <em>N</em> for which we can build practical systems. By reducing the value of α, we will broaden the range of applications for which optical computing is attractive and increase our impact on reducing the energy costs associated with computing. By increasing the attainable value of <em>N</em>, we will do our part to extend the reach of human capability, enabling computation at scales unachievable with conventional digital machines!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=73687cdd7aa6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/lightmatter/optical-components-for-matrix-processing-73687cdd7aa6">Optical components for matrix processing</a> was originally published in <a href="https://medium.com/lightmatter">Lightmatter</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Matrix processing with nanophotonics]]></title>
            <link>https://medium.com/lightmatter/matrix-processing-with-nanophotonics-998e294dabc1?source=rss----3943c2ca1164---4</link>
            <guid isPermaLink="false">https://medium.com/p/998e294dabc1</guid>
            <category><![CDATA[optics]]></category>
            <category><![CDATA[hardware]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Martin Forsythe]]></dc:creator>
            <pubDate>Wed, 28 Aug 2019 15:32:38 GMT</pubDate>
            <atom:updated>2019-08-29T13:00:19.827Z</atom:updated>
            <content:encoded><![CDATA[<p>At the heart of the computations that power deep learning and many other numerical scientific computing tasks is a mathematical operation called general matrix multiplication (GEMM). Today, the most advanced neural networks — used in self-driving cars, cancer diagnostics, and voice assisted search — are powered by GEMM (see reference [<a href="https://petewarden.com/2015/04/20/why-gemm-is-at-the-heart-of-deep-learning/">1</a>]), and so a great deal of effort has been devoted to designing specialized hardware to accelerate this operation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EppJYObpShR7RmTZRNYiTA.png" /><figcaption>Different hardware platforms can be used to perform the GEMM operations for a deep learning prediction. The box titled LM indicates Lightmatter’s photonic processor.</figcaption></figure><p>At Lightmatter, we are building a photonic processor to accelerate deep learning. In a previous <a href="https://medium.com/lightmatter/the-story-behind-lightmatters-tech-e9fa0facca30">post</a> we discussed the history of optical chips and the advances that made Lightmatter’s technology possible today. This post will dive into some of the technical differences between optical and electronic accelerators with the goal of explaining why nanophotonics offers a route to higher computational performance while requiring significantly less energy, reducing both cost and heat production. The post will first explain how general matrix multiplication works and how it is implemented in accelerator hardware today. Then, we will explain how Lightmatter’s nanophotonic processor uses light rather than digital electronics to implement the same GEMM calculations more efficiently.</p><h3>Matrix multiply-accumulate operations</h3><p>A matrix is a two-dimensional array of values — its size is quantified by the number of rows and columns, which is often written as [rows 𝗑 columns]. When two matrices, <strong><em>A </em></strong>and <strong><em>B</em></strong>, are multiplied together, the result is a new matrix <strong><em>D</em></strong>. If <strong><em>A </em></strong>and <strong><em>B</em></strong> are of sizes [<em>I </em>𝗑<em> J</em>] and [<em>J</em> 𝗑 <em>K</em>] respectively, the matrix <strong><em>D</em></strong> is of size [<em>I </em>𝗑 <em>K</em>]. Each element of <strong><em>D</em></strong> is computed by accumulating the multiplication of each element of the vectors (1D arrays) that are extracted from the rows of <strong><em>A</em></strong> and the columns of <strong><em>B</em></strong>. Consequently, matrix multiplication “contracts” the inner dimension J.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wCkTiZbVk-RkqCBd8JoCrg.png" /><figcaption>The highlighted element of <strong>D</strong> is computed from the highlighted row of <strong>A </strong>and column of <strong>B</strong>.</figcaption></figure><p>In code this looks like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*thYbIBx7-0VV9CiK3picjQ.png" /></figure><p>When designing hardware to perform matrix multiplication there are a number of optimizations that are possible. In digital electronics, one such optimization is to implement a hardware instruction called a <a href="https://en.wikipedia.org/wiki/Multiply%E2%80%93accumulate_operation">multiply-accumulate</a> (MAC), which computes <em>d←a</em>∗<em>b+c </em>for three numbers, <em>a</em>, <em>b</em>, and <em>c</em>. From the code above we can recognize that a matrix multiplication can be decomposed into a series of MACs. There are also a number of optimizations involving data access/memory management <a href="https://github.com/flame/blislab">tricks</a>, but for the purposes of this post we’ll just concern ourselves with the MACs since they are the fundamental unit of computation.</p><p>If you look back at the first figure, you will notice that the elements in <strong><em>A</em></strong>, <strong><em>B</em></strong> and <strong><em>D</em></strong> are grouped suggestively. It turns out that you can express the multiplication of a large matrix in terms of the products of smaller matrices if you split the larger matrices into sub-matrices, called <em>tiles </em>or <em>blocks</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vu41VhsZd1VLzjRN-U581w.png" /><figcaption>On a matrix processor the green tile is computed by accumulating products of the blue and orange tiles; the red tile is accumulated from the products of the purple and orange tiles. Since there are two rows of tiles in the matrix <strong><em>A</em></strong>, the orange tiles from <strong><em>B</em></strong> are used twice in computing the output.</figcaption></figure><p>On a matrix processor, such as Google’s TPU [<a href="https://arxiv.org/abs/1704.04760">2</a>] or MIT’s Eyeriss [<a href="http://eyeriss.mit.edu/">3</a>], rather than operating on a stream of single values in row and column vectors, the computation is parallelized by processing products of tiles<em>. </em>The tiles are accumulated in exactly the same row-column pattern pictured above where the unit element was a single entry.</p><p>So far, we have explained the matrix-multiply portion of the GEMM operation. The word “general” in the acronym comes from allowing the matrix product (<strong><em>A </em></strong>𝗑 <strong><em>B</em></strong>) to be summed with an initial value matrix <strong><em>C </em></strong>[4], forming a matrix multiply-accumulate (MMAC).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d283w8eFAaStthtWYiLLVg.png" /></figure><p>In this equation the left arrow indicates that the result may optionally be accumulated in-place, i.e. into the same memory that was storing <strong><em>C</em></strong>, just like the += notation in the code above. Thinking in terms of MMAC operations we can visualize the matrix multiplication of the tiles as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6NHi2hpsVRhFtMHmum4MXg.gif" /><figcaption><strong>+=</strong> indicates accumulation, <strong>x</strong> indicates matrix multiplication</figcaption></figure><h3>Matrix processors — mesh-based parallel computing</h3><p>To understand how nanophotonics and digital electronics differ for making GEMM accelerators, it is helpful to first discuss the mesh diagrams that get used to describe parallel dataflow processors. In a dataflow processor, different processing elements (PEs) independently perform partial computations and data moves between processing elements each tick of the processor’s timing clock. Computation at each PE depends on the upstream elements, i.e. in the diagram below <strong>b</strong> depends on <strong>a</strong>, and <strong>c</strong> depends on <strong>b </strong>(thus indirectly on <strong>a</strong>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gkMJl89pNBZ3EmOkgqRu8Q.png" /><figcaption>Data moves one arrow during each clock period (T), no matter the length of the arrow.</figcaption></figure><p>Thus, the arrows that connect PEs in a mesh diagram indicate both a temporal and arithmetic dependency structure. Each compute node also plays a role in the distributed storage of data by having a small local memory. However, due to the local topology of the mesh, moving data from main memory to an internal PE requires the data to first pass through intermediate PEs–e.g. it takes two clock cycles to move data from memory to the central PE in the diagram below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y2Q_k9UHxjU17cT2Py6EAQ.png" /><figcaption>Data moves between processing elements (PEs) in the direction of the arrows.</figcaption></figure><p>Depending on the dataflow processor in question, each node may have varying levels of complexity; a PE might be as complicated as a general purpose CPU or as simple as a single multiply-accumulate (MAC) unit with data routing. When the mesh of PEs is homogeneous, i.e. each PE performs the same partial computation, the mesh is called a “systolic array” [<a href="http://www.eecs.harvard.edu/~htk/publication/1982-kung-why-systolic-architecture.pdf">5</a>].</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hKdfrrnLSPr_MFNSdZZcTA.png" /><figcaption>PEs for matrix multiplication with a 2D systolic array. In a spatial accumulation array the values for <strong>a</strong> are broadcast to the array prior to beginning computation, which is why the PE stores <strong>a</strong> as internal state. In a temporal accumulation array, the result is stored as internal state, so a readout broadcast must be used.</figcaption></figure><p>The pipeline parallelism that is used to feed a systolic matrix multiplier can be a little surprising if you are not used to dataflow meshes. In a spatial accumulation mesh, the values for a tile of <strong><em>A</em></strong><em> </em>are broadcast to the mesh <em>prior </em>to beginning the computation. Column vectors from the tile of <strong><em>B </em></strong>are then fed into the mesh in a staggered pipeline and for each clock cycle data flows between the processing units and accumulates the matrix-vector product as it passes through. The animation below shows this pipeline for a [3 𝗑 3] systolic array processing a [3 𝗑 9] input matrix<em>.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/519/1*1UqEpy9q4qWqUnOfsaHOWg.gif" /><figcaption>Animation of computing a [3 𝗑 3][3 𝗑 9] matrix product with a spatial accumulation systolic array.</figcaption></figure><p>The animation above shows that computing this [3 𝗑 3][3 𝗑 9] matrix product takes 14 clock cycles. In general it takes N timesteps to load the tile <strong>A</strong> onto an [N 𝗑 N] mesh and (2*N-1+K) clock cycles to compute a [N 𝗑 N][N 𝗑 K] matrix product. In contrast, a processor with a single MAC unit would take N*N*K clock cycles (e.g. 81).</p><h4>Weight stationary processing</h4><p>In deep learning applications, we are frequently interested in computing matrix products where one of the dimensions is significantly larger than the other. For instance, computing a 2D convolution as a matrix product using the so-called <em>im2col</em> trick will result in a small “weight” matrix <strong><em>A </em></strong>and a wide “data” matrix <strong><em>B</em></strong>. In such a situation it is useful to perform as much computation as possible while the same weight matrix tile is loaded on the matrix processor, i.e. keeping the “weights stationary” while streaming “data vectors” through the processor. This weight stationary scheme is typically used in spatial accumulation architectures, while an “output-stationary” scheme is used in temporal accumulation architectures (see references [<a href="https://arxiv.org/pdf/1807.07928.pdf">3</a>, <a href="https://medium.com/@CPLu/should-we-all-embrace-systolic-array-df3830f193dc">7</a>, <a href="https://medium.com/@CPLu/should-we-all-embrace-systolic-array-df3830f193dc">8</a>]). In the context of deep learning this pattern of holding the weights static is especially useful for “inference” workloads where a pre-trained neural network is used to make predictions on millions of data.</p><h3>Nanophotonic matrix processors</h3><p>So far, we have discussed matrix multiply accumulate operations and how they can be implemented with conventional digital electronics. Now we are going to dive into how Lightmatter’s processor uses light instead of electronics. The word “nanophotonic” — “nano” meaning small and “photonic” meaning having to do with light — is used to describe optical computing elements that are implemented with integrated optical circuits, which can be fabricated using traditional semiconductor/oxide processes.</p><p>Computing a matrix product on a nanophotonic matrix processor is quite a bit different from the operation of a digital electronics-based 2D systolic array. However, the pattern of using a weight stationary scheme to compute a stream of products between “weight” tiles of the <strong><em>A</em></strong> matrix and “data” vectors from the <strong><em>B</em></strong> matrix remains the same. In fact, we can represent both a systolic array and a nanophotonic processor with the following dataflow diagram in which the processing element (PE) computes the product between an [N 𝗑 N] matrix tile and an N-element data vector. The only difference is that with a systolic array, the data pipelines are staggered across N cycles while a nanophotonic processor computes all N-elements synchronously.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YjVyL7T0T9nGWGATvr3XKw.png" /><figcaption>Dataflow for a matrix-vector processor with an array size of N=6. In a nanophotonic processor the PE computes the matrix-vector product synchronously, while for a systolic array the PE computes with an N-step pipeline.</figcaption></figure><p>In digital electronics, data is encoded as a binary string in the on/off state of transistors. This means that the numbers that are representable are discrete, e.g. integers or floating-point values. In photonics, data is encoded by modulating the amplitude (or phase) of pulses of laser light; this allows representing continuous values, i.e. real numbers. Changing the strength (or direction) of the optical field changes the real number that is represented. Instead of wires guiding electronic currents, silicon structures called waveguides carry the laser light — this is similar to how an optical fiber guides telecommunications signals. In place of the integrated transistor circuits that perform a MAC, in nanophotonics there are two primitive computational elements for manipulating our representation— a <a href="https://en.wikipedia.org/wiki/Mach%E2%80%93Zehnder_interferometer"><strong>Mach-Zehnder interferometer</strong></a>, that rotates vectors, and an <strong>attenuator</strong>, that scales them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tGqx091koIl5b1jETHGb6g.png" /><figcaption>Comparison between digital electronics and photonics representations of operations and numbers.</figcaption></figure><p>The Mach-Zehnder interferometer (MZI) is the most important element to understand because it can be modified to build an attenuator. An MZI operates on the light in two waveguides. By interfering the light from the two “arms” of the interferometer, an MZI computes the product between a [2 𝗑 2] <a href="https://en.wikipedia.org/wiki/Unitary_matrix">unitary matrix</a>, <strong><em>U</em></strong>, and the 2-element data vector, <strong><em>x</em></strong>, represented by the light in the two incoming waveguides. This product <strong><em>Ux</em></strong><em> rotates</em> the <strong><em>x</em></strong> vector without<em> </em>changing its length. You can think about this as shuffling some of the light from one waveguide to another while still preserving the total amount of light. The rotation angle, <em>θ</em>, determines how much light moves from one arm to another and is controlled by the voltage applied to two adjustable phase shifters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IiGMKjwEmmD5TgN6ILIL5Q.png" /><figcaption>An MZI performs a rotation matrix on the 2-element data vector in <strong>two</strong> incoming waveguides.</figcaption></figure><p>There are many ways to parameterize a unitary matrix (see reference [<a href="https://doi.org/10.1016/j.laa.2018.02.017">6</a>]), and correspondingly there are a number of different physical layouts for building an MZI. The parameterization used above highlights the relationship with the rotation matrices that you may have encountered in a math class.</p><p>The second primitive element for computation nanophotonics is an attenuator. One way to implement this is by blocking off the waveguides coming into/out of one arm of an MZI. Taking the light out of one arm allows this attenuator element to <em>scale</em> the data value in a waveguide by a factor of cos <em>θ</em>, i.e. by factors in the range [-1, 1]<em>.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TZWkvqWyvz8mYtfia2BEGw.png" /><figcaption>An attenuator scales the data value in <strong>one </strong>incoming waveguide by a factor of cos <em>θ.</em></figcaption></figure><p>So, how do you use MZIs and attenuators to perform the matrix multiplication between a square tile of <strong><em>A</em></strong><em> </em>and the corresponding tile of <strong><em>B</em></strong>? Researchers in quantum computation / optics have devised a number of different schemes for making meshes of MZIs that can be programmed to perform <em>any</em> [N 𝗑 N] unitary matrix, <strong><em>U</em></strong>, on N waveguides (see references [<a href="https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.73.58">9</a>, <a href="https://arxiv.org/pdf/1603.08788.pdf">10</a>, <a href="https://pdfs.semanticscholar.org/5063/688ef3ff4c5df3e5fe97ab32d636ecff7f24.pdf">11</a>]). You can think of this as building up an N-dimensional rotation by performing a series of [2 𝗑 2] rotations in different pairs of directions, i.e. 2D subspaces. If you view each column of <strong><em>B</em></strong> as specifying the coordinates of a point in a high dimensional space, the act of multiplying this vector by the matrix <strong><em>A</em></strong> can be regarded as transforming the coordinate system.</p><p>By using a factorization called the <a href="https://en.wikipedia.org/wiki/Singular_value_decomposition">singular value decomposition</a>, it is possible to interpret any matrix multiplication as first performing a rotation, then scaling each axis, and finally performing another rotation. Since a unitary matrix performs a rotation and a diagonal matrix scales each row independently, this decomposition allows us to rewrite any matrix tile, <strong><em>M</em></strong>, as a product of two unitary matrices (<strong><em>U</em></strong>, <strong><em>V</em></strong>) and a diagonal matrix (<strong><em>Σ</em></strong>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IF8SlHZkHpqs2d0B1YqCYQ.png" /><figcaption>Singular value decomposition of a matrix tile <strong>M</strong>.</figcaption></figure><p>By choosing an appropriate scaling for our number representation, we can implement the diagonal matrix <strong><em>Σ</em></strong> with attenuators. Thus, any matrix tile <strong><em>M </em></strong>can be implemented with two MZI meshes and a column of attenuators. In the diagram below we assume that light propagates from left to right, so the order of the MZI meshes corresponding to <strong><em>U</em></strong> and <strong><em>V</em></strong> is reversed relative to the equation above.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AT7sJ5I9lM_L9-H4w0BY3A.png" /><figcaption>Example array of photonics elements that can be programmed to implement any [6 𝗑 6] matrix. A careful observer will note that there are N*(N-1)/2 MZIs for each unitary matrix, for a total of 2*N*N phase-shifters. However, since we set the two phase shifters in the MZI to <em>θ</em> and <em>-θ</em>,<em> </em>there are only N*N unique phases, the same number of free parameters as the original matrix tile, <strong><em>M</em></strong>.</figcaption></figure><p>It’s important to note that the lines and boxes in the diagram above have a very different meaning than in the previous dataflow processor diagrams; the entire computation is performed as the light travels from the input to the output of the MZI/attenuator mesh. Since this “time-of-flight” is only about 100 picoseconds, we are able to compute the full output for a matrix-vector product in a single clock cycle!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9P7utTU-Uy0zf-Oa28MAyw.png" /><figcaption>Dataflow in a nanophotonic matrix processor.</figcaption></figure><h3>The future of AI hardware accelerators</h3><blockquote>ML is both broad enough to apply to many domains and narrow enough to benefit from domain-specific architectures, such as Google’s Tensor Processing Unit (TPU). Moreover, the growth in demand for ML computing exceeds Moore’s law at its peak, just as it is fading. Hence, ML experts and computer architects must work together to design the computing systems required to deliver on the potential of ML.<br> — Jeff Dean, David Patterson, Cliff Young <a href="https://doi.org/10.1109/MM.2018.112130030">IEEE Micro, 38 (2), 21 (2018)</a></blockquote><p>Deep learning is revolutionizing the way that problems are solved in many fields, from enhancing diagnostic medical imaging to powering speech recognition systems and search engines. At the same time, the need for ever more powerful computers to train the largest AI systems has been increasing exponentially —<a href="https://openai.com/blog/ai-and-compute/">more than 5x faster than Moore’s law</a>! This exceptional computational resource requirement is one of the factors that limits advances in artificial intelligence; all this computation demands considerable energy with correspondingly high financial and environmental costs [<a href="https://arxiv.org/abs/1906.02243">12</a>].</p><p>The computational throughput achievable with digital electronics is limited not just by how many transistors can be put in a given area of silicon, but by how quickly the chip can be cooled. One of the largest operational costs of a data center is the electricity used to cool the processors. With modern transistor densities, it is not physically possible to cool a chip fast enough to prevent it from melting if all of the transistors on the chip are simultaneously powered on (leading to so-called <a href="https://en.wikipedia.org/wiki/Dark_silicon">dark silicon</a>). This also limits how fast the processor’s clock frequency can be (reference [<a href="https://www.comsol.com/blogs/havent-cpu-clock-speeds-increased-last-years/">13</a>] offers an approachable discussion). Thus, thermal management is one of the central factors that limits how much computation a chip can perform.</p><p>Unlike switching electronic transistors on and off, passing light through the optical elements in a nanophotonic processor does not generate heat. Transistors are still required for the memory used to store data as well as the control electronics that manage the processor. However, the key is that we are able to replace all of the transistors for N*N MACs with just 2N elements for converting the data vector into/out of the optical signal. (There are also electronics for re-programming the phase shifters whenever the weight matrix tile is changed, but these modulate less frequently and are thus less of a power constraint). As a result, our processor uses orders of magnitude less energy per matrix calculation. Since a nanophotonic matrix processor does not generate nearly as much heat, it is theoretically possible to run the processor much faster than the latest electronic chips. By building a processor that is both faster and more energy-efficient than electronic accelerator hardware, we hope to make a positive contribution to the advancement of artificial intelligence and reduce the carbon footprint in the process!</p><p><em>This article contains contributions by </em><a href="https://medium.com/u/81fa8f6f466d"><em>Martin Forsythe</em></a><em>, </em><a href="https://medium.com/u/e84b7cb7c2f0"><em>Siddharth Trehan</em></a><em>, </em><a href="https://medium.com/u/429ed1911566"><em>Victoria Pisini</em></a><em>, </em><a href="https://medium.com/u/7e80b9510e4a"><em>Michael Gould</em></a>, <a href="https://medium.com/u/e12802c4dcc6"><em>Tomo Lazovich</em></a><em>, </em><a href="https://medium.com/u/f78aab8cd687"><em>Tyler Kenney</em></a><em>, </em><a href="https://medium.com/u/6187d33b077c"><em>Scott McKenzie</em></a><em>, </em><a href="https://medium.com/u/4945e7efe10b"><em>Darius Bunandar</em></a><em>, and </em><a href="https://medium.com/u/65681d25102d"><em>Nicholas Harris</em></a><em>.</em></p><h4>References, footnotes, and further reading</h4><p>[1] P. Warden <a href="https://petewarden.com/2015/04/20/why-gemm-is-at-the-heart-of-deep-learning/">Why GEMM is at the heart of deep learning?</a><br>[2] Google’s TPU: <a href="https://arxiv.org/abs/1704.04760">arXiv:1709.03395</a><br>[3] MIT’s Eyeriss project: <a href="http://eyeriss.mit.edu/">eyeriss.mit.edu</a> &amp; <a href="https://arxiv.org/pdf/1807.07928">arXiv:1807.07928</a><br>[4] Strictly speaking the <a href="https://en.wikipedia.org/wiki/Basic_Linear_Algebra_Subprograms#Level_3">BLAS</a> standard for GEMM also allows scaling by numbers ⍺ and β, <strong><em>D←</em></strong>⍺(<strong><em>A</em></strong>𝗑<strong><em>B</em></strong>)+β<strong><em>C</em></strong>, and optionally allows transposing or conjugating the matrices <strong><em>A</em></strong> and <strong><em>B</em></strong>, but deep learning accelerators are typically designed to perform a simple MMAC.<br>[5] H.T. Kung (1982) <a href="http://www.eecs.harvard.edu/~htk/publication/1982-kung-why-systolic-architecture.pdf">doi:10.1109/MM.2018.112130030</a><br>[6] H. Führ and Z. Rzeszotnik (2018) <a href="https://doi.org/10.1016/j.laa.2018.02.017">doi:10.1016/j.laa.2018.02.017</a><br>[7] C.-P. Lu (2017) <a href="https://arxiv.org/pdf/1705.05983.pdf">arXiv:1705.05983</a><br>[8] C.-P. Lu <a href="https://medium.com/@CPLu/should-we-all-embrace-systolic-array-df3830f193dc">Should we all embrace systolic array</a>s?<br>[9] M. Reck et al. (1994) <a href="https://doi.org/10.1103/PhysRevLett.73.58">doi:10.1103/PhysRevLett.73.58</a><br>[10] W. Clements et al. (2016) <a href="https://arxiv.org/pdf/1603.08788.pdf">arXiv:1603.08788</a><br>[11] H. de Guise et al. (2018) <a href="https://pdfs.semanticscholar.org/5063/688ef3ff4c5df3e5fe97ab32d636ecff7f24.pdf">doi:10.1103/PhysRevA.97.022328</a><br>[12] E. Strubbell et al. (2019) <a href="https://arxiv.org/abs/1906.02243">arXiv:1906.02243</a><br>[13] P.P. Mattsson <a href="https://www.comsol.com/blogs/havent-cpu-clock-speeds-increased-last-years/">Why Haven’t CPU Clock Speeds Increased in the Last Few Years?</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=998e294dabc1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/lightmatter/matrix-processing-with-nanophotonics-998e294dabc1">Matrix processing with nanophotonics</a> was originally published in <a href="https://medium.com/lightmatter">Lightmatter</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The story behind Lightmatter’s tech]]></title>
            <link>https://medium.com/lightmatter/the-story-behind-lightmatters-tech-e9fa0facca30?source=rss----3943c2ca1164---4</link>
            <guid isPermaLink="false">https://medium.com/p/e9fa0facca30</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[optics]]></category>
            <category><![CDATA[photonics]]></category>
            <category><![CDATA[computers]]></category>
            <dc:creator><![CDATA[Lightmatter]]></dc:creator>
            <pubDate>Wed, 24 Jul 2019 21:10:41 GMT</pubDate>
            <atom:updated>2019-07-25T00:57:17.607Z</atom:updated>
            <content:encoded><![CDATA[<p>Photonic (or optical) computers have long been considered a holy grail for information processing due to the potential for high bandwidth and low power computation. Developing these machines required three decades of technological advancement that Lightmatter is now harnessing to deliver on the promise of highly power-efficient, parallel computation with light. In this blog post, we will walk through the history of optical computing, its death and its resurgence in quantum computing, and how Lightmatter is now building on these techniques to develop a faster and more energy-efficient optical processor for artificial intelligence.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WB4i2O2iYPW2ql4h" /></figure><h4>A brief history of optical computing</h4><p>In the 1980s, scientists at Bell Labs made early attempts at creating optical computers. This new kind of computer would offer bandwidth that was significantly higher than that of electronics — hundreds of terahertz (10^14) compared to a few gigahertz (10^9). By the mid 1980s, hopes for this technology had reached a <a href="https://www.nytimes.com/1985/10/22/science/light-may-be-key-to-new-generation-of-fast-computers.html">fever-pitch</a>:</p><blockquote><em>By the mid-1990’s we’ll have flexible programmable computers. You may never know there are optics in there. You’ll see no flashing lights. It will be very dull looking. But it will run circles around everything else. Electronics just can’t keep up with us.</em></blockquote><blockquote>- Dr. Henry J. Caulfield <em>(New York Times, 1985)</em></blockquote><p>The Bell Labs approach to optical computing relied on implementing an optical version of the electronic transistor — a device that is used to switch (or amplify) electrical signals. Unlike electrons, which are used in the transistors inside your phone and computer, light beams do not interact directly with each other. However, light can interact with materials; by temporarily changing the properties of the material that it is passing through, the passage of one light beam can be ‘felt’ by another.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uEZZ1rH0o1ctEr-g" /><figcaption><em>Fig. When considered as a digital (off or on device), transistors (middle) are an electronic version of a switch (left). Optical transistors (right) were meant to replace their electronic counterpart.</em></figcaption></figure><p>As you may have noticed, the prediction made by the Bell Labs scientists did not come to fruition. This was largely due to difficulties in implementing “optical transistors.” Each optical transistor absorbs some light, making the signal weaker and weaker as it propagates and limiting the number of operations that can be performed on this kind of system. On top of this, there was the issue of storing data optically, a problem which remains extremely challenging to this day. There was a significant backlash in the scientific community towards research on optical computing due to the unfulfilled promises of the 1980s and the hype that it generated.</p><p>While the optical transistor was dying, a new kind of optical computing approach was being invented. In the mid-1990s, the field of quantum computing was growing rapidly owing to new proofs that showed that quantum systems could <a href="https://en.wikipedia.org/wiki/Shor%27s_algorithm">solve problems</a> that were intractable on classical computers. There were many known approaches to implementing quantum systems, including using photons (single particles of light). In 1994, in hopes of building an optical quantum processor, <a href="https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.73.58">Michael Reck and co-authors</a> described a system that used arrays of a fundamental optical component — the Mach-Zehnder Interferometer (MZI) — to perform an important mathematical operation called matrix multiplication.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tWFoeSvuEfSKcM5E" /><figcaption><em>Fig. Bulk optical (left) and integrated optical (right) implementation of a Mach-Zehnder interferometer. Bulk optics systems are typically assembled on room-scale metal tables.</em></figcaption></figure><p>At the time, experiments in optics were typically performed using bulky optical components that were screwed into an optical tabletop (i.e., a heavy, metal, vibration-controlled surface; often called a “breadboard”) for mechanical stability. With this “breadboarding” platform, stabilizing optical systems with tens of optical beams that operate in synchronous beats was intractable — even small vibrations or temperature changes would introduce errors to the system. So, while the idea of concatenating small optical circuits to form a larger optical computer was revolutionary, the technology to make it possible had not yet caught up with the theory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/0*rNUDRc7F3LzJieYX" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bh3J1_JW_PnnszDf" /><figcaption><em>Fig. Bulk optical (left) and integrated optical (right) version of the same </em><a href="https://phys.org/news/2015-04-quantum-teleportation-chip.html"><em>quantum teleportation setup</em></a><em>.</em></figcaption></figure><h4>Research on integrated photonics for matrix processing</h4><p>The solution on the horizon was to shrink the meter-sized optical components down to 10s of microns using computer chips with “integrated photonics” elements that could be easily fabricated and controlled. Thanks to interest in the technology surrounding the fiber optical networks that serve as the backbone of today’s internet, the telecommunications industry was actively working on developing photonic chips. However, it wasn’t until <a href="https://ieeexplore.ieee.org/document/4032698">around 2004</a> that fabricating photonic integrated circuits with a large number of components became feasible. By 2012, photonic chip fabrication facilities began offering multi-project wafer (MPW) services for silicon-based optical chips. This enabled multiple academic research groups to share resources and produce designs in low quantities at reduced costs. The first optical computers that would lead to Lightmatter were created in this environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lyun-Zm_eFkAAscP" /><figcaption>Fig. Micrograph of a programmable nanophotonic processor. This chip was fabricated at IME A*STAR in Singapore in 2013.</figcaption></figure><p>In 2012, Nicholas Harris (Lightmatter’s CEO) and collaborators used the <a href="https://www.laserfocusworld.com/home/article/16559512/astar-ime-university-of-washington-team-up-to-provide-silicon-photonics-platform">OpSIS MPW service</a> to realize a “programmable nanophotonic processor” (PNP), an optical processor implemented in silicon photonics that performs matrix transformations on light. There were two major technical challenges towards implementing large-scale PNPs: (1) compact, low-loss, and efficient phase shifters and (2) multi-channel control and readout circuitry. The first <a href="https://en.wikipedia.org/wiki/Tape-out">tapeout</a> was completed at the end of 2012 and the resulting chip is shown above.</p><p>As a member of Prof. Dirk Englund’s <a href="http://www.rle.mit.edu/qp/">Quantum Photonics Laboratory</a> at the <a href="http://web.mit.edu/">Massachusetts Institute of Technology</a>, Harris spent the next several years designing the control and readout hardware from scratch, coding the software platform, and developing calibration techniques for PNPs as well as designing and taping-out increasingly complex PNPs. The first research articles on the PNP and its application to quantum information processing were posted to the online preprint server arXiv in 2015: one <a href="https://arxiv.org/abs/1507.03406">article</a> from Harris and Darius Bunandar (Lightmatter’s Chief Scientist) together with collaborators at MIT, and <a href="https://arxiv.org/abs/1505.01182">another</a> from Jacques Carolan and collaborators at the University of Bristol in the UK. The articles were ultimately published in the academic journals <a href="https://www.nature.com/articles/nphoton.2017.95">Nature Photonics</a> and <a href="https://science.sciencemag.org/content/349/6249/711">Science</a>.</p><p>Because the PNP could implement general matrix operations, it enabled a broad array of applications, including classical computing, quantum computing, data routing, security, and more. Installations of the PNP setup were deployed at universities and research facilities including MIT, the University of Vienna, and the Air Force Research Laboratory. We’ve included a list of academic publications that used the PNP at the end of this article. We recently wrote a review article on the field of PNPs, which can be found <a href="https://www.osapublishing.org/optica/viewmedia.cfm?uri=optica-5-12-1623&amp;seq=0">here</a>.</p><p>In 2017, Harris and other collaborators at MIT published <a href="https://www.nature.com/articles/nphoton.2017.93">a paper on deep learning</a> that used the PNP to demonstrate parts of an all-optical neural network (a concept first <a href="https://infoscience.epfl.ch/record/158539/files/AO_26_5061_Dec1987.pdf">reported</a> in 1987 at CalTech). In that work, an entire deep neural network would be unrolled into many PNPs stitched together using nonlinear optical elements (rudimentary versions of optical transistors). As a side note, we’re often asked if this work is a basis of Lightmatter’s tech. It is not — the proposal was interesting, but it had limitations.</p><p>First, neural networks can have hundreds of millions of parameters; current technology cannot support a corresponding number of MZIs. In fact, the implementation would likely require arrays of chips optically connected with nonlinear optical elements. Second, there are challenges towards implementing these nonlinear optical elements — the same kind of challenges that Bell Labs had in the 1980s. While implementations of all-optical neural networks from the 2017 proposal are likely to remain elusive, the underlying hardware — the PNP — developed by Harris and collaborators in the Quantum Photonics Laboratory at MIT has established itself as a valuable alternative platform for matrix processing.</p><h4>Matrix processors and deep learning</h4><p>While optical matrix processing technology was maturing, big things were happening in the artificial intelligence processor space. In 2017, Google published its work on a <a href="https://arxiv.org/abs/1704.04760">matrix processor for deep learning</a>. They called it the “Tensor Processing Unit.” This move was surprising, since Google is broadly known as a software company, yet its team had designed and fabricated a state-of-the-art chip in one year to help enhance Google’s software products. State-of-the-art artificial intelligence algorithms (typically deep neural networks) are, at their core, sequences of matrix products. Therefore, building matrix processors for this task makes a lot of sense.</p><p>Google’s TPU release was part of a sort of big bang for machine learning chips as investors, corporations, and entrepreneurs perceived the commercial opportunity in building application-specific chips to speed up artificial intelligence tasks. The realization would spawn internal research efforts at many tech companies and a new wave of hardware startups all aimed at building chips to accelerate artificial intelligence applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*OV4NNaFpne406rz_" /><figcaption><em>Fig. 2D arrays of compute units used for matrix processing in the Google TPU and Lightmatter’s processor.</em></figcaption></figure><p>The TPU is composed of a 2D <a href="http://www.eecs.harvard.edu/~htk/publication/1982-kung-why-systolic-architecture.pdf">“systolic” array</a> of multiply-accumulate units (MACs) that fire in a synchronized sequence. Each MAC performs the operation ab+c, where a, b, and c are values stored in registers. A schematic representation of a systolic MAC array is shown above. In Google’s TPU, the MAC array is typically configured so that the weights that represent a layer (or chunk of a layer) of a neural network are loaded into the array and the vector data (images, etc.) flow through the array with each clock cycle. When computing a matrix-matrix product, there are many different data vectors that need to be multiplied by the same weight values. So, there is a big benefit to storing the weights in the MAC array, rather than having to load them repeatedly from memory. This is known as a “weight stationary” scheme and is generally viewed as an efficient method in the context of deep learning inference tasks, since memory access is both slow and energy intensive — especially if the memory is not located on-chip.</p><h4>The future</h4><p>At Lightmatter, we take a different approach to processing deep neural networks, but with many similarities to the 2D MAC array employed by the TPU. Our approach, based on the PNP architecture, relies on a 2-D array of Mach-Zehnder interferometers (MZIs) fabricated in a silicon photonics process. To implement an N by N matrix product, our approach requires N² MZIs — the same number of compute elements used by systolic MAC arrays. Mathematically, each MZI performs a 2-by-2 matrix-vector product. Together, the whole mesh of MZIs multiplies an N-by-N matrix by an N-element vector. Computation occurs as light travels from the input to the output of the MZI array within the time of flight for the optical signals of about 100 picoseconds — less than a single clock cycle of your computer! Because our system operates at optical wavelengths, the theoretical bandwidth of the MZIs is nearly 200 terahertz (it would be a challenge to drive the MZIs at anywhere near this speed) compared to a couple of gigahertz for electronic MACs. Our MZIs require orders of magnitude less energy per calculation than electronic MACs implemented in the latest electronic chips.</p><p>Because of these special properties of our photonic system, we’re able to implement a matrix processor that is both faster and more energy-efficient than electronic artificial intelligence accelerators.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dKWZJ5WmtEHsBzc2" /><figcaption><em>Fig. The research platform developed and used in academic publications by the founders of Lightmatter while at the Quantum Photonics Laboratory at MIT. The photonic processor is controlled by an array of custom circuits with programmable electrical outputs and the light is read-out using an array of detectors mounted on another custom circuit board; both units communicate over USB via a microcontroller to a host computer. At Lightmatter, we are integrating all of these functions into a single chip.</em></figcaption></figure><p>Since the founding of Lightmatter, we have been improving the way that we control and interface with our optical computer. To make our system user-friendly we’ve undertaken a number of engineering challenges: (1) implementing all of the control and readout circuits on-chip, (2) integrating high density memory in the package, (3) adding standard electronic communications interfaces to the system so that the chip can talk with the outside world just like an electronic accelerator, and (4) building the software infrastructure that will make the system plug-and-play for anyone who will use our product.</p><p>Building the hardware and software stack is important, but it can’t be done open-loop. Over the past year, we’ve been benchmarking our system on large-scale, real world neural network architectures and datasets (like <a href="https://arxiv.org/abs/1512.03385">ResNet</a> with <a href="http://www.image-net.org/">ImageNet</a>) that are more relevant than handwritten number recognition tasks from the 1990s (like <a href="http://yann.lecun.com/exdb/mnist/">MNIST</a>).</p><p>We look forward to sharing our ultra-fast, efficient optical compute platform with companies that, like us, are looking to push the boundaries of what is possible with responsible artificial intelligence.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Em92OaBTKW0j_s8w" /></figure><p><em>This article contains contributions by </em><a href="https://medium.com/u/65681d25102d"><em>Nicholas Harris</em></a><em>, </em><a href="https://medium.com/u/4945e7efe10b"><em>Darius Bunandar</em></a><em>, </em><a href="https://medium.com/u/f2f03442de51"><em>Thomas Graham</em></a><em>, </em><a href="https://medium.com/u/82ef3f96a6df"><em>Carl Ramey</em></a><em>, </em><a href="https://medium.com/u/81fa8f6f466d"><em>Martin Forsythe</em></a><em>, </em><a href="https://medium.com/u/e12802c4dcc6"><em>Tomo Lazovich</em></a><em>, </em><a href="https://medium.com/u/7e80b9510e4a"><em>Michael Gould</em></a><em>, and </em><a href="https://medium.com/u/429ed1911566"><em>Victoria Pisini</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e9fa0facca30" width="1" height="1" alt=""><hr><p><a href="https://medium.com/lightmatter/the-story-behind-lightmatters-tech-e9fa0facca30">The story behind Lightmatter’s tech</a> was originally published in <a href="https://medium.com/lightmatter">Lightmatter</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lightmatter + GV]]></title>
            <link>https://medium.com/lightmatter/lightmatter-gv-8fca0c3cd68d?source=rss----3943c2ca1164---4</link>
            <guid isPermaLink="false">https://medium.com/p/8fca0c3cd68d</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[photonics]]></category>
            <category><![CDATA[computing]]></category>
            <dc:creator><![CDATA[Nicholas Harris]]></dc:creator>
            <pubDate>Mon, 25 Feb 2019 22:18:55 GMT</pubDate>
            <atom:updated>2019-02-25T22:18:55.484Z</atom:updated>
            <content:encoded><![CDATA[<p>Today, we’re excited to announce the close of our $22M Series A-1 funding round led by GV (formerly Google Ventures) with participation from Spark Capital, and Matrix Partners. This brings our total Series A raise to $33M.</p><p>This January marks one year since we started— a lot has happened. We carefully assembled a <a href="https://www.lightmatter.co/about.php">team</a> of 23 world-class scientists and engineers to develop a scalable platform for high throughput, high efficiency artificial intelligence computing. We taped out our first (successful) test chip with transistors and photonic elements from start to finish in four months. Eight months after that, we taped out a chip with over a billion transistors — a testament to the talent and drive of the Lightmatter team. Looking forward, we will need even more talent and drive to deliver the first photonics-based artificial intelligence accelerator product.</p><p>While integrated photonic systems are typically considered in the context of communication in datacenters, we’re leveraging them to address the growing demand for compute, largely driven by artificial intelligence, in the post-Moore’s Law era. It’s worth noting that the end of Moore’s Law isn’t (yet) due to the inability of chip makers to shrink transistors. If you’re going to pack more transistors onto the same sized chip, which has been happening for decades, those transistors need to be commensurately more energy efficient; herein lies the problem. At Lightmatter, we are addressing this scaling challenge in the context of artificial intelligence.</p><p>The leading artificial intelligence algorithms (deep neural networks) of today are mainly composed of a single operation: the matrix-vector (or tensor-tensor) product. From a mathematical standpoint, this is perhaps unsurprising since deep neural networks are inspired by networks of neurons in the brain. The connectivity of these neurons, wherein information is believed to be encoded, can be straightforwardly tabulated in the form of an adjacency matrix. Assuming artificial intelligence algorithms continue to take hints from biology, matrix math is likely to be relevant for a long time to come.</p><p>Today, digital electronic computers perform matrix-vector products using multiply-accumulate units (sometimes in 2-D arrays). At Lightmatter, we replace this device with an optical counterpart: the programmable Mach-Zehnder interferometer. This photonic device is not bound by the physics that limit transistor-based electronic circuits — opening an avenue towards continuing the currently broken trend of exponential growth in compute per unit area within a practical power envelope.</p><p>There’s a lot of work ahead and we’re thrilled to bring the GV team on board as we continue to build out our team and realize a new kind of computer that’s fast and efficient enough to drive the next generation of artificial intelligence.</p><p>To learn more about Lightmatter, please visit <a href="https://www.lightmatter.co/"><strong>lightmatter.co</strong></a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8fca0c3cd68d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/lightmatter/lightmatter-gv-8fca0c3cd68d">Lightmatter + GV</a> was originally published in <a href="https://medium.com/lightmatter">Lightmatter</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>