Bringing heterogeneity to the CMS software framework