pytorch - ✅(Solved) Fix DISABLED test_device_capability_supported_dtypes (__main__.TestAccelerator) [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#179888Fetched 2026-04-11 06:12:12
View on GitHub
Comments
1
Participants
2
Timeline
17
Reactions
0
Timeline (top)
labeled ×5mentioned ×5subscribed ×5added_to_project_v2 ×1

Root Cause

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

PR fix notes

PR #180660: [xpu][fix] Skip test_device_capability_supported_dtypes on XPU

Description (problem / solution / changelog)

Stack from ghstack (oldest at bottom):

  • -> #180660

Motivation

Some barebones data types (e.g., uint1uint7) defined in https://github.com/pytorch/pytorch/blob/3e5f3426e5aa858e5668a64bb06db0354e9d9f00/c10/core/ScalarType.h#L126-L132 and opaque bit-field types (e.g., Bits1x8, etc.) defined in https://github.com/pytorch/pytorch/blob/3e5f3426e5aa858e5668a64bb06db0354e9d9f00/c10/core/ScalarType.h#L120-L124 are not supported by cast_and_store, see https://github.com/pytorch/pytorch/blob/1dba3349d74d100f19a395ece143aa2474f53af6/c10/core/DynamicCast.h#L92-L106

When these data types are triggered via t.to(dtype), they hit the CUDA_KERNEL_ASSERT in https://github.com/pytorch/pytorch/blob/1dba3349d74d100f19a395ece143aa2474f53af6/c10/core/DynamicCast.h#L57

On XPU, this leads to problematic behavior:

  • The CUDA-style kernel assert results in undefined behavior (e.g., segfaults or intermittent passes randomly), depending on the timing between kernel completion and the host.
  • Even if CUDA_KERNEL_ASSERT is replaced with SYCL_KERNEL_ASSERT, subsequent tests may still fail due to a corrupted runtime context.

Given this, we plan to skip this UT for now. We already have basic coverage for torch.accelerator.get_device_capability in https://github.com/pytorch/pytorch/blob/1dba3349d74d100f19a395ece143aa2474f53af6/test/test_xpu.py#L168-L180

Additional Context

fix https://github.com/pytorch/pytorch/issues/179888

Changed files

  • .github/merge_rules.yaml (modified, +1/-0)
  • test/test_accelerator.py (modified, +5/-0)
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 @guangyey

extent analysis

TL;DR

  • The test test_device_capability_supported_dtypes in test_accelerator.py needs to be investigated and fixed to resolve the failure on the main branch.

Guidance

  • Review the recent failure examples on torch-ci.com to understand the context and potential causes of the test failure.
  • Investigate the test_device_capability_supported_dtypes test in test_accelerator.py to identify the specific issue, potentially related to device capability or supported data types.
  • Consider reaching out to the mentioned individuals (@mruberry, @gujinghui, @EikanWang, @fengyuan14, @guangyey) for additional insight or collaboration on resolving the test failure.

Notes

  • The root cause of the test failure is not explicitly stated, so a thorough investigation is necessary to determine the correct fix.
  • The issue seems to be specific to the xpu platform, so any fixes or workarounds may need to be tailored to this environment.

Recommendation

  • Apply workaround: Investigate and fix the test_device_capability_supported_dtypes test to resolve the failure, as there is no clear indication of a fixed version available.

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