Carbon-Efficient 3D DNN Acceleration: Optimizing Performance and Sustainability