Skip to content

test(cuda): pin dynamic-output capture refusal - #2180

Merged
justinchuby merged 1 commit into
mainfrom
fix/cuda-dynamic-output-capture-contract
Aug 26, 2026
Merged

justinchuby merged 1 commit into
mainfrom
fix/cuda-dynamic-output-capture-contract

Conversation

@justinchuby

Copy link
Copy Markdown
Owner

Summary

  • add the reviewed Unique and NonMaxSuppression materialization syncs to the CUDA capture contract with their DeviceWorkspace/dynamic-output rationale
  • bind each entry to its owning kernel, two-phase output policy, and explicit scalar-count D2H capture-refusal reason
  • exercise real CUDA begin_graph_capture refusal and prove it occurs before either kernel phase executes

Reproduction

On origin/main, the exact contract command ran 2 tests: 1 passed and unconditional_syncs_are_limited_to_capture_unsupported_paths failed because unique.rs::materialize and non_max_suppression.rs::materialize were unreviewed.

Validation

  • cargo test --locked -p onnx-runtime-ep-cuda --features cuda --test capture_sync_contract (3 passed)
  • cargo test --locked -p onnx-runtime-ep-cuda --features cuda --lib capture::tests (3 passed)
  • cargo test --locked -p onnx-runtime-ep-cuda --features cuda --lib kernels::unique::tests:: (2 passed, 2 CUDA tests ignored as expected)
  • CUDA RTX 4060: Unique dynamic-output semantics/transfer/capture-refusal test (1 passed)
  • CUDA RTX 4060: full nms_gpu target, including default DeviceWorkspace path and capture refusal (9 passed)
  • cargo clippy -p onnx-runtime-ep-cuda --all-targets --features cuda,gpu-tests -- -D warnings
  • cargo fmt -p onnx-runtime-ep-cuda --check

Mutation evidence

  • changing Unique to CaptureSupport::Supported fails the new guard on the missing explicit refusal
  • removing NMS's scalar D2H reason fails the new guard on the missing 8-byte count D2H synchronization contract

DFT and MultiHeadAttention entries are unchanged and remain covered by the existing allowlist equality check.

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

Copilot-Session: d60eb808-7cc6-4abc-b48d-2a6dd3841624
@codecov

codecov Bot commented Aug 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.03%. Comparing base (607dba7) to head (cc2ee00).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2180      +/-   ##
==========================================
+ Coverage   80.60%   81.03%   +0.43%     
==========================================
  Files         432      432              
  Lines      218383   218383              
  Branches   218383   218383              
==========================================
+ Hits       176027   176975     +948     
+ Misses      36511    35563     -948     
  Partials     5845     5845              
Flag Coverage Δ
cli-ort-linux 72.51% <ø> (ø)
cli-ort-windows 72.01% <ø> (-0.10%) ⬇️
mlas 85.93% <ø> (+0.03%) ⬆️
offline 81.17% <ø> (+0.45%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 13 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

2 participants