Resource-aware Deployment of Dynamic DNNs over Multi-tiered Interconnected Systems