Skip to content

the supported dtypes are not align with cuda #2253

Open

Description

@daisyden

Summary

XPU operator dtype support does not align with CUDA. Multiple ops (addmm, addmv, baddbmm, histogram, mv, conv variants, einsum, mm, embedding_bag, linear, matmul, tensordot, bmm, bilinear, linalg_multi_dot, addbmm) fail test_dtypes, test_noncontiguous_samples, test_numpy_ref, and test_multiple_devices checks because XPU does not support the same set of dtypes (e.g. int64, complex32) as CUDA.

Type

  • Category: feature-gap
  • Platform: xpu
  • Related Components: addmm, addmv, baddbmm, histogram, histogramdd, mv, nn.functional.conv1d, nn.functional.conv2d, nn.functional.conv3d, nn.functional.conv_transpose1d, einsum, mm, nn.functional.embedding_bag, nn.functional.linear, matmul, tensordot, bmm, addbmm, nn.functional.bilinear, linalg.multi_dot, true_divide

Objective

Align XPU supported dtypes with CUDA for all listed operators so that test_dtypes, test_noncontiguous_samples, test_numpy_ref, and test_multiple_devices tests pass on XPU.

Current Status

Context

Tests are in third_party/torch-xpu-ops/test/xpu/test_ops_xpu.py (TestCommonXPU). Some cases are struck through in the issue body indicating they may already be resolved. Labels include duplicate, skipped, ut_upstream, agent:active.

Root Cause Analysis

XPU kernels for multiple operators (addmm, addmv, baddbmm, histogram, mv, conv variants, einsum, mm, embedding_bag, linear, matmul, tensordot, bmm, addbmm, bilinear, linalg.multi_dot) do not dispatch on the same set of dtypes as their CUDA counterparts. This causes test_dtypes and related tests to fail because XPU is missing support for types like int64 and complex32.

Proposed Fix Strategy

Each operator's XPU kernel (in src/ATen/native/xpu/sycl/) needs its AT_DISPATCH macro updated to include the missing dtypes, and the underlying SYCL kernels need to handle those types. This is operator-by-operator work across 20+ ops.

Target Repository

torch-xpu-ops

Agent Assessment

Verdict: NEEDS_HUMAN

Why this needs human intervention:
Feature-gap / umbrella enablement issue requiring dtype support additions across 20+ operators — not a single fixable bug.

Root Cause: XPU kernels for multiple operators (addmm, addmv, baddbmm, histogram, mv, conv variants, einsum, mm, embedding_bag, linear, matmul, tensordot, bmm, addbmm, bilinear, linalg.multi_dot) do not dispatch on the same set of dtypes as their CUDA counterparts. This causes test_dtypes and related tests to fail because XPU is missing support for types like int64 and complex32.

Proposed Fix Strategy: Each operator's XPU kernel (in src/ATen/native/xpu/sycl/) needs its AT_DISPATCH macro updated to include the missing dtypes, and the underlying SYCL kernels need to handle those types. This is operator-by-operator work across 20+ ops.

Action Items

  • 🔍 Issue formatted (Discovery Agent)

    Discovery log

    [2026-05-14 03:42:03]
    Summary: XPU operator dtype support does not align with CUDA. Multiple ops (addmm, addmv, baddbmm, histogram, mv, conv variants, einsum, mm, embedding_bag, linear, matmul, tensordot, bmm, bilinear, linalg_multi_dot, addbmm) fail test_dtypes, test_noncontiguous_samples, test_numpy_ref, and test_multiple_devices checks because XPU does not support the same set of dtypes (e.g. int64, complex32) as CUDA.
    Failed tests: N/A
    Dependency: N/A
    Commit scope: N/A
    Tokens: model: claude-sonnet-4 | tokens: 40.6K | in: 4 | out: 474 | cache_read: 19.3K | cache_write: 20.8K | cost: $0.0908

  • 🧠 Root cause identified (Triage Agent)

    Triage log

    [2026-05-14 03:42:39]
    Verdict: NEEDS_HUMAN
    Reason: Feature-gap / umbrella enablement issue requiring dtype support additions across 20+ operators — not a single fixable bug.

    Target Repository: torch-xpu-ops

    Root Cause: XPU kernels for multiple operators (addmm, addmv, baddbmm, histogram, mv, conv variants, einsum, mm, embedding_bag, linear, matmul, tensordot, bmm, addbmm, bilinear, linalg.multi_dot) do not dispatch on the same set of dtypes as their CUDA counterparts. This causes test_dtypes and related tests to fail because XPU is missing support for types like int64 and complex32.

    Fix Strategy: Each operator's XPU kernel (in src/ATen/native/xpu/sycl/) needs its AT_DISPATCH macro updated to include the missing dtypes, and the underlying SYCL kernels need to handle those types. This is operator-by-operator work across 20+ ops.

    Tokens: model: claude-sonnet-4 | tokens: 38.9K | in: 4 | out: 547 | cache_read: 35.0K | cache_write: 3.4K | cost: $0.0313
    Log: agent-issue-2253-triaging-20260514-034218.log

  • 🔧 Fix implemented (Fix Agent)

    Fix log
  • ✅ Fix verified locally

  • 📋 PR proposed

  • 👀 Human review

  • 🎉 PR merged

Original Issue

Original issue body

🐛 Describe the bug

Cases:
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_addmm_decomposed_xpu
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_addmm_xpu
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_addmv_xpu
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_baddbmm_xpu
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_histogram_xpu
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_histogramdd_xpu
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_mv_xpu
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_nn_functional_conv1d_xpu
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_nn_functional_conv2d_xpu
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_nn_functional_conv3d_xpu
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_nn_functional_conv_transpose1d_xpu
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_nn_functional_conv_transpose2d_xpu
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_nn_functional_conv_transpose3d_xpu
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_nn_functional_softsign_xpu
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_einsum_xpu
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_inner_xpu
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_python_ref__refs_true_divide_xpu_complex32
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_linalg_lu_factor_ex_xpu
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_mm_xpu
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_python_ref_executor__refs_true_divide_executor_aten_xpu_complex32
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_nn_functional_embedding_bag_xpu
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_nn_functional_linear_xpu
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_tensordot_xpu
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_noncontiguous_samples_matmul_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_noncontiguous_samples_mm_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_noncontiguous_samples_mv_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_noncontiguous_samples_nn_functional_bilinear_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_noncontiguous_samples_nn_functional_conv1d_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_noncontiguous_samples_nn_functional_conv2d_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_noncontiguous_samples_nn_functional_conv3d_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_noncontiguous_samples_nn_functional_conv_transpose1d_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_noncontiguous_samples_nn_functional_conv_transpose2d_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_noncontiguous_samples_nn_functional_conv_transpose3d_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_noncontiguous_samples_nn_functional_linear_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_noncontiguous_samples_tensordot_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_numpy_ref_addbmm_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_multiple_devices_addbmm_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_multiple_devices_addmm_decomposed_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_multiple_devices_addmm_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_multiple_devices_addmv_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_multiple_devices_baddbmm_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_multiple_devices_bmm_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_multiple_devices_linalg_multi_dot_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_multiple_devices_mm_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_multiple_devices_mv_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_multiple_devices_nn_functional_bilinear_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_multiple_devices_nn_functional_conv1d_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_multiple_devices_nn_functional_conv2d_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_multiple_devices_nn_functional_conv3d_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_multiple_devices_nn_functional_conv_transpose1d_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_multiple_devices_nn_functional_conv_transpose2d_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_multiple_devices_nn_functional_conv_transpose3d_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_multiple_devices_nn_functional_linear_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_multiple_devices_tensordot_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_noncontiguous_samples___rmatmul___xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_noncontiguous_samples_addbmm_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_noncontiguous_samples_addmm_decomposed_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_noncontiguous_samples_addmm_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_noncontiguous_samples_addmv_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_noncontiguous_samples_baddbmm_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_noncontiguous_samples_bmm_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_noncontiguous_samples_einsum_xpu_int64

Reproduce command:

cd pytorch; pip install -r .ci/docker/requirements-ci.txt; cd third_party/torch-xpu-ops/xpu; PYTORCH_TEST_WITH_SLOW=1 pytest -v test_ops_xpu.py::TestCommonXPU -k test_dtypes_addmm_decomposed_xpu

| op_ut | third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU | test_dtypes_addmm_decomposed_xpu | failed | AssertionError: The supported dtypes for addmm on device type xpu are incorrect! ; Exception: The supported dtypes for addmm on device type xpu are incorrect! | XML |
| op_ut | third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU | test_dtypes_addmm_xpu | failed | AssertionError: The supported dtypes for addmm on device type xpu are incorrect! ; Exception: The supported dtypes for addmm on device type xpu are incorrect! | XML |
| op_ut | third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU | test_dtypes_addmv_xpu | failed | AssertionError: The supported dtypes for addmv on device type xpu are incorrect! ; Exception: The supported dtypes for addmv on device type xpu are incorrect! | XML |
| op_ut | third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU | test_dtypes_baddbmm_xpu | failed | AssertionError: The supported dtypes for baddbmm on device type xpu are incorrect! ; Exception: The supported dtypes for baddbmm on device type xpu are incorrect! | XML |
| op_ut | third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU | test_dtypes_histogram_xpu | failed | AssertionError: The supported dtypes for histogram on device type xpu are incorrect! ; Exception: The supported dtypes for histogram on device type xpu are incorrect! | XML |
| op_ut | third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU | test_dtypes_histogramdd_xpu | failed | AssertionError: The supported dtypes for histogramdd on device type xpu are incorrect! ; Exception: The supported dtypes for histogramdd on device type xpu are incorrect! | XML |
| op_ut | third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU | test_dtypes_mv_xpu | failed | AssertionError: The supported dtypes for mv on device type xpu are incorrect! ; Exception: The supported dtypes for mv on device type xpu are incorrect! | XML |
| op_ut | third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU | test_dtypes_nn_functional_conv1d_xpu | failed | AssertionError: The supported dtypes for nn.functional.conv1d on device type xpu are incorrect! ; Exception: The supported dtypes for nn.functional.conv1d on device type xpu are incorrect! | XML |
| op_ut | third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU | test_dtypes_nn_functional_conv2d_xpu | failed | AssertionError: The supported dtypes for nn.functional.conv2d on device type xpu are incorrect! ; Exception: The supported dtypes for nn.functional.conv2d on device type xpu are incorrect! | XML |
| op_ut | third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU | test_dtypes_nn_functional_conv3d_xpu | failed | AssertionError: The supported dtypes for nn.functional.conv3d on device type xpu are incorrect! ; Exception: The supported dtypes for nn.functional.conv3d on device type xpu are incorrect! | XML |
| op_ut | third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU | test_dtypes_nn_functional_conv_transpose1d_xpu | failed | AssertionError: The supported dtypes for nn.functional.conv_transpose1d on device type xpu are incorrect! ; Exception: The supported dtypes for nn.functional.conv_transpose1d on device type xpu are incorrect! | XML |
| op_ut | third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU | test_dtypes_nn_functional_conv_transpose2d_xpu | failed | AssertionError: The supported dtypes for nn.functional.conv_transpose2d on device type xpu are incorrect! ; Exception: The supported dtypes for nn.functional.conv_transpose2d on device type xpu are incorrect! | XML |
| op_ut | third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU | test_dtypes_nn_functional_conv_transpose3d_xpu | failed | AssertionError: The supported dtypes for nn.functional.conv_transpose3d on device type xpu are incorrect! ; Exception: The supported dtypes for nn.functional.conv_transpose3d on device type xpu are incorrect! | XML |
| op_ut | third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU | test_dtypes_nn_functional_softsign_xpu | failed | AssertionError: The supported dtypes for nn.functional.softsign on device type xpu are incorrect! ; Exception: The supported dtypes for nn.functional.softsign on device type xpu are incorrect! | XML |

Versions

main

Activity

  1. added
    skippedUsed for temp UT failure to parallel fix
    on Oct 31, 2025
  2. self-assigned this
    on Oct 31, 2025
  3. added
    test: utUnit-test failure surface
    and removed
    test: utUnit-test failure surface
    on Nov 1, 2025
  4. added this to the PT2.10 milestone on Nov 12, 2025
  5. daisyden commented on Nov 19, 2025

    @daisyden
    ContributorAuthor

    duplicated with #2289

  6. daisyden commented on Nov 24, 2025

    @daisyden
    ContributorAuthor

    Aligned with CUDA in commit pytorch/pytorch@6874f0a, but need a review of @CuiYifeng and @EikanWang

  7. modified the milestones: PT2.10, PT2.11 on Nov 27, 2025
  8. mengfei25 commented on Dec 4, 2025

    @mengfei25
    Contributor

    ✅ op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_nn_functional_conv_transpose2d_xpu op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_nn_functional_conv_transpose3d_xpu op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_nn_functional_softsign_xpu Passed in nightly testing

  9. mengfei25 commented on Dec 4, 2025

    @mengfei25
    Contributor

    ✅ op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_nn_functional_conv_transpose2d_xpu op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_nn_functional_conv_transpose3d_xpu op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_nn_functional_softsign_xpu Passed in nightly testing

  10. modified the milestones: PT2.11, UT Backlog on Mar 2, 2026
  11. 2 remaining items

  12. Stonepia commented on May 14, 2026

    @Stonepia
    Contributor

    ❌ Agent error in code_fix step:

    OpenCode failed (rc=-9)
    
    Traceback
        output, log_path, session_id, token_usage = backend.run(
                                                    ^^^^^^^^^^^^
      File "~/torch-xpu-ops/.github/issue-handler/issue_handler/utils/agent_backend.py", line 325, in run
        raise RuntimeError(
    RuntimeError: OpenCode failed (rc=-9), log: ~/torch-xpu-ops/.github/issue-handler/logs/agent-issue-2253-implementing-20260514-014329.log
    dd `dtypesIfXPU` matching `dtypesIfCUDA` for the affected ops.No previous fix attempt in the tree. Let me find the OpInfo definitions for the affected ops.Now I need to identify which ops from the issue need `dtypesIfXPU`. Let me check if `dtypesIfXPU` already exists anywhere:Good, so `dtypesIfXPU` is already a supported parameter. Now I need to find each affected op and add `dtypesIfXPU` matching `dtypesIfCUDA`. Let me look at each op mentioned in the issue. I'll search for them systematically.
    
  13. Stonepia commented on May 14, 2026

    @Stonepia
    Contributor

    ❌ Agent error in code_fix step:

    Command '['gh', 'api', '/repos/chuanqi129/pytorch/pulls', '--method', 'POST', '-f', 'title=the supported dtypes are not align with cuda', '-f', "body=## the supported dtypes are not align with cuda\n\
    
    Traceback
      File "~/torch-xpu-ops/.github/issue-handler/issue_handler/utils/git.py", line 77, in _gh_api
        raw = _gh(cmd, token=token)
              ^^^^^^^^^^^^^^^^^^^^^
      File "~/torch-xpu-ops/.github/issue-handler/issue_handler/utils/git.py", line 60, in _gh
        raise subprocess.CalledProcessError(
    subprocess.CalledProcessError: Command '['gh', 'api', '/repos/chuanqi129/pytorch/pulls', '--method', 'POST', '-f', 'title=the supported dtypes are not align with cuda', '-f', "body=## the supported dtypes are not align with cuda\n\nFixes https://github.com/intel/torch-xpu-ops/issues/2253\n\n**Root Cause:** The OpInfo definitions for ops like addmm, addmv, baddbmm, mm, mv, histogram, histogramdd, conv1d/2d/3d, conv_transpose*, einsum, embedding_bag, linear, addbmm, bmm, linalg_multi_dot use 'dtypesIfCUDA' to restrict supported dtypes (e.g. floating_and_complex_types only), but lack a corresponding 'dtypesIfXPU'. As a result, XPU falls back to the general 'dtypes' field (which includes int64, complex32, and other integer types), causing test_dtypes to fail because XPU does not actually support those dtypes for these ops. The complex32 failure in true_divide is a separate manifestation of the same missing 'dtypesIfXPU' restriction.\n\n**Failed Tests:**\n- `test_ops_xpu.py::TestCommonXPU::test_dtypes_addmm_decomposed_xpu`\n- `test_ops_xpu.py::TestCommonXPU::test_dtypes_addmm_xpu`\n- `test_ops_xpu.py::TestCommonXPU::test_dtypes_addmv_xpu`\n- `test_ops_xpu.py::TestCommonXPU::test_dtypes_baddbmm_xpu`\n- `test_ops_xpu.py::TestCommonXPU::test_dtypes_histogram_xpu`\n- `test_ops_xpu.py::TestCommonXPU::test_dtypes_histogramdd_xpu`\n- `test_ops_xpu.py::TestCommonXPU::test_dtypes_mv_xpu`\n- `test_ops_xpu.py::TestCommonXPU::test_dtypes_nn_functional_conv1d_xpu`\n- `test_ops_xpu.py::TestCommonXPU::test_dtypes_nn_functional_conv2d_xpu`\n- `test_ops_xpu.py::TestCommonXPU::test_dtypes_nn_functional_conv3d_xpu`\n- `test_ops_xpu.py::TestCommonXPU::test_dtypes_nn_functional_conv_transpose1d_xpu`\n- `test_ops_xpu.py::TestCommonXPU::test_dtypes_einsum_xpu`\n- `test_ops_xpu.py::TestCommonXPU::test_python_ref__refs_true_divide_xpu_complex32`\n- `test_ops_xpu.py::TestCommonXPU::test_dtypes_mm_xpu`\n- `test_ops_xpu.py::TestCommonXPU::test_python_ref_executor__refs_true_divide_executor_aten_xpu_complex32`\n- `test_ops_xpu.py::TestCommonXPU::test_dtypes_nn_functional_embedding_bag_xpu`\n- `test_ops_xpu.py::TestCommonXPU::test_dtypes_nn_functional_linear_xpu`\n- `test_ops_xpu.py::TestCommonXPU::test_noncontiguous_samples_matmul_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_noncontiguous_samples_mm_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_noncontiguous_samples_mv_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_noncontiguous_samples_nn_functional_bilinear_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_noncontiguous_samples_nn_functional_conv1d_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_noncontiguous_samples_nn_functional_conv2d_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_noncontiguous_samples_nn_functional_conv3d_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_noncontiguous_samples_nn_functional_conv_transpose1d_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_noncontiguous_samples_nn_functional_conv_transpose2d_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_noncontiguous_samples_nn_functional_conv_transpose3d_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_noncontiguous_samples_nn_functional_linear_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_noncontiguous_samples_tensordot_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_numpy_ref_addbmm_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_multiple_devices_addbmm_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_multiple_devices_addmm_decomposed_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_multiple_devices_addmm_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_multiple_devices_addmv_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_multiple_devices_baddbmm_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_multiple_devices_bmm_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_multiple_devices_linalg_multi_dot_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_multiple_devices_mm_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_multiple_devices_mv_xpu_int64`\n\n\n---\n\n**Diff stat:**\n```\n.../_internal/common_methods_invocations.py        | 113 +++++++++++++--------\n .../testing/_internal/opinfo/definitions/linalg.py |   1 +\n 2 files changed, 70 insertions(+), 44 deletions(-)\n```\n\n\n", '-f', 'head=agent/issue-2253', '-f', 'base=main', '-F', 'draft=true']' returned non-zero exit status 1.
    
  14. Stonepia commented on May 14, 2026

    @Stonepia
    Contributor

    ❌ Agent error in code_fix step:

    Command '['gh', 'api', '/repos/chuanqi129/pytorch/pulls', '--method', 'POST', '-f', 'title=the supported dtypes are not align with cuda', '-f', "body=## the supported dtypes are not align with cuda\n\
    
    Traceback
      File "~/torch-xpu-ops/.github/issue-handler/issue_handler/utils/git.py", line 77, in _gh_api
        raw = _gh(cmd, token=token)
              ^^^^^^^^^^^^^^^^^^^^^
      File "~/torch-xpu-ops/.github/issue-handler/issue_handler/utils/git.py", line 60, in _gh
        raise subprocess.CalledProcessError(
    subprocess.CalledProcessError: Command '['gh', 'api', '/repos/chuanqi129/pytorch/pulls', '--method', 'POST', '-f', 'title=the supported dtypes are not align with cuda', '-f', "body=## the supported dtypes are not align with cuda\n\nFixes https://github.com/intel/torch-xpu-ops/issues/2253\n\n**Root Cause:** The OpInfo definitions for ops like addmm, addmv, baddbmm, mm, mv, histogram, histogramdd, conv1d/2d/3d, conv_transpose*, einsum, embedding_bag, linear, addbmm, bmm, linalg_multi_dot use 'dtypesIfCUDA' to restrict supported dtypes (e.g. floating_and_complex_types only), but lack a corresponding 'dtypesIfXPU'. As a result, XPU falls back to the general 'dtypes' field (which includes int64, complex32, and other integer types), causing test_dtypes to fail because XPU does not actually support those dtypes for these ops. The complex32 failure in true_divide is a separate manifestation of the same missing 'dtypesIfXPU' restriction.\n\n**Failed Tests:**\n- `test_ops_xpu.py::TestCommonXPU::test_dtypes_addmm_decomposed_xpu`\n- `test_ops_xpu.py::TestCommonXPU::test_dtypes_addmm_xpu`\n- `test_ops_xpu.py::TestCommonXPU::test_dtypes_addmv_xpu`\n- `test_ops_xpu.py::TestCommonXPU::test_dtypes_baddbmm_xpu`\n- `test_ops_xpu.py::TestCommonXPU::test_dtypes_histogram_xpu`\n- `test_ops_xpu.py::TestCommonXPU::test_dtypes_histogramdd_xpu`\n- `test_ops_xpu.py::TestCommonXPU::test_dtypes_mv_xpu`\n- `test_ops_xpu.py::TestCommonXPU::test_dtypes_nn_functional_conv1d_xpu`\n- `test_ops_xpu.py::TestCommonXPU::test_dtypes_nn_functional_conv2d_xpu`\n- `test_ops_xpu.py::TestCommonXPU::test_dtypes_nn_functional_conv3d_xpu`\n- `test_ops_xpu.py::TestCommonXPU::test_dtypes_nn_functional_conv_transpose1d_xpu`\n- `test_ops_xpu.py::TestCommonXPU::test_dtypes_einsum_xpu`\n- `test_ops_xpu.py::TestCommonXPU::test_python_ref__refs_true_divide_xpu_complex32`\n- `test_ops_xpu.py::TestCommonXPU::test_dtypes_mm_xpu`\n- `test_ops_xpu.py::TestCommonXPU::test_python_ref_executor__refs_true_divide_executor_aten_xpu_complex32`\n- `test_ops_xpu.py::TestCommonXPU::test_dtypes_nn_functional_embedding_bag_xpu`\n- `test_ops_xpu.py::TestCommonXPU::test_dtypes_nn_functional_linear_xpu`\n- `test_ops_xpu.py::TestCommonXPU::test_noncontiguous_samples_matmul_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_noncontiguous_samples_mm_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_noncontiguous_samples_mv_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_noncontiguous_samples_nn_functional_bilinear_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_noncontiguous_samples_nn_functional_conv1d_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_noncontiguous_samples_nn_functional_conv2d_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_noncontiguous_samples_nn_functional_conv3d_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_noncontiguous_samples_nn_functional_conv_transpose1d_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_noncontiguous_samples_nn_functional_conv_transpose2d_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_noncontiguous_samples_nn_functional_conv_transpose3d_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_noncontiguous_samples_nn_functional_linear_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_noncontiguous_samples_tensordot_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_numpy_ref_addbmm_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_multiple_devices_addbmm_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_multiple_devices_addmm_decomposed_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_multiple_devices_addmm_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_multiple_devices_addmv_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_multiple_devices_baddbmm_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_multiple_devices_bmm_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_multiple_devices_linalg_multi_dot_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_multiple_devices_mm_xpu_int64`\n- `test_ops_xpu.py::TestCommonXPU::test_multiple_devices_mv_xpu_int64`\n\n\n---\n\n**Diff stat:**\n```\naten/src/ATen/native/mps/operations/Im2Col.mm      | 12 -----\n aten/src/ATen/native/mps/operations/ReduceOps.mm   | 24 ++++++++-\n test/inductor/test_torchinductor_strided_blocks.py | 11 ----\n test/test_mps.py                                   |  8 ---\n test/test_nn.py                                    | 61 ++++++++++------------\n torch/_inductor/codegen/triton.py                  | 20 ++-----\n torch/_inductor/runtime/triton_heuristics.py       |  4 +-\n 7 files changed, 54 insertions(+), 86 deletions(-)\n```\n\n\n", '-f', 'head=agent/issue-2253', '-f', 'base=main', '-F', 'draft=true']' returned non-zero exit status 1.
    
  15. added
    agent:needs-humanAgent lifecycle: real bug the agent could not fix on its own
    and removed on May 14, 2026
  16. daisyden commented on Jun 10, 2026

    @daisyden
    ContributorAuthor

    The upstream PyTorch PR (pytorch/pytorch#176688) is open and expected to resolve this dependency. This issue is labeled as a community component dependency.

  17. github-actions commented on Jun 23, 2026

    @github-actions

    ✅ op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_python_ref_executor__refs_true_divide_executor_aten_xpu_complex32 Passed in nightly testing

  18. github-actions commented on Jul 22, 2026

    @github-actions

    ✅ op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_addmm_decomposed_xpu op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_addmm_xpu op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_addmv_xpu op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_baddbmm_xpu op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_einsum_xpu op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_mm_xpu op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_mv_xpu op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_nn_functional_conv1d_xpu op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_nn_functional_conv2d_xpu op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_nn_functional_conv3d_xpu op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_nn_functional_conv_transpose1d_xpu op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_nn_functional_embedding_bag_xpu op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_dtypes_nn_functional_linear_xpu Passed in nightly testing

  19. libohao1201 commented on Aug 20, 2026

    @libohao1201
    Contributor

    The following XPU UT case(s) tracked by this issue have been skipped in #5043 until a fix is available:

    • test_dtypes_addmm_decomposed_xpu
    • test_dtypes_addmm_xpu
    • test_dtypes_addmv_xpu
    • test_dtypes_baddbmm_xpu
    • test_dtypes_histogram_xpu
    • test_dtypes_histogramdd_xpu
    • test_dtypes_mv_xpu
    • test_dtypes_nn_functional_conv1d_xpu
    • test_dtypes_nn_functional_conv2d_xpu
    • test_dtypes_nn_functional_conv3d_xpu
  20. github-actions commented on Aug 27, 2026

    @github-actions

    ✅ op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_python_ref__refs_true_divide_xpu_complex32 Passed in nightly testing on BMG

  21. added theissue type on Nov 11, 2026
  22. daisyden commented on Nov 11, 2026

    @daisyden
    ContributorAuthor
    label-issue: #2253

    Root cause: XPU does not register the same dtype set as CUDA for a family of linear-algebra / histogram / embedding ops (addmm, addmv, baddbmm, histogram, histogramdd, mv, conv*, einsum, mm, embedding_bag, linear, matmul, tensordot, bmm, addbmm, bilinear, linalg.multi_dot, true_divide). test_dtypes fails with "The supported dtypes for on device type xpu are incorrect!"; test_noncontiguous_samples / test_numpy_ref / test_multiple_devices fail because int64 (and complex32) paths are missing. This is a dtype-coverage feature gap, not a numeric bug.

    Umbrella issue spanning many ops — strong need_split candidate (one tracking issue per op family, or at least separate histogram vs matmul-family).

    Analyzed representative case: test/xpu/test_ops_xpu.py::TestCommonXPU::test_dtypes_histogram_xpu (first non-struck case; one group).

    axis value reason
    type Bug Native Type unset; reported as UT failures. Underlying cause is a dtype-coverage gap, but surfaced as failing op_ut.
    test test: ut op_ut cases in test_ops_xpu.py (TestCommonXPU). Existing skipped + ut_upstream labels kept.
    module (none confident) Spans addmm/mm/bmm/histogram/embedding_bag/conv/einsum — no single XPU module; left unset rather than mislabel.
    priority High Many distinct failing op_ut cases across the op family (>6).
    dtype dtype: int64 Most non-struck failures are int64 non-contiguous/numpy-ref; histogram cases are dtype-support.
    symptom Functionality "supported dtypes ... are incorrect" — op rejects/accepts wrong dtype set vs CUDA.
    dependency dependency component: community (existing, kept) Upstream OpInfo dtype claims; ut_upstream.
    triage need_split, agent:needs-human (existing) Umbrella across many ops; existing human duplicate label has no linked target.

    Existing human labels preserved: duplicate, skipped, dependency component: community, ut_upstream, agent:needs-human.

    Representative cases (subset; see extract.json):

    • test_dtypes_histogram_xpu
    • test_dtypes_histogramdd_xpu
    • test_noncontiguous_samples_matmul_xpu_int64
    • test_noncontiguous_samples_mm_xpu_int64
    • test_noncontiguous_samples_mv_xpu_int64
    • test_multiple_devices_bmm_xpu_int64
    • test_multiple_devices_linalg_multi_dot_xpu_int64
    • test_numpy_ref_addbmm_xpu_int64
    • test_noncontiguous_samples_einsum_xpu_int64

    Warning

    apply_labels.py flagged items that need a human:

    • warning: dropping label(s) not defined in labels.json: ['(none confident)', 'Functionality', 'dependency component: community (existing, kept)', 'need_split, agent:needs-human (existing)']

    Applied to this issue. Generated by a local label-issue run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

agent:needs-humanAgent lifecycle: real bug the agent could not fix on its owndependency component: communityMatching open pytorch/pytorch issuedtype: int64int64 / long dtypeduplicateThis issue or pull request already existsskippedUsed for temp UT failure to parallel fixtest: utUnit-test failure surfaceut_upstreamUpstream unit-test dependency

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions