Skip to content

[release/2.13] Expected error message is different than actual #2817

Open
pytorch/pytorch
#197247

Description

@Silv3S

🐛 Describe the bug

Cases:
op_ut,third_party.torch-xpu-ops.test.xpu.test_linalg_xpu.TestLinalgXPU,test_linalg_lstsq_input_checks_xpu_complex128
op_ut,third_party.torch-xpu-ops.test.xpu.test_linalg_xpu.TestLinalgXPU,test_linalg_lstsq_input_checks_xpu_complex64
op_ut,third_party.torch-xpu-ops.test.xpu.test_linalg_xpu.TestLinalgXPU,test_linalg_lstsq_input_checks_xpu_float32
op_ut,third_party.torch-xpu-ops.test.xpu.test_linalg_xpu.TestLinalgXPU,test_linalg_lstsq_input_checks_xpu_float64

E           AssertionError: "`driver` other than `gels` is not supported on CUDA" does not match "torch.linalg.lstsq: parameter `driver` should be one of (gels, gelsy, gelsd, gelss)"
E           
E           To execute this test, run the following from the base repo dir:
E               python test/test_linalg.py TestLinalgXPU.test_linalg_lstsq_input_checks_xpu_complex128
E           
E           This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0

Versions

PyTorch2.10
7e412e0

Activity

  1. self-assigned this
    on Feb 3, 2026
  2. added
    skippedUsed for temp UT failure to parallel fix
    on Mar 20, 2026
  3. added this to the UT Backlog milestone on Mar 20, 2026
  4. bjarzemb commented on Jun 17, 2026

    @bjarzemb
    Contributor

    I have this issue also on Windows with Intel XPU (Arc B580) in release 2.13 tests.

  5. changed the title [-]Expected error message is different than actual[/-] [+][release/2.13] Expected error message is different than actual[/+] on Jun 17, 2026
  6. kdrozd-dev commented on Jun 17, 2026

    @kdrozd-dev
    Contributor

    I have this issue also on Windows with Intel XPU (Arc B580) in release 2.13 tests.

    Fix is ready we are waiting for community review.

  7. bjarzemb commented on Jun 24, 2026

    @bjarzemb
    Contributor

    I have this issue also on LNL (windows) in release 2.13 tests.

  8. added
    module: opsOther ATen/native ops: autograd, optimizer, fx, export
    functionalityFunctional defect: error/assert/hang/timeout (non-numeric)
    test: utUnit-test failure surface
    on Nov 11, 2026
  9. added theissue type on Nov 11, 2026
  10. daisyden commented on Nov 11, 2026

    @daisyden
    Contributor
    label-issue: #2817

    Root cause: the upstream test expects the CUDA-only driver error raised at aten/src/ATen/native/BatchLinearAlgebra.cpp:3538 ("driver other than gels is not supported on CUDA"), but XPU lstsq takes the CPU-fallback path which accepts all drivers and raises the generic "should be one of (gels, gelsy, gelsd, gelss)" message. Error-message expectation mismatch, not incorrect computation; defect owner is the upstream test (wait_upstream).

    Analyzed case: torch-xpu-ops/test/xpu/test_linalg_xpu.py::TestLinalgXPU::test_linalg_lstsq_input_checks_xpu_complex128 (case 1 of 4; the other 3 not analyzed)

    axis value reason
    type Bug Reported UT failure (assertion); issue_type empty, Bug heuristic.
    test test: ut op_ut rows for test/xpu/test_linalg_xpu.py.
    module module: ops torch.linalg.lstsq input-check; ATen native linalg op.
    priority Low Error-message/validation difference vs CUDA without incorrect computation.
    symptom functionality AssertionError on expected vs actual error text.

    Test cases (4):

    • torch-xpu-ops/test/xpu/test_linalg_xpu.py::TestLinalgXPU::test_linalg_lstsq_input_checks_xpu_complex128
    • torch-xpu-ops/test/xpu/test_linalg_xpu.py::TestLinalgXPU::test_linalg_lstsq_input_checks_xpu_complex64
    • torch-xpu-ops/test/xpu/test_linalg_xpu.py::TestLinalgXPU::test_linalg_lstsq_input_checks_xpu_float32
    • torch-xpu-ops/test/xpu/test_linalg_xpu.py::TestLinalgXPU::test_linalg_lstsq_input_checks_xpu_float64

    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

functionalityFunctional defect: error/assert/hang/timeout (non-numeric)module: opsOther ATen/native ops: autograd, optimizer, fx, exportskippedUsed for temp UT failure to parallel fixtest: utUnit-test failure surfacewait_upstreamNeeds upstream tests adjustment

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions