pytorch - 💡(How to fix) Fix [inductor] CPP kernel fusion AssertionError ((8, 7, 7), (56, 7)) when GroupNorm + scaled_dot_product_attention + bmm compiled on CPU [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
pytorch/pytorch#180980Fetched 2026-04-22 07:43:09
View on GitHub
Comments
1
Participants
2
Timeline
193
Reactions
0
Assignees
Timeline (top)
mentioned ×90subscribed ×90labeled ×7assigned ×1

Error Message

Error logs

Traceback (most recent call last):

Root Cause

TorchInductor crashes during CPP kernel fusion with AssertionError: ((8, 7, 7), (56, 7)) in codegen/cpp.py:fuse. The mismatch arises because GroupNorm's decomposition produces an as_strided tensor with layout [8, 7, 1] stride [7, 1, 56], which when fed into the scaled_dot_product_attention decomposition causes the softmax reduction buffers to be lowered with 2D loop ranges (56, 7) — incompatible with the upstream 3D pointwise kernels (8, 7, 7). The CPP fusion pass then hits an unguarded assert.

Fix Action

Fix / Workaround

I0421 09:51:39.375000 2617416 torch/_dynamo/utils.py:1900] [0/0] ChromiumEventLogger initialized with id 7f69ab89-6e3d-4ac0-badf-e189bdfd2ff6 V0421 09:51:39.376000 2617416 torch/_dynamo/convert_frame.py:1790] [0/0] torchdynamo start compiling model /home/bugs/crash_3c1643d7_reporting.py:11, stack (elided 5 frames): V0421 09:51:39.376000 2617416 torch/_dynamo/convert_frame.py:1790] [0/0] File "/home/bugs/crash_3c1643d7_reporting.py", line 23, in <module> V0421 09:51:39.376000 2617416 torch/_dynamo/convert_frame.py:1790] [0/0] out_compiled = torch.compile(model, backend='inductor')() V0421 09:51:39.376000 2617416 torch/_dynamo/convert_frame.py:1790] [0/0] I0421 09:51:39.376000 2617416 torch/_dynamo/symbolic_convert.py:5320] [0/0] Step 1: torchdynamo start tracing model /home/bugs/crash_3c1643d7_reporting.py:11 I0421 09:51:39.377000 2617416 torch/fx/experimental/symbolic_shapes.py:3945] [0/0] create_env V0421 09:51:39.379000 2617416 torch/_dynamo/symbolic_convert.py:1414] [0/0] [__trace_source] TRACE starts_line /home/bugs/crash_3c1643d7_reporting.py:12 in model (model) V0421 09:51:39.379000 2617416 torch/_dynamo/symbolic_convert.py:1414] [0/0] [__trace_source] t9128106 = torch.sigmoid(t9128098) V0421 09:51:39.380000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_GLOBAL torch [] V0421 09:51:39.380000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_ATTR sigmoid [LazyVariableTracker(unrealized: <class 'module'>)] V0421 09:51:39.415000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_GLOBAL t9128098 [LazyVariableTracker(unrealized: <class 'builtin_function_or_method'>)] V0421 09:51:39.415000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE CALL_FUNCTION 1 [LazyVariableTracker(unrealized: <class 'builtin_function_or_method'>), LazyVariableTracker(unrealized: <class 'torch.Tensor'>)] V0421 09:51:39.421000 2617416 torch/_dynamo/variables/builder.py:4033] [0/0] wrap_to_fake G['t9128098'] (8, 7, 7) StatefulSymbolicContext(dynamic_sizes=[<DimDynamic.STATIC: 2>, <DimDynamic.STATIC: 2>, <DimDynamic.STATIC: 2>], dynamic_strides=[<DimDynamic.INFER_STRIDE: 4>, <DimDynamic.INFER_STRIDE: 4>, <DimDynamic.INFER_STRIDE: 4>], constraint_sizes=[None, None, None], constraint_strides=[None, None, None], specialize_on=[[], [], []], view_base_context=None, shape_ids=None, tensor_source=GlobalSource(global_name='t9128098'), shape_env_to_source_to_symbol_cache={}) <class 'torch.Tensor'> V0421 09:51:39.422000 2617416 torch/dynamo/output_graph.py:3602] [0/0] create_graph_input G_t9128098 G['t9128098'] FakeTensor(..., size=(8, 7, 7)) at debug_level 0 before=False V0421 09:51:39.427000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE STORE_FAST t9128106 [TensorVariable()] V0421 09:51:39.427000 2617416 torch/_dynamo/symbolic_convert.py:1414] [0/0] [__trace_source] TRACE starts_line /home/bugs/crash_3c1643d7_reporting.py:13 in model (model) V0421 09:51:39.427000 2617416 torch/_dynamo/symbolic_convert.py:1414] [0/0] [__trace_source] t9128101 = _m_t9128101(t9128098) V0421 09:51:39.427000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_GLOBAL _m_t9128101 [] V0421 09:51:39.427000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_GLOBAL t9128098 [LazyVariableTracker(unrealized: <class 'torch.nn.modules.normalization.GroupNorm'>)] V0421 09:51:39.427000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE CALL_FUNCTION 1 [LazyVariableTracker(unrealized: <class 'torch.nn.modules.normalization.GroupNorm'>), TensorVariable()] V0421 09:51:39.430000 2617416 torch/_dynamo/symbolic_convert.py:5824] [0/0] INLINING <code object forward at 0x7fac56264be0, file "/home/.venv/lib/python3.10/site-packages/torch/nn/modules/normalization.py", line 326>, inlined according trace_rules.lookup MOD_INLINELIST V0421 09:51:39.430000 2617416 torch/_dynamo/symbolic_convert.py:1414] [0/0] [__trace_source] TRACE starts_line /home/.venv/lib/python3.10/site-packages/torch/nn/modules/normalization.py:327 in forward (GroupNorm.forward) (inline depth: 1) V0421 09:51:39.430000 2617416 torch/_dynamo/symbolic_convert.py:1414] [0/0] [__trace_source] return F.group_norm(input, self.num_groups, self.weight, self.bias, self.eps) V0421 09:51:39.434000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_GLOBAL F [] V0421 09:51:39.434000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_ATTR group_norm [LazyVariableTracker(unrealized: <class 'module'>)] V0421 09:51:39.434000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_FAST input [LazyVariableTracker(unrealized: <class 'function'>)] V0421 09:51:39.434000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_FAST self [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable()] V0421 09:51:39.434000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_ATTR num_groups [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable(), UnspecializedBuiltinNNModuleVariable(GroupNorm)] V0421 09:51:39.435000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_FAST self [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable(), LazyVariableTracker(unrealized: <class 'int'>)] V0421 09:51:39.435000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_ATTR weight [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable(), LazyVariableTracker(unrealized: <class 'int'>), UnspecializedBuiltinNNModuleVariable(GroupNorm)] V0421 09:51:39.435000 2617416 torch/_dynamo/variables/builder.py:4033] [0/0] wrap_to_fake G['_m_t9128101']._parameters['weight'] (7,) StatefulSymbolicContext(dynamic_sizes=[<DimDynamic.STATIC: 2>], dynamic_strides=[<DimDynamic.INFER_STRIDE: 4>], constraint_sizes=[None], constraint_strides=[None], specialize_on=[[]], view_base_context=None, shape_ids=None, tensor_source=DictGetItemSource(base=UnspecializedParamBufferSource(base=UnspecializedBuiltinNNModuleSource(base=GlobalSource(global_name='_m_t9128101')), member='_parameters'), index='weight'), shape_env_to_source_to_symbol_cache={}) <class 'torch.nn.parameter.Parameter'> V0421 09:51:39.435000 2617416 torch/dynamo/output_graph.py:3602] [0/0] create_graph_input G_m_t9128101_parameters_weight G['_m_t9128101']._parameters['weight'] Parameter(FakeTensor(..., size=(7,), requires_grad=True)) at debug_level 0 before=False V0421 09:51:39.436000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_FAST self [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable(), LazyVariableTracker(unrealized: <class 'int'>), LazyVariableTracker(realized: TensorVariable())] V0421 09:51:39.436000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_ATTR bias [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable(), LazyVariableTracker(unrealized: <class 'int'>), LazyVariableTracker(realized: TensorVariable()), UnspecializedBuiltinNNModuleVariable(GroupNorm)] V0421 09:51:39.436000 2617416 torch/_dynamo/variables/builder.py:4033] [0/0] wrap_to_fake G['_m_t9128101']._parameters['bias'] (7,) StatefulSymbolicContext(dynamic_sizes=[<DimDynamic.STATIC: 2>], dynamic_strides=[<DimDynamic.INFER_STRIDE: 4>], constraint_sizes=[None], constraint_strides=[None], specialize_on=[[]], view_base_context=None, shape_ids=None, tensor_source=DictGetItemSource(base=UnspecializedParamBufferSource(base=UnspecializedBuiltinNNModuleSource(base=GlobalSource(global_name='_m_t9128101')), member='_parameters'), index='bias'), shape_env_to_source_to_symbol_cache={}) <class 'torch.nn.parameter.Parameter'> V0421 09:51:39.436000 2617416 torch/dynamo/output_graph.py:3602] [0/0] create_graph_input G_m_t9128101_parameters_bias G['_m_t9128101']._parameters['bias'] Parameter(FakeTensor(..., size=(7,), requires_grad=True)) at debug_level 0 before=False V0421 09:51:39.437000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_FAST self [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable(), LazyVariableTracker(unrealized: <class 'int'>), LazyVariableTracker(realized: TensorVariable()), LazyVariableTracker(realized: TensorVariable())] V0421 09:51:39.437000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_ATTR eps [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable(), LazyVariableTracker(unrealized: <class 'int'>), LazyVariableTracker(realized: TensorVariable()), LazyVariableTracker(realized: TensorVariable()), UnspecializedBuiltinNNModuleVariable(GroupNorm)] V0421 09:51:39.437000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE CALL_FUNCTION 5 [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable(), LazyVariableTracker(unrealized: <class 'int'>), LazyVariableTracker(realized: TensorVariable()), LazyVariableTracker(realized: TensorVariable()), LazyVariableTracker(unrealized: <class 'float'>)] V0421 09:51:39.442000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE RETURN_VALUE None [TensorVariable()] V0421 09:51:39.442000 2617416 torch/_dynamo/symbolic_convert.py:5915] [0/0] DONE INLINING <code object forward at 0x7fac56264be0, file "/home/.venv/lib/python3.10/site-packages/torch/nn/modules/normalization.py", line 326> V0421 09:51:39.442000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE STORE_FAST t9128101 [TensorVariable()] V0421 09:51:39.442000 2617416 torch/_dynamo/symbolic_convert.py:1414] [0/0] [__trace_source] TRACE starts_line /home/bugs/crash_3c1643d7_reporting.py:14 in model (model) V0421 09:51:39.442000 2617416 torch/_dynamo/symbolic_convert.py:1414] [0/0] [__trace_source] t9128104 = F.scaled_dot_product_attention(t9128101, t9128101, t9128101) V0421 09:51:39.442000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_GLOBAL F [] V0421 09:51:39.442000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_ATTR scaled_dot_product_attention [LazyVariableTracker(unrealized: <class 'module'>)] V0421 09:51:39.443000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_FAST t9128101 [LazyVariableTracker(unrealized: <class 'builtin_function_or_method'>)] V0421 09:51:39.443000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_FAST t9128101 [LazyVariableTracker(unrealized: <class 'builtin_function_or_method'>), TensorVariable()] V0421 09:51:39.443000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_FAST t9128101 [LazyVariableTracker(unrealized: <class 'builtin_function_or_method'>), TensorVariable(), TensorVariable()] V0421 09:51:39.443000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE CALL_FUNCTION 3 [LazyVariableTracker(unrealized: <class 'builtin_function_or_method'>), TensorVariable(), TensorVariable(), TensorVariable()] V0421 09:51:39.456000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE STORE_FAST t9128104 [TensorVariable()] V0421 09:51:39.456000 2617416 torch/_dynamo/symbolic_convert.py:1414] [0/0] [__trace_source] TRACE starts_line /home/bugs/crash_3c1643d7_reporting.py:15 in model (model) V0421 09:51:39.456000 2617416 torch/_dynamo/symbolic_convert.py:1414] [0/0] [__trace_source] t9128105 = _m_t9128105(t9128104) V0421 09:51:39.457000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_GLOBAL _m_t9128105 [] V0421 09:51:39.457000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_FAST t9128104 [LazyVariableTracker(unrealized: <class 'torch.nn.modules.activation.RReLU'>)] V0421 09:51:39.457000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE CALL_FUNCTION 1 [LazyVariableTracker(unrealized: <class 'torch.nn.modules.activation.RReLU'>), TensorVariable()] V0421 09:51:39.457000 2617416 torch/_dynamo/symbolic_convert.py:5824] [0/0] INLINING <code object forward at 0x7fac563e9c60, file "/home/.venv/lib/python3.10/site-packages/torch/nn/modules/activation.py", line 205>, inlined according trace_rules.lookup MOD_INLINELIST V0421 09:51:39.457000 2617416 torch/_dynamo/symbolic_convert.py:1414] [0/0] [__trace_source] TRACE starts_line /home/.venv/lib/python3.10/site-packages/torch/nn/modules/activation.py:209 in forward (RReLU.forward) (inline depth: 1) V0421 09:51:39.457000 2617416 torch/_dynamo/symbolic_convert.py:1414] [0/0] [__trace_source] return F.rrelu(input, self.lower, self.upper, self.training, self.inplace) V0421 09:51:39.471000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_GLOBAL F [] V0421 09:51:39.471000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_ATTR rrelu [LazyVariableTracker(unrealized: <class 'module'>)] V0421 09:51:39.471000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_FAST input [LazyVariableTracker(unrealized: <class 'function'>)] V0421 09:51:39.471000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_FAST self [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable()] V0421 09:51:39.471000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_ATTR lower [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable(), UnspecializedBuiltinNNModuleVariable(RReLU)] V0421 09:51:39.471000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_FAST self [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable(), LazyVariableTracker(unrealized: <class 'float'>)] V0421 09:51:39.471000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_ATTR upper [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable(), LazyVariableTracker(unrealized: <class 'float'>), UnspecializedBuiltinNNModuleVariable(RReLU)] V0421 09:51:39.471000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_FAST self [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable(), LazyVariableTracker(unrealized: <class 'float'>), LazyVariableTracker(unrealized: <class 'float'>)] V0421 09:51:39.471000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_ATTR training [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable(), LazyVariableTracker(unrealized: <class 'float'>), LazyVariableTracker(unrealized: <class 'float'>), UnspecializedBuiltinNNModuleVariable(RReLU)] V0421 09:51:39.472000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_FAST self [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable(), LazyVariableTracker(unrealized: <class 'float'>), LazyVariableTracker(unrealized: <class 'float'>), LazyVariableTracker(unrealized: <class 'bool'>)] V0421 09:51:39.472000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_ATTR inplace [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable(), LazyVariableTracker(unrealized: <class 'float'>), LazyVariableTracker(unrealized: <class 'float'>), LazyVariableTracker(unrealized: <class 'bool'>), UnspecializedBuiltinNNModuleVariable(RReLU)] V0421 09:51:39.472000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE CALL_FUNCTION 5 [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable(), LazyVariableTracker(unrealized: <class 'float'>), LazyVariableTracker(unrealized: <class 'float'>), LazyVariableTracker(unrealized: <class 'bool'>), LazyVariableTracker(unrealized: <class 'bool'>)] V0421 09:51:39.474000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE RETURN_VALUE None [TensorVariable()] V0421 09:51:39.474000 2617416 torch/_dynamo/symbolic_convert.py:5915] [0/0] DONE INLINING <code object forward at 0x7fac563e9c60, file "/home/.venv/lib/python3.10/site-packages/torch/nn/modules/activation.py", line 205> V0421 09:51:39.474000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE STORE_FAST t9128105 [TensorVariable()] V0421 09:51:39.474000 2617416 torch/_dynamo/symbolic_convert.py:1414] [0/0] [__trace_source] TRACE starts_line /home/bugs/crash_3c1643d7_reporting.py:16 in model (model) V0421 09:51:39.474000 2617416 torch/_dynamo/symbolic_convert.py:1414] [0/0] [__trace_source] return torch.bmm(t9128106, t9128105) V0421 09:51:39.474000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_GLOBAL torch [] V0421 09:51:39.474000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_ATTR bmm [PythonModuleVariable(<module 'torch' from '/home/.venv/lib/python3.10/site-packages/torch/init.py'>)] V0421 09:51:39.474000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_FAST t9128106 [LazyVariableTracker(unrealized: <class 'builtin_function_or_method'>)] V0421 09:51:39.474000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_FAST t9128105 [LazyVariableTracker(unrealized: <class 'builtin_function_or_method'>), TensorVariable()] V0421 09:51:39.474000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE CALL_FUNCTION 2 [LazyVariableTracker(unrealized: <class 'builtin_function_or_method'>), TensorVariable(), TensorVariable()] V0421 09:51:39.475000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE RETURN_VALUE None [TensorVariable()] I0421 09:51:39.475000 2617416 torch/_dynamo/symbolic_convert.py:5547] [0/0] Step 1: torchdynamo done tracing model (RETURN_VALUE) V0421 09:51:39.475000 2617416 torch/_dynamo/symbolic_convert.py:5551] [0/0] return triggered compile V0421 09:51:39.475000 2617416 torch/_dynamo/output_graph.py:1638] [0/0] COMPILING GRAPH due to GraphCompileReason(reason='return_value', user_stack=[<FrameSummary file /home/bugs/crash_3c1643d7_reporting.py, line 16 in model>], graph_break=False) V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] TRACED GRAPH V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] ===== __compiled_fn_1_19eb5920_6223_4bed_82ca_67c576c2f24d ===== V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] /home/.venv/lib/python3.10/site-packages/torch/fx/_lazy_graph_module.py class GraphModule(torch.nn.Module): V0421 09:51:39.477000 2617416 torch/dynamo/output_graph.py:2417] [0/0] [graph_code] def forward(self, G_t9128098: "f32[8, 7, 7][49, 7, 1]cpu", G_m_t9128101_parameters_weight: "f32[7][1]cpu", G_m_t9128101_parameters_bias: "f32[7][1]cpu"): V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [graph_code] g_t9128098 = G_t9128098 V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [graph_code] g_m_t9128101_parameters_weight = G_m_t9128101_parameters_weight V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [graph_code] g_m_t9128101_parameters_bias = G_m_t9128101_parameters_bias V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] # File: /home/bugs/crash_3c1643d7_reporting.py:12 in model, code: t9128106 = torch.sigmoid(t9128098) V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [_graph_code] t9128106: "f32[8, 7, 7][49, 7, 1]cpu" = torch.sigmoid(g_t9128098) V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [graph_code] # File: /home/bugs/crash_3c1643d7_reporting.py:13 in model, code: t9128101 = m_t9128101(t9128098) V0421 09:51:39.477000 2617416 torch/dynamo/output_graph.py:2417] [0/0] [graph_code] t9128101: "f32[8, 7, 7][49, 7, 1]cpu" = torch.nn.functional.group_norm(g_t9128098, 1, g_m_t9128101_parameters_weight, g_m_t9128101_parameters_bias, 1e-05); g_t9128098 = g_m_t9128101_parameters_weight = g_m_t9128101_parameters_bias = None V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] # File: /home/bugs/crash_3c1643d7_reporting.py:14 in model, code: t9128104 = F.scaled_dot_product_attention(t9128101, t9128101, t9128101) V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] t9128104: "f32[8, 7, 7][49, 7, 1]cpu" = torch._C._nn.scaled_dot_product_attention(t9128101, t9128101, t9128101); t9128101 = None V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] # File: /home/bugs/crash_3c1643d7_reporting.py:15 in model, code: t9128105 = _m_t9128105(t9128104) V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] t9128105: "f32[8, 7, 7][49, 7, 1]cpu" = torch.nn.functional.rrelu(t9128104, 0.125, 0.3333333333333333, False, False); t9128104 = None V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] # File: /home/bugs/crash_3c1643d7_reporting.py:16 in model, code: return torch.bmm(t9128106, t9128105) V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] bmm: "f32[8, 7, 7][49, 7, 1]cpu" = torch.bmm(t9128106, t9128105); t9128106 = t9128105 = None V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] return (bmm,) V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] I0421 09:51:39.478000 2617416 torch/_dynamo/output_graph.py:2661] [0/0] Step 2: calling compiler function inductor V0421 09:51:40.315000 2617416 torch/fx/experimental/symbolic_shapes.py:7777] [0/0] eval 2 [trivial] V0421 09:51:40.340000 2617416 torch/fx/experimental/symbolic_shapes.py:7777] [0/0] eval -1 [trivial] I0421 09:51:40.396000 2617416 torch/_dynamo/convert_frame.py:1901] [0/0] run_gc_after_compile: running gc Traceback (most recent call last): File "/home/bugs/crash_3c1643d7_reporting.py", line 23, in <module> out_compiled = torch.compile(model, backend='inductor')() File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py", line 1038, in compile_wrapper raise e.remove_dynamo_frames() from None # see TORCHDYNAMO_VERBOSE=1 File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py", line 1024, in compile_wrapper return fn(*args, **kwargs) File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 2316, in call result = self._torchdynamo_orig_backend( File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 2052, in call result = self._inner_convert( File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 729, in call result = _compile( File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 1827, in _compile guarded_code, tracer_output = compile_inner(code, one_graph, hooks) File "/home/.venv/lib/python3.10/site-packages/torch/_utils_internal.py", line 96, in wrapper_function return function(*args, **kwargs) File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 1500, in compile_inner return _compile_inner(code, one_graph, hooks) File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 1534, in _compile_inner dynamo_output = compile_frame( File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 1408, in compile_frame bytecode, tracer_output = transform_code_object(code, transform) File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/bytecode_transformation.py", line 1608, in transform_code_object tracer_output = transformations(instructions, code_options) File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 1380, in transform tracer_output = trace_frame( File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 341, in _fn return fn(*args, **kwargs) File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 863, in trace_frame run_tracer() File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 844, in run_tracer tracer.run() File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1794, in run while self.step(): File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1459, in step self.dispatch_table[inst.opcode](self, inst) File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 5570, in RETURN_VALUE self._return(inst) File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 5552, in _return all_stack_locals_metadata = self.output.compile_subgraph( File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/output_graph.py", line 1889, in compile_subgraph self.compile_and_call_fx_graph(tx, pass2.graph_output_vars(), root) File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/output_graph.py", line 2460, in compile_and_call_fx_graph compiled_fn = self.call_user_compiler(gm, self.example_inputs()) File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/output_graph.py", line 2613, in call_user_compiler return self._call_user_compiler(gm, example_inputs) File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/output_graph.py", line 2664, in call_user_compiler compiled_fn = compiler_fn(gm, example_inputs) File "/home/.venv/lib/python3.10/site-packages/torch/dynamo/repro/after_dynamo.py", line 156, in call compiled_gm = compiler_fn(gm, example_inputs) File "/home/.venv/lib/python3.10/site-packages/torch/init.py", line 2461, in call return compile_fx(model, inputs, config_patches=self.config) File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 2578, in compile_fx return _maybe_wrap_and_compile_fx_main( File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 2655, in _maybe_wrap_and_compile_fx_main return _compile_fx_main( File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 2864, in _compile_fx_main raise e.remove_dynamo_frames() from None # see TORCHDYNAMO_VERBOSE=1 File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 2850, in _compile_fx_main return aot_autograd( File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/backends/common.py", line 124, in call cg = aot_module_simplified(gm, example_inputs, **self.kwargs) File "/home/.venv/lib/python3.10/site-packages/torch/_functorch/aot_autograd.py", line 1161, in aot_module_simplified compiled_fn, _ = aot_stage2_compile( File "/home/.venv/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/graph_compile.py", line 366, in aot_stage2_compile return aot_stage2_autograd(aot_state, aot_graph_capture) File "/home/.venv/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/graph_compile.py", line 2197, in aot_stage2_autograd fwd_output_strides, compiled_fw_func = _aot_stage2b_fw_compile( File "/home/.venv/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/graph_compile.py", line 1986, in _aot_stage2b_fw_compile return _aot_stage2b_compile_forward_or_inference( File "/home/.venv/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/graph_compile.py", line 2513, in _aot_stage2b_compile_forward_or_inference compiled_fw_func = compiler(fw_module, adjusted_flat_args) File "/home/.venv/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/schemas.py", line 1394, in call output_code = self.compiler_fn(gm, example_inputs) File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 2719, in fw_compiler_base return compile_fx_forward( File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 2390, in compile_fx_forward return inner_compile( File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 826, in compile_fx_inner return wrap_compiler_debug(_compile_fx_inner, compiler_name="inductor")( File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/repro/after_aot.py", line 273, in debug_wrapper inner_compiled_fn = compiler_fn(gm, example_inputs) File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 1053, in _compile_fx_inner raise InductorError(e, currentframe()).with_traceback( File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 1037, in _compile_fx_inner mb_compiled_graph = fx_codegen_and_compile( File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 1798, in fx_codegen_and_compile return scheme.codegen_and_compile(gm, example_inputs, inputs_to_check, graph_kwargs) File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 1570, in codegen_and_compile compiled_module = graph.compile_to_module() File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/graph.py", line 2499, in compile_to_module return self._compile_to_module() File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/graph.py", line 2505, in _compile_to_module self.codegen_with_cpp_wrapper() if self.cpp_wrapper else self.codegen() File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/graph.py", line 2437, in codegen self._update_scheduler() File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/graph.py", line 2431, in _update_scheduler self.scheduler = Scheduler(self.operations) File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/scheduler.py", line 2882, in init self._init(nodes) File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/scheduler.py", line 2975, in _init self.nodes = self.fuse_nodes(self.nodes) File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/scheduler.py", line 3711, in fuse_nodes nodes = self.fuse_nodes_once(nodes, is_reorder_round=False) File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/scheduler.py", line 4637, in fuse_nodes_once self._try_fusion_pairs( File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/scheduler.py", line 4546, in _try_fusion_pairs self.fuse_two_nodes(node1, node2, fused_nodes) File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/scheduler.py", line 4373, in fuse_two_nodes node3 = self.get_backend(device).fuse(node1, node2) File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/codegen/cpp.py", line 4773, in fuse assert vars1 == vars2, (vars1, vars2) torch._inductor.exc.InductorError: AssertionError: ((8, 7, 7), (56, 7))

I0421 09:51:40.411000 2617416 torch/_dynamo/eval_frame.py:701] TorchDynamo attempted to trace the following frames: [ I0421 09:51:40.411000 2617416 torch/_dynamo/eval_frame.py:701] * model /home/bugs/crash_3c1643d7_reporting.py:11 I0421 09:51:40.411000 2617416 torch/_dynamo/eval_frame.py:701] ] I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] TorchDynamo compilation metrics: I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] Function, Runtimes (s) I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] _compile.compile_inner, 1.0240 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] compile_attempt_0, 1.0180 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] bytecode_tracing, 0.0961 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] get_fake_value, 0.0209 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] create_proxy, 0.0038 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] wrap_to_fake_tensor_and_record, 0.0022 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] variable_builder_call, 0.0454 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] insert_deferred_runtime_asserts, 0.0012 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] OutputGraph.call_user_compiler, 0.9154 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] _recursive_pre_grad_passes, 0.0024 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.pre_grad_passes.group_batch_fusion_passes, 0.0000 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.pre_grad_passes.efficient_conv_bn_eval_pass, 0.0001 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.pre_grad_passes.apply_gumbel_max_trick_pass, 0.0000 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] inductor_codecache_torch_key, 0.1048 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] create_aot_dispatcher_function, 0.5271 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] aot_collect_metadata, 0.0201 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] aot_trace_joint_graph, 0.0880 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] _recursive_joint_graph_passes, 0.2309 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.joint_graph_passes.remove_noop_ops, 0.0010 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.joint_graph_passes.constant_fold_uniform_value, 0.0029 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.joint_graph_passes.pass_pattern_0, 0.0092 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.joint_graph_passes.pass_pattern_1, 0.0002 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] min_cut_rematerialization_partition, 0.0227 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] compile_fx.<locals>.fw_compiler_base, 0.1543 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] compile_fx_inner, 0.1542 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] fx_codegen_and_compile, 0.1531 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] additional_fake_tensor_prop, 0.0127 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] _recursive_post_grad_passes, 0.0181 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.post_grad_passes.remove_profiler_ops, 0.0000 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.post_grad_passes.post_grad_custom_pre_pass, 0.0000 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.post_grad_passes.remove_noop_ops, 0.0001 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.post_grad_passes.remove_assert_ops, 0.0000 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.post_grad_passes.pass_pattern_0, 0.0000 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.post_grad_passes.pass_pattern_1, 0.0047 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.post_grad_passes.pass_pattern_2, 0.0003 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.post_grad_passes.stable_sort, 0.0001 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.post_grad_passes.move_constructors_to_cuda, 0.0001 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.post_grad_passes.reinplace_inplaceable_ops, 0.0005 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.post_grad_passes.decompose_triton_kernel_wrapper_functional, 0.0000 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.post_grad_passes.decompose_auto_functionalized, 0.0001 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.post_grad_passes.decompose_scan_to_while_loop, 0.0000 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.post_grad_passes.decompose_map_to_while_loop, 0.0000 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] GraphLowering.run, 0.0634 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] GraphLowering.compile_to_fn, 0.0463 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] GraphLowering.compile_to_module, 0.0462 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] GraphLowering.codegen, 0.0462 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] Scheduler.init, 0.0450 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] Scheduler.fused_nodes, 0.0091 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] gc, 0.0007 V0421 09:51:40.412000 2617416 torch/fx/experimental/symbolic_shapes.py:189] lru_cache_stats constrain_symbol_range: CacheInfo(hits=0, misses=0, maxsize=None, currsize=0) V0421 09:51:40.412000 2617416 torch/fx/experimental/symbolic_shapes.py:189] lru_cache_stats guard_or_defer_runtime_assert: CacheInfo(hits=0, misses=0, maxsize=256, currsize=0) V0421 09:51:40.412000 2617416 torch/fx/experimental/symbolic_shapes.py:189] lru_cache_stats _inner_evaluate_expr: CacheInfo(hits=150, misses=5, maxsize=256, currsize=5) V0421 09:51:40.412000 2617416 torch/fx/experimental/symbolic_shapes.py:189] lru_cache_stats _simplify_floor_div: CacheInfo(hits=0, misses=0, maxsize=None, currsize=0) V0421 09:51:40.412000 2617416 torch/fx/experimental/symbolic_shapes.py:189] lru_cache_stats _maybe_guard_rel: CacheInfo(hits=0, misses=0, maxsize=256, currsize=0) V0421 09:51:40.412000 2617416 torch/fx/experimental/symbolic_shapes.py:189] lru_cache_stats _find: CacheInfo(hits=0, misses=0, maxsize=None, currsize=0) V0421 09:51:40.412000 2617416 torch/fx/experimental/symbolic_shapes.py:189] lru_cache_stats has_hint: CacheInfo(hits=0, misses=0, maxsize=256, currsize=0) V0421 09:51:40.412000 2617416 torch/fx/experimental/symbolic_shapes.py:189] lru_cache_stats size_hint: CacheInfo(hits=0, misses=0, maxsize=256, currsize=0) V0421 09:51:40.412000 2617416 torch/fx/experimental/symbolic_shapes.py:189] lru_cache_stats simplify: CacheInfo(hits=0, misses=2, maxsize=None, currsize=2) V0421 09:51:40.412000 2617416 torch/fx/experimental/symbolic_shapes.py:189] lru_cache_stats _update_divisible: CacheInfo(hits=0, misses=0, maxsize=None, currsize=0) V0421 09:51:40.412000 2617416 torch/fx/experimental/symbolic_shapes.py:189] lru_cache_stats replace: CacheInfo(hits=0, misses=2, maxsize=None, currsize=2) V0421 09:51:40.412000 2617416 torch/fx/experimental/symbolic_shapes.py:189] lru_cache_stats _maybe_evaluate_static: CacheInfo(hits=7, misses=2, maxsize=None, currsize=2) V0421 09:51:40.412000 2617416 torch/fx/experimental/symbolic_shapes.py:189] lru_cache_stats get_implications: CacheInfo(hits=0, misses=0, maxsize=None, currsize=0) V0421 09:51:40.412000 2617416 torch/fx/experimental/symbolic_shapes.py:189] lru_cache_stats get_axioms: CacheInfo(hits=53, misses=1, maxsize=None, currsize=1) V0421 09:51:40.412000 2617416 torch/fx/experimental/symbolic_shapes.py:189] lru_cache_stats _maybe_evaluate_static_worker: CacheInfo(hits=0, misses=0, maxsize=None, currsize=0) V0421 09:51:40.412000 2617416 torch/fx/experimental/symbolic_shapes.py:189] lru_cache_stats safe_expand: CacheInfo(hits=0, misses=2, maxsize=256, currsize=2) V0421 09:51:40.412000 2617416 torch/fx/experimental/symbolic_shapes.py:189] lru_cache_stats uninteresting_files: CacheInfo(hits=7, misses=1, maxsize=None, currsize=1)

CPU: Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 52 bits physical, 57 bits virtual Byte Order: Little Endian CPU(s): 384 On-line CPU(s) list: 0-383 Vendor ID: AuthenticAMD Model name: AMD EPYC 9684X 96-Core Processor CPU family: 25 Model: 17 Thread(s) per core: 2 Core(s) per socket: 96 Socket(s): 2 Stepping: 2 BogoMIPS: 5099.98 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good amd_lbr_v2 nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba perfmon_v2 ibrs ibpb stibp ibrs_enhanced vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local user_shstk avx512_bf16 clzero irperf xsaveerptr rdpru wbnoinvd amd_ppin cppc amd_ibpb_ret arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif x2avic v_spec_ctrl vnmi avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq la57 rdpid overflow_recov succor smca fsrm flush_l1d debug_swap ibpb_exit_to_user Virtualization: AMD-V L1d cache: 6 MiB (192 instances) L1i cache: 6 MiB (192 instances) L2 cache: 192 MiB (192 instances) L3 cache: 2.3 GiB (24 instances) NUMA node(s): 2 NUMA node0 CPU(s): 0-95,192-287 NUMA node1 CPU(s): 96-191,288-383 Vulnerability Gather data sampling: Not affected Vulnerability Itlb multihit: Not affected Vulnerability L1tf: Not affected Vulnerability Mds: Not affected Vulnerability Meltdown: Not affected Vulnerability Mmio stale data: Not affected Vulnerability Reg file data sampling: Not affected Vulnerability Retbleed: Not affected Vulnerability Spec rstack overflow: Mitigation; Safe RET Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Vulnerability Spectre v2: Mitigation; Enhanced / Automatic IBRS; IBPB conditional; STIBP always-on; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected Vulnerability Srbds: Not affected Vulnerability Tsx async abort: Not affected Vulnerability Vmscape: Mitigation; IBPB before exit to userspace

Code Example

import torch
import torch.nn as nn
import torch.nn.functional as F

_m_t9128101 = nn.GroupNorm(1, 7).eval()
_m_t9128105 = nn.RReLU().eval()

torch.manual_seed(0)
t9128098 = torch.randn([8, 7, 7])

def model():
    t9128106 = torch.sigmoid(t9128098)
    t9128101 = _m_t9128101(t9128098)
    t9128104 = F.scaled_dot_product_attention(t9128101, t9128101, t9128101)
    t9128105 = _m_t9128105(t9128104)
    return torch.bmm(t9128106, t9128105)

# Eager: works fine
out_eager = model()
assert torch.isfinite(out_eager).all()

# Compiled: crashes
out_compiled = torch.compile(model, backend='inductor')()
RAW_BUFFERClick to expand / collapse

🐛 Describe the bug

TorchInductor crashes during CPP kernel fusion with AssertionError: ((8, 7, 7), (56, 7)) in codegen/cpp.py:fuse. The mismatch arises because GroupNorm's decomposition produces an as_strided tensor with layout [8, 7, 1] stride [7, 1, 56], which when fed into the scaled_dot_product_attention decomposition causes the softmax reduction buffers to be lowered with 2D loop ranges (56, 7) — incompatible with the upstream 3D pointwise kernels (8, 7, 7). The CPP fusion pass then hits an unguarded assert.

import torch
import torch.nn as nn
import torch.nn.functional as F

_m_t9128101 = nn.GroupNorm(1, 7).eval()
_m_t9128105 = nn.RReLU().eval()

torch.manual_seed(0)
t9128098 = torch.randn([8, 7, 7])

def model():
    t9128106 = torch.sigmoid(t9128098)
    t9128101 = _m_t9128101(t9128098)
    t9128104 = F.scaled_dot_product_attention(t9128101, t9128101, t9128101)
    t9128105 = _m_t9128105(t9128104)
    return torch.bmm(t9128106, t9128105)

# Eager: works fine
out_eager = model()
assert torch.isfinite(out_eager).all()

# Compiled: crashes
out_compiled = torch.compile(model, backend='inductor')()

Error logs

I0421 09:51:39.375000 2617416 torch/_dynamo/utils.py:1900] [0/0] ChromiumEventLogger initialized with id 7f69ab89-6e3d-4ac0-badf-e189bdfd2ff6 V0421 09:51:39.376000 2617416 torch/_dynamo/convert_frame.py:1790] [0/0] torchdynamo start compiling model /home/bugs/crash_3c1643d7_reporting.py:11, stack (elided 5 frames): V0421 09:51:39.376000 2617416 torch/_dynamo/convert_frame.py:1790] [0/0] File "/home/bugs/crash_3c1643d7_reporting.py", line 23, in <module> V0421 09:51:39.376000 2617416 torch/_dynamo/convert_frame.py:1790] [0/0] out_compiled = torch.compile(model, backend='inductor')() V0421 09:51:39.376000 2617416 torch/_dynamo/convert_frame.py:1790] [0/0] I0421 09:51:39.376000 2617416 torch/_dynamo/symbolic_convert.py:5320] [0/0] Step 1: torchdynamo start tracing model /home/bugs/crash_3c1643d7_reporting.py:11 I0421 09:51:39.377000 2617416 torch/fx/experimental/symbolic_shapes.py:3945] [0/0] create_env V0421 09:51:39.379000 2617416 torch/_dynamo/symbolic_convert.py:1414] [0/0] [__trace_source] TRACE starts_line /home/bugs/crash_3c1643d7_reporting.py:12 in model (model) V0421 09:51:39.379000 2617416 torch/_dynamo/symbolic_convert.py:1414] [0/0] [__trace_source] t9128106 = torch.sigmoid(t9128098) V0421 09:51:39.380000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_GLOBAL torch [] V0421 09:51:39.380000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_ATTR sigmoid [LazyVariableTracker(unrealized: <class 'module'>)] V0421 09:51:39.415000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_GLOBAL t9128098 [LazyVariableTracker(unrealized: <class 'builtin_function_or_method'>)] V0421 09:51:39.415000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE CALL_FUNCTION 1 [LazyVariableTracker(unrealized: <class 'builtin_function_or_method'>), LazyVariableTracker(unrealized: <class 'torch.Tensor'>)] V0421 09:51:39.421000 2617416 torch/_dynamo/variables/builder.py:4033] [0/0] wrap_to_fake G['t9128098'] (8, 7, 7) StatefulSymbolicContext(dynamic_sizes=[<DimDynamic.STATIC: 2>, <DimDynamic.STATIC: 2>, <DimDynamic.STATIC: 2>], dynamic_strides=[<DimDynamic.INFER_STRIDE: 4>, <DimDynamic.INFER_STRIDE: 4>, <DimDynamic.INFER_STRIDE: 4>], constraint_sizes=[None, None, None], constraint_strides=[None, None, None], specialize_on=[[], [], []], view_base_context=None, shape_ids=None, tensor_source=GlobalSource(global_name='t9128098'), shape_env_to_source_to_symbol_cache={}) <class 'torch.Tensor'> V0421 09:51:39.422000 2617416 torch/dynamo/output_graph.py:3602] [0/0] create_graph_input G_t9128098 G['t9128098'] FakeTensor(..., size=(8, 7, 7)) at debug_level 0 before=False V0421 09:51:39.427000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE STORE_FAST t9128106 [TensorVariable()] V0421 09:51:39.427000 2617416 torch/_dynamo/symbolic_convert.py:1414] [0/0] [__trace_source] TRACE starts_line /home/bugs/crash_3c1643d7_reporting.py:13 in model (model) V0421 09:51:39.427000 2617416 torch/_dynamo/symbolic_convert.py:1414] [0/0] [__trace_source] t9128101 = _m_t9128101(t9128098) V0421 09:51:39.427000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_GLOBAL _m_t9128101 [] V0421 09:51:39.427000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_GLOBAL t9128098 [LazyVariableTracker(unrealized: <class 'torch.nn.modules.normalization.GroupNorm'>)] V0421 09:51:39.427000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE CALL_FUNCTION 1 [LazyVariableTracker(unrealized: <class 'torch.nn.modules.normalization.GroupNorm'>), TensorVariable()] V0421 09:51:39.430000 2617416 torch/_dynamo/symbolic_convert.py:5824] [0/0] INLINING <code object forward at 0x7fac56264be0, file "/home/.venv/lib/python3.10/site-packages/torch/nn/modules/normalization.py", line 326>, inlined according trace_rules.lookup MOD_INLINELIST V0421 09:51:39.430000 2617416 torch/_dynamo/symbolic_convert.py:1414] [0/0] [__trace_source] TRACE starts_line /home/.venv/lib/python3.10/site-packages/torch/nn/modules/normalization.py:327 in forward (GroupNorm.forward) (inline depth: 1) V0421 09:51:39.430000 2617416 torch/_dynamo/symbolic_convert.py:1414] [0/0] [__trace_source] return F.group_norm(input, self.num_groups, self.weight, self.bias, self.eps) V0421 09:51:39.434000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_GLOBAL F [] V0421 09:51:39.434000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_ATTR group_norm [LazyVariableTracker(unrealized: <class 'module'>)] V0421 09:51:39.434000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_FAST input [LazyVariableTracker(unrealized: <class 'function'>)] V0421 09:51:39.434000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_FAST self [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable()] V0421 09:51:39.434000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_ATTR num_groups [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable(), UnspecializedBuiltinNNModuleVariable(GroupNorm)] V0421 09:51:39.435000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_FAST self [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable(), LazyVariableTracker(unrealized: <class 'int'>)] V0421 09:51:39.435000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_ATTR weight [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable(), LazyVariableTracker(unrealized: <class 'int'>), UnspecializedBuiltinNNModuleVariable(GroupNorm)] V0421 09:51:39.435000 2617416 torch/_dynamo/variables/builder.py:4033] [0/0] wrap_to_fake G['_m_t9128101']._parameters['weight'] (7,) StatefulSymbolicContext(dynamic_sizes=[<DimDynamic.STATIC: 2>], dynamic_strides=[<DimDynamic.INFER_STRIDE: 4>], constraint_sizes=[None], constraint_strides=[None], specialize_on=[[]], view_base_context=None, shape_ids=None, tensor_source=DictGetItemSource(base=UnspecializedParamBufferSource(base=UnspecializedBuiltinNNModuleSource(base=GlobalSource(global_name='_m_t9128101')), member='_parameters'), index='weight'), shape_env_to_source_to_symbol_cache={}) <class 'torch.nn.parameter.Parameter'> V0421 09:51:39.435000 2617416 torch/dynamo/output_graph.py:3602] [0/0] create_graph_input G_m_t9128101_parameters_weight G['_m_t9128101']._parameters['weight'] Parameter(FakeTensor(..., size=(7,), requires_grad=True)) at debug_level 0 before=False V0421 09:51:39.436000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_FAST self [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable(), LazyVariableTracker(unrealized: <class 'int'>), LazyVariableTracker(realized: TensorVariable())] V0421 09:51:39.436000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_ATTR bias [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable(), LazyVariableTracker(unrealized: <class 'int'>), LazyVariableTracker(realized: TensorVariable()), UnspecializedBuiltinNNModuleVariable(GroupNorm)] V0421 09:51:39.436000 2617416 torch/_dynamo/variables/builder.py:4033] [0/0] wrap_to_fake G['_m_t9128101']._parameters['bias'] (7,) StatefulSymbolicContext(dynamic_sizes=[<DimDynamic.STATIC: 2>], dynamic_strides=[<DimDynamic.INFER_STRIDE: 4>], constraint_sizes=[None], constraint_strides=[None], specialize_on=[[]], view_base_context=None, shape_ids=None, tensor_source=DictGetItemSource(base=UnspecializedParamBufferSource(base=UnspecializedBuiltinNNModuleSource(base=GlobalSource(global_name='_m_t9128101')), member='_parameters'), index='bias'), shape_env_to_source_to_symbol_cache={}) <class 'torch.nn.parameter.Parameter'> V0421 09:51:39.436000 2617416 torch/dynamo/output_graph.py:3602] [0/0] create_graph_input G_m_t9128101_parameters_bias G['_m_t9128101']._parameters['bias'] Parameter(FakeTensor(..., size=(7,), requires_grad=True)) at debug_level 0 before=False V0421 09:51:39.437000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_FAST self [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable(), LazyVariableTracker(unrealized: <class 'int'>), LazyVariableTracker(realized: TensorVariable()), LazyVariableTracker(realized: TensorVariable())] V0421 09:51:39.437000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_ATTR eps [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable(), LazyVariableTracker(unrealized: <class 'int'>), LazyVariableTracker(realized: TensorVariable()), LazyVariableTracker(realized: TensorVariable()), UnspecializedBuiltinNNModuleVariable(GroupNorm)] V0421 09:51:39.437000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE CALL_FUNCTION 5 [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable(), LazyVariableTracker(unrealized: <class 'int'>), LazyVariableTracker(realized: TensorVariable()), LazyVariableTracker(realized: TensorVariable()), LazyVariableTracker(unrealized: <class 'float'>)] V0421 09:51:39.442000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE RETURN_VALUE None [TensorVariable()] V0421 09:51:39.442000 2617416 torch/_dynamo/symbolic_convert.py:5915] [0/0] DONE INLINING <code object forward at 0x7fac56264be0, file "/home/.venv/lib/python3.10/site-packages/torch/nn/modules/normalization.py", line 326> V0421 09:51:39.442000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE STORE_FAST t9128101 [TensorVariable()] V0421 09:51:39.442000 2617416 torch/_dynamo/symbolic_convert.py:1414] [0/0] [__trace_source] TRACE starts_line /home/bugs/crash_3c1643d7_reporting.py:14 in model (model) V0421 09:51:39.442000 2617416 torch/_dynamo/symbolic_convert.py:1414] [0/0] [__trace_source] t9128104 = F.scaled_dot_product_attention(t9128101, t9128101, t9128101) V0421 09:51:39.442000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_GLOBAL F [] V0421 09:51:39.442000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_ATTR scaled_dot_product_attention [LazyVariableTracker(unrealized: <class 'module'>)] V0421 09:51:39.443000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_FAST t9128101 [LazyVariableTracker(unrealized: <class 'builtin_function_or_method'>)] V0421 09:51:39.443000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_FAST t9128101 [LazyVariableTracker(unrealized: <class 'builtin_function_or_method'>), TensorVariable()] V0421 09:51:39.443000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_FAST t9128101 [LazyVariableTracker(unrealized: <class 'builtin_function_or_method'>), TensorVariable(), TensorVariable()] V0421 09:51:39.443000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE CALL_FUNCTION 3 [LazyVariableTracker(unrealized: <class 'builtin_function_or_method'>), TensorVariable(), TensorVariable(), TensorVariable()] V0421 09:51:39.456000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE STORE_FAST t9128104 [TensorVariable()] V0421 09:51:39.456000 2617416 torch/_dynamo/symbolic_convert.py:1414] [0/0] [__trace_source] TRACE starts_line /home/bugs/crash_3c1643d7_reporting.py:15 in model (model) V0421 09:51:39.456000 2617416 torch/_dynamo/symbolic_convert.py:1414] [0/0] [__trace_source] t9128105 = _m_t9128105(t9128104) V0421 09:51:39.457000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_GLOBAL _m_t9128105 [] V0421 09:51:39.457000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_FAST t9128104 [LazyVariableTracker(unrealized: <class 'torch.nn.modules.activation.RReLU'>)] V0421 09:51:39.457000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE CALL_FUNCTION 1 [LazyVariableTracker(unrealized: <class 'torch.nn.modules.activation.RReLU'>), TensorVariable()] V0421 09:51:39.457000 2617416 torch/_dynamo/symbolic_convert.py:5824] [0/0] INLINING <code object forward at 0x7fac563e9c60, file "/home/.venv/lib/python3.10/site-packages/torch/nn/modules/activation.py", line 205>, inlined according trace_rules.lookup MOD_INLINELIST V0421 09:51:39.457000 2617416 torch/_dynamo/symbolic_convert.py:1414] [0/0] [__trace_source] TRACE starts_line /home/.venv/lib/python3.10/site-packages/torch/nn/modules/activation.py:209 in forward (RReLU.forward) (inline depth: 1) V0421 09:51:39.457000 2617416 torch/_dynamo/symbolic_convert.py:1414] [0/0] [__trace_source] return F.rrelu(input, self.lower, self.upper, self.training, self.inplace) V0421 09:51:39.471000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_GLOBAL F [] V0421 09:51:39.471000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_ATTR rrelu [LazyVariableTracker(unrealized: <class 'module'>)] V0421 09:51:39.471000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_FAST input [LazyVariableTracker(unrealized: <class 'function'>)] V0421 09:51:39.471000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_FAST self [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable()] V0421 09:51:39.471000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_ATTR lower [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable(), UnspecializedBuiltinNNModuleVariable(RReLU)] V0421 09:51:39.471000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_FAST self [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable(), LazyVariableTracker(unrealized: <class 'float'>)] V0421 09:51:39.471000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_ATTR upper [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable(), LazyVariableTracker(unrealized: <class 'float'>), UnspecializedBuiltinNNModuleVariable(RReLU)] V0421 09:51:39.471000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_FAST self [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable(), LazyVariableTracker(unrealized: <class 'float'>), LazyVariableTracker(unrealized: <class 'float'>)] V0421 09:51:39.471000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_ATTR training [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable(), LazyVariableTracker(unrealized: <class 'float'>), LazyVariableTracker(unrealized: <class 'float'>), UnspecializedBuiltinNNModuleVariable(RReLU)] V0421 09:51:39.472000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_FAST self [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable(), LazyVariableTracker(unrealized: <class 'float'>), LazyVariableTracker(unrealized: <class 'float'>), LazyVariableTracker(unrealized: <class 'bool'>)] V0421 09:51:39.472000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_ATTR inplace [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable(), LazyVariableTracker(unrealized: <class 'float'>), LazyVariableTracker(unrealized: <class 'float'>), LazyVariableTracker(unrealized: <class 'bool'>), UnspecializedBuiltinNNModuleVariable(RReLU)] V0421 09:51:39.472000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE CALL_FUNCTION 5 [LazyVariableTracker(unrealized: <class 'function'>), TensorVariable(), LazyVariableTracker(unrealized: <class 'float'>), LazyVariableTracker(unrealized: <class 'float'>), LazyVariableTracker(unrealized: <class 'bool'>), LazyVariableTracker(unrealized: <class 'bool'>)] V0421 09:51:39.474000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE RETURN_VALUE None [TensorVariable()] V0421 09:51:39.474000 2617416 torch/_dynamo/symbolic_convert.py:5915] [0/0] DONE INLINING <code object forward at 0x7fac563e9c60, file "/home/.venv/lib/python3.10/site-packages/torch/nn/modules/activation.py", line 205> V0421 09:51:39.474000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE STORE_FAST t9128105 [TensorVariable()] V0421 09:51:39.474000 2617416 torch/_dynamo/symbolic_convert.py:1414] [0/0] [__trace_source] TRACE starts_line /home/bugs/crash_3c1643d7_reporting.py:16 in model (model) V0421 09:51:39.474000 2617416 torch/_dynamo/symbolic_convert.py:1414] [0/0] [__trace_source] return torch.bmm(t9128106, t9128105) V0421 09:51:39.474000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_GLOBAL torch [] V0421 09:51:39.474000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_ATTR bmm [PythonModuleVariable(<module 'torch' from '/home/.venv/lib/python3.10/site-packages/torch/init.py'>)] V0421 09:51:39.474000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_FAST t9128106 [LazyVariableTracker(unrealized: <class 'builtin_function_or_method'>)] V0421 09:51:39.474000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE LOAD_FAST t9128105 [LazyVariableTracker(unrealized: <class 'builtin_function_or_method'>), TensorVariable()] V0421 09:51:39.474000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE CALL_FUNCTION 2 [LazyVariableTracker(unrealized: <class 'builtin_function_or_method'>), TensorVariable(), TensorVariable()] V0421 09:51:39.475000 2617416 torch/_dynamo/symbolic_convert.py:1440] [0/0] [__trace_bytecode] TRACE RETURN_VALUE None [TensorVariable()] I0421 09:51:39.475000 2617416 torch/_dynamo/symbolic_convert.py:5547] [0/0] Step 1: torchdynamo done tracing model (RETURN_VALUE) V0421 09:51:39.475000 2617416 torch/_dynamo/symbolic_convert.py:5551] [0/0] return triggered compile V0421 09:51:39.475000 2617416 torch/_dynamo/output_graph.py:1638] [0/0] COMPILING GRAPH due to GraphCompileReason(reason='return_value', user_stack=[<FrameSummary file /home/bugs/crash_3c1643d7_reporting.py, line 16 in model>], graph_break=False) V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] TRACED GRAPH V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] ===== __compiled_fn_1_19eb5920_6223_4bed_82ca_67c576c2f24d ===== V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] /home/.venv/lib/python3.10/site-packages/torch/fx/_lazy_graph_module.py class GraphModule(torch.nn.Module): V0421 09:51:39.477000 2617416 torch/dynamo/output_graph.py:2417] [0/0] [graph_code] def forward(self, G_t9128098: "f32[8, 7, 7][49, 7, 1]cpu", G_m_t9128101_parameters_weight: "f32[7][1]cpu", G_m_t9128101_parameters_bias: "f32[7][1]cpu"): V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [graph_code] g_t9128098 = G_t9128098 V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [graph_code] g_m_t9128101_parameters_weight = G_m_t9128101_parameters_weight V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [graph_code] g_m_t9128101_parameters_bias = G_m_t9128101_parameters_bias V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] # File: /home/bugs/crash_3c1643d7_reporting.py:12 in model, code: t9128106 = torch.sigmoid(t9128098) V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [_graph_code] t9128106: "f32[8, 7, 7][49, 7, 1]cpu" = torch.sigmoid(g_t9128098) V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [graph_code] # File: /home/bugs/crash_3c1643d7_reporting.py:13 in model, code: t9128101 = m_t9128101(t9128098) V0421 09:51:39.477000 2617416 torch/dynamo/output_graph.py:2417] [0/0] [graph_code] t9128101: "f32[8, 7, 7][49, 7, 1]cpu" = torch.nn.functional.group_norm(g_t9128098, 1, g_m_t9128101_parameters_weight, g_m_t9128101_parameters_bias, 1e-05); g_t9128098 = g_m_t9128101_parameters_weight = g_m_t9128101_parameters_bias = None V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] # File: /home/bugs/crash_3c1643d7_reporting.py:14 in model, code: t9128104 = F.scaled_dot_product_attention(t9128101, t9128101, t9128101) V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] t9128104: "f32[8, 7, 7][49, 7, 1]cpu" = torch._C._nn.scaled_dot_product_attention(t9128101, t9128101, t9128101); t9128101 = None V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] # File: /home/bugs/crash_3c1643d7_reporting.py:15 in model, code: t9128105 = _m_t9128105(t9128104) V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] t9128105: "f32[8, 7, 7][49, 7, 1]cpu" = torch.nn.functional.rrelu(t9128104, 0.125, 0.3333333333333333, False, False); t9128104 = None V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] # File: /home/bugs/crash_3c1643d7_reporting.py:16 in model, code: return torch.bmm(t9128106, t9128105) V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] bmm: "f32[8, 7, 7][49, 7, 1]cpu" = torch.bmm(t9128106, t9128105); t9128106 = t9128105 = None V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] return (bmm,) V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] V0421 09:51:39.477000 2617416 torch/_dynamo/output_graph.py:2417] [0/0] [__graph_code] I0421 09:51:39.478000 2617416 torch/_dynamo/output_graph.py:2661] [0/0] Step 2: calling compiler function inductor V0421 09:51:40.315000 2617416 torch/fx/experimental/symbolic_shapes.py:7777] [0/0] eval 2 [trivial] V0421 09:51:40.340000 2617416 torch/fx/experimental/symbolic_shapes.py:7777] [0/0] eval -1 [trivial] I0421 09:51:40.396000 2617416 torch/_dynamo/convert_frame.py:1901] [0/0] run_gc_after_compile: running gc Traceback (most recent call last): File "/home/bugs/crash_3c1643d7_reporting.py", line 23, in <module> out_compiled = torch.compile(model, backend='inductor')() File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py", line 1038, in compile_wrapper raise e.remove_dynamo_frames() from None # see TORCHDYNAMO_VERBOSE=1 File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py", line 1024, in compile_wrapper return fn(*args, **kwargs) File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 2316, in call result = self._torchdynamo_orig_backend( File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 2052, in call result = self._inner_convert( File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 729, in call result = _compile( File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 1827, in _compile guarded_code, tracer_output = compile_inner(code, one_graph, hooks) File "/home/.venv/lib/python3.10/site-packages/torch/_utils_internal.py", line 96, in wrapper_function return function(*args, **kwargs) File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 1500, in compile_inner return _compile_inner(code, one_graph, hooks) File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 1534, in _compile_inner dynamo_output = compile_frame( File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 1408, in compile_frame bytecode, tracer_output = transform_code_object(code, transform) File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/bytecode_transformation.py", line 1608, in transform_code_object tracer_output = transformations(instructions, code_options) File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 1380, in transform tracer_output = trace_frame( File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 341, in _fn return fn(*args, **kwargs) File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 863, in trace_frame run_tracer() File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 844, in run_tracer tracer.run() File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1794, in run while self.step(): File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1459, in step self.dispatch_table[inst.opcode](self, inst) File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 5570, in RETURN_VALUE self._return(inst) File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 5552, in _return all_stack_locals_metadata = self.output.compile_subgraph( File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/output_graph.py", line 1889, in compile_subgraph self.compile_and_call_fx_graph(tx, pass2.graph_output_vars(), root) File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/output_graph.py", line 2460, in compile_and_call_fx_graph compiled_fn = self.call_user_compiler(gm, self.example_inputs()) File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/output_graph.py", line 2613, in call_user_compiler return self._call_user_compiler(gm, example_inputs) File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/output_graph.py", line 2664, in call_user_compiler compiled_fn = compiler_fn(gm, example_inputs) File "/home/.venv/lib/python3.10/site-packages/torch/dynamo/repro/after_dynamo.py", line 156, in call compiled_gm = compiler_fn(gm, example_inputs) File "/home/.venv/lib/python3.10/site-packages/torch/init.py", line 2461, in call return compile_fx(model, inputs, config_patches=self.config) File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 2578, in compile_fx return _maybe_wrap_and_compile_fx_main( File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 2655, in _maybe_wrap_and_compile_fx_main return _compile_fx_main( File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 2864, in _compile_fx_main raise e.remove_dynamo_frames() from None # see TORCHDYNAMO_VERBOSE=1 File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 2850, in _compile_fx_main return aot_autograd( File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/backends/common.py", line 124, in call cg = aot_module_simplified(gm, example_inputs, **self.kwargs) File "/home/.venv/lib/python3.10/site-packages/torch/_functorch/aot_autograd.py", line 1161, in aot_module_simplified compiled_fn, _ = aot_stage2_compile( File "/home/.venv/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/graph_compile.py", line 366, in aot_stage2_compile return aot_stage2_autograd(aot_state, aot_graph_capture) File "/home/.venv/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/graph_compile.py", line 2197, in aot_stage2_autograd fwd_output_strides, compiled_fw_func = _aot_stage2b_fw_compile( File "/home/.venv/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/graph_compile.py", line 1986, in _aot_stage2b_fw_compile return _aot_stage2b_compile_forward_or_inference( File "/home/.venv/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/graph_compile.py", line 2513, in _aot_stage2b_compile_forward_or_inference compiled_fw_func = compiler(fw_module, adjusted_flat_args) File "/home/.venv/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/schemas.py", line 1394, in call output_code = self.compiler_fn(gm, example_inputs) File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 2719, in fw_compiler_base return compile_fx_forward( File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 2390, in compile_fx_forward return inner_compile( File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 826, in compile_fx_inner return wrap_compiler_debug(_compile_fx_inner, compiler_name="inductor")( File "/home/.venv/lib/python3.10/site-packages/torch/_dynamo/repro/after_aot.py", line 273, in debug_wrapper inner_compiled_fn = compiler_fn(gm, example_inputs) File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 1053, in _compile_fx_inner raise InductorError(e, currentframe()).with_traceback( File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 1037, in _compile_fx_inner mb_compiled_graph = fx_codegen_and_compile( File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 1798, in fx_codegen_and_compile return scheme.codegen_and_compile(gm, example_inputs, inputs_to_check, graph_kwargs) File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 1570, in codegen_and_compile compiled_module = graph.compile_to_module() File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/graph.py", line 2499, in compile_to_module return self._compile_to_module() File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/graph.py", line 2505, in _compile_to_module self.codegen_with_cpp_wrapper() if self.cpp_wrapper else self.codegen() File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/graph.py", line 2437, in codegen self._update_scheduler() File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/graph.py", line 2431, in _update_scheduler self.scheduler = Scheduler(self.operations) File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/scheduler.py", line 2882, in init self._init(nodes) File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/scheduler.py", line 2975, in _init self.nodes = self.fuse_nodes(self.nodes) File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/scheduler.py", line 3711, in fuse_nodes nodes = self.fuse_nodes_once(nodes, is_reorder_round=False) File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/scheduler.py", line 4637, in fuse_nodes_once self._try_fusion_pairs( File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/scheduler.py", line 4546, in _try_fusion_pairs self.fuse_two_nodes(node1, node2, fused_nodes) File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/scheduler.py", line 4373, in fuse_two_nodes node3 = self.get_backend(device).fuse(node1, node2) File "/home/.venv/lib/python3.10/site-packages/torch/_inductor/codegen/cpp.py", line 4773, in fuse assert vars1 == vars2, (vars1, vars2) torch._inductor.exc.InductorError: AssertionError: ((8, 7, 7), (56, 7))

I0421 09:51:40.411000 2617416 torch/_dynamo/eval_frame.py:701] TorchDynamo attempted to trace the following frames: [ I0421 09:51:40.411000 2617416 torch/_dynamo/eval_frame.py:701] * model /home/bugs/crash_3c1643d7_reporting.py:11 I0421 09:51:40.411000 2617416 torch/_dynamo/eval_frame.py:701] ] I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] TorchDynamo compilation metrics: I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] Function, Runtimes (s) I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] _compile.compile_inner, 1.0240 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] compile_attempt_0, 1.0180 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] bytecode_tracing, 0.0961 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] get_fake_value, 0.0209 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] create_proxy, 0.0038 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] wrap_to_fake_tensor_and_record, 0.0022 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] variable_builder_call, 0.0454 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] insert_deferred_runtime_asserts, 0.0012 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] OutputGraph.call_user_compiler, 0.9154 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] _recursive_pre_grad_passes, 0.0024 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.pre_grad_passes.group_batch_fusion_passes, 0.0000 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.pre_grad_passes.efficient_conv_bn_eval_pass, 0.0001 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.pre_grad_passes.apply_gumbel_max_trick_pass, 0.0000 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] inductor_codecache_torch_key, 0.1048 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] create_aot_dispatcher_function, 0.5271 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] aot_collect_metadata, 0.0201 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] aot_trace_joint_graph, 0.0880 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] _recursive_joint_graph_passes, 0.2309 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.joint_graph_passes.remove_noop_ops, 0.0010 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.joint_graph_passes.constant_fold_uniform_value, 0.0029 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.joint_graph_passes.pass_pattern_0, 0.0092 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.joint_graph_passes.pass_pattern_1, 0.0002 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] min_cut_rematerialization_partition, 0.0227 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] compile_fx.<locals>.fw_compiler_base, 0.1543 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] compile_fx_inner, 0.1542 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] fx_codegen_and_compile, 0.1531 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] additional_fake_tensor_prop, 0.0127 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] _recursive_post_grad_passes, 0.0181 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.post_grad_passes.remove_profiler_ops, 0.0000 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.post_grad_passes.post_grad_custom_pre_pass, 0.0000 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.post_grad_passes.remove_noop_ops, 0.0001 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.post_grad_passes.remove_assert_ops, 0.0000 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.post_grad_passes.pass_pattern_0, 0.0000 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.post_grad_passes.pass_pattern_1, 0.0047 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.post_grad_passes.pass_pattern_2, 0.0003 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.post_grad_passes.stable_sort, 0.0001 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.post_grad_passes.move_constructors_to_cuda, 0.0001 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.post_grad_passes.reinplace_inplaceable_ops, 0.0005 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.post_grad_passes.decompose_triton_kernel_wrapper_functional, 0.0000 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.post_grad_passes.decompose_auto_functionalized, 0.0001 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.post_grad_passes.decompose_scan_to_while_loop, 0.0000 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] pass.post_grad_passes.decompose_map_to_while_loop, 0.0000 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] GraphLowering.run, 0.0634 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] GraphLowering.compile_to_fn, 0.0463 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] GraphLowering.compile_to_module, 0.0462 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] GraphLowering.codegen, 0.0462 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] Scheduler.init, 0.0450 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] Scheduler.fused_nodes, 0.0091 I0421 09:51:40.412000 2617416 torch/_dynamo/utils.py:910] gc, 0.0007 V0421 09:51:40.412000 2617416 torch/fx/experimental/symbolic_shapes.py:189] lru_cache_stats constrain_symbol_range: CacheInfo(hits=0, misses=0, maxsize=None, currsize=0) V0421 09:51:40.412000 2617416 torch/fx/experimental/symbolic_shapes.py:189] lru_cache_stats guard_or_defer_runtime_assert: CacheInfo(hits=0, misses=0, maxsize=256, currsize=0) V0421 09:51:40.412000 2617416 torch/fx/experimental/symbolic_shapes.py:189] lru_cache_stats _inner_evaluate_expr: CacheInfo(hits=150, misses=5, maxsize=256, currsize=5) V0421 09:51:40.412000 2617416 torch/fx/experimental/symbolic_shapes.py:189] lru_cache_stats _simplify_floor_div: CacheInfo(hits=0, misses=0, maxsize=None, currsize=0) V0421 09:51:40.412000 2617416 torch/fx/experimental/symbolic_shapes.py:189] lru_cache_stats _maybe_guard_rel: CacheInfo(hits=0, misses=0, maxsize=256, currsize=0) V0421 09:51:40.412000 2617416 torch/fx/experimental/symbolic_shapes.py:189] lru_cache_stats _find: CacheInfo(hits=0, misses=0, maxsize=None, currsize=0) V0421 09:51:40.412000 2617416 torch/fx/experimental/symbolic_shapes.py:189] lru_cache_stats has_hint: CacheInfo(hits=0, misses=0, maxsize=256, currsize=0) V0421 09:51:40.412000 2617416 torch/fx/experimental/symbolic_shapes.py:189] lru_cache_stats size_hint: CacheInfo(hits=0, misses=0, maxsize=256, currsize=0) V0421 09:51:40.412000 2617416 torch/fx/experimental/symbolic_shapes.py:189] lru_cache_stats simplify: CacheInfo(hits=0, misses=2, maxsize=None, currsize=2) V0421 09:51:40.412000 2617416 torch/fx/experimental/symbolic_shapes.py:189] lru_cache_stats _update_divisible: CacheInfo(hits=0, misses=0, maxsize=None, currsize=0) V0421 09:51:40.412000 2617416 torch/fx/experimental/symbolic_shapes.py:189] lru_cache_stats replace: CacheInfo(hits=0, misses=2, maxsize=None, currsize=2) V0421 09:51:40.412000 2617416 torch/fx/experimental/symbolic_shapes.py:189] lru_cache_stats _maybe_evaluate_static: CacheInfo(hits=7, misses=2, maxsize=None, currsize=2) V0421 09:51:40.412000 2617416 torch/fx/experimental/symbolic_shapes.py:189] lru_cache_stats get_implications: CacheInfo(hits=0, misses=0, maxsize=None, currsize=0) V0421 09:51:40.412000 2617416 torch/fx/experimental/symbolic_shapes.py:189] lru_cache_stats get_axioms: CacheInfo(hits=53, misses=1, maxsize=None, currsize=1) V0421 09:51:40.412000 2617416 torch/fx/experimental/symbolic_shapes.py:189] lru_cache_stats _maybe_evaluate_static_worker: CacheInfo(hits=0, misses=0, maxsize=None, currsize=0) V0421 09:51:40.412000 2617416 torch/fx/experimental/symbolic_shapes.py:189] lru_cache_stats safe_expand: CacheInfo(hits=0, misses=2, maxsize=256, currsize=2) V0421 09:51:40.412000 2617416 torch/fx/experimental/symbolic_shapes.py:189] lru_cache_stats uninteresting_files: CacheInfo(hits=7, misses=1, maxsize=None, currsize=1)

Versions

Collecting environment information... PyTorch version: 2.11.0+cu130 Is debug build: False CUDA used to build PyTorch: 13.0 ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.5 LTS (x86_64) GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0 Clang version: 15.0.0 ([email protected]:llvm/llvm-project.git 4ba6a9c9f65bbc8bd06e3652cb20fd4dfc846137) CMake version: version 3.22.1 Libc version: glibc-2.35

Python version: 3.10.12 (main, Mar 3 2026, 11:56:32) [GCC 11.4.0] (64-bit runtime) Python platform: Linux-6.8.0-94-generic-x86_64-with-glibc2.35 Is CUDA available: False CUDA runtime version: No CUDA CUDA_MODULE_LOADING set to: N/A GPU models and configuration: No CUDA Nvidia driver version: No CUDA cuDNN version: No CUDA Is XPU available: False HIP runtime version: N/A MIOpen runtime version: N/A Is XNNPACK available: True Caching allocator config: N/A

CPU: Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 52 bits physical, 57 bits virtual Byte Order: Little Endian CPU(s): 384 On-line CPU(s) list: 0-383 Vendor ID: AuthenticAMD Model name: AMD EPYC 9684X 96-Core Processor CPU family: 25 Model: 17 Thread(s) per core: 2 Core(s) per socket: 96 Socket(s): 2 Stepping: 2 BogoMIPS: 5099.98 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good amd_lbr_v2 nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba perfmon_v2 ibrs ibpb stibp ibrs_enhanced vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local user_shstk avx512_bf16 clzero irperf xsaveerptr rdpru wbnoinvd amd_ppin cppc amd_ibpb_ret arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif x2avic v_spec_ctrl vnmi avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq la57 rdpid overflow_recov succor smca fsrm flush_l1d debug_swap ibpb_exit_to_user Virtualization: AMD-V L1d cache: 6 MiB (192 instances) L1i cache: 6 MiB (192 instances) L2 cache: 192 MiB (192 instances) L3 cache: 2.3 GiB (24 instances) NUMA node(s): 2 NUMA node0 CPU(s): 0-95,192-287 NUMA node1 CPU(s): 96-191,288-383 Vulnerability Gather data sampling: Not affected Vulnerability Itlb multihit: Not affected Vulnerability L1tf: Not affected Vulnerability Mds: Not affected Vulnerability Meltdown: Not affected Vulnerability Mmio stale data: Not affected Vulnerability Reg file data sampling: Not affected Vulnerability Retbleed: Not affected Vulnerability Spec rstack overflow: Mitigation; Safe RET Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Vulnerability Spectre v2: Mitigation; Enhanced / Automatic IBRS; IBPB conditional; STIBP always-on; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected Vulnerability Srbds: Not affected Vulnerability Tsx async abort: Not affected Vulnerability Vmscape: Mitigation; IBPB before exit to userspace

Versions of relevant libraries: [pip3] numpy==2.2.6 [pip3] nvidia-cublas==13.1.0.3 [pip3] nvidia-cuda-cupti==13.0.85 [pip3] nvidia-cuda-nvrtc==13.0.88 [pip3] nvidia-cuda-runtime==13.0.96 [pip3] nvidia-cudnn-cu13==9.19.0.56 [pip3] nvidia-cufft==12.0.0.61 [pip3] nvidia-curand==10.4.0.35 [pip3] nvidia-cusolver==12.0.4.66 [pip3] nvidia-cusparse==12.6.3.3 [pip3] nvidia-cusparselt-cu13==0.8.0 [pip3] nvidia-nccl-cu13==2.28.9 [pip3] nvidia-nvjitlink==13.0.88 [pip3] nvidia-nvtx==13.0.85 [pip3] torch==2.11.0 [pip3] triton==3.6.0 [conda] Could not collect

cc @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @jerryzh168 @aditew01 @chauhang @penguinwu @voznesenskym @EikanWang @Guobing-Chen @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @aakhundov @coconutruben @jataylo

extent analysis

TL;DR

The most likely fix is to modify the model to avoid the mismatch in tensor shapes and strides that causes the AssertionError during CPP kernel fusion.

Guidance

  1. Identify the source of the shape mismatch: The error occurs because GroupNorm's decomposition produces an as_strided tensor with layout [8, 7, 1] stride [7, 1, 56], which is incompatible with the upstream 3D pointwise kernels (8, 7, 7).
  2. Modify the model to avoid the shape mismatch: Consider changing the GroupNorm layer or the subsequent layers to ensure that the tensor shapes and strides are compatible.
  3. Verify the fix: After modifying the model, re-run the code to verify that the AssertionError is resolved and the model compiles successfully.
  4. Check for other potential issues: Review the error logs and the model code to ensure that there are no other potential issues that could cause the model to fail during compilation or execution.

Example

No specific code example can be provided without modifying the original model code. However, the fix may involve changing the GroupNorm layer to a different normalization layer or modifying the subsequent layers to accommodate the shape and stride of the output tensor.

Notes

  • The fix may require a deeper understanding of the model architecture and the specific requirements of the GroupNorm layer and the subsequent layers.
  • The error logs provide detailed information about the model compilation process, which can be useful in identifying the source of the issue and verifying the fix.

Recommendation

Apply a workaround by modifying the model to avoid the shape mismatch, as the root cause of the issue is related to the specific model architecture and the requirements of the GroupNorm layer and the subsequent layers.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING