Skip to content

[Bug]: tests/compile failures #24376

@ProExpertProg

Description

@ProExpertProg

Your current environment

The output of python collect_env.py
Collecting environment information...
PyTorch version: 2.8.0+cu129
Is debug build: False
CUDA used to build PyTorch: 12.9
ROCM used to build PyTorch: N/A

OS: Ubuntu 24.04.3 LTS (x86_64)
GCC version: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
Clang version: Could not collect
CMake version: version 3.28.3
Libc version: glibc-2.39

Python version: 3.12.3 (main, Aug 14 2025, 17:47:21) [GCC 13.3.0] (64-bit runtime)
Python platform: Linux-6.8.0-78-generic-x86_64-with-glibc2.39
Is CUDA available: True
CUDA runtime version: 12.9.86
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: 
GPU 0: NVIDIA B200
GPU 1: NVIDIA B200
GPU 2: NVIDIA B200
GPU 3: NVIDIA B200
GPU 4: NVIDIA B200
GPU 5: NVIDIA B200
GPU 6: NVIDIA B200
GPU 7: NVIDIA B200

Nvidia driver version: 580.65.06
cuDNN version: Could not collect
Is XPU available: False
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

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):                               224
On-line CPU(s) list:                  0-223
Vendor ID:                            GenuineIntel
Model name:                           INTEL(R) XEON(R) PLATINUM 8570
CPU family:                           6
Model:                                207
Thread(s) per core:                   2
Core(s) per socket:                   56
Socket(s):                            2
Stepping:                             2
CPU(s) scaling MHz:                   56%
CPU max MHz:                          4000.0000
CPU min MHz:                          800.0000
BogoMIPS:                             4200.00
Flags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 intel_ppin cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect user_shstk avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req vnmi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr ibt amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities
Virtualization:                       VT-x
L1d cache:                            5.3 MiB (112 instances)
L1i cache:                            3.5 MiB (112 instances)
L2 cache:                             224 MiB (112 instances)
L3 cache:                             600 MiB (2 instances)
NUMA node(s):                         2
NUMA node0 CPU(s):                    0-55,112-167
NUMA node1 CPU(s):                    56-111,168-223
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:   Not affected
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; RSB filling; PBRSB-eIBRS SW sequence; BHI BHI_DIS_S
Vulnerability Srbds:                  Not affected
Vulnerability Tsx async abort:        Not affected

Versions of relevant libraries:
[pip3] numpy==2.2.6
[pip3] nvidia-cublas-cu12==12.9.1.4
[pip3] nvidia-cuda-cupti-cu12==12.9.79
[pip3] nvidia-cuda-nvrtc-cu12==12.9.86
[pip3] nvidia-cuda-runtime-cu12==12.9.79
[pip3] nvidia-cudnn-cu12==9.10.2.21
[pip3] nvidia-cudnn-frontend==1.14.0
[pip3] nvidia-cufft-cu12==11.4.1.4
[pip3] nvidia-curand-cu12==10.3.10.19
[pip3] nvidia-cusolver-cu12==11.7.5.82
[pip3] nvidia-cusparse-cu12==12.5.10.65
[pip3] nvidia-cusparselt-cu12==0.7.1
[pip3] nvidia-nccl-cu12==2.27.3
[pip3] nvidia-nvjitlink-cu12==12.9.86
[pip3] nvidia-nvtx-cu12==12.9.79
[pip3] torch==2.8.0+cu129
[pip3] torchaudio==2.8.0+cu129
[pip3] torchvision==0.23.0+cu129
[pip3] triton==3.4.0
[conda] Could not collect

🐛 Describe the bug

Currently, running pytest tests/compile fails for 2 reasons:

  1. There are repeated registrations of silly attention ops, so importing multiple tests into the same process fails
  2. There are a bunch of tests not currently in CI, all failing.

Fixing this would be helpful so that we can just run all of the tests in CI, as well as locally during development to make sure nothing compilation-related broke.

Tracking solutions:

  1. I started working on this in [torch.compile] Refactor duplicate torch op registrations #23257 but gave up due to the many failures. It should still be a good starting point. Done by @ZJY0516 in [CI] execute all piecewise compilation tests together #24502.
  2. The tests currently failing individually
    2.a) test_functionalization.py: @angelayi is working on this
    2.b) tests/compile/test_sequence_parallelism.py: fixed in [torch.compile] Cleanup compilation tests and custom passes, add debug utils, fix DCE bug (#23091), fix test (#24376), and prep for custom op matching (#24604) #24542
    2.c) tests/compile/test_config.py: Fixed in [CI] run tests/compile/test_config.py #22682, waiting to be merged
    2.d) tests/compile/test_async_tp.py: I assume this was due to an interface change in torch 2.8

The failure in 2.d (full trace below):

torch._dynamo.exc.BackendCompilerFailed: backend='<tests.compile.backend.TestBackend object at 0x73b9a1196360>' raised:
RuntimeError: symm_mem::fused_scaled_matmul_reduce_scatter() is missing value for argument 'orig_scatter_dim'. Declaration: symm_mem::fused_scaled_matmul_reduce_scatter(Tensor A, Tensor B, Tensor A_scale, Tensor B_scale, str reduce_op, int orig_scatter_dim, int scatter_dim_after_maybe_reshape, str group_name, int[]? output_shape, Tensor? bias=None, Tensor? result_scale=None, ScalarType? out_dtype=None, bool use_fast_accum=False) -> Tensor
Full trace (it seems like the failure happens while tracing the replacement function which contains an incorrect call to symm_mem::fused_scaled_matmul_reduce_scatter)
  File "/home/luka/git/vllm/.venv/lib/python3.12/site-packages/torch/_inductor/pattern_matcher.py", line 1500, in check_fn
    match.replacement_graph = trace_fn(replace_fn, args)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/luka/git/vllm/.venv/lib/python3.12/site-packages/torch/utils/_contextlib.py", line 120, in decorate_context
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/luka/git/vllm/.venv/lib/python3.12/site-packages/torch/_inductor/pattern_matcher.py", line 2094, in fwd_only
    gm = make_fx(fn, decompositions, tracing_mode="real")(*args)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/luka/git/vllm/.venv/lib/python3.12/site-packages/torch/fx/experimental/proxy_tensor.py", line 2318, in wrapped
    return make_fx_tracer.trace(f, *args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/luka/git/vllm/.venv/lib/python3.12/site-packages/torch/fx/experimental/proxy_tensor.py", line 2250, in trace
    return self._trace_inner(f, *args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/luka/git/vllm/.venv/lib/python3.12/site-packages/torch/fx/experimental/proxy_tensor.py", line 2221, in _trace_inner
    t = dispatch_trace(
        ^^^^^^^^^^^^^^^
  File "/home/luka/git/vllm/.venv/lib/python3.12/site-packages/torch/_compile.py", line 53, in inner
    return disable_fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/luka/git/vllm/.venv/lib/python3.12/site-packages/torch/_dynamo/eval_frame.py", line 929, in _fn
    return fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^
  File "/home/luka/git/vllm/.venv/lib/python3.12/site-packages/torch/fx/experimental/proxy_tensor.py", line 1254, in dispatch_trace
    graph = tracer.trace(root, concrete_args)  # type: ignore[arg-type]
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/luka/git/vllm/.venv/lib/python3.12/site-packages/torch/_dynamo/eval_frame.py", line 929, in _fn
    return fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^
  File "/home/luka/git/vllm/.venv/lib/python3.12/site-packages/torch/fx/_symbolic_trace.py", line 850, in trace
    (self.create_arg(fn(*args)),),
                     ^^^^^^^^^
  File "/home/luka/git/vllm/.venv/lib/python3.12/site-packages/torch/fx/experimental/proxy_tensor.py", line 1312, in wrapped
    out = f(*tensors)  # type:ignore[call-arg]
          ^^^^^^^^^^^
  File "/home/luka/git/vllm/vllm/compilation/collective_fusion.py", line 271, in replacement
    gemm_rs = torch.ops.symm_mem.fused_scaled_matmul_reduce_scatter(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/luka/git/vllm/.venv/lib/python3.12/site-packages/torch/_ops.py", line 1243, in __call__
    return self._op(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/luka/git/vllm/.venv/lib/python3.12/site-packages/torch/fx/experimental/proxy_tensor.py", line 1360, in __torch_function__
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/luka/git/vllm/.venv/lib/python3.12/site-packages/torch/_ops.py", line 1243, in __call__
    return self._op(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
torch._dynamo.exc.BackendCompilerFailed: backend='<tests.compile.backend.TestBackend object at 0x73b9a1196360>' raised:
RuntimeError: symm_mem::fused_scaled_matmul_reduce_scatter() is missing value for argument 'orig_scatter_dim'. Declaration: symm_mem::fused_scaled_matmul_reduce_scatter(Tensor A, Tensor B, Tensor A_scale, Tensor B_scale, str reduce_op, int orig_scatter_dim, int scatter_dim_after_maybe_reshape, str group_name, int[]? output_shape, Tensor? bias=None, Tensor? result_scale=None, ScalarType? out_dtype=None, bool use_fast_accum=False) -> Tensor

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

Metadata

Metadata

Labels

actionableThere is clear action for a vLLM developer to takebugSomething isn't workinggood first issueGood for newcomerstorch.compile

Type

No type

Projects

Status

Ready

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions