A Structure-Aware Framework for Learning Device Placements on Computation Graphs