  In this article we study dimer models, as introduced in string theory, which
give a way of writing down a class of non-commutative `superpotential'
algebras. Some examples are 3-dimensional Calabi-Yau algebras, as defined by
Ginzburg, and some are not. We consider two types of `consistency' condition on
dimer models, and show that a `geometrically consistent' model is
`algebraically consistent'. We prove that the algebra obtained from an
algebraically consistent dimer model is a 3-dimensional Calabi-Yau algebra and
finally prove that this gives a non-commutative crepant resolution of the
Gorenstein affine toric threefold associated to the dimer model.
