Created
September 1, 2022 01:39
-
-
Save mlazos/0e5ef52f16e73250a42130d0dfc755de to your computer and use it in GitHub Desktop.
Resume before + after
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 Stack Trace ========== | |
Traceback (most recent call last): | |
File "/scratch/mlazos/torchdynamo/torchdynamo/convert_frame.py", line 310, in _convert_frame_assert | |
code = transform_code_object(frame.f_code, transform) | |
File "/scratch/mlazos/torchdynamo/torchdynamo/bytecode_transformation.py", line 338, in transform_code_object | |
transformations(instructions, code_options) | |
File "/scratch/mlazos/torchdynamo/torchdynamo/convert_frame.py", line 298, in transform | |
tracer.run() | |
File "/scratch/mlazos/torchdynamo/torchdynamo/symbolic_convert.py", line 331, in run | |
and self.step() | |
File "/scratch/mlazos/torchdynamo/torchdynamo/symbolic_convert.py", line 304, in step | |
getattr(self, inst.opname)(inst) | |
File "/scratch/mlazos/torchdynamo/torchdynamo/symbolic_convert.py", line 837, in BUILD_MAP | |
assert isinstance(k, ConstantVariable) or ( | |
AssertionError | |
========== The above exception occurred while processing the following code ========== | |
File "/scratch/mlazos/torchdynamo/../test/errors.py", line 60, in <module> | |
level2() | |
File "/scratch/mlazos/torchdynamo/../test/errors.py", line 26, in test_assertion_error | |
def test_assertion_error(): | |
File "/scratch/mlazos/torchdynamo/../test/errors.py", line 32, in <graph break in test_assertion_error> | |
print("hi") | |
File "/scratch/mlazos/torchdynamo/../test/errors.py", line 34, in <graph break in test_assertion_error> | |
print("hey") | |
File "/scratch/mlazos/torchdynamo/../test/errors.py", line 36, in <graph break in test_assertion_error> | |
z = {y: 5} | |
========== |
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 Stack Trace ========== | |
Traceback (most recent call last): | |
File "/scratch/mlazos/torchdynamo/torchdynamo/convert_frame.py", line 310, in _convert_frame_assert | |
code = transform_code_object(frame.f_code, transform) | |
File "/scratch/mlazos/torchdynamo/torchdynamo/bytecode_transformation.py", line 338, in transform_code_object | |
transformations(instructions, code_options) | |
File "/scratch/mlazos/torchdynamo/torchdynamo/convert_frame.py", line 298, in transform | |
tracer.run() | |
File "/scratch/mlazos/torchdynamo/torchdynamo/symbolic_convert.py", line 331, in run | |
and self.step() | |
File "/scratch/mlazos/torchdynamo/torchdynamo/symbolic_convert.py", line 304, in step | |
getattr(self, inst.opname)(inst) | |
File "/scratch/mlazos/torchdynamo/torchdynamo/symbolic_convert.py", line 837, in BUILD_MAP | |
assert isinstance(k, ConstantVariable) or ( | |
AssertionError | |
========== The above exception occurred while processing the following code ========== | |
File "/scratch/mlazos/torchdynamo/../test/errors.py", line 58, in <module> | |
File "/scratch/mlazos/torchdynamo/../test/errors.py", line 47, in level1 | |
x = torch.ones(1, 1) | |
File "/scratch/mlazos/torchdynamo/../test/errors.py", line 50, in level2 | |
File "/scratch/mlazos/torchdynamo/../test/errors.py", line 24, in test_assertion_error | |
File "/scratch/mlazos/torchdynamo/../test/errors.py", line 24, in test_assertion_error | |
File "/scratch/mlazos/torchdynamo/../test/errors.py", line 24, in test_assertion_error | |
File "/scratch/mlazos/torchdynamo/../test/errors.py", line 34, in test_assertion_error | |
print("hey") | |
========== |
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.INFO | |
torchdynamo.config.verbose = True | |
cuda = torch.device("cuda") | |
def test_break(): | |
y = torch.ones(4, 4) | |
print("hey") | |
z = 3 / 4 + max(1, 4) | |
return y * y * z | |
def test_torch_runtime(): | |
y = torch.ones(4, 5) | |
z = torch.zeros(3, 6) | |
return y * z | |
def test_assertion_error(): | |
x = torch.ones(100, 100, device=cuda) | |
a = torch.ones(100, 100, device=cuda) | |
x = 0 | |
r = torch.ones(100, 100, device=cuda) | |
y = torch.ones(200, 200, device=cuda) | |
print("hi") | |
w = torch.ones(300, 300, device=cuda) | |
print("hey") | |
x += 1 | |
z = {y: 5} | |
return z * torch.zeros(400, 400) * y * w | |
def level0(): | |
x = torch.ones(1, 1) | |
level1() | |
def level1(): | |
x = torch.ones(1, 1) | |
level2() | |
@torchdynamo.optimize("eager") | |
def level2(): | |
x = torch.ones(1, 1) | |
test_assertion_error() | |
try: | |
level2() | |
except: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment