Repository navigation
Handle null plugin EP allocators - #32683
Merged
Vineeth Chelur (crvineeth97) merged 3 commits intoSep 22, 2026
Merged
Vineeth Chelur (crvineeth97) merged 3 commits into
Vineeth Chelur (crvineeth97) merged 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
π‘ Changes recommended
Factory allocator creation can still dereference null during EP-library registration.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds null allocator handling for plugin EP session allocators.
Changes:
- Skips null preferred allocators.
- Adds an example EP configuration option.
- Adds regression coverage for the per-session path.
File summaries
| File | Description |
|---|---|
test_execution.cc |
Adds regression test. |
ep.h |
Adds allocator configuration flag. |
ep.cc |
Returns null for host-accessible allocation. |
ep_factory.cc |
Parses the test configuration. |
ep_plugin_provider_interfaces.cc |
Skips null session allocators. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 1
- Review effort level: Balanced
π‘ Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
eserscor
reviewed
Sep 17, 2026
Vineeth Chelur (crvineeth97)
requested review from
eserscor
and
a balanced review from Copilot
September 17, 2026 22:56
eserscor
approved these changes
Sep 18, 2026
Vineeth Chelur (crvineeth97)
enabled auto-merge (squash)
September 21, 2026 20:36
added 3 commits
September 21, 2026 15:05
OrtEp and OrtEpFactory CreateAllocator may succeed with a null allocator to request default CPU allocation. Skip that optional preferred allocator before Info() and ownership wrapping; preserve errors and non-null ownership paths. Add a default-off example EP option returning success/null for HOST_ACCESSIBLE session memory and reuse the Mul inference regression helper. CPU execution-provider fallback policy is unchanged.
Vineeth Chelur (crvineeth97)
force-pushed
the
vchelur/fix-null-plugin-ep-allocator
branch
from
September 21, 2026 22:05
6522266 to
06707b7
Compare
Vineeth Chelur (crvineeth97)
merged commit Sep 22, 2026
536f161
into
microsoft:main
92 of 94 checks passed
Vineeth Chelur (crvineeth97)
deleted the
vchelur/fix-null-plugin-ep-allocator
branch
September 22, 2026 00:16
This was referenced Oct 9, 2026
This was referenced Nov 2, 2026
Open
This was referenced Nov 9, 2026
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.
Why
When the QNN HTP shared-memory allocator is disabled, QNN can validly return success with a null per-session
HOST_ACCESSIBLEallocator to request ORT's default CPU allocator.PluginExecutionProvider::CreatePreferredAllocatorsinstead dereferenced the null pointer during session initialization. CPU memory allocation here is independent of CPU execution-provider fallback.What Changed
Skip a null per-session allocator before querying allocator metadata or taking ownership. Add regression coverage for this path.
How Tested
Added
OrtEpLibrary.PluginEp_NullSessionAllocatorUsesDefaultCpuAllocator. Not run locally because this worktree has no existing compatible ORT build cache.