Add testing across mem_formats to ModuleInfos (#69317)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/69317
Test Plan: Imported from OSS
Reviewed By: jbschlosser
Differential Revision: D33285780
Pulled By: mikaylagawarecki
fbshipit-source-id: 1d19293e640e5581351a9c74892dcac4bcdd3f1d