Partition functions on 3d circle bundles and their gravity duals