ROAM: memory-efficient large DNN training via optimized operator ordering and memory layout