Skip to content

Commit

Permalink
failure with dynamic=True
Browse files Browse the repository at this point in the history
  • Loading branch information
kshitij12345 committed Aug 26, 2024
1 parent 9f3fc95 commit ea3de2b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion thunder/tests/test_dynamo.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ def func(x):

# out should have grad_fn and its name should be ThunderFunctionBackward
assert out.grad_fn is not None
assert out.grad_fn.name() == "ThunderFunctionBackward"
if not dynamic:
# If dynamic, while trying to execute `x + 1`, we fail with
# "s0 had an unexpected type <class 'torch.SymInt'>. Supported types are (<class 'int'>, <class 'thunder.core.baseutils.NumberProxyInterface'>)")
# as the FakeTensor for `x` has shape with SymInt.
assert out.grad_fn.name() == "ThunderFunctionBackward"

# We record the GraphModules that was compiled by ThunderCompiler
assert len(backend.subgraph_infos) == 2
Expand Down

0 comments on commit ea3de2b

Please sign in to comment.