handle multi-device graphs when empty_zero is checked