Skip to content

Commit

Permalink
update dynamic shape (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
heheda12345 authored May 17, 2024
2 parents 6ff29cf + 30045b3 commit 6a048c7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/fx_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,8 @@ def compile(
for x in self.example_inputs
])
assert callable(compiled_fn)
if self.fake_mode.shape_env is not None:
print("shape_env guards", self.fake_mode.shape_env.format_guards())
# if self.fake_mode.shape_env is not None:
# print("shape_env guards", self.fake_mode.shape_env.format_guards())
# TODO: add backend compiler
return compiled_fn

Expand Down Expand Up @@ -402,9 +402,9 @@ def track_symint(source: StorePos, val: Any) -> None:
if self.fake_mode.shape_env._maybe_evaluate_static(g) is not None:
print("maybe static")
continue
print("before simplify", g)
# print("before simplify", g)
g = self.fake_mode.shape_env.simplify(g)
print("after simplify", g)
# print("after simplify", g)
try:
codegen.add_check(
(ShapeGuardPrinter(symbol_to_source).doprint(g), voidpos()))
Expand Down

0 comments on commit 6a048c7

Please sign in to comment.