Skip to content

Commit 3fc2e9b

Browse files
bmehta001Copilot
andcommitted
Restrict GatherND valid-index-zero test to CPU EP only
Other EPs may not support 1D GatherND with scalar output, causing test failures unrelated to the sentinel-value fix. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 6847568 commit 3fc2e9b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

onnxruntime/test/providers/cpu/tensor/gather_nd_op_test.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,10 @@ TEST(GatherNDOpTest, GatherND_valid_index_zero) {
405405
test.AddInput<int64_t>("indices", {1}, {0});
406406
test.AddOutput<int32_t>("output", {}, {10});
407407

408-
test.Run();
408+
// Restrict to CPU — other EPs may not support this 1D configuration.
409+
std::vector<std::unique_ptr<onnxruntime::IExecutionProvider>> cpu_only_ep;
410+
cpu_only_ep.push_back(DefaultCpuExecutionProvider());
411+
test.Run(OpTester::ExpectResult::kExpectSuccess, "", {}, nullptr, &cpu_only_ep);
409412
}
410413

411414
} // namespace test

0 commit comments

Comments
 (0)