diff --git a/tensorflow_serving/servables/tensorflow/bundle_factory_util_test.cc b/tensorflow_serving/servables/tensorflow/bundle_factory_util_test.cc index 21c9d2c1059..7cc4eaf8360 100644 --- a/tensorflow_serving/servables/tensorflow/bundle_factory_util_test.cc +++ b/tensorflow_serving/servables/tensorflow/bundle_factory_util_test.cc @@ -150,7 +150,7 @@ TEST_F(BundleFactoryUtilTest, EstimateResourceFromPathWithGoodExport) { void BM_HalfPlusTwo(benchmark::State& state) { static Session* session; - if (state.thread_index == 0) { + if (state.thread_index() == 0) { SavedModelBundle bundle; TF_ASSERT_OK(LoadSavedModel(SessionOptions(), RunOptions(), test_util::GetTestSavedModelPath(), {"serve"}, diff --git a/tensorflow_serving/servables/tensorflow/tflite_session_test.cc b/tensorflow_serving/servables/tensorflow/tflite_session_test.cc index 265b2eaf118..51d534f0e40 100644 --- a/tensorflow_serving/servables/tensorflow/tflite_session_test.cc +++ b/tensorflow_serving/servables/tensorflow/tflite_session_test.cc @@ -813,7 +813,7 @@ TEST(TfLiteSession, TestSetScheduler) { static void BM_Reshape(benchmark::State& state, bool use_flex_op) { static TfLiteSession* session; - if (state.thread_index == 0) { + if (state.thread_index() == 0) { auto model_signature_def_map = GetTestSignatureDefMap(); string model_bytes = BuildTestModel(tflite::TensorType_INT32, use_flex_op, &model_signature_def_map); @@ -848,7 +848,7 @@ BENCHMARK(BM_Reshape_Flex)->UseRealTime()->ThreadRange(1, 64); void BM_HalfPlusTwo(benchmark::State& state) { static TfLiteSession* session; - if (state.thread_index == 0) { + if (state.thread_index() == 0) { string model_bytes; TF_ASSERT_OK(ReadFileToString( Env::Default(), test_util::TestSrcDirPath(kTestModel), &model_bytes)); @@ -871,7 +871,7 @@ BENCHMARK(BM_HalfPlusTwo)->UseRealTime()->ThreadRange(1, 64); void BM_MobileNet(benchmark::State& state) { static TfLiteSession* session; - if (state.thread_index == 0) { + if (state.thread_index() == 0) { string model_bytes; TF_ASSERT_OK(ReadFileToString(Env::Default(), test_util::TestSrcDirPath(kMobileNetModel), @@ -897,7 +897,7 @@ BENCHMARK(BM_MobileNet)->UseRealTime()->ThreadRange(1, 64); void BM_ParseExample(benchmark::State& state) { static TfLiteSession* session; - if (state.thread_index == 0) { + if (state.thread_index() == 0) { string model_bytes; TF_ASSERT_OK(ReadFileToString(Env::Default(), test_util::TestSrcDirPath(kParseExampleModel),