[pytorch] strip out warning message ifdef STRIP_ERROR_MESSAGES (#47827)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/47827
Similar to TORCH_CHECK_WITH_MSG, strip messages for TORCH_WARN/TORCH_WARN_ONCE.
Test Plan: Imported from OSS
Reviewed By: ezyang
Differential Revision: D24913586
Pulled By: ljk53
fbshipit-source-id: 00f0f2bf33a48d5d7008b70ff5820623586dfd4e