Preserve CUDA internal-test builds without the Windows CMake cycle - #32805
Conversation
Keep the module-to-host link dependency on Windows and remove the reverse build-order edge from the provider test executable. Document the module target as the targeted Windows internal-test build entry point. Fixes #32804 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Guard the shared dependency-list append at its source instead of filtering the provider-test copy later. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused dependency adjustment resolves the reported cycle without altering non-Windows or plugin configurations.
Review effort: Balanced
Findings: None
What changed in this PR
Fixes the Windows CUDA internal-test CMake dependency cycle while preserving module linking and default-build behavior.
Changes:
- Removes the Windows-only executable-to-module dependency.
- Documents targeted Windows internal-test builds.
| File | Description |
|---|---|
cmake/onnxruntime_unittests.cmake |
Breaks the cyclic target dependency on Windows. |
docs/contrib_ops/cuda/matmul_nbits.md |
Documents the required module build target. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Build the dynamically loaded module explicitly for targeted builds instead of making it a prerequisite of the test executable. Retain the Windows module-to-executable import-library link. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Separate runtime module prerequisites from binary build dependencies. In the Windows non-plugin internal-test configuration, keep onnxruntime_provider_test as the public aggregate target and link the module against a separate executable target with the original output filename. Preserve CTest names, environment, timeout, reporting and executable PCH settings. Other configurations retain their executable target and module build dependency. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Evaluate the internal-test option after its prerequisites. Reject a missing test module in the Windows build job and explicitly run the wrapper on the GPU runner, requiring a fresh completed-test XML result so absent or skipped tests cannot pass silently. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Separate configure from the full build and first build only the public provider-test target. Require fresh executable and CUDA test module outputs so the full build cannot mask a missing aggregate dependency. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve size_t workspace sizes, use a float comparison literal, and widen the tactic-pruning threshold multiplication so the FLT_MAX no-best sentinel cannot overflow during constant folding. Keep warnings-as-errors enabled. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Review of head Critical — Windows CUDA internal-test module fails to link ( Non-blocking question: The new XML check proves that the outer No other confirmed defects from the full review. This was a static review with PR-head CI-log verification; no local Windows build or GPU run was performed. |
Checkpoint the current incomplete fix. Automatic exports do not cover linked static-library symbols, and the test-count check runs before Google Test selects tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Compile internal-test objects before the host link and derive targeted exports from module references and static host libraries. Keep tests in the DLL, add export-generation regressions and CI artifact checks, and verify successful internal tests after execution. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Merged |
Co-authored-by: xadupre <22452781+xadupre@users.noreply.github.com>
Replace the stale routing record reference in the packed INT GEMV path and preserve expert selection collection. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use the executable target for WebGPU definitions and cover packed INT GEMV expert counting. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Ti-Tai Wang (titaiwangms)
left a comment
There was a problem hiding this comment.
Can you resolve the conflict?
|
Copilot resolve the merge conflicts in this pull request |
…rnal-tests-cycle # Conflicts: # .github/workflows/android.yml # onnxruntime/test/framework/moe_expert_counting_test.cc Co-authored-by: xadupre <22452781+xadupre@users.noreply.github.com>
Merged the latest |


Fixes #32804.
Break the Windows CUDA internal-test dependency cycle while preserving
--target onnxruntime_provider_test: an aggregate target builds the executable and its dynamically loaded test module. Binary and CTest names remain unchanged.CUDA_EP_Unittest.Allon the GPU runner and reject missing or skipped tests.Local checks: CMake generation, PowerShell fixtures and lint; no ORT compilation. Windows CI has passed generation and built the host executable; module linking and execution remain to be validated.