pytorch - 💡(How to fix) Fix DISABLED test_jacfwd (__main__.FuncTorchHigherOrderOpTestsWithCompiledAutograd) [2 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#179897Fetched 2026-04-11 06:12:04
View on GitHub
Comments
2
Participants
1
Timeline
79
Reactions
0
Participants
Timeline (top)
mentioned ×36subscribed ×36labeled ×5commented ×2

Error Message

Traceback (most recent call last): File "/var/lib/jenkins/workspace/test/dynamo/test_higher_order_ops.py", line 5214, in test_jacfwd wrapped_gm = self._compile_check(wrapper_fn, (x,)) File "/var/lib/jenkins/workspace/test/dynamo/test_higher_order_ops.py", line 3789, in _compile_check expected = torch.compile(fn, backend=backend, fullgraph=fullgraph)(*inputs) File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py", line 1051, in compile_wrapper raise e.with_traceback(None) from e.cause # User compiler error torch._dynamo.exc.Unsupported: Attempted to call a super() attribute that is not a function or method Explanation: Dynamo does not know how to trace the call super().unflatten() because super().unflatten is not a function or method attribute. Hint: Ensure the attribute accessed via super() is a standard method or function.

Developer debug context: call_method SuperVariable() unflatten

For more details about this graph break, please visit: https://meta-pytorch.github.io/compile-graph-break-site/gb/gb0006.html

from user code: File "/var/lib/jenkins/workspace/test/dynamo/test_higher_order_ops.py", line 5211, in wrapper_fn return torch.func.jacfwd(torch.sin)(x) File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_functorch/eager_transforms.py", line 1401, in wrapper_fn jac_outs_ins = tuple( File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_functorch/eager_transforms.py", line 1402, in <genexpr> tuple( File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_functorch/eager_transforms.py", line 1403, in <genexpr> safe_unflatten(jac_out_in, -1, primal.shape) File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_functorch/eager_transforms.py", line 1247, in safe_unflatten return tensor.unflatten(dim, shape) File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/utils/_device.py", line 122, in torch_function return func(*args, **kwargs) File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_tensor.py", line 1456, in unflatten return super().unflatten(dim, sizes)

Set TORCHDYNAMO_VERBOSE=1 for the internal stack trace (please do this especially if you're reporting a bug to PyTorch). For even more developer context, set TORCH_LOGS="+dynamo"

To execute this test, run the following from the base repo dir: python test/dynamo/test_higher_order_ops.py FuncTorchHigherOrderOpTestsWithCompiledAutograd.test_jacfwd

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/dynamo/test_higher_order_ops.py", line 5214, in test_jacfwd
    wrapped_gm = self._compile_check(wrapper_fn, (x,))
  File "/var/lib/jenkins/workspace/test/dynamo/test_higher_order_ops.py", line 3789, in _compile_check
    expected = torch.compile(fn, backend=backend, fullgraph=fullgraph)(*inputs)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py", line 1051, in compile_wrapper
    raise e.with_traceback(None) from e.__cause__  # User compiler error
torch._dynamo.exc.Unsupported: Attempted to call a super() attribute that is not a function or method
  Explanation: Dynamo does not know how to trace the call `super().unflatten()` because `super().unflatten` is not a function or method attribute.
  Hint: Ensure the attribute accessed via `super()` is a standard method or function.

  Developer debug context: call_method SuperVariable() unflatten

 For more details about this graph break, please visit: https://meta-pytorch.github.io/compile-graph-break-site/gb/gb0006.html

from user code:
   File "/var/lib/jenkins/workspace/test/dynamo/test_higher_order_ops.py", line 5211, in wrapper_fn
    return torch.func.jacfwd(torch.sin)(x)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_functorch/eager_transforms.py", line 1401, in wrapper_fn
    jac_outs_ins = tuple(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_functorch/eager_transforms.py", line 1402, in <genexpr>
    tuple(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_functorch/eager_transforms.py", line 1403, in <genexpr>
    safe_unflatten(jac_out_in, -1, primal.shape)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_functorch/eager_transforms.py", line 1247, in safe_unflatten
    return tensor.unflatten(dim, shape)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/utils/_device.py", line 122, in __torch_function__
    return func(*args, **kwargs)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_tensor.py", line 1456, in unflatten
    return super().unflatten(dim, sizes)

Set TORCHDYNAMO_VERBOSE=1 for the internal stack trace (please do this especially if you're reporting a bug to PyTorch). For even more developer context, set TORCH_LOGS="+dynamo"


To execute this test, run the following from the base repo dir:
    python test/dynamo/test_higher_order_ops.py FuncTorchHigherOrderOpTestsWithCompiledAutograd.test_jacfwd

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

Platforms: linux, slow

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 6 workflow(s) with 12 failures and 6 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_jacfwd
  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/dynamo/test_higher_order_ops.py", line 5214, in test_jacfwd
    wrapped_gm = self._compile_check(wrapper_fn, (x,))
  File "/var/lib/jenkins/workspace/test/dynamo/test_higher_order_ops.py", line 3789, in _compile_check
    expected = torch.compile(fn, backend=backend, fullgraph=fullgraph)(*inputs)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py", line 1051, in compile_wrapper
    raise e.with_traceback(None) from e.__cause__  # User compiler error
torch._dynamo.exc.Unsupported: Attempted to call a super() attribute that is not a function or method
  Explanation: Dynamo does not know how to trace the call `super().unflatten()` because `super().unflatten` is not a function or method attribute.
  Hint: Ensure the attribute accessed via `super()` is a standard method or function.

  Developer debug context: call_method SuperVariable() unflatten

 For more details about this graph break, please visit: https://meta-pytorch.github.io/compile-graph-break-site/gb/gb0006.html

from user code:
   File "/var/lib/jenkins/workspace/test/dynamo/test_higher_order_ops.py", line 5211, in wrapper_fn
    return torch.func.jacfwd(torch.sin)(x)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_functorch/eager_transforms.py", line 1401, in wrapper_fn
    jac_outs_ins = tuple(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_functorch/eager_transforms.py", line 1402, in <genexpr>
    tuple(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_functorch/eager_transforms.py", line 1403, in <genexpr>
    safe_unflatten(jac_out_in, -1, primal.shape)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_functorch/eager_transforms.py", line 1247, in safe_unflatten
    return tensor.unflatten(dim, shape)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/utils/_device.py", line 122, in __torch_function__
    return func(*args, **kwargs)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_tensor.py", line 1456, in unflatten
    return super().unflatten(dim, sizes)

Set TORCHDYNAMO_VERBOSE=1 for the internal stack trace (please do this especially if you're reporting a bug to PyTorch). For even more developer context, set TORCH_LOGS="+dynamo"


To execute this test, run the following from the base repo dir:
    python test/dynamo/test_higher_order_ops.py FuncTorchHigherOrderOpTestsWithCompiledAutograd.test_jacfwd

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

Test file path: inductor/test_compiled_autograd.py

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

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben @jataylo

extent analysis

TL;DR

The test failure is likely due to an issue with Dynamo's ability to trace the call super().unflatten() because super().unflatten is not a function or method attribute, and setting TORCHDYNAMO_VERBOSE=1 may provide more insight into the problem.

Guidance

  • Review the error message and the provided debugging instructions to understand the issue better.
  • Set TORCHDYNAMO_VERBOSE=1 to get the internal stack trace, which may help identify the root cause of the problem.
  • Check the compile-graph-break-site for more information about the graph break.
  • Run the test with the provided command python test/dynamo/test_higher_order_ops.py FuncTorchHigherOrderOpTestsWithCompiledAutograd.test_jacfwd to reproduce the issue.

Example

No code example is provided as the issue is related to a specific test failure and requires more context to provide a code snippet.

Notes

The issue seems to be related to the Dynamo compiler and its ability to trace certain function calls. The provided error message and debugging instructions should help identify the root cause of the problem.

Recommendation

Apply workaround: Set TORCHDYNAMO_VERBOSE=1 to get more information about the issue and review the provided debugging instructions to understand the problem better. This may help identify a solution or provide more insight into the issue.

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