Skip to content

Check CPU fallback assignments in nested subgraphs - #32862

Open
danielsongmicrosoft wants to merge 1 commit into
microsoft:mainfrom
danielsongmicrosoft:user/danielsongmicrosoft/onnxruntime-robustness-c337669f2323
Open

danielsongmicrosoft wants to merge 1 commit into
microsoft:mainfrom
danielsongmicrosoft:user/danielsongmicrosoft/onnxruntime-robustness-c337669f2323

Conversation

@danielsongmicrosoft

Copy link
Copy Markdown
Contributor

Summary

  • Check execution provider assignments recursively when CPU fallback is disabled.
  • Cover nested control-flow subgraphs and fully assigned nested graphs.

Validation

  • Warnings-as-errors build completed successfully.
  • Focused nested-subgraph regression tests passed.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

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.

Copilot review overview

🟢 Approval recommended

The recursive validation is correct, scoped appropriately, and covered by focused regression tests.

Review effort: Balanced
Findings: None

What changed in this PR

Recursively enforces disabled CPU fallback across nested ONNX subgraphs.

Changes:

  • Adds recursive CPU EP assignment detection.
  • Uses it during session initialization.
  • Adds nested control-flow regression tests.
File Description
onnxruntime/​core/​session/​inference_session.cc Applies recursive assignment validation.
onnxruntime/​core/​session/​inference_session_utils.h Declares the validation helper.
onnxruntime/​core/​session/​inference_session_utils.cc Implements recursive subgraph traversal.
onnxruntime/​test/​framework/​inference_session_test.cc Tests rejected and fully assigned nested graphs.

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

@danielsongmicrosoft
danielsongmicrosoft marked this pull request as ready for review September 28, 2026 19:55

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.

2 participants