We present a method for investigating variations in the upper end of the stellar Initial Mass Function (IMF) by probing the production rate of ionizing photons in unresolved, compact star clusters with ages <~10 Myr and with different masses. We test this method by performing a pilot study on the young cluster population in the nearby galaxy NGC5194 (M51a), for which multi-wavelength observations from the Hubble Space Telescope are available. Our results indicate that the proposed method can probe the upper end of the IMF in galaxies located out to at least ~10 Mpc, i.e., a factor ~200 further away than possible by counting individual stars in young compact clusters. Our results for NGC5194 show no obvious dependence of the upper mass end of the IMF on the mass of the star cluster down to ~1000 M_sun, although more extensive analyses involving lower mass clusters and other galaxies are needed to confirm this conclusion.