  We consider random $n\times n$ matrices $X$ with independent and centered
entries and a general variance profile. We show that the spectral radius of $X$
converges with very high probability to the square root of the spectral radius
of the variance matrix of $X$ when $n$ tends to infinity. We also establish the
optimal rate of convergence, that is a new result even for general i.i.d.
matrices beyond the explicitly solvable Gaussian cases. The main ingredient is
the proof of the local inhomogeneous circular law [arXiv:1612.07776] at the
spectral edge.
