pytorch - 💡(How to fix) Fix DISABLED test_matcher_with_name_node_map_function (__main__.TestMatcher) [1 comments, 1 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#182019Fetched 2026-05-01 05:32:49
View on GitHub
Comments
1
Participants
1
Timeline
13
Reactions
0
Participants
Timeline (top)
labeled ×4mentioned ×4subscribed ×4commented ×1

Error Message

Traceback (most recent call last): File "/var/lib/jenkins/workspace/test/fx/test_matcher_utils.py", line 206, in test_matcher_with_name_node_map_function pattern_gm = export( File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/init.py", line 205, in export raise e File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/init.py", line 171, in export return _export( File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/_trace.py", line 1344, in wrapper raise e File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/_trace.py", line 1310, in wrapper ep = fn(*args, **kwargs) File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/exported_program.py", line 124, in wrapper return fn(*args, **kwargs) File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_utils_internal.py", line 96, in wrapper_function return function(*args, **kwargs) File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/_trace.py", line 2512, in _export ep = _export_for_training( File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/_trace.py", line 1344, in wrapper raise e File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/_trace.py", line 1310, in wrapper ep = fn(*args, **kwargs) File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/exported_program.py", line 124, in wrapper return fn(*args, **kwargs) File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/_trace.py", line 2300, in _export_for_training export_artifact = export_func( File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/_trace.py", line 1599, in _strict_export gm_torch_level = _export_to_torch_ir( File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/_trace.py", line 917, in _export_to_torch_ir gm_torch_level = dynamo_graph_capture(*args, **kwargs) File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_dynamo/functional_export.py", line 866, in inner reset() File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_dynamo/init.py", line 180, in reset from torch._inductor.cudagraph_trees import reset_cudagraph_trees File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_inductor/cudagraph_trees.py", line 69, in <module> from torch._inductor.compile_fx import ( File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 112, in <module> from . import config, distributed_autotune, metrics File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_inductor/distributed_autotune.py", line 15, in <module> from . import config, select_algorithm File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_inductor/select_algorithm.py", line 5864, in <module> from . import lowering # noqa: F401 File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_inductor/lowering.py", line 62, in <module> from .decomposition import decompositions, get_decompositions File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_inductor/decomposition.py", line 108, in <module> decompositions = {**core_aten_decompositions(), **inductor_decompositions} TypeError: 'CustomDecompTable' object is not a mapping

To execute this test, run the following from the base repo dir: python test/fx/test_matcher_utils.py TestMatcher.test_matcher_with_name_node_map_function

This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0

Root Cause

This test was disabled because it is failing in CI. See recent examples and the most recent trunk workflow logs.

Code Example

Traceback (most recent call last):
  File "/var/lib/jenkins/workspace/test/fx/test_matcher_utils.py", line 206, in test_matcher_with_name_node_map_function
    pattern_gm = export(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/__init__.py", line 205, in export
    raise e
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/__init__.py", line 171, in export
    return _export(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/_trace.py", line 1344, in wrapper
    raise e
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/_trace.py", line 1310, in wrapper
    ep = fn(*args, **kwargs)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/exported_program.py", line 124, in wrapper
    return fn(*args, **kwargs)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_utils_internal.py", line 96, in wrapper_function
    return function(*args, **kwargs)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/_trace.py", line 2512, in _export
    ep = _export_for_training(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/_trace.py", line 1344, in wrapper
    raise e
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/_trace.py", line 1310, in wrapper
    ep = fn(*args, **kwargs)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/exported_program.py", line 124, in wrapper
    return fn(*args, **kwargs)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/_trace.py", line 2300, in _export_for_training
    export_artifact = export_func(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/_trace.py", line 1599, in _strict_export
    gm_torch_level = _export_to_torch_ir(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/_trace.py", line 917, in _export_to_torch_ir
    gm_torch_level = dynamo_graph_capture(*args, **kwargs)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_dynamo/functional_export.py", line 866, in inner
    reset()
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_dynamo/__init__.py", line 180, in reset
    from torch._inductor.cudagraph_trees import reset_cudagraph_trees
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_inductor/cudagraph_trees.py", line 69, in <module>
    from torch._inductor.compile_fx import (
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 112, in <module>
    from . import config, distributed_autotune, metrics
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_inductor/distributed_autotune.py", line 15, in <module>
    from . import config, select_algorithm
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_inductor/select_algorithm.py", line 5864, in <module>
    from . import lowering  # noqa: F401
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_inductor/lowering.py", line 62, in <module>
    from .decomposition import decompositions, get_decompositions
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_inductor/decomposition.py", line 108, in <module>
    decompositions = {**core_aten_decompositions(), **inductor_decompositions}
TypeError: 'CustomDecompTable' object is not a mapping

To execute this test, run the following from the base repo dir:
    python test/fx/test_matcher_utils.py TestMatcher.test_matcher_with_name_node_map_function

This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
RAW_BUFFERClick to expand / collapse

Platforms: linux

This test was disabled because it is failing in CI. See recent examples and the most recent trunk workflow logs.

Over the past 6 hours, it has been determined flaky in 10 workflow(s) with 20 failures and 10 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_matcher_with_name_node_map_function
  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 "/var/lib/jenkins/workspace/test/fx/test_matcher_utils.py", line 206, in test_matcher_with_name_node_map_function
    pattern_gm = export(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/__init__.py", line 205, in export
    raise e
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/__init__.py", line 171, in export
    return _export(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/_trace.py", line 1344, in wrapper
    raise e
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/_trace.py", line 1310, in wrapper
    ep = fn(*args, **kwargs)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/exported_program.py", line 124, in wrapper
    return fn(*args, **kwargs)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_utils_internal.py", line 96, in wrapper_function
    return function(*args, **kwargs)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/_trace.py", line 2512, in _export
    ep = _export_for_training(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/_trace.py", line 1344, in wrapper
    raise e
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/_trace.py", line 1310, in wrapper
    ep = fn(*args, **kwargs)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/exported_program.py", line 124, in wrapper
    return fn(*args, **kwargs)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/_trace.py", line 2300, in _export_for_training
    export_artifact = export_func(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/_trace.py", line 1599, in _strict_export
    gm_torch_level = _export_to_torch_ir(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/export/_trace.py", line 917, in _export_to_torch_ir
    gm_torch_level = dynamo_graph_capture(*args, **kwargs)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_dynamo/functional_export.py", line 866, in inner
    reset()
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_dynamo/__init__.py", line 180, in reset
    from torch._inductor.cudagraph_trees import reset_cudagraph_trees
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_inductor/cudagraph_trees.py", line 69, in <module>
    from torch._inductor.compile_fx import (
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 112, in <module>
    from . import config, distributed_autotune, metrics
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_inductor/distributed_autotune.py", line 15, in <module>
    from . import config, select_algorithm
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_inductor/select_algorithm.py", line 5864, in <module>
    from . import lowering  # noqa: F401
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_inductor/lowering.py", line 62, in <module>
    from .decomposition import decompositions, get_decompositions
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_inductor/decomposition.py", line 108, in <module>
    decompositions = {**core_aten_decompositions(), **inductor_decompositions}
TypeError: 'CustomDecompTable' object is not a mapping

To execute this test, run the following from the base repo dir:
    python test/fx/test_matcher_utils.py TestMatcher.test_matcher_with_name_node_map_function

This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
</details>

Test file path: test_fx.py

For all disabled tests (by GitHub issue), see https://hud.pytorch.org/disabled.

cc @ezyang @EikanWang @jgong5 @wenzhe-nrv

extent analysis

TL;DR

The test test_matcher_with_name_node_map_function is failing due to a TypeError caused by a CustomDecompTable object not being a mapping, and a potential fix involves investigating the decomposition.py file where the error originates.

Guidance

  • Investigate the decomposition.py file, specifically the line where decompositions is defined, to understand why CustomDecompTable is not a mapping.
  • Check the core_aten_decompositions() and inductor_decompositions functions to ensure they return the expected mapping type.
  • Verify that the CustomDecompTable object is correctly initialized and configured before being used in the decompositions dictionary.
  • Run the test locally using the provided command python test/fx/test_matcher_utils.py TestMatcher.test_matcher_with_name_node_map_function to reproduce and debug the issue.

Notes

The error message suggests a specific issue with the CustomDecompTable object, but without more context or information about the surrounding code, it's difficult to provide a more detailed solution.

Recommendation

Apply a workaround by debugging the decomposition.py file and ensuring that CustomDecompTable is correctly implemented as a mapping, or investigate alternative solutions that avoid using CustomDecompTable as a mapping.

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