From 114f1f0b9b8982515742cf3793f7796b4a79aac1 Mon Sep 17 00:00:00 2001 From: Xu Zhao Date: Fri, 7 Jun 2024 17:52:13 +0000 Subject: [PATCH] Added torchao nightly workflow (#128152) Summary: Add torchao benchmark workflow, upload the artifacts to GHA. X-link: https://github.com/pytorch/benchmark/pull/2273 Test Plan: ``` python run_benchmark.py torchao --ci ``` Differential Revision: D58140479 Pulled By: xuzhao9 Pull Request resolved: https://github.com/pytorch/pytorch/pull/128152 Approved by: https://github.com/jerryzh168 --- benchmarks/dynamo/common.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/benchmarks/dynamo/common.py b/benchmarks/dynamo/common.py index 2b685b8926b38f..39c3a3cda3e38d 100644 --- a/benchmarks/dynamo/common.py +++ b/benchmarks/dynamo/common.py @@ -3975,9 +3975,12 @@ def run(runner, args, original_dir=None): assert "cuda" in args.devices, "Quantization requires CUDA device." assert args.bfloat16, "Quantization requires dtype bfloat16." try: - from .torchao_backend import setup_baseline, torchao_optimize_ctx - except ImportError: from torchao_backend import setup_baseline, torchao_optimize_ctx + except ImportError: + from userbenchmark.dynamo.dynamobench.torchao_backend import ( + setup_baseline, + torchao_optimize_ctx, + ) setup_baseline() baseline_ctx = functools.partial(