combine consecutive layes on the same device (#55973)
Summary:
Implements proposal https://github.com/pytorch/pytorch/issues/53438
Pull Request resolved: https://github.com/pytorch/pytorch/pull/55973
Reviewed By: pritamdamania87
Differential Revision: D28340034
Pulled By: mrzzd
fbshipit-source-id: d7fe476c0364603f36d41f348769245dac0acd88