Skip to content

Commit

Permalink
Fix BeamSearch T5 if initializers are on outer scope (microsoft#23044)
Browse files Browse the repository at this point in the history
### Description
This PR adds the logic needed to consider only the needed implicit
inputs on BeamSearch op in case of T5 model (encoder/decoder, 2 graphs).
The logic added is similar to what happens in the _If_ kernel setup.


### Motivation and Context
Fixes microsoft#23043
  • Loading branch information
amancini-N authored and ankitm3k committed Dec 11, 2024
1 parent 8dd8bc5 commit 1354f34
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions onnxruntime/test/contrib_ops/beam_search_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -424,19 +424,5 @@ TEST(BeamSearchTest, DummyT5WithOuterScopeInitializers) {
tester.RunWithConfig();
}

TEST(BeamSearchTest, DummyT5WithSequenceInputIds) {
#if defined(USE_CUDA) && defined(USE_DML)
SKIP_CUDA_TEST_WITH_DML;
#endif
ModelTester tester(CurrentTestName(), ORT_TSTR("testdata/dummy_t5_with_sequence_input_ids.onnx"));
tester.ConfigEp(DefaultCpuExecutionProvider());
tester.AddInput("encoder_input_ids", {1, 5}, {16, 17, 1, 0, 8});
tester.AddOutput("sequences", {1, 3, 10}, {2, 19, 18, 3, 8, 8, 8, 8, 8, 8, 2, 19, 18, 3, 10, 19, 18, 3, 8, 8, 2, 19, 18, 15, 13, 13, 13, 13, 13, 13});
#ifdef USE_CUDA
tester.ConfigEp(DefaultCudaExecutionProvider());
#endif
tester.RunWithConfig();
}

} // namespace test
} // namespace onnxruntime

0 comments on commit 1354f34

Please sign in to comment.