Repository: pytorch
Issue: DISABLED test_perfect_match_on_sequence_and_bool_attributes (__main__.TestFxToOnnx)
Labels: module: onnx,triaged,module: flaky-tests,skipped

Platforms: linux

This test was disabled because it is failing in CI. See [recent examples](https://hud.pytorch.org/flakytest?name=test_perfect_match_on_sequence_and_bool_attributes&suite=TestFxToOnnx&limit=100) and the most recent trunk [workflow logs](https://github.com/pytorch/pytorch/runs/24406787381).

Over the past 3 hours, it has been determined flaky in 2 workflow(s) with 2 failures and 2 successes.

**Debugging instructions (after clicking on the recent samples link):**
DO NOT ASSUME THINGS ARE OKAY IF THE CI IS GREEN. We now shield flaky tests from developers so CI will thus be green but it will be harder to parse the logs.
To find relevant log snippets:
1. Click on the workflow logs linked above
2. Click on the Test step of the job so that it is expanded. Otherwise, the grepping will not work.
3. Grep for `test_perfect_match_on_sequence_and_bool_attributes`
4. There should be several instances run (as flaky tests are rerun in CI) from which you can study the logs.



<details><summary>Sample error message</summary>

```
Traceback (most recent call last):
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/onnx/_internal/exporter.py", line 1498, in dynamo_export
    return Exporter(
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/onnx/_internal/exporter.py", line 1236, in export
    graph_module = self.options.fx_tracer.generate_fx(
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/onnx/_internal/fx/dynamo_graph_extractor.py", line 232, in generate_fx
    return self.pre_export_passes(options, model, graph_module, updated_model_args)  # type: ignore[return-value]
  File "<@beartype(torch.onnx._internal.fx.dynamo_graph_extractor.DynamoExport.pre_export_passes) at 0x7f140b0a2dc0>", line 93, in pre_export_passes
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/onnx/_internal/fx/dynamo_graph_extractor.py", line 242, in pre_export_passes
    return exporter.common_pre_export_passes(
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/onnx/_internal/exporter.py", line 1532, in common_pre_export_passes
    module = passes.Decompose(
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/onnx/_internal/diagnostics/infra/decorator.py", line 151, in wrapper
    ctx.log_and_raise_if_error(diag)
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/onnx/_internal/diagnostics/infra/context.py", line 366, in log_and_raise_if_error
    raise diagnostic.source_exception
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/onnx/_internal/diagnostics/infra/decorator.py", line 135, in wrapper
    return_values = fn(*args, **kwargs)
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/onnx/_internal/fx/_pass.py", line 277, in run
    module = self._run(*args, **kwargs)
  File "<@beartype(torch.onnx._internal.fx.passes.decomp.Decompose._run) at 0x7f14118929d0>", line 11, in _run
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/onnx/_internal/fx/passes/decomp.py", line 71, in _run
    decomposed_module = proxy_tensor.make_fx(
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/fx/experimental/proxy_tensor.py", line 1276, in wrapped
    t = dispatch_trace(wrap_key(func, args, fx_tracer, pre_dispatch), tracer=fx_tracer, concrete_args=tuple(phs))
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/_compile.py", line 24, in inner
    return torch._dynamo.disable(fn, recursive)(*args, **kwargs)
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/_dynamo/eval_frame.py", line 403, in _fn
    return fn(*args, **kwargs)
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/_dynamo/external_utils.py", line 36, in inner
    return fn(*args, **kwargs)
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/fx/experimental/proxy_tensor.py", line 658, in dispatch_trace
    graph = tracer.trace(root, concrete_args)
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/_dynamo/eval_frame.py", line 403, in _fn
    return fn(*args, **kwargs)
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/_dynamo/external_utils.py", line 36, in inner
    return fn(*args, **kwargs)
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/fx/_symbolic_trace.py", line 793, in trace
    (self.create_arg(fn(*args)),),
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/fx/experimental/proxy_tensor.py", line 676, in wrapped
    out = f(*tensors)
  File "<string>", line 1, in <lambda>
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/onnx/_internal/fx/passes/_utils.py", line 30, in wrapped
    return torch.fx.Interpreter(graph_module).run(*args)
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/fx/interpreter.py", line 145, in run
    self.env[node] = self.run_node(node)
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/fx/interpreter.py", line 202, in run_node
    return getattr(self, n.op)(n.target, args, kwargs)
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/fx/interpreter.py", line 319, in call_module
    return submod(*args, **kwargs)
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/fx/_symbolic_trace.py", line 771, in module_call_wrapper
    return self.call_module(mod, forward, args, kwargs)
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/fx/experimental/proxy_tensor.py", line 580, in call_module
    return forward(*args, **kwargs)
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/fx/_symbolic_trace.py", line 764, in forward
    return _orig_module_call(mod, *args, **kwargs)
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
    return forward_call(*args, **kwargs)
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/nn/modules/conv.py", line 460, in forward
    return self._conv_forward(input, self.weight, self.bias)
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/nn/modules/conv.py", line 456, in _conv_forward
    return F.conv2d(input, weight, bias, self.stride,
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/fx/experimental/proxy_tensor.py", line 721, in __torch_function__
    return func(*args, **kwargs)
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/utils/_stats.py", line 20, in wrapper
    return fn(*args, **kwargs)
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/fx/experimental/proxy_tensor.py", line 771, in __torch_dispatch__
    return self.inner_torch_dispatch(func, types, args, kwargs)
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/fx/experimental/proxy_tensor.py", line 806, in inner_torch_dispatch
    return proxy_call(self, func, self.pre_dispatch, args, kwargs)
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/fx/experimental/proxy_tensor.py", line 463, in proxy_call
    out = func(*args, **kwargs)
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/_ops.py", line 630, in __call__
    return self_._op(*args, **kwargs)
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/utils/_stats.py", line 20, in wrapper
    return fn(*args, **kwargs)
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/_subclasses/fake_tensor.py", line 924, in __torch_dispatch__
    return self.dispatch(func, types, args, kwargs)
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/_subclasses/fake_tensor.py", line 1282, in dispatch
    return self._cached_dispatch_impl(func, types, args, kwargs)
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/_subclasses/fake_tensor.py", line 1015, in _cached_dispatch_impl
    output = self._dispatch_impl(func, types, args, kwargs)
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/_subclasses/fake_tensor.py", line 1486, in _dispatch_impl
    op_impl_out = op_impl(self, func, *args, **kwargs)
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/_subclasses/fake_impls.py", line 150, in dispatch_to_op_implementations_dict
    return op_implementations_dict[func](fake_mode, func, *args, **kwargs)
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/_subclasses/fake_impls.py", line 629, in conv
    conv_backend = torch._C._select_conv_backend(**kwargs)
RuntimeError: expected stride to be a single integer value or a list of -1 values to match the convolution dimensions, but got stride=[2, 1]

While executing %l__self___conv2 : [num_users=1] = call_module[target=L__self___conv2](args = (%l_input_,), kwargs = {})
Original traceback:
  File "onnx/test_fx_to_onnx.py", line 236, in forward
    return self.conv2(input)


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "onnx/test_fx_to_onnx.py", line 239, in test_perfect_match_on_sequence_and_bool_attributes
    onnx_program = dynamo_export(
  File "<@beartype(torch.onnx._internal.exporter.dynamo_export) at 0x7f14128a58b0>", line 51, in dynamo_export
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/onnx/_internal/exporter.py", line 1514, in dynamo_export
    raise OnnxExporterError(
torch.onnx.OnnxExporterError: Failed to export the model to ONNX. Generating SARIF report at 'report_dynamo_export.sarif'. SARIF is a standard format for the output of static analysis tools. SARIF logs can be loaded in VS Code SARIF viewer extension, or SARIF web viewer (https://microsoft.github.io/sarif-web-component/). Please report a bug on PyTorch Github: https://github.com/pytorch/pytorch/issues

To execute this test, run the following from the base repo dir:
     python test_fx_to_onnx.py -k test_perfect_match_on_sequence_and_bool_attributes

This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
```

</details>


Test file path: `onnx/test_fx_to_onnx.py`

cc @clee2000