Skip to content

Fix QMoE compatibility report capture on Windows - #34210

Open
eserscor wants to merge 2 commits into
mainfrom
eserscor-windows-cuda-ci-failure-fix
Open

eserscor wants to merge 2 commits into
mainfrom
eserscor-windows-cuda-ci-failure-fix

Conversation

@eserscor

Copy link
Copy Markdown
Contributor

Description

Replace the CUDA device-side printf used for INT3 QMoE compatibility counters with a host-side device-to-host counter readback and flushed stdout report. Update the test to require zero missed corrections in both FC1 and FC2 reports.

Motivation and Context

The Windows CUDA CI test selects the Tensor Core path but does not capture the device-side missed=0 report, causing test_cuda_int3_tensor_core_compatibility_shadow to fail. Host-side reporting makes the verification output capturable by the test while preserving its checks.

Validation: Python syntax check and git diff --check passed. The CUDA regression test was not run locally; the available T1000 does not support the BF16 Tensor Core path required by this test.

Report compatibility verification counters through host stdout so the Windows test can capture them. Verify that FC1 and FC2 both report zero missed corrections.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@eserscor
eserscor marked this pull request as ready for review November 13, 2026 22:26
Copilot AI balanced review requested due to automatic review settings November 13, 2026 22:26

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.

🟡 Changes recommended

The diagnostic performs a host readback followed by cudaStreamSynchronize during CUDA graph capture, invalidating capture and causing inference to fail when compatibility verification is enabled.

1 open issue
What changed in this PR

This PR makes CUDA INT3 QMoE compatibility reports capturable on Windows by moving counter reporting from device-side printf to flushed host stdout.

Changes:

  • Read compatibility counters back to the host and report them for FC1 and FC2.
  • Strengthen the regression test to require zero missed corrections in both reports.
File Description
onnxruntime/​test/​python/​transformers/​test_qmoe_shared_direct.py Require separate FC1 and FC2 missed=0 reports.
onnxruntime/​contrib_ops/​cuda/​moe/​qmoe_int3_tc.cuh Replace device-side reporting with host readback, stream synchronization, and flushed output.

Review effort: Balanced

The compatibility report performs a host readback and stream synchronization, which are illegal during graph capture. Skip only the diagnostic readback while capture is active.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

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 Windows CUDA stdout-capture fix still needs regression testing on a BF16 Tensor Core-capable Windows CUDA runner because static review cannot verify the platform-specific capture behavior.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

This branch has not been deployed

No deployments
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