Skip to content

Instantly share code, notes, and snippets.

test.py:
import torchdynamo
torchdynamo.config.trace = False
>> python test.py
Traceback (most recent call last):
File "/scratch/mlazos/test/test.py", line 3, in <module>
@mlazos
mlazos / after.txt
Created September 1, 2022 01:39
Resume before + after
========== 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()
@mlazos
mlazos / after.txt
Created September 1, 2022 02:03
before after resume line fixes
========== 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()
torchdynamo.convert_frame: [ERROR] WON'T CONVERT test_assertion_error /scratch/mlazos/test/scratch.py line 6
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/scratch.py", line 9, in test_assertion_error
z = {y: 5}
/scratch/mlazos/py39/lib/python3.9/site-packages/torchvision-0.14.0a0+1d0786b-py3.9-linux-x86_64.egg/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: /scratch/mlazos/py39/lib/python3.9/site-packages/torchvision-0.14.0a0+1d0786b-py3.9-linux-x86_64.egg/torchvision/image.so: undefined symbol: _ZN2at4_ops19empty_memory_format4callEN3c108ArrayRefIlEENS2_8optionalINS2_10ScalarTypeEEENS5_INS2_6LayoutEEENS5_INS2_6DeviceEEENS5_IbEENS5_INS2_12MemoryFormatEEE
warn(f"Failed to load image Python extension: {e}")
WARNING:torchinductor.lowering:make_fallback(aten.native_group_norm_backward): a decomposition exists, we should switch to it
torchinductor.scheduler: [CRITICAL] Error in codegen for ComputedBuffer(name='buf0', layout=FixedLayout('cuda', torch.float32, size=[200, 200], stride=[200, 1]), data=Pointwise(
'cuda',
torch.float32,
relu(constant(1, torch.float32) + constant(1, torch.float32)),
ranges=[200, 200],
origins={relu}
))
Traceback (most recent call last):
File "/scratch/mlazos/torchdynamo/torchinductor/graph.py", line 246, in call_function
return lowerings[target](*args, **kwargs)
File "/scratch/mlazos/torchdynamo/torchinductor/lowering.py", line 185, in wrapped
return decomp_fn(*args, **kwargs)
File "/scratch/mlazos/torchdynamo/torchinductor/lowering.py", line 810, in _foobar
assert False
AssertionError
The above exception was the direct cause of the following exception:
@mlazos
mlazos / console_output.txt
Created September 8, 2022 08:55
minifier output
wrote out to minifier_launcher.py
Traceback (most recent call last):
File "/scratch/mlazos/torchdynamo/torchinductor/graph.py", line 246, in call_function
return lowerings[target](*args, **kwargs)
File "/scratch/mlazos/torchdynamo/torchinductor/lowering.py", line 185, in wrapped
return decomp_fn(*args, **kwargs)
File "/scratch/mlazos/torchdynamo/torchinductor/lowering.py", line 810, in _foobar
assert False
AssertionError
@mlazos
mlazos / console_output.txt
Created September 8, 2022 08:58
minifier output logs
>> LoweringException("AssertionError: \n target: aten._foobar.default\n args[0]: TensorBox(StorageBox(\n Pointwise(\n 'cpu',\n torch.float32,\n constant(1, torch.float32) + constant(1, torch.float32),\n ranges=[200, 200],\n origins={add}\n )\n ))")
Started off with 28 nodes
Writing checkpoint with 28 nodes to /tmp/minifier_mlazos/checkpoints/28.py
Trying granularity 16
Strategy: Eliminate dead code (G: 16) (28 nodes, 10 inputs)
FAIL: Eliminate dead code
@mlazos
mlazos / console_output.txt
Created September 8, 2022 10:19
backend compiler error
WARNING:root:Compiled Fx GraphModule failed with . Starting minifier.
Writing checkpoint with 10 nodes to /tmp/minifier_mlazos/checkpoints/10.py
Writing checkpoint with 10 locally to repro.py
Started off with 10 nodes
Writing checkpoint with 10 nodes to /tmp/minifier_mlazos/checkpoints/10.py
Writing checkpoint with 10 locally to repro.py
Trying granularity 8
Strategy: Eliminate dead code (G: 8) (10 nodes, 0 inputs)
FAIL: Eliminate dead code
@mlazos
mlazos / code.py
Created September 13, 2022 17:33
repro
import logging
import torch
import torchdynamo
torchdynamo.config.log_level = logging.WARNING
def test_assertion_error():
y = torch.ones(200, 200)