  Crossbar-based PIM DNN accelerators can provide massively parallel in-situ
operations. A specifically designed compiler is important to achieve high
performance for a wide variety of DNN workloads. However, some key compilation
issues such as parallelism considerations, weight replication selection, and
array mapping methods have not been solved. In this work, we propose PIMCOMP -
a universal compilation framework for NVM crossbar-based PIM DNN accelerators.
PIMCOMP is built on an abstract PIM accelerator architecture, which is
compatible with the widely used Crossbar/IMA/Tile/Chip hierarchy. On this
basis, we propose four general compilation stages for crossbar-based PIM
accelerators: node partitioning, weight replicating, core mapping, and dataflow
scheduling. We design two compilation modes with different inter-layer pipeline
granularities to support high-throughput and low-latency application scenarios,
respectively. Our experimental results show that PIMCMOP yields improvements of
1.6$\times$ and 2.4$\times$ in throughput and latency, respectively, relative
to PUMA.
