  For each algebra of global dimension 2 arising from the quiver with potential
associated to a triangulation of an unpunctured surface, Amiot-Grimeland have
defined an integer-valued function on the first singular homology group of the
surface, and have proved that two such algebras of global dimension 2 are
derived equivalent precisely when there exists an automorphism of the surface
that makes their associated functions coincide.
  In the present paper we generalize the constructions and results of
Amiot-Grimeland to the setting of arbitrarily punctured surfaces. As an
application, we show that there always is a derived equivalence between any two
algebras of global dimension 2 arising from the quivers with potential of
(valency at least 2) triangulations of arbitrarily punctured polygons.
  While in the unpunctured case the quiver with potential of any triangulation
admits cuts yielding algebras of global dimension at most 2, in the case of
punctured surfaces the QPs of some triangulations do not admit cuts, and even
when they do, the global dimension of the corresponding degree-0 algebra may
exceed 2. In this paper we give a combinatorial characterization of each of
these two situations.
