Fix wrong if check (#1507)
Summary:
Missing `in metrics_needed` for `cpu_peak_mem` when check if the `metrics_needed` includes `cpu_peak_mem` or `gpu_peak_mem`.
Pull Request resolved: https://github.com/pytorch/benchmark/pull/1507
Reviewed By: aaronenyeshi
Differential Revision: D44462076
Pulled By: xuzhao9
fbshipit-source-id: 757a080bedd778ef1aa23121ea224b77305ba9e8