  To lower the barrier to diffractive optical neural networks (DONNs) design,
exploration, and deployment, we propose LightRidge, the first end-to-end
optical ML compilation framework, which consists of (1) precise and
differentiable optical physics kernels that enable complete explorations of
DONNs architectures, (2) optical physics computation kernel acceleration that
significantly reduces the runtime cost in training, emulation, and deployment
of DONNs, and (3) versatile and flexible optical system modeling and
user-friendly domain-specific-language (DSL). As a result, LightRidge framework
enables efficient end-to-end design and deployment of DONNs, and significantly
reduces the efforts for programming, hardware-software codesign, and chip
integration. Our results are experimentally conducted with physical optical
systems, where we demonstrate: (1) the optical physics kernels precisely
correlated to low-level physics and systems, (2) significant speedups in
runtime with physics-aware emulation workloads compared to the state-of-the-art
commercial system, (3) effective architectural design space exploration
verified by the hardware prototype and on-chip integration case study, and (4)
novel DONN design principles including successful demonstrations of advanced
image classification and image segmentation task using DONNs architecture and
topology.
