pytorch - ✅(Solved) Fix DISABLED test_benchmark_harness_no_pickle_for_opaque_inputs (__main__.TestOpaqueObject) [1 pull requests, 1 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#178748Fetched 2026-04-08 01:52:32
View on GitHub
Comments
1
Participants
2
Timeline
15
Reactions
0
Author
Timeline (top)
labeled ×5mentioned ×4subscribed ×4added_to_project_v2 ×1

Root Cause

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

PR fix notes

PR #180647: [xpu][fix] Fix hard code UT failed on XPU

Description (problem / solution / changelog)

Stack from ghstack (oldest at bottom):

  • -> #180647

Motivation

Fix https://github.com/pytorch/pytorch/issues/179101 Fix https://github.com/pytorch/pytorch/issues/178748 Fix https://github.com/pytorch/pytorch/issues/178745 This UT failed on XPU due to hard-code to CUDA.

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

Changed files

  • test/distributed/tensor/test_dtensor_compile.py (modified, +2/-2)
  • test/inductor/test_gpu_cpp_wrapper.py (modified, +4/-2)
  • test/test_opaque_obj_v2.py (modified, +3/-3)
RAW_BUFFERClick to expand / collapse

Platforms: xpu

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

cc @mruberry @gujinghui @EikanWang @fengyuan14

extent analysis

Fix Plan

The fix involves modifying the test_benchmark_harness_no_pickle_for_opaque_inputs test in test_opaque_obj_v2.py to handle opaque inputs correctly.

  • Modify the test to use a supported serialization method for opaque inputs.
  • Update the test to verify the correctness of the benchmark harness with the new serialization method.

Example code snippet:

import torch

class TestOpaqueObject:
    def test_benchmark_harness_no_pickle_for_opaque_inputs(self):
        # Use a supported serialization method, e.g., torch.save() and torch.load()
        opaque_input = torch.tensor([1, 2, 3])
        serialized_input = torch.save(opaque_input, 'opaque_input.pt')
        loaded_input = torch.load('opaque_input.pt')

        # Verify the correctness of the benchmark harness
        # ...
        self.assertEqual(opaque_input, loaded_input)

Verification

To verify the fix, run the test_benchmark_harness_no_pickle_for_opaque_inputs test and check that it passes without errors.

Extra Tips

  • Ensure that the serialization method used is compatible with the opaque input type.
  • Test the fix on multiple platforms to ensure consistency.

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 - ✅(Solved) Fix DISABLED test_benchmark_harness_no_pickle_for_opaque_inputs (__main__.TestOpaqueObject) [1 pull requests, 1 comments, 2 participants]