Skip to content

Commit 873993f

Browse files
Delete 'enable_lazy_split', since the flag is not used anywhere. The code paths for the above flag being false are retained and true are eliminated. This will ensure that improving batching will be easier.
PiperOrigin-RevId: 676159369
1 parent 26b9320 commit 873993f

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

tensorflow_serving/batching/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ cc_test(
117117
"//tensorflow_serving/core/test_util:test_main",
118118
"//tensorflow_serving/servables/tensorflow:serving_session",
119119
"//tensorflow_serving/test_util",
120+
"//testing/base/public:gunit",
120121
"@com_google_absl//absl/synchronization",
121122
"@org_tensorflow//tensorflow/cc/saved_model:loader",
122123
"@org_tensorflow//tensorflow/cc/saved_model:tag_constants",

tensorflow_serving/batching/batching_session_test.cc

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -250,14 +250,11 @@ TEST(BatchingSessionSignatureTest, TensorSignatureFromSignatureDefs) {
250250
UnorderedElementsAre("y0", "y1", "y3"));
251251
}
252252

253-
class BatchingSessionTest
254-
: public ::testing::TestWithParam<std::tuple<bool, bool>> {
253+
class BatchingSessionTest : public ::testing::TestWithParam<bool> {
255254
public:
256255
BatchingSessionTest() {}
257256

258-
bool enable_large_batch_splitting() const { return std::get<0>(GetParam()); }
259-
260-
bool enable_lazy_split() const { return std::get<1>(GetParam()); }
257+
bool enable_large_batch_splitting() const { return GetParam(); }
261258

262259
std::function<
263260
Status(std::unique_ptr<BatchingSessionTask>* input_task,
@@ -278,7 +275,6 @@ class BatchingSessionTest
278275
input_options;
279276
output_options.enable_large_batch_splitting =
280277
enable_large_batch_splitting();
281-
output_options.enable_lazy_split = enable_lazy_split();
282278
if (enable_large_batch_splitting()) {
283279
output_options.split_input_task_func = get_split_input_task_func();
284280
// Bump up the max batch size, and set execution batch size to the max
@@ -1104,14 +1100,7 @@ TEST_P(BatchingSessionTest, SubsetOutputTensors) {
11041100
}));
11051101
}
11061102

1107-
INSTANTIATE_TEST_SUITE_P(
1108-
Parameter, BatchingSessionTest,
1109-
::testing::Values(std::make_tuple(/*enable_input_batch_split=*/false,
1110-
/*enable_lazy_split=*/false),
1111-
std::make_tuple(/*enable_input_batch_split=*/true,
1112-
/*enable_lazy_split=*/false),
1113-
std::make_tuple(/*enable_input_batch_split=*/true,
1114-
/*enable_lazy_split=*/true)));
1103+
INSTANTIATE_TEST_SUITE_P(Parameter, BatchingSessionTest, ::testing::Bool());
11151104

11161105
} // namespace
11171106
} // namespace serving

0 commit comments

Comments
 (0)