pytorch - 💡(How to fix) Fix DISABLED test_rms_norm_bwd_bfloat16_split_reductions_False_shape0_max_autotune_False_initial_xblock_1_add_1dim_True (__main__.NoMixOrderReductionTest) [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#177005Fetched 2026-04-08 00:23:00
View on GitHub
Comments
2
Participants
1
Timeline
115
Reactions
0
Participants
Timeline (top)
mentioned ×54subscribed ×54labeled ×5commented ×2

Error Message

Traceback (most recent call last): File "/var/lib/jenkins/workspace/test/inductor/test_mix_order_reduction.py", line 363, in test_rms_norm_bwd ref = fwd_bwd(f) File "/var/lib/jenkins/workspace/test/inductor/test_mix_order_reduction.py", line 332, in fwd_bwd out.backward(dy) File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_tensor.py", line 631, in backward torch.autograd.backward( File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/autograd/init.py", line 379, in backward _engine_run_backward( File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/autograd/graph.py", line 877, in _engine_run_backward return Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 124.00 MiB. GPU 0 has a total capacity of 22.03 GiB of which 13.27 GiB is free. Process 13154 has 186.00 MiB memory in use. Process 13173 has 1.28 GiB memory in use. Process 13212 has 186.00 MiB memory in use. Process 13231 has 334.00 MiB memory in use. Process 16329 has 186.00 MiB memory in use. Including non-PyTorch memory, this process has 6.59 GiB memory in use. 6.39 GiB allowed; Of the allocated memory 6.22 GiB is allocated by PyTorch, and 138.28 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (https://docs.pytorch.org/docs/stable/notes/cuda.html#optimizing-memory-usage-with-pytorch-cuda-alloc-conf)

To execute this test, run the following from the base repo dir: python test/inductor/test_mix_order_reduction.py NoMixOrderReductionTest.test_rms_norm_bwd_bfloat16_split_reductions_False_shape0_max_autotune_False_initial_xblock_1_add_1dim_True

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/inductor/test_mix_order_reduction.py", line 363, in test_rms_norm_bwd
    ref = fwd_bwd(f)
  File "/var/lib/jenkins/workspace/test/inductor/test_mix_order_reduction.py", line 332, in fwd_bwd
    out.backward(dy)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_tensor.py", line 631, in backward
    torch.autograd.backward(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/autograd/__init__.py", line 379, in backward
    _engine_run_backward(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/autograd/graph.py", line 877, in _engine_run_backward
    return Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass
torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 124.00 MiB. GPU 0 has a total capacity of 22.03 GiB of which 13.27 GiB is free. Process 13154 has 186.00 MiB memory in use. Process 13173 has 1.28 GiB memory in use. Process 13212 has 186.00 MiB memory in use. Process 13231 has 334.00 MiB memory in use. Process 16329 has 186.00 MiB memory in use. Including non-PyTorch memory, this process has 6.59 GiB memory in use. 6.39 GiB allowed; Of the allocated memory 6.22 GiB is allocated by PyTorch, and 138.28 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation.  See documentation for Memory Management  (https://docs.pytorch.org/docs/stable/notes/cuda.html#optimizing-memory-usage-with-pytorch-cuda-alloc-conf)

To execute this test, run the following from the base repo dir:
    python test/inductor/test_mix_order_reduction.py NoMixOrderReductionTest.test_rms_norm_bwd_bfloat16_split_reductions_False_shape0_max_autotune_False_initial_xblock_1_add_1dim_True

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_rms_norm_bwd_bfloat16_split_reductions_False_shape0_max_autotune_False_initial_xblock_1_add_1dim_True
  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/inductor/test_mix_order_reduction.py", line 363, in test_rms_norm_bwd
    ref = fwd_bwd(f)
  File "/var/lib/jenkins/workspace/test/inductor/test_mix_order_reduction.py", line 332, in fwd_bwd
    out.backward(dy)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_tensor.py", line 631, in backward
    torch.autograd.backward(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/autograd/__init__.py", line 379, in backward
    _engine_run_backward(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/autograd/graph.py", line 877, in _engine_run_backward
    return Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass
torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 124.00 MiB. GPU 0 has a total capacity of 22.03 GiB of which 13.27 GiB is free. Process 13154 has 186.00 MiB memory in use. Process 13173 has 1.28 GiB memory in use. Process 13212 has 186.00 MiB memory in use. Process 13231 has 334.00 MiB memory in use. Process 16329 has 186.00 MiB memory in use. Including non-PyTorch memory, this process has 6.59 GiB memory in use. 6.39 GiB allowed; Of the allocated memory 6.22 GiB is allocated by PyTorch, and 138.28 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation.  See documentation for Memory Management  (https://docs.pytorch.org/docs/stable/notes/cuda.html#optimizing-memory-usage-with-pytorch-cuda-alloc-conf)

To execute this test, run the following from the base repo dir:
    python test/inductor/test_mix_order_reduction.py NoMixOrderReductionTest.test_rms_norm_bwd_bfloat16_split_reductions_False_shape0_max_autotune_False_initial_xblock_1_add_1dim_True

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

Test file path: inductor/test_mix_order_reduction.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

Fix Plan

1. Increase GPU Memory Allocation

  • Set the PYTORCH_CUDA_ALLOC_CONF environment variable to expandable_segments:True to avoid memory fragmentation.
  • Run the test with the following command:
    PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True python test/inductor/test_mix_order_reduction.py NoMixOrderReductionTest.test_rms_norm_bwd_bfloat16_split_reductions_False_shape0_max_autotune_False_initial_xblock_1_add_1dim_True
  • Alternatively, you can also try to increase the GPU memory allocation by setting the CUDA_VISIBLE_DEVICES environment variable to a specific GPU with more memory.

2. Reduce Memory Usage

  • Review the test code and identify any unnecessary memory allocations or large data structures.
  • Optimize the test code to reduce memory usage, such as by using smaller data types or reducing the size of intermediate results.

3. Disable CUDA

  • If the test is not dependent on CUDA, consider disabling it to reduce memory usage.
  • Run the test with the following command:
    python test/inductor/test_mix_order_reduction.py NoMixOrderReductionTest.test_rms_norm_bwd_bfloat16_split_reductions_False_shape0_max_autotune_False_initial_xblock_1_add_1dim_True --no-cuda

4. Increase Test Timeout

  • If the test is timing out due to memory allocation issues, consider increasing the test timeout.
  • Run the test with the following command:
    python test/inductor/test_mix_order_reduction.py NoMixOrderReductionTest.test_rms_norm_bwd_bfloat16_split_reductions_False_shape0_max_autotune_False_initial_xblock_1_add_1dim_True --timeout 300

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

pytorch - 💡(How to fix) Fix DISABLED test_rms_norm_bwd_bfloat16_split_reductions_False_shape0_max_autotune_False_initial_xblock_1_add_1dim_True (__main__.NoMixOrderReductionTest) [2 comments, 1 participants]