Enable torch_speed_benchmark to accept different memory formats. (#36202)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/36202
Test Plan: Imported from OSS
Differential Revision: D20970216
Pulled By: AshkanAliabadi
fbshipit-source-id: bb5a260e5677716356eec6ad4daa1f3c65420bbd