Disable validation layers in non-debug builds. (#42122)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/42122
Test Plan: Imported from OSS
Reviewed By: IvanKobzarev
Differential Revision: D22835545
Pulled By: AshkanAliabadi
fbshipit-source-id: b0eee550c8d727c79b5d45a7e1d603379ae3af5c