pytorch - ✅(Solved) Fix DISABLED test_copy_cat_fusion (__main__.FusionTests) [1 pull requests, 2 comments, 2 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#177653Fetched 2026-04-08 00:52:43
View on GitHub
Comments
2
Participants
2
Timeline
62
Reactions
0
Author
Timeline (top)
mentioned ×26subscribed ×26labeled ×7commented ×2

Root Cause

This test was disabled because it is failing on main branch (recent examples).

PR fix notes

PR #179659: [xpu][fix] Fix test cases failures on XPU.

Description (problem / solution / changelog)

Stack from ghstack (oldest at bottom):

  • -> #179659
  1. 8 AOTInductor tests fail on XPU because caching_allocator_disabled() (Intorduced by #177418) from torch.cuda.memory calls torch._C._cuda_cudaCachingAllocator_is_enabled() which doesn't exist in XPU-only builds. Replace the direct import of torch.cuda.caching_allocator_disabled with a device-aware wrapper that delegates to the CUDA implementation on CUDA builds and acts as a no-op on other GPU backends (XPU, etc.).
  2. Fixes #177653
  3. Fixes #177483

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

Changed files

  • test/inductor/test_aot_inductor.py (modified, +13/-1)
  • test/inductor/test_perf.py (modified, +2/-1)
  • test/inductor/test_torchinductor_opinfo.py (modified, +1/-0)
RAW_BUFFERClick to expand / collapse

Platforms: xpu

This test was disabled because it is failing on main branch (recent examples).

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

extent analysis

Fix Plan

The fix involves re-enabling and updating the test_copy_cat_fusion test in test_perf.py to ensure it works correctly on the main branch.

Steps to Fix

  • Re-enable the disabled test by removing the decorator or comment that disables it.
  • Update the test to handle any recent changes in the copy and cat functions.
  • Verify the test passes on the main branch.

Example Code

# test_perf.py
class FusionTests:
    # Re-enable the test
    def test_copy_cat_fusion(self):
        # Update the test to handle recent changes
        input_tensor = torch.randn(10, 10)
        copied_tensor = input_tensor.copy()
        cat_tensor = torch.cat((input_tensor, copied_tensor))
        self.assertEqual(cat_tensor.shape, (20, 10))

Verification

Run the test using the command python test_perf.py and verify it passes without any errors.

Extra Tips

  • Ensure the test is run on the main branch to verify the fix.
  • If the test still fails, investigate the recent changes in the copy and cat functions to identify the root cause.

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