Add ORT_UNIT_TEST_MAIN_DYNAMIC_PLUGIN_EP_CONFIG_JSON_FILE env var#27945
Merged
Add ORT_UNIT_TEST_MAIN_DYNAMIC_PLUGIN_EP_CONFIG_JSON_FILE env var#27945
Conversation
Add support for specifying dynamic plugin EP configuration via a JSON file path in the ORT_UNIT_TEST_MAIN_DYNAMIC_PLUGIN_EP_CONFIG_JSON_FILE environment variable. This is mutually exclusive with the existing inline JSON env var ORT_UNIT_TEST_MAIN_DYNAMIC_PLUGIN_EP_CONFIG_JSON.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an alternate way for unit test runs to provide dynamic Plugin EP initialization config by reading JSON from a file path specified in an environment variable, avoiding overly long inline env var values.
Changes:
- Add
ORT_UNIT_TEST_MAIN_DYNAMIC_PLUGIN_EP_CONFIG_JSON_FILEenv var support to load dynamic plugin EP config JSON from a file. - Enforce mutual exclusivity between inline JSON (
..._CONFIG_JSON) and file-based JSON (..._CONFIG_JSON_FILE).
Comments suppressed due to low confidence (1)
onnxruntime/test/unittest_main/test_main.cc:10
std::cout/std::cerrare used in this file on non-Windows too, but<iostream>is only included under_WIN32. Please include<iostream>unconditionally (or otherwise ensure the needed declarations are included) to avoid relying on transitive includes that may break on some toolchains/standard libraries.
#include <fstream>
#include <memory>
#include <optional>
#include <string>
#include <vector>
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
chilo-ms
approved these changes
Apr 2, 2026
…in_ep_config_from_file
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.
Description
Add support for specifying dynamic plugin EP configuration via a JSON file path in the ORT_UNIT_TEST_MAIN_DYNAMIC_PLUGIN_EP_CONFIG_JSON_FILE environment variable. This is mutually exclusive with the existing inline JSON env var ORT_UNIT_TEST_MAIN_DYNAMIC_PLUGIN_EP_CONFIG_JSON.
Motivation and Context
Allow more flexibility in specifying configuration. It may be impractical to put everything in an environment variable.