Skip to content

fix: enable test_transform_bias_rescale_qkv_nested on XPU (issue #2182 fixed)#10

Open
laifenxiawucha wants to merge 1 commit into
fix/xpu-ut-issuesfrom
hermes/fix-78-nested-qkv-test
Open

fix: enable test_transform_bias_rescale_qkv_nested on XPU (issue #2182 fixed)#10
laifenxiawucha wants to merge 1 commit into
fix/xpu-ut-issuesfrom
hermes/fix-78-nested-qkv-test

Conversation

@laifenxiawucha
Copy link
Copy Markdown
Owner

The underlying C++ issue (missing T-rounding for nested tensors in
transform_bias_rescale_qkv_xpu) was fixed upstream via
intel/torch-xpu-ops#2450. This changes the unconditional XPU skip
to a no-op skip so the test runs now that the C++ fix is in place.

CUDA reference: aten/src/ATen/native/transformers/cuda/attention.cu:621-629

Reproducer

import math, torch
embed_dim, num_heads, bs, sl = 24, 4, 4, 2
x = torch.randn(bs, sl, 3*embed_dim)
xs = list(torch.unbind(x))
x_nt = torch.nested.nested_tensor(xs)
# The XPU kernel now correctly pads T to multiple of 8:
# Output q has shape [bs, num_heads, 8, dim_per_head]
# Before fix: output had T=2 (unpadded), reference expected T=8

Self-Review

  • fix_location_correct — test skip removal only, C++ fix done in torch-xpu-ops#2450
  • reference_semantics_matched — matches CUDA attention.cu:621-629
  • minimal_change — 1-line skip change
  • no_cuda_dependency
  • test_coverage — tests 5 configs including non-multiple-of-8 sl
  • blast_radius_checked — only affects the one test function
  • no_unrelated_changes

Authored by Hermes Agent.

…rch#2182 fixed)

The underlying C++ issue (missing T-rounding for nested tensors in
transform_bias_rescale_qkv_xpu) was fixed upstream via
intel/torch-xpu-ops#2450.  This removes the unconditional XPU skip
that was guarding the test while the C++ fix was pending.

CUDA reference: aten/src/ATen/native/transformers/cuda/attention.cu:621-629
Authored by Hermes Agent.
@laifenxiawucha laifenxiawucha force-pushed the hermes/fix-78-nested-qkv-test branch from 75de6a7 to d7698f2 Compare May 22, 2026 05:03
@laifenxiawucha laifenxiawucha changed the base branch from main to fix/xpu-ut-issues May 22, 2026 05:04
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.

1 participant