Skip to content

Windows ML: Fix crash with null provider options for VitisAI EP - #629

Merged
adrastogi merged 1 commit into
mainfrom
user/adrastogi/vitis-fix
Apr 20, 2026
Merged

adrastogi merged 1 commit into
mainfrom
user/adrastogi/vitis-fix

Conversation

@adrastogi

Copy link
Copy Markdown
Contributor

Description

CppConsoleDesktop.SelfContained.exe was crashing with an access violation when using VitisAIExecutionProvider. My command line was CppConsoleDesktop.SelfContained.exe --ep_name VitisAIExecutionProvider --device_type NPU --compile

The crash is because ONNX dereferences a null OrtKeyValuePairs* when reading the EP options.

In the Performance Configurator header, GetVitisAIOptions was returning Ort::KeyValuePairs(nullptr), which wraps a null internal pointer. This fix changed it to return a default-constructed Ort::KeyValuePairs which should be a valid object for ORT to query.

Tested by rebuilding and running the sample. The app no longer crashes and successfully completes inference on the SqueezeNet model using the EP.

Target Release

2.0

Checklist

Note that /azp run currently isn't working for this repo.

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.

:shipit:

@adrastogi
adrastogi merged commit 9f03325 into main Apr 20, 2026
4 checks passed
@adrastogi
adrastogi deleted the user/adrastogi/vitis-fix branch April 20, 2026 16:48
shisan (qiutongMS) pushed a commit that referenced this pull request Aug 25, 2026
Align the WindowsML central package set with stable Windows App SDK 2.1.3 and port the main-only EP performance chain from PRs #588, #634, #635, #629, #642, and #643.

Preserve release Central Package Management, defer the PR #643 legacy sample removals to final integration review, and record the x64 Release validation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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