The leap in communication technology in recent years has brought new challenges to the compactness, modulation speed, working bandwidth and control efficiency of modulation equipment. The discovery of graphene has led the two-dimensional materials to develop rapidly, and a series of new materials have continuously emerged, such as MXene, black phosphorus, transition metal sulfides, etc. These new two-dimensional materials have excellent nonlinear optical effects, strong light-matter interaction, and ultra-wide working bandwidth. Using their thermo-optic effect, nonlinear effect and the combination with optical structure, the needs of ultra-fast modulation in optical communication can be met. Compact, ultra-fast, and ultra-wide will become the tags for all-optical modulation of two-dimensional materials in the future. This article focuses on all-optical devices based on thermo-optical effects and non-linear effects of two-dimensional materials, and introduces fiber-type Mach-Zehnder interferometer structures, Michelson interferometer structures, polarization interferometer structures, and micro-ring structures. In this paper, the development status of all-optical devices is discussed from the perspectives of response time, loss, driving energy, extinction ratio, and modulation depth. Finally, we review the latest developments, analyze the challenges and opportunities faced by all-optical devices, and propose that all-optical devices should be developed in the direction of ring resonators and finding better new two-dimensional materials. We believe that all-optical devices will maintain high-speed development, acting as a cornerstone to promote the progress of all-optical systems.