Fix CUDA arena cfg lifetime, add ROCm dispatch, harden VitisAI LoadLibrary, add missing cctype include - #2041
Merged
Conversation
…ch, fix VitisAI LoadLibrary, add cctype include Co-authored-by: baijumeswani <12852605+baijumeswani@users.noreply.github.com> Agent-Logs-Url: https://github.com/microsoft/onnxruntime-genai/sessions/bf3707be-07ba-4dde-babb-cd6a94ca4411
Copilot
AI
changed the title
[WIP] Decouple plugin execution providers from USE_WINML macro
Fix CUDA arena cfg lifetime, add ROCm dispatch, harden VitisAI LoadLibrary, add missing cctype include
Mar 21, 2026
baijumeswani
marked this pull request as ready for review
March 21, 2026 08:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses review feedback from the EP decoupling PR.
CUDA arena cfg use-after-free (
src/cuda/session_options.cpp):arena_cfgwas scoped inside theif (use_arena_management)block and destroyed beforeAppendExecutionProvider_CUDA_V2consumed it. Moved declaration outside the block.ROCm path regression (new
src/rocm/session_options.{h,cpp}): ROCm had no dispatch entry and would silently fall through to the generic V2/V1 path, which doesn't supportAppendExecutionProvider_ROCM. Added a dedicated provider implementation matching the original behavior, wired into the dispatch table and cmake glob.VitisAI LoadLibrary (
src/vitisai/session_options.cpp):LoadLibraryresult was unchecked—GetProcAddresswould be called with a null handle on failure. Added null-check with error, replaced C-style cast withreinterpret_cast.Missing
<cctype>(src/openvino/session_options.cpp):RemoveAllWhitespacecallsstd::isspacewithout including<cctype>, relying on transitive includes.💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.