  We compute the quantum gravity partition function of M-theory on $AdS_4
\times X_7 $ by using localization techniques in four-dimensional gauged
supergravity obtained by a consistent truncation on the Sasaki-Einstein
manifold $X_{7}$. The supergravity path integral reduces to a finite
dimensional integral over two collective coordinates that parametrize the
localizing instanton solutions. The renormalized action of the off-shell
instanton solutions depends linearly and holomorphically on the "square root"
prepotential evaluated at the center of $AdS_{4}$. The partition function
resembles the Laplace transform of the wave function of a topological string
and with an assumption about the measure for the localization integral yields
an Airy function in precise agreement with the computation from the boundary
ABJM theory on a 3-sphere. Our bulk quantum gravity computation is
nonperturbatively exact in four-dimensional Planck length but ignores
corrections due to brane-instantons.
