Enabling Ubiquitous 3D Intelligence via Algorithm-Hardware Synergy