Fix for epctx ovir test case#1176
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the OpenVINO EP context (OVIR) provider tests to avoid crashes on non-Intel CPUs by skipping the OVIR import/export test fixtures at runtime based on detected CPU vendor.
Changes:
- Add a CPU-vendor helper (
IsIntelCPU()) and use it to gate OVIR EP context tests. - Skip OVIR EP context import/export test fixtures on non-Intel CPUs via
GTEST_SKIP()inSetUp().
Comment on lines
+43
to
+45
| bool IsIntelCPU() { | ||
| return onnxruntime::CPUIDInfo::GetCPUIDInfo().GetCPUVendor() == "Intel"; | ||
| } |
Comment on lines
11
to
15
| #include "core/framework/provider_options.h" | ||
| #include "core/framework/tensor_shape.h" | ||
| #include "core/common/float16.h" | ||
| #include "core/common/cpuid_info.h" | ||
|
|
jatinwadhwa921
added a commit
that referenced
this pull request
Jul 1, 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.
The OVIR EP context import/export path is currently only validated on Intel CPUs. On AMD-based CPUs this path is untested, in particular the embed_mode = 0 flow, which exports the compiled model to a separate .bin file and memory-maps it back on reload, is not supported there and can crash the test process (observed as a SEGFAULT in onnxruntime_provider_test on AMD Linux runners).
Since we cannot currently guarantee correct import/export behavior on AMD silicon, this change gates the OVIR EP context tests to run only on Intel CPUs. On non-Intel CPUs (e.g. AMD) the tests are skipped at runtime via a CPU-vendor check (CPUIDInfo::GetCPUVendor()), so the same test binary continues to run everywhere without crashing.