  We present icarogw 2.0, a pure CPU/GPU python code developed to infer
astrophysical and cosmological population properties of noisy, heterogeneous,
and incomplete observations. icarogw 2.0 is mainly developed for compact binary
coalescence (CBC) population inference with gravitational wave (GW)
observations. The code contains several models for masses, spins, and redshift
of CBC distributions, and is able to infer population distributions as well as
the cosmological parameters and possible general relativity deviations at
cosmological scales. We present the theoretical and computational foundations
of icarogw 2.0, and we describe how the code can be employed for population and
cosmological inference using (i) only GWs, (ii) GWs and galaxy surveys and
(iii) GWs with electromagnetic counterparts. We discuss the code performance on
Graphical Processing Units (GPUs), finding a gain in computation time of about
two orders of magnitudes when more than 100 GW events are involved for the
analysis. We validate the code by re-analyzing GW population and cosmological
studies, finding very good agreement with previous publications.
