Skip to content

[upstream_ut] MetadataMismatchError in TestFakeTensor of test_ops.py#14

Draft
Stonepia wants to merge 1 commit into
mainfrom
agent/issue-1963
Draft

[upstream_ut] MetadataMismatchError in TestFakeTensor of test_ops.py#14
Stonepia wants to merge 1 commit into
mainfrom
agent/issue-1963

Conversation

@Stonepia

Copy link
Copy Markdown
Collaborator

[upstream_ut] MetadataMismatchError in TestFakeTensor of test_ops.py

Fixes intel/torch-xpu-ops#1963

Root Cause: linalg_pinv and pinverse are not registered in any XPU autocast policy in aten/src/ATen/autocast_mode.cpp. For CUDA, these ops are handled via fp32 policy but the equivalent XPU registration is missing. Without an explicit XPU autocast registration, the real kernel respects the active autocast dtype (float16) while the fake tensor dispatch falls through without dtype casting, producing a dtype mismatch (float32 vs float16). The bilinear failure likely follows the same pattern where the promote policy for XPU is not being observed by FakeTensor.

Failed Tests:

  • test_ops.py::TestFakeTensorXPU::test_fake_autocast_linalg_pinv_xpu_float32
  • test_ops.py::TestFakeTensorXPU::test_fake_autocast_pinverse_xpu_float32
  • test_ops.py::TestFakeTensorXPU::test_fake_crossref_backward_amp_nn_functional_bilinear_xpu_float32

Diff stat:

aten/src/ATen/autocast_mode.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

[upstream_ut] MetadataMismatchError in TestFakeTensor of test_ops.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[upstream_ut] MetadataMismatchError in TestFakeTensor of test_ops.py

1 participant