Blending representation learning approaches with simultaneous localizationand mapping (SLAM) systems is an open question, because of their highly modularand complex nature. Functionally, SLAM is an operation that transforms rawsensor inputs into a distribution over the state(s) of the robot and theenvironment. If this transformation (SLAM) were expressible as a differentiablefunction, we could leverage task-based error signals to learn representationsthat optimize task performance. However, several components of a typical denseSLAM system are non-differentiable. In this work, we propose gradSLAM, amethodology for posing SLAM systems as differentiable computational graphs,which unifies gradient-based learning and SLAM. We propose differentiabletrust-region optimizers, surface measurement and fusion schemes, andraycasting, without sacrificing accuracy. This amalgamation of dense SLAM withcomputational graphs enables us to backprop all the way from 3D maps to 2Dpixels, opening up new possibilities in gradient-based learning for SLAM. TL;DR: We leverage the power of automatic differentiation frameworks to makedense SLAM differentiable.