From 9ba80b9037d9e14efc3a9e878f501bb181306345 Mon Sep 17 00:00:00 2001 From: Xu Zhao Date: Mon, 22 Jul 2024 10:18:36 -0700 Subject: [PATCH] Run accuracy check at Diff time (#2388) Summary: X-link: https://github.com/pytorch/pytorch/pull/131266 Pull Request resolved: https://github.com/pytorch/benchmark/pull/2388 We can enable accuracy checks at Diff time since it is not a performance metric. * Refactor the existing diff time test to use the new PT2 Benchmark Runner. * Deprecate the speedup tests and enable the accuracy tests only. We rely on ServiceLab to perform performance testing and regression detection. Reviewed By: oulgen Differential Revision: D59825601 --- userbenchmark/dynamo/dynamobench/torchbench.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/userbenchmark/dynamo/dynamobench/torchbench.py b/userbenchmark/dynamo/dynamobench/torchbench.py index 43c2962f9f..c72fb8dfdd 100755 --- a/userbenchmark/dynamo/dynamobench/torchbench.py +++ b/userbenchmark/dynamo/dynamobench/torchbench.py @@ -79,6 +79,12 @@ def load_yaml_file(): with open(filepath) as f: data = yaml.safe_load(f) + internal_file_path = os.path.join(os.path.dirname(__file__), "fb", filename) + if os.path.exists(internal_file_path): + with open(internal_file_path) as f: + internal_data = yaml.safe_load(f) + data.update(internal_data) + def flatten(lst): for item in lst: if isinstance(item, list):