Skip to content

[CUDA] Guard FP8 XQA test by compute capability - #32559

Merged
Tianlei Wu (tianleiwu) merged 1 commit into
mainfrom
tlwu/20260911/fp8_xqa_test_guard
Sep 11, 2026
Merged

[CUDA] Guard FP8 XQA test by compute capability#32559
Tianlei Wu (tianleiwu) merged 1 commit into
mainfrom
tlwu/20260911/fp8_xqa_test_guard

Conversation

@tianleiwu

Copy link
Copy Markdown
Contributor

Description

The Windows CUDA CI runner for PR #32515 uses an SM86 A10-4Q. PagedAttention intentionally enables FP8 XQA only on SM89 or SM90+, so the FP8 cases in test_xqa_large_attention_scale_and_k_scale fell back to portable kernels and failed the XQA dispatch assertion.

Mirror the runtime capability predicate in the test and include the FP8 variant only on supported GPUs. UINT8 and INT8 remain covered on SM80 and newer devices. This is a capability guard, not a memory guard: the failed job completed pytest normally and reported two assertion failures rather than a CUDA allocation failure or process crash.

Failed job: https://github.com/microsoft/onnxruntime/actions/runs/34435175610/job/102757939916?pr=32515

Motivation and Context

Fixes the Windows GPU CUDA CI regression introduced by #32515 without skipping valid XQA coverage on SM86.

Testing

  • TestPagedAttentionInt4Helpers: 4 tests passed, including simulated SM86, SM89, and SM90 capability cases.
  • lintrunner onnxruntime/test/python/transformers/test_paged_attention_int4.py
  • python -m py_compile onnxruntime/test/python/transformers/test_paged_attention_int4.py
  • git diff --check

Copilot AI balanced review requested due to automatic review settings September 11, 2026 04:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The capability check must target the same CUDA device used by the test.

Pull request overview

Guards FP8 XQA tests to run only on GPUs with SM89+ capability, preventing failures on SM86 while retaining UINT8/INT8 coverage.

Changes:

  • Added capability detection and simulated SM86/SM89/SM90 tests.
  • Conditionally includes FP8 test cases.
File summaries
File Summary
onnxruntime/test/python/transformers/test_paged_attention_int4.py Adds the capability guard; the device queried should match the CUDA device used by run_case.
Review details

Suppressed comments (1)

onnxruntime/test/python/transformers/test_paged_attention_int4.py:31

  • This reads PyTorch's current device, but run_case binds every ORT tensor/session to CUDA device 0 (lines 302-324). If another test leaves a different device current, the guard can skip FP8 coverage on device 0 or run it on an SM<89 device; query the same device that the test executes on.
    major, minor = torch.cuda.get_device_capability()
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@tianleiwu
Tianlei Wu (tianleiwu) merged commit 8ec7981 into main Sep 11, 2026
90 of 91 checks passed
@tianleiwu
Tianlei Wu (tianleiwu) deleted the tlwu/20260911/fp8_xqa_test_guard branch September 11, 2026 17:07
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.

3 participants