Created
September 13, 2022 17:33
-
-
Save mlazos/6a63ad1e6470dc12329b165adab20df8 to your computer and use it in GitHub Desktop.
repro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import torch | |
import torchdynamo | |
torchdynamo.config.log_level = logging.WARNING | |
def test_assertion_error(): | |
y = torch.ones(200, 200) | |
z = {y: 5} | |
return z | |
@torchdynamo.optimize("eager") | |
def level1(): | |
x = torch.ones(1, 1) | |
level2() | |
def level2(): | |
x = torch.ones(1, 1) | |
print("hi") | |
test_assertion_error() | |
try: | |
level1() | |
except: | |
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
torchdynamo.symbolic_convert: [WARNING] Graph break: call_function BuiltinVariable(print) [ConstantVariable(str)] {} from user code at File "/scratch/mlazos/test/errors.py", line 28, in level2 | |
print("hi") | |
torchdynamo.symbolic_convert: [WARNING] Graph break: call_function BuiltinVariable(print) [ConstantVariable(str)] {} from user code at File "/scratch/mlazos/test/errors.py", line 28, in level2 | |
print("hi") | |
hi | |
torchdynamo.convert_frame: [ERROR] WON'T CONVERT <graph break in level2> /scratch/mlazos/test/errors.py line 28 | |
due to: | |
Traceback (most recent call last): | |
File "/scratch/mlazos/torchdynamo/torchdynamo/symbolic_convert.py", line 837, in BUILD_MAP | |
assert isinstance(k, ConstantVariable) or ( | |
AssertionError | |
from user code: | |
File "/scratch/mlazos/test/errors.py", line 30, in <graph break in level2> | |
test_assertion_error() | |
Set torchdynamo.config.verbose=True for more information | |
========== | |
torchdynamo.convert_frame: [ERROR] WON'T CONVERT test_assertion_error /scratch/mlazos/test/errors.py line 12 | |
due to: | |
Traceback (most recent call last): | |
File "/scratch/mlazos/torchdynamo/torchdynamo/symbolic_convert.py", line 837, in BUILD_MAP | |
assert isinstance(k, ConstantVariable) or ( | |
AssertionError | |
from user code: | |
File "/scratch/mlazos/test/errors.py", line 14, in test_assertion_error | |
z = {y: 5} | |
Set torchdynamo.config.verbose=True for more information | |
========== |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment