From 878b2b5ed4497e8575bdf2ee506ff1a5345c5bcb Mon Sep 17 00:00:00 2001 From: Menglu Yu Date: Wed, 28 Aug 2024 16:12:08 -0700 Subject: [PATCH] Fix group fusion stride layout (#2442) Summary: X-link: https://github.com/pytorch/pytorch/pull/134696 Pull Request resolved: https://github.com/pytorch/benchmark/pull/2442 context: https://fb.workplace.com/groups/1075192433118967/permalink/1401282167176657/ moving the changes to the group gemm op has compilation errors, see details in D55606636 Differential Revision: D61888433 --- userbenchmark/dynamo/dynamobench/_dynamo/utils.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/userbenchmark/dynamo/dynamobench/_dynamo/utils.py b/userbenchmark/dynamo/dynamobench/_dynamo/utils.py index ae78f2237..501443d77 100644 --- a/userbenchmark/dynamo/dynamobench/_dynamo/utils.py +++ b/userbenchmark/dynamo/dynamobench/_dynamo/utils.py @@ -3242,3 +3242,9 @@ def record(cls): finally: if config.record_compile_time_instruction_count: cls.end() + + +def realize_inputs(inputs: List[torch.fx.Node]): + for inp in inputs: + if isinstance(inp, torch.fx.node.Node): + inp.meta["inductor_realize_to_strides"] = True