ABSTRACT
Large-scale deep learning benefits from an emerging class of AI accelerators. Some of these accelerators' designs are general enough for compute-intensive applications beyond AI and Cloud TPU is one such example. In this paper, we demonstrate a novel approach using TensorFlow on Cloud TPU to simulate the two-dimensional Ising Model. TensorFlow and Cloud TPU framework enable the simple and readable code to express the complicated distributed algorithm without compromising the performance. Our code implementation fits into a small Jupyter Notebook and fully utilizes Cloud TPU's efficient matrix operation and dedicated high speed inter-chip connection. The performance is highly competitive: it outperforms the best published benchmarks to our knowledge by 60% in single-core and 250% in multi-core with good linear scaling. When compared to Tesla V100 GPU, the single-core performance maintains a ~10% gain. We also demonstrate that using low precision arithmetic---bfloat16---does not compromise the correctness of the simulation results.
- Martín Abadi, Paul Barham, Jianmin Chen, Zhifeng Chen, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Geoffrey Irving, and Michael Isard. Tensorflow: a system for large-scale machine learning. In OSDI, volume 16, pages 265--283, 2016.Google ScholarDigital Library
- Didier Barradas-Bautista, Matias Alvarado-Mentado, Mark Agostino, and Germinal Cocho. Cancer growth and metastasis as a metaphor of go gaming: An ising model approach. PloS one, 13(5):e0195654, 2018.Google ScholarCross Ref
- Kurt Binder. Finite size scaling analysis of ising model block distribution functions. Zeitschrift fÃijr Physik B Condensed Matter, 43(2):119--140, 1981.Google Scholar
- Kurt Binder, Dieter Heermann, Lyle Roelofs, A. John Mallinckrodt, and Susan McKay. Monte carlo simulation in statistical physics. Computers in Physics, 7(2):156--157, 1993.Google ScholarCross Ref
- Kurt Binder and Erik Luijten. Monte carlo tests of renormalization-group predictions for critical phenomena in ising models. Physics Reports, 344(4--6):179--253, 2001.Google Scholar
- Benjamin Block, Peter Virnau, and Tobias Preis. Multi-gpu accelerated multi-spin monte carlo simulations of the 2d ising model. Computer Physics Communications, 181(9):1549--1556, 2010.Google ScholarCross Ref
- Google Cloud. Choosing between a single cloud tpu device and a cloud tpu pod (alpha). https://cloud.google.com/tpu/docs/deciding-pod-versus-tpu, 2019.Google Scholar
- Google Cloud. Performance guide. https://cloud.google.com/tpu/docs/performance-guide, 2019.Google Scholar
- Google Cloud. System architecture. https://cloud.google.com/tpu/docs/system-architecture, 2019.Google Scholar
- Google Cloud. Using bfloat16 with tensorflow models. https://cloud.google.com/tpu/docs/bfloat16, 2019.Google Scholar
- Chase Cook, Hengyang Zhao, Takashi Sato, Masayuki Hiromoto, and Sheldon X.-D. Tan. Gpu based parallel ising computing for combinatorial optimization problems in vlsi physical design. arXiv preprint arXiv:1807.10750, 2018.Google Scholar
- Nvidia NVLink Fabric. Nvlink fabric: Advancing multi-gpu processing. https://www.nvidia.com/en-us/data-center/nvlink/, 2019.Google Scholar
- Ernst Ising. Beitrag zur theorie des ferromagnetismus. Zeitschrift fÃijr Physik, 31(1):253--258, 1925.Google Scholar
- Norm Jouppi. Quantifying the performance of the tpu, our first machine learning chip. Google Cloud: https://cloud.google.com/blog/products/gcp/quantifying-the-performance-of-the-tpu-our-first-machine-learning-chip, 2017.Google Scholar
- Norman P. Jouppi, Cliff Young, Nishant Patil, David Patterson, Gaurav Agrawal, Raminder Bajwa, Sarah Bates, Suresh Bhatia, Nan Boden, and Al Borchers. In-datacenter performance analysis of a tensor processing unit. In Computer Architecture (ISCA), 2017 ACM/IEEE 44th Annual International Symposium on, pages 1--12. IEEE, 2017.Google ScholarDigital Library
- Norman P. Jouppi, Doe Hyun Yoon, George Kurian, Sheng Li, Nishant Patil, James Landon, Cliff Young, and David Patterson. A Domain-Specific Supercomputer for Training Deep Neural Networks. Submitted to Communications of the ACM.Google Scholar
- Peter Müller. A generic approach to posterior integration and Gibbs sampling. Purdue University, Department of Statistics, 1991.Google Scholar
- Lars Onsager. Crystal statistics.i. a two-dimensional model with an order-disorder transition. Physical Review, 65(3--4):117, 1944.Google Scholar
- Francisco Ortega-Zamorano, Marcelo A. Montemurro, Sergio Alejandro Cannas, José M. Jerez, and Leonardo Franco. Fpga hardware acceleration of monte carlo simulations for the ising model. IEEE Trans. Parallel Distrib. Syst., 27(9):2618--2627, 2016.Google ScholarDigital Library
- Adam Paszke, Sam Gross, Soumith Chintala, and Gregory Chanan. Pytorch: Tensors and dynamic neural networks in python with strong gpu acceleration. PyTorch: Tensors and dynamic neural networks in Python with strong GPU acceleration, 2017.Google Scholar
- Tobias Preis, Wolfgang Paul, and Johannes J. Schneider. Fluctuation patterns in high-frequency financial asset returns. EPL (Europhysics Letters), 82(6):68005, 2008.Google Scholar
- Tobias Preis, Peter Virnau, Wolfgang Paul, and Johannes J. Schneider. Gpu accelerated monte carlo simulation of the 2d and 3d ising model. Journal of Computational Physics, 228(12):4468--4477, 2009.Google ScholarDigital Library
- Francisco Prieto-Castrillo, Amin Shokri Gazafroudi, Javier Prieto, and Juan Manuel Corchado. An ising spin-based model to explore efficient flexibility in distributed power systems. Complexity 2018, 2018.Google Scholar
- Alan M. Ferrenberg, Jiahao Xu, and David P. Landau Pushing the Limits of Monte Carlo Simulations for the 3d Ising Model. arXiv preprint arXiv:1806.03558, 2018.Google Scholar
Index Terms
- High performance Monte Carlo simulation of ising model on TPU clusters
Recommendations
GPU accelerated Monte Carlo simulation of the 2D and 3D Ising model
The compute unified device architecture (CUDA) is a programming approach for performing scientific calculations on a graphics processing unit (GPU) as a data-parallel computing device. The programming interface allows to implement algorithms using ...
Acceleration of Monte-Carlo simulation on high performance computing platforms
RACS '18: Proceedings of the 2018 Conference on Research in Adaptive and Convergent SystemsMonte Carlo methods are often used to solve computational problems with randomness. The random sampling helps avoid the deterministic results, but it requires intensive computations to obtain the results. Several attempts have been made to boost the ...
High-Performance Quasi-Monte Carlo Financial Simulation: FPGA vs. GPP vs. GPU
Quasi-Monte Carlo simulation is a special Monte Carlo simulation method that uses quasi-random or low-discrepancy numbers as random sample sets. In many applications, this method has proved advantageous compared to the traditional Monte Carlo simulation ...
Comments