Skip to content

Add ORT_UNIT_TEST_MAIN_DYNAMIC_PLUGIN_EP_CONFIG_JSON_FILE env var#27945

Merged
edgchen1 merged 3 commits intomainfrom
edgchen1/dynamic_plugin_ep_config_from_file
Apr 2, 2026
Merged

Add ORT_UNIT_TEST_MAIN_DYNAMIC_PLUGIN_EP_CONFIG_JSON_FILE env var#27945
edgchen1 merged 3 commits intomainfrom
edgchen1/dynamic_plugin_ep_config_from_file

Conversation

@edgchen1
Copy link
Copy Markdown
Contributor

@edgchen1 edgchen1 commented Apr 2, 2026

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.

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.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_FILE env 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::cerr are 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.

@edgchen1 edgchen1 merged commit 445dcff into main Apr 2, 2026
103 of 177 checks passed
@edgchen1 edgchen1 deleted the edgchen1/dynamic_plugin_ep_config_from_file branch April 2, 2026 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants