Improve placeholder matching in subgraph rewriter (#54958)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/54958
Test Plan: Imported from OSS
Reviewed By: jamesr66a
Differential Revision: D27431889
Pulled By: ansley
fbshipit-source-id: 8b1b4f2f0202305530b9648b6b770f9e2ecacfe2