Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 24, 2025

  • Rebased on latest main branch
  • Fix skiplayernorm_op_test.cc: Move CPU EP to be added after WebGPU EP
  • Fix gather_op_test.cc: Move CPU EP to be added after CUDA EP (4 test cases)

Summary

When BaseTester::ConfigEps() is called with multiple EPs, it does not run the test for all EPs - it runs the test for the first available EP for the given operator. Therefore, when using ConfigEps() with multiple EPs, CPU EP must be added last, otherwise other EPs won't be tested.

This PR fixes the following files:

  • skiplayernorm_op_test.cc: Moved CPU EP to be added after WebGPU EP, so WebGPU EP gets tested first
  • gather_op_test.cc: Moved CPU EP to be added after CUDA EP in all 4 ShrunkenGather test cases, so CUDA EP gets tested first

Note: matmul_2bits_test.cc already has the correct ordering (WebGPU EP before CPU EP) in the latest main branch.

Original prompt

I found the current code base may contain multiple places where the following bug occurs:

When BaseTester::ConfigEps() is called with multiple EPs, it does not mean to run the test for all EPs; it means to run the first available EP for the given operator. So, when we use ConfigEps() we have to put CPU EP as the last item, otherwise the other EP won't be tested.

onnxruntime\test\contrib_ops\matmul_2bits_test.cc, for example, does not follow this, so the test case is actually not tested for WebGPU EP.

I need your help to search the code base and find all potential bugs with using of BaseTester::ConfigEps() - if the list contains multiple EPs, ensure CPU EP is the last one

Make a PR for the changes.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

When BaseTester::ConfigEps() is called with multiple EPs, it runs the
first available EP for the given operator. CPU EP should be added last
to ensure other EPs get tested first.

Files fixed:
- matmul_2bits_test.cc: Move CPU EP after WebGPU EP
- skiplayernorm_op_test.cc: Move CPU EP after WebGPU EP
- gather_op_test.cc: Move CPU EP after CUDA EP (4 test cases)

Co-authored-by: fs-eire <7679871+fs-eire@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix ordering of EPs in BaseTester::ConfigEps implementation Fix ConfigEps execution provider ordering in test files Dec 24, 2025
Copilot AI requested a review from fs-eire December 24, 2025 20:49
@fs-eire
Copy link
Contributor

fs-eire commented Dec 24, 2025

/azp run Linux QNN CI Pipeline, Win_TRT_Minimal_CUDA_Test_CI, Windows ARM64 QNN CI Pipeline, Windows GPU Doc Gen CI Pipeline

@azure-pipelines
Copy link

Azure Pipelines successfully started running 4 pipeline(s).

qjia7 added a commit that referenced this pull request Dec 30, 2025
@fs-eire
Copy link
Contributor

fs-eire commented Dec 30, 2025

@copilot please update the PR to latest main branch

Co-authored-by: fs-eire <7679871+fs-eire@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 30, 2025

@copilot please update the PR to latest main branch

Updated the PR to the latest main branch in commit df7bf78. Resolved a merge conflict in matmul_2bits_test.cc where main added a conditional check for has_zero_point - kept both the new condition and the fix to ensure CPU EP is added last.

@fs-eire
Copy link
Contributor

fs-eire commented Dec 31, 2025

@copilot please redo this change based on latest main branch.

Copy link
Contributor Author

Copilot AI commented Dec 31, 2025

@copilot please redo this change based on latest main branch.

Rebased the PR on the latest main branch (commit 94e7a1c) and applied fixes to skiplayernorm_op_test.cc and gather_op_test.cc. Note that matmul_2bits_test.cc already has the correct ordering in the latest main branch. The changes are in local commit f733c41, being pushed to the PR branch.

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