8000 Update · pytorch/pytorch@14c0439 · GitHub
[go: up one dir, main page]

Skip to content

Commit 14c0439

Browse files
committed
Update
1 parent d883874 commit 14c0439

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

test/dynamo/test_misc.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -302,12 +302,13 @@ def fn(d, t):
302302

303303
self.assertEqual(fn(d, t), torch.sin(d["x"] - d["y"] + t))
304304

305-
actual_graph = torch._dynamo.testing.normalize_gm(
306-
cnt.graphs[0].print_readable(print_output=False)
307-
)
308-
self.assertExpectedInline(
309-
actual_graph,
310-
"""\
305+
if torch._dynamo.config.assume_static_by_default:
306+
actual_graph = torch._dynamo.testing.normalize_gm(
307+
cnt.graphs[0].print_readable(print_output=False)
308+
)
309+
self.assertExpectedInline(
310+
actual_graph,
311+
"""\
311312
class GraphModule(torch.nn.Module):
312313
def forward(self, L_t_: "f32[2, 3]", L_d_y_: "f32[2, 3]", L_d_x_: "f32[2, 3]"):
313314
l_t_ = L_t_
@@ -318,7 +319,7 @@ def forward(self, L_t_: "f32[2, 3]", L_d_y_: "f32[2, 3]", L_d_x_: "f32[2, 3]"):
318319
flat_apply: "f32[2, 3]" = torch.ops.higher_order.flat_apply(torch.ops.mylib.foo.default, mylib_foo_input_spec, l_d_x_, l_d_y_, l_t_); mylib_foo_input_spec = l_d_x_ = l_d_y_ = l_t_ = None
319320
return (flat_apply,)
32032 5483 1
""",
321-
)
322+
)
322323

323324
def test_invalid_args_builtin(self):
324325
@torch.compile(backend="eager")

0 commit comments

Comments
 (0)
0