Move the apply_tensor_props into its own function for more public use (#67786)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/67786
Test Plan: Imported from OSS
Reviewed By: albanD
Differential Revision: D32175962
Pulled By: Gamrix
fbshipit-source-id: caefe1c849277632d976a6b5513f72b47595f2c0