High-Performance Multi-Mode Ptychography Reconstruction on Distributed GPUs

Ptychography is an emerging imaging technique that is able to provide wavelength-limited spatial resolution from specimen with extended lateral dimensions. As a scanning microscopy method, a typical two-dimensional image requires a number of data frames. As a diffraction-based imaging technique, the real-space image has to be recovered through iterative reconstruction algorithms. Due to these two inherent aspects, a ptychographic reconstruction is generally a computation-intensive and time-consuming process, which limits the throughput of this method. We report an accelerated version of the multi-mode difference map algorithm for ptychography reconstruction using multiple distributed GPUs. This approach leverages available scientific computing packages in Python, including mpi4py and PyCUDA, with the core computation functions implemented in CUDA C. We find that interestingly even with MPI collective communications, the weak scaling in the number of GPU nodes can still remain nearly constant. Most importantly, for realistic diffraction measurements, we observe a speedup ranging from a factor of 10 to 103 depending on the data size, which reduces the reconstruction time remarkably from hours to typically about 1 minute and is thus critical for real-time data processing and visualization.

[1]  Nathalie Bouet,et al.  Multimodal hard x-ray imaging with resolution approaching 10 nm for studies in material science , 2018 .

[2]  Mario A. Storti,et al.  MPI for Python: Performance improvements and MPI-2 extensions , 2008, J. Parallel Distributed Comput..

[3]  Ondřej Mandula,et al.  PyNX.Ptycho: a computing library for X-ray coherent diffraction imaging of nanostructures , 2016 .

[4]  Nicolas Pinto,et al.  PyCUDA and PyOpenCL: A scripting-based approach to GPU run-time code generation , 2009, Parallel Comput..

[5]  Talita Perciano,et al.  SHARP: a distributed, GPU-based ptychographic solver , 2016, 1602.01448.

[6]  J. Rodenburg,et al.  Movable aperture lensless transmission microscopy: a novel phase retrieval algorithm. , 2004, Physical review letters.

[7]  Tom Peterka,et al.  Continuous Motion Scan Ptychography: Characterization for Increased Speed in Coherent X-ray Imaging References and Links Chemical Composition Mapping with Nanometre Resolution by Soft X-ray Microscopy, " Nature , 2022 .

[8]  Youssef S. G. Nashed,et al.  Distributed Automatic Differentiation for Ptychography , 2017, ICCS.

[9]  Tom Peterka,et al.  Parallel ptychographic reconstruction. , 2014, Optics express.

[10]  V. Elser Solution of the crystallographic phase problem by iterated projections. , 2002, Acta crystallographica. Section A, Foundations of crystallography.

[11]  J. Rodenburg,et al.  A phase retrieval algorithm for shifting illumination , 2004 .

[12]  Xiaojing Huang,et al.  Fly-scan ptychography , 2015, Scientific Reports.

[13]  J. Fienup,et al.  Phase retrieval with transverse translation diversity: a nonlinear optimization approach. , 2008, Optics express.

[14]  Andreas Menzel,et al.  Reconstructing state mixtures from diffraction measurements , 2013, Nature.

[15]  Andreas Menzel,et al.  Probe retrieval in ptychographic coherent diffractive imaging. , 2009, Ultramicroscopy.

[16]  O. Bunk,et al.  High-Resolution Scanning X-ray Diffraction Microscopy , 2008, Science.

[17]  Franz Pfeiffer,et al.  X-ray ptychography , 2018 .

[18]  A. Menzel,et al.  On-the-fly scans for X-ray ptychography , 2014 .

[19]  Xiaojing Huang,et al.  Optimization of overlap uniformness for ptychography. , 2014, Optics express.

[20]  P. Thibault,et al.  Maximum-likelihood refinement for coherent diffractive imaging , 2012 .

[21]  Mario A. Storti,et al.  MPI for Python , 2005, J. Parallel Distributed Comput..

[22]  Lisandro Dalcin,et al.  Parallel distributed computing using Python , 2011 .

[23]  J. Rodenburg,et al.  An improved ptychographical phase retrieval algorithm for diffractive imaging. , 2009, Ultramicroscopy.