benchmark
9a58c643 - Migrate to use the correctness checking code in dynamo torchbench.py (#1700)

Commit
2 years ago
Migrate to use the correctness checking code in dynamo torchbench.py (#1700) Summary: https://github.com/pytorch/benchmark/commit/c1408a3a7e50482533e82b6a705dc56ccc62174d breaks the metadata checking code. This PR migrates the entire correctness checking code to use the version in `check_accuracy()` at https://github.com/pytorch/pytorch/blob/main/benchmarks/dynamo/common.py#L1354. Pull Request resolved: https://github.com/pytorch/benchmark/pull/1700 Test Plan: ``` $ python run.py resnet50 -d cuda -t train --torchdynamo inductor --accuracy /data/home/xzhao9/cluster/miniconda3/envs/py310/lib/python3.10/site-packages/torch/_inductor/compile_fx.py:123: UserWarning: TensorFloat32 tensor cores for float32 matrix multiplication available but not enabled. Consider setting `torch.set_float32_matmul_precision('high')` for better performance. warnings.warn( Running train method from resnet50 on cuda in dynamo inductor mode with input batch size 1 and precision fp32. GPU Time: 17.840 milliseconds CPU Total Wall Time: 17.869 milliseconds GPU 0 Peak Memory: 2.1889 GB CPU Peak Memory: 0.5010 GB Accuracy: pass PT2 Compilation time: 22.195 seconds ``` Reviewed By: FindHao Differential Revision: D46319768 Pulled By: xuzhao9 fbshipit-source-id: 4f8e8bfb1ef4e081083455f72fe43ad12e563452
Author
Parents
Loading