Skip to content

Conversation

@fs-eire
Copy link
Contributor

@fs-eire fs-eire commented Jan 18, 2026

Description

move IO binding test to onnxruntime_provider_tests from onnxruntime_test_all

Motivation and Context

Currently, a few unit test cases are included in onnxruntime_test_all. This works well until we want to support WebGPU EP as a plugin EP.

The main differences between onnxruntime_test_all and onnxruntime_provider_tests is that the latter respects plugin EP configuration. The IO Binding test cases involve EP configuration (eg. "enableGraphCapture" for WebGPU) so it no longer works with WebGPU EP.

@fs-eire fs-eire force-pushed the fs-eire/move-io-binding-test branch from ff0bda7 to 06f9da7 Compare January 18, 2026 22:38
Copy link
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

This pull request moves IO binding test cases from onnxruntime_test_all to onnxruntime_provider_tests to support WebGPU EP as a plugin EP. The main rationale is that onnxruntime_provider_tests respects plugin EP configuration, which is necessary for WebGPU EP features like graph capture.

Changes:

  • Moved VerifyOutputs helper functions from inference_session_test.cc to framework_test_utils.h to make them reusable
  • Created new file io_binding_test.cc in test/providers/ containing all IO binding test cases
  • Removed IO binding tests and helper functions from inference_session_test.cc

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
onnxruntime/test/unittest_util/framework_test_utils.h Added gtest include and VerifyOutputs helper functions (templated and non-templated overloads) to support test utilities
onnxruntime/test/providers/io_binding_test.cc New file containing moved IO binding tests including CreateMatMulModel, RunModelWithBindingMatMul, TestBindHelper, and all related test cases
onnxruntime/test/framework/inference_session_test.cc Removed IO binding related functions and tests that were moved to the provider tests file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


st = session_object.Run(run_options, *io_binding.get());

std::cout << "Run returned status: " << st.ErrorMessage() << std::endl;
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

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

Missing include for iostream header. The code uses std::cout on this line but is not included in the file. This will cause a compilation error.

Copilot uses AI. Check for mistakes.
#include <iterator>
#include <thread>
#include <fstream>
#include <random>
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

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

Missing include for sstream header. The code uses std::stringstream but is not included in the file. This will cause a compilation error.

Suggested change
#include <random>
#include <random>
#include <sstream>

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants