Remove variable_excluded_from_dispatch() check for factory functions. (#46371)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/46371
Test Plan: Imported from OSS
Reviewed By: bhosmer
Differential Revision: D24324545
Pulled By: ailzhang
fbshipit-source-id: 78038054690dff14883df711073be4c2da4e1f8b