move unused parameters to end of bucket orders when rebuild buckets for static graph (#58097)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/58097
move unused parameters to end of bucket orders when rebuild buckets for static graph
Test Plan: unit tests
Reviewed By: rohan-varma
Differential Revision: D28366689
fbshipit-source-id: fbd224aeb761d5aa3bab35a00d64974eb4455b2e